syncpack
syncpack copied to clipboard
Setting workspace depencyType throws uncaught runtime error
Description
hi @JamieMason after https://github.com/JamieMason/syncpack/commit/2d1bf059a239dff3af203104491a315b894b8796#diff-c58dda308b363b6022c8a03f2d4ae8fd387425eb7a733f166bfd7d93d68ef11fL12
I am getting uncaught TypeError in a yarn workspace codebase
dependencies @org/package ^0.1.1
workspace @org/package ^0.1.1
~/node_modules/syncpack/dist/bin-set-semver-ranges/set-semver-ranges.js:18
root[dependencyType][name] = nextVersion;
^
Can you edit your local install at node_modules/syncpack/dist/bin-set-semver-ranges/set-semver-ranges.js to include this log, run syncpack again, then share the output?
+ console.log(
+ require('util').inspect(
+ { input, dependencyType, name, version, wrapper },
+ false,
+ null,
+ true,
+ ),
+ );
root[dependencyType][name] = nextVersion;
Sorry I can't just dump outputs at the moment, cause it contains private codebase data. I will try to make a reproducible example later this week. Meanwhile maybe it might help, we enforce explicit dependencies for packages, so they also have workspace packages listed in package.json (I assume thats why same package is logged twice in my initial message)
That's understandable, no worries. If you can make a repro that would be great, at the moment I don't have enough to work with to know what it could be.
Hey, here is the repro https://stackblitz.com/edit/github-nztxhj-ks9wvj?file=package.json
Released in 8.3.8, thanks a lot.