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.
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 formajor.minor
. It also doesn't accept requests formajor.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 tomajor.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
Committer
In most cases, this should be a different person than the contributor.