Skip to content

Commit a2c80e5

Browse files
Cap comment-parser below 1.4.2
`comment-parser` 1.4.2 changed how it tokenizes a tag body, so the `{…}` metadata that `script/info.js` reads from the line after each `@example` is now captured as the tag type instead of staying in the description. `JSON.parse` then receives an empty string and throws, which breaks `generate` and `test-api` on a fresh install, as the range was `^1.0.0` with no lockfile to hold an older resolution. Constrain the range to `<1.4.2` so installs keep a release that leaves the metadata in the description, until `info.js` is taught to parse examples with an explicit tokenizer that does not treat `{…}` as a type.
1 parent afa793b commit a2c80e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@ungap/structured-clone": "^1.0.0",
3737
"@wooorm/starry-night": "^3.0.0",
3838
"c8": "^10.0.0",
39-
"comment-parser": "^1.0.0",
39+
"comment-parser": "^1.0.0 <1.4.2",
4040
"control-pictures": "^2.0.0",
4141
"estree-util-is-identifier-name": "^3.0.0",
4242
"estree-util-visit": "^2.0.0",

0 commit comments

Comments
 (0)