Skip to content

chore: fix update-specs script, use builtin fetch#3528

Merged
UziTech merged 1 commit intomarkedjs:masterfrom
SpencerWhitehead7:fix-update-specs-script
Nov 9, 2024
Merged

chore: fix update-specs script, use builtin fetch#3528
UziTech merged 1 commit intomarkedjs:masterfrom
SpencerWhitehead7:fix-update-specs-script

Conversation

@SpencerWhitehead7
Copy link
Contributor

Description

Fixes the update specs script being broken, removes unnecessary dependency

In master, when you run update specs, it fails to update commonmark specs.

This is because the place it pulls from, https://spec.commonmark.org/<version>/spec.json seems like it doesn't accept versions numbers without a patch anymore, and the current script sends a request for major.minor. It also doesn't accept requests for major.minor.0, or, as far as I could tell, anything except the current version. Therefore, we can just use the version from commonmark's package.json instead of lowering it to major.minor.

This does mean the resulting spec file gets renamed, but I think having the full version is better if we're actually pulling from the full version.

The script was also using node-fetch, but fetch has existed natively in node since (I think) node 18 so it's within marked's support window.

-->

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link

vercel bot commented Nov 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 9, 2024 3:33pm

Copy link
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 💯

@UziTech UziTech merged commit bd22323 into markedjs:master Nov 9, 2024
@SpencerWhitehead7 SpencerWhitehead7 deleted the fix-update-specs-script branch February 23, 2025 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants