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
question(groups): help with configuring versionGroups #209
Comments
I meant the reverse of this. If the |
Here's an example of the output when the bad
And when it's present:
I thought it was strange that the
When it's working properly and:
When it's not. |
Can you share your full config file or ideally share a reproduction that includes the package.json files? |
Sure thing! Here's the config file for now - I'll try to get a sandbox up and running to reproduce: // @ts-check
/** @type {import("syncpack").RcFile} */
const config = {
semverGroups: [
{
range: '',
dependencyTypes: ['dev', 'prod', 'overrides', 'resolutions'],
},
{
range: '^',
dependencyTypes: ['peer'],
},
],
source: [
'package.json',
'apps/*/package.json',
'config/*/package.json',
'lib/*/package.json',
'templates/*/package.json',
],
sortAz: ['contributors', 'dependencies', 'devDependencies', 'keywords', 'peerDependencies', 'resolutions', 'scripts'],
sortFirst: ['name', 'description', 'version', 'author', 'type', 'sideEffects'],
versionGroups: [
{
label: 'Use workspace protocol when developing local packages',
dependencies: ['$LOCAL'],
dependencyTypes: ['!local'],
pinVersion: 'workspace:*',
},
{
dependencies: ['@types/**'],
dependencyTypes: ['!dev'],
isBanned: true,
label: '@types packages should only be under devDependencies',
},
{
label: 'All Remix dependencies use versions the @myorg/remix package is using',
dependencies: ['@remix-run/!(eslint-config)'],
dependencyTypes: ['**'],
snapTo: ['@myorg/remix'],
},
],
}
module.exports = config |
Nothing obvious stands out, my only theory is that maybe the |
Description
I have a package
@myorg/remix
where we keep common Remix utilities. It haspeerDependencies
set as follows:I upgraded our repro to
@remix-run/**@2.9.0
today, but thepeerDependencies
above were not updated and I left them that way. I expected syncpack to clue me in on it, but it didn't... So after some digging, I found that if I don't have this entry in myversionGroups
:Then the 'Default Version Group' fails as expected. The moment I added it back, that group passes.
I've been looking through the code to try to figure out what's happening, but the Effect stuff is a little mind-melting and it's going to take me some time to make heads or tails of this. :)
Suggested Solution
None yet.
Help Needed
I would like to make a rule that makes sure
@myorg/remix
is the source of truth for all other packages when it comes to versions of@remix-run/**
packages, with the exception of@remix-run/eslint-config
. I thought snapTo was the right thing to use here, but it seems it's acting a bit wonky for me. Maybe I'm using it wrong?The text was updated successfully, but these errors were encountered: