Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 9, 2024

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.

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
8 checks passed
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