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
In the monorepo I work in, there are a large number of package.json files configured using (yarn, soon pnpm) workspaces, and then some few additional package.json files that don't participate in the monorepo for one reason or another. It'd be nice to have a way to include these additional package.json files in the source configuration, without losing the ability to include automatically discovered package.json files from the workspaces configuration.
In other words, where the documentation says:
package.json files are resolved in this order of precedence:
If using Pnpm, read packages from ./pnpm-workspace.yaml.
Default to 'package.json' and 'packages/*/package.json'.
I'd like a way to use 2-4, while adding some additional package.json files to the sources.
Suggested Solution
Maybe there could be some pre-defined values that can be provided when using globs (1 in the above list), to also merge in the values from 2, 3, 4? MIght cause conflicts with real directories though... I don't know exactly what configuration format to use here
Thanks for the amazing tool!
The text was updated successfully, but these errors were encountered:
Define no sources and syncpack will discover them from known package manager configs (first one wins).
Define sources and syncpack will only use those.
This issue can track adding some way to combine both.
In the meantime you'd need to manually duplicate the sources.
In some cases you could import './package.json' into a JS syncpack config file to reference the workspace config from there, but for pnpm projects that wouldn't be a straightforward option since its config is yaml.
Description
In the monorepo I work in, there are a large number of package.json files configured using (yarn, soon pnpm) workspaces, and then some few additional package.json files that don't participate in the monorepo for one reason or another. It'd be nice to have a way to include these additional package.json files in the
source
configuration, without losing the ability to include automatically discovered package.json files from the workspaces configuration.In other words, where the documentation says:
I'd like a way to use 2-4, while adding some additional package.json files to the sources.
Suggested Solution
Maybe there could be some pre-defined values that can be provided when using globs (1 in the above list), to also merge in the values from 2, 3, 4? MIght cause conflicts with real directories though... I don't know exactly what configuration format to use here
Thanks for the amazing tool!
The text was updated successfully, but these errors were encountered: