-
Notifications
You must be signed in to change notification settings - Fork 87
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
latest [email protected]
doesn't work well with meow@10
(from latest stylelint
v15.10.1)
#260
Comments
This has been slowly getting 👍🏼s and it's been a month, any update? |
😬😬😬 |
Any updates here? Thanks |
For those who's waiting for this fix, for time being you can bypass this with explicit deps overriding. With yarn: "resolutions": {
"meow": "^9.0.0"
} With npm it's |
Any updates? Stylelint 16 is using |
same issue,how to resolve |
same issue,how to resolve? |
You can patch vite-plugin-checker, in order to make it compatible with newer versions of meow: diff --git a/node_modules/vite-plugin-checker/dist/esm/checkers/stylelint/options.js b/node_modules/vite-plugin-checker/dist/esm/checkers/stylelint/options.js
index 1fa4fb8..4788fcb 100644
--- a/node_modules/vite-plugin-checker/dist/esm/checkers/stylelint/options.js
+++ b/node_modules/vite-plugin-checker/dist/esm/checkers/stylelint/options.js
@@ -5,6 +5,7 @@ const translateOptions = async (command) => {
const result = meow({
autoHelp: false,
autoVersion: false,
+ importMeta: import.meta,
help: `
Usage: stylelint [input] [options]
Input: Files(s), glob(s), or nothing to use stdin.
@@ -90,7 +91,7 @@ const translateOptions = async (command) => {
`,
flags: {
allowEmptyInput: {
- alias: "aei",
+ shortFlag: "aei",
type: "boolean"
},
cache: {
@@ -118,60 +119,60 @@ const translateOptions = async (command) => {
type: "string"
},
disableDefaultIgnores: {
- alias: "di",
+ shortFlag: "di",
type: "boolean"
},
fix: {
type: "boolean"
},
formatter: {
- alias: "f",
+ shortFlag: "f",
default: "string",
type: "string"
},
help: {
- alias: "h",
+ shortFlag: "h",
type: "boolean"
},
ignoreDisables: {
- alias: "id",
+ shortFlag: "id",
type: "boolean"
},
ignorePath: {
- alias: "i",
+ shortFlag: "i",
type: "string",
isMultiple: true
},
ignorePattern: {
- alias: "ip",
+ shortFlag: "ip",
type: "string",
isMultiple: true
},
maxWarnings: {
- alias: "mw",
+ shortFlag: "mw",
type: "number"
},
outputFile: {
- alias: "o",
+ shortFlag: "o",
type: "string"
},
printConfig: {
type: "boolean"
},
quiet: {
- alias: "q",
+ shortFlag: "q",
type: "boolean"
},
reportDescriptionlessDisables: {
- alias: "rdd",
+ shortFlag: "rdd",
type: "boolean"
},
reportInvalidScopeDisables: {
- alias: "risd",
+ shortFlag: "risd",
type: "boolean"
},
reportNeedlessDisables: {
- alias: "rd",
+ shortFlag: "rd",
type: "boolean"
},
stdin: {
@@ -181,11 +182,11 @@ const translateOptions = async (command) => {
type: "string"
},
version: {
- alias: "v",
+ shortFlag: "v",
type: "boolean"
},
globbyOptions: {
- alias: "go",
+ shortFlag: "go",
type: "string"
}
}, |
Describe the bug
The latest Stylelint v15.10.1 now uses
meow@^10
, updating to that version to remove a recently announcedsemver
vulnerability from the dependency tree.However, using
meow@10
with the latestvite-plugin-checker
generates errors for me when trying to build with Vite:It seems likely to me that the reason is because the breaking changes to
meow@10
are that the package is fully ESM now:https://github.com/sindresorhus/meow/releases/tag/v10.0.0
Using
meow@9
doesn't generate this error for me.Reproduction
See minimal repro at this repo: https://github.com/tryforceful/poc--20230714-meow-vite-plugin-checker
Try to build that package with
pnpm i; pnpm dev
and it will generate the above error.If you comment out these lines in the
vite.config.js
which enable vite-plugin-checker:the error also goes away, showing that vite-plugin-checker is having difficulty using the implicit dependency
meow@10
from stylelint.Note that running
stylelint
alone in this repo also works fine.Expected behavior
I expect no error when running
pnpm dev
while using the latestvite-plugin-checker
andstylelint
(v15.10.1)System Info
System: OS: macOS 12.6.3 CPU: (10) arm64 Apple M1 Pro Memory: 245.20 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 20.2.0 - /usr/local/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.6.6 - /usr/local/bin/npm pnpm: 8.6.7 - /opt/homebrew/bin/pnpm Browsers: Chrome: 114.0.5735.198 Safari: 15.6.1 npmPackages: vite-plugin-checker: 0.6.1 => 0.6.1
Additional context
See #255 where upgrading
meow
is also being requestedValidations
The text was updated successfully, but these errors were encountered: