Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork66
Consistent dependency versions in large JavaScript Monorepos.
License
JamieMason/syncpack
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Consistent dependency versions in large JavaScript Monorepos.
https://jamiemason.github.io/syncpack
Note
This is the README for v14-alpha, a Rust rewrite which is due to replacev13.x.x
npm install --save-dev syncpack@alpha
All command line options can be combined to target packages and dependencies in multiple ways.
Ensure that multiple packages requiring the same dependency define the same version, so that every package requires eg.react@17.0.2, instead of a combination ofreact@17.0.2,react@16.8.3, andreact@16.14.0.
# Find all issues in "dependencies" or "devDependencies"syncpack lint --dependency-types prod,dev# Only lint issues in "react" specificallysyncpack lint --dependencies react# Look for issues in dependencies containing "react" in the namesyncpack lint --dependencies'**react**'# Find issues in scoped packages onlysyncpack lint --dependencies'@types/**'# Find issues everywhere except "peerDependencies"syncpack lint --dependency-types'!peer'# Only look for issues where an exact version is used (eg "1.2.3")syncpack lint --specifier-types exact# Sort dependencies by how many times they are usedsyncpack lint --sort count# See more examplessyncpack lint --help# See a short summary of optionssyncpack lint -h
Fix every autofixable issue found bysyncpack lint.
# Only fix issues in dependencies and devDependenciessyncpack fix --dependency-types prod,dev# Only fix inconsistencies with exact versions (eg "1.2.3")syncpack fix --specifier-types exact# Only fix issues in "react" specificallysyncpack fix --dependencies react# See more examplessyncpack fix --help# See a short summary of optionssyncpack fix -h
Update packages to the latest versions from the npm registry, wherever they are in your monorepo.
Semver range preferences are preserved when updating.
# Accept any update in latest (x.x.x)syncpack update --target latest# Only update minor versions (1.x.x)syncpack update --target minor# Only update patch versions (1.2.x)syncpack update --target patch# Check for outdated dependencies in one packagesyncpack update --check --source'packages/pingu/package.json'# Update dependencies and devDependencies in the whole monoreposyncpack update --dependency-types dev,prod# Only update dependencies with a semver range specifier (^, ~, etc.)syncpack update --specifier-types range# Update dependencies where name exactly matches 'react'syncpack update --dependencies'react'# Update dependencies where name contains 'react'syncpack update --dependencies'**react**'# Update dependencies with the '@aws-sdk' scopesyncpack update --dependencies'@aws-sdk/**'# See more examplessyncpack update --help# See a short summary of optionssyncpack update -h
Organise package.json files according to a conventional format, where fields appear in a predictable order and nested fields are ordered alphabetically. Shorthand properties are used where available, such as the"repository" and"bugs" fields.
# Fix every formatting issue in the monoreposyncpack format# List all formatting issues in the monoreposyncpack format --check# Check the formatting of one packagesyncpack format --check --source'packages/pingu/package.json'# See more examplessyncpack format --help# See a short summary of optionssyncpack format -h
Query and inspect all dependencies in your project, both valid and invalid.
# Sort dependencies by how many times they are usedsyncpack list --sort count# Show every instance of each dependency, not just their namessyncpack list --show instances# Show dependencies ignored in your syncpack configsyncpack list --show ignored# Show highest level of detailsyncpack list --show all# Choose only some valuessyncpack list --show hints,statuses# List all "peerDependencies"syncpack list --dependency-types peer# List all types packagessyncpack list --dependencies'@types/**'# List instances of an exact version being used as a peer dependencysyncpack list --specifier-types exact --show instances --dependency-types peer# See more examplessyncpack list --help# See a short summary of optionssyncpack list -h
Output the state of every instance of every dependency as a JSON object, one per line. This command is best used with tools likejq for filtering and processing.
# Output all dependencies as JSONsyncpack json# Output only AWS SDK dependenciessyncpack json --dependencies'@aws-sdk/**'# Count dependencies by typesyncpack json| jq -r'.dependencyType'| sort| uniq -c# See more examplessyncpack json --help# See a short summary of optionssyncpack json -h
About
Consistent dependency versions in large JavaScript Monorepos.
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.