You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd really like the ability to prevent having a dependency in a monorepo package that's already defined at the root.
Say I have jest defined in ./package.json, syncpack could be configured to disallow ./apps/my-app/package.json having that dependency too.
Suggested Solution
Honestly I have no idea how you'd want to configure this. I'm happy with something as simple as the above, but I'm sure others would love to customise it further for their own needs.
Help Needed
The ability to produce a sweet ass config interface.
The text was updated successfully, but these errors were encountered:
I missed this one @midzdotdev, slowwww reply here. It's a good idea, I'm not sure yet on what the config should be but I'll have a think.
EDIT: Maybe for something like this it's some kind of general lint rule rather than being a form of version group or something, not sure.
JamieMason
changed the title
Feature Request: Disallow redefining dependencies already defined in the root
feat(config): disallow redefining dependencies already defined in the root
Feb 10, 2025
It's very bespoke but one thing you could do today is this in a JS config file:
constrootPackage=require("./package.json");module.exports={versionGroups: [{// 1. whenever these dependencies from the root package are founddependencies: Object.keys({
...rootPackage.dependencies,
...rootPackage.devDependencies,// add more if you need to}),// 2. ...but they are NOT in the root packagepackages: [`!${rootPackage.name}`],// 3. ban themisBanned: true,},],};
Description
I'd really like the ability to prevent having a dependency in a monorepo package that's already defined at the root.
Say I have
jest
defined in./package.json
, syncpack could be configured to disallow./apps/my-app/package.json
having that dependency too.Suggested Solution
Honestly I have no idea how you'd want to configure this. I'm happy with something as simple as the above, but I'm sure others would love to customise it further for their own needs.
Help Needed
The ability to produce a sweet ass config interface.
The text was updated successfully, but these errors were encountered: