Security fix for semver vulnerability#7043
Conversation
🦋 Changeset detectedLatest commit: 685c37f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Let's lead with the security fix. We can manually add a changeset entry for the windows 10 regression. |
semver vulnerability
Not sure. In the past, for intermittent platform-specific issues we've just waited for users to verify it's working after release. Particularly when the issue was patched in one of our dependencies. |
…endency--ambitious-chihuahua-db1b479643
…endency--ambitious-chihuahua-db1b479643
ybiquitous
left a comment
There was a problem hiding this comment.
@romainmenke I don't realize this solution! Thanks!
I still have two concerns:
meowrequires Node.js >=14.16. Is this a breaking change? That is, should we updateengines.nodeto^14.18.0 || >= 16.0.0?
$ npm view meow@11.0.0 engines
{ node: '>=14.16' }
$ npx ls-engines@latest
...
┌───────────────────────────────────┬───────────────────────────┐
│ package engines: │ dependency graph engines: │
├───────────────────────────────────┼───────────────────────────┤
│ "engines": { │ "engines": { │
│ "node": "^14.13.1 || >= 16.0.0" │ "node": ">= 14.18" │
│ } │ } │
└───────────────────────────────────┴───────────────────────────┘
...- People will not be able to
require "stylelint/lib/cli.js". Should this be acceptable? I guess there may be few people who need such a CJS way... 🤔
If we revert #7020, it should be |
That's a shame. It is breaking (although probably for only a handful of users). No easier answer here. Major releases are painful for plugin authors, so we only do it once a year. Shall we move this change to
I believe so, as it's not part of our public API. |
Version 10 also resolves the security issue. I will look into this shortly :) |
I agree but it needs to be at least version 10.1.0. |
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
| ) | ||
| + // @ts-expect-error | ||
| : Key extends keyof WithStringKeys<BaseType> | ||
| + // @ts-expect-error | ||
| ? WithStringKeys<BaseType>[Key] |
There was a problem hiding this comment.
The types were incorrect at this version, but that doesn't affect the runtime of the cli.
|
I also agree with updating to For your information: $ npm view meow@^10.1.0 engines
meow@10.1.0 { node: '>=12.17' }
meow@10.1.1 { node: '>=12.17' }
meow@10.1.2 { node: '^12.20.0 || ^14.13.1 || >=16.0.0' }
meow@10.1.3 { node: '^12.20.0 || ^14.13.1 || >=16.0.0' }
meow@10.1.4 { node: '^12.20.0 || ^14.13.1 || >=16.0.0' }
meow@10.1.5 { node: '^12.20.0 || ^14.13.1 || >=16.0.0' }Perhaps, it may be better to update the latest version of - "meow": "^10.1.0",
+ "meow": "^10.1.5", |
|
In addition, here's a result of $ npx ls-engines@latest
...
┌───────────────────────────────────┬───────────────────────────┐
│ package engines: │ dependency graph engines: │
├───────────────────────────────────┼───────────────────────────┤
│ "engines": { │ "engines": { │
│ "node": "^14.13.1 || >= 16.0.0" │ "node": ">= 14.18" │
│ } │ } │
└───────────────────────────────────┴───────────────────────────┘
...
Your “engines” field does not exactly match your dependency graph‘s requirements!
...
|
ybiquitous
left a comment
There was a problem hiding this comment.
Thank you for the excellent fix. LGTM 👍🏼
| "stylelint": patch | ||
| --- | ||
|
|
||
| Security: fix for `semver` vulnerability |
There was a problem hiding this comment.
[note] Our maintainer guide now doesn't mention the Security: prefix. This doesn't block this PR, but I'm a bit curious. 😅
stylelint/docs/maintainer-guide/pull-requests.md
Lines 22 to 23 in a42f955
There was a problem hiding this comment.
It's an oversight. It should list all the ones from https://keepachangelog.com/en/1.0.0/. I'll open a PR.
|
I think this PR needs one more approvement. |
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Seems to be because of "node_modules/supports-hyperlinks": {
"version": "3.0.0",
// ...
"engines": {
"node": ">=14.18"
}
},Luckily not a sub dependency of |
Closes #5042
Closes #7040
Not sure how to describe this change within the conventions of the project.
Suggestions welcome.
How do we verify that #5042 is fixed?
Comments within that issue describe that updating
meowis the solution, but it would be nice to verify this and to have a test that prevents regressions.#7040 :