-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
devDependency with non semVer value silently fails #140
Comments
I should add that this also happens when there's similar Also a workaround is to {
"semverGroups": [
{
"packages": [
"**"
],
"dependencies": [
"@changesets/cli"
],
"isIgnored": true
}
]
} |
Note that the syntax for resolutions has to include the {
"semverGroups": [
{
"types": [
"resolutions"
],
"packages": [
"**"
],
"dependencies": [
"@changesets/cli@^2.26.0"
],
"isIgnored": true
},
{
"packages": [
"**"
],
"dependencies": [
"@changesets/cli"
],
"isIgnored": true
}
]
} |
Oh. There is a much simpler reproducer! In an empty folder with this {
"devDependencies": {
"a": "b"
}
} Running $ SYNCPACK_VERBOSE=true npx syncpack lint ~/dev/workshop/iios-syncpack
? readConfigFileSync( undefined )
? no config file found
? readFileSync( ...syncpack/package.json )
? readYamlFileSync( ...syncpack/pnpm-workspace.yaml )
? readFileSync(...syncpack/lerna.json )
? globSync( package.json )
? globSync( packages/*/package.json )
? Error: "glob" did not match "packages/*/package.json":
at /.npm/_npx/be9d1b14e10e64b8/node_modules/tightrope/cjs/result/filter.js:12:23
at /.npm/_npx/be9d1b14e10e64b8/node_modules/tightrope/cjs/result/lib/with-catch.js:9:20
at curriedFn (/.npm/_npx/be9d1b14e10e64b8/node_modules/tightrope/cjs/fn/curry.js:7:20)
at /.npm/_npx/be9d1b14e10e64b8/node_modules/tightrope/cjs/fn/pipe.js:5:36
at Array.reduce (<anonymous>)
at pipe (/.npm/_npx/be9d1b14e10e64b8/node_modules/tightrope/cjs/fn/pipe.js:5:16)
at resolvePattern (/.npm/_npx/be9d1b14e10e64b8/node_modules/syncpack/dist/get-package-json-files/get-file-paths.js:26:36)
at /.npm/_npx/be9d1b14e10e64b8/node_modules/syncpack/dist/lib/$R.js:18:32
at /.npm/_npx/be9d1b14e10e64b8/node_modules/tightrope/cjs/fn/pipe.js:5:36
at Array.reduce (<anonymous>)
? readFileSync( /...syncpack/package.json )
? add a@b to dev:versionsByName package.json
? add a@b to dev:versionsByName package.json
? exit( 1 ) |
I need to improve the output messaging to make it clearer what is happening (#132) but you should only get an exit Since v10 syncpack will error on versions it considers invalid, but the messaging needs to improve to help understand and fix them. Downgrading to v9 should hopefully avoid this for now as it doesn't have this strictness. |
Released in 10.6.1. Any problems, please let me know. If you find syncpack useful, please star the project or help us spread the word to other Developers. |
Thank you, just tested it and it's a great improvement. I starred the repo too ⭐ |
Great 👍 |
Update: 12.0.0-alpha.0 adds better support for non-semver version formats and there is a new Getting Started guide. The output when there are errors should also be more detailed now too. |
Description
I have this line in my
package.json
:With it,
syncpack lint
fails silently (retuning exit code1
), not showing anything sketchy even withSYNCPACK_VERBOSE-true
When removing it, everything works again. Note that I'm using yarn
4.0.0-rc.45
in case there's been some changes in thepatch:
protocol...Update
Any non semVer value seems to fail:
The text was updated successfully, but these errors were encountered: