syncpack 14.0.0-alpha.10 → 14.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +114 -20
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,54 +1,148 @@
1
1
  # syncpack
2
2
 
3
3
  <p align="center">
4
- <img src="https://jamiemason.github.io/syncpack/logo.svg" width="200" height="179" alt="">
4
+ <img src="https://jamiemason.github.io/syncpack/logo.svg" width="134" height="120" alt="">
5
5
  <br>Consistent dependency versions in large JavaScript Monorepos.
6
6
  <br><a href="https://jamiemason.github.io/syncpack">https://jamiemason.github.io/syncpack</a>
7
7
  </p>
8
8
 
9
+ > [!NOTE]
10
+ > This is the README for v14-alpha, a Rust rewrite which is due to replace [`v13.x.x`](https://github.com/JamieMason/syncpack/tree/13.x.x?tab=readme-ov-file#syncpack)
11
+
9
12
  ## Installation
10
13
 
11
14
  ```bash
12
- npm install --save-dev syncpack
15
+ npm install --save-dev syncpack@alpha
13
16
  ```
14
17
 
15
18
  ## Commands
16
19
 
17
- ### [fix-mismatches](https://jamiemason.github.io/syncpack/command/fix-mismatches)
20
+ > All command line options can be combined to target packages and dependencies in multiple ways.
18
21
 
19
- Ensure that multiple packages requiring the same dependency define the same version, so that every package requires eg. `react@16.4.2`, instead of a combination of `react@16.4.2`, `react@0.15.9`, and `react@16.0.0`.
22
+ ### [lint](https://jamiemason.github.io/syncpack/command/lint)
20
23
 
21
- ### [format](https://jamiemason.github.io/syncpack/command/format)
24
+ 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 of `react@17.0.2`, `react@16.8.3`, and `react@16.14.0`.
22
25
 
23
- 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.
26
+ #### Examples
24
27
 
25
- ### [lint](https://jamiemason.github.io/syncpack/command/lint)
28
+ ```bash
29
+ # Find all issues in "dependencies" or "devDependencies"
30
+ syncpack lint --dependency-types prod,dev
31
+ # Only lint issues in "react" specifically
32
+ syncpack lint --dependencies react
33
+ # Look for issues in dependencies containing "react" in the name
34
+ syncpack lint --dependencies '**react**'
35
+ # Find issues in scoped packages only
36
+ syncpack lint --dependencies '@types/**'
37
+ # Find issues everywhere except "peerDependencies"
38
+ syncpack lint --dependency-types '!peer'
39
+ # Only look for issues where an exact version is used (eg "1.2.3")
40
+ syncpack lint --specifier-types exact
41
+ # Sort dependencies by how many times they are used
42
+ syncpack lint --sort count
43
+ # See more examples
44
+ syncpack lint --help
45
+ # See a short summary of options
46
+ syncpack lint -h
47
+ ```
26
48
 
27
- Lint all versions and ranges and exit with 0 or 1 based on whether all files match your Syncpack configuration file.
49
+ ### [fix](https://jamiemason.github.io/syncpack/command/fix)
28
50
 
29
- ### [lint-semver-ranges](https://jamiemason.github.io/syncpack/command/lint-semver-ranges)
51
+ Fix every autofixable issue found by `syncpack lint`.
30
52
 
31
- Check whether dependency versions used within "dependencies", "devDependencies", etc follow a consistent format.
53
+ #### Examples
32
54
 
33
- ### [list](https://jamiemason.github.io/syncpack/command/list)
55
+ ```bash
56
+ # Only fix issues in dependencies and devDependencies
57
+ syncpack fix --dependency-types prod,dev
58
+ # Only fix inconsistencies with exact versions (eg "1.2.3")
59
+ syncpack fix --specifier-types exact
60
+ # Only fix issues in "react" specifically
61
+ syncpack fix --dependencies react
62
+ # See more examples
63
+ syncpack fix --help
64
+ # See a short summary of options
65
+ syncpack fix -h
66
+ ```
67
+
68
+ ### [update](https://jamiemason.github.io/syncpack/command/update)
34
69
 
35
- List all dependencies required by your packages.
70
+ Update packages to the latest versions from the npm registry, wherever they are in your monorepo.<br/>Semver range preferences are preserved when updating.
36
71
 
37
- ### [list-mismatches](https://jamiemason.github.io/syncpack/command/list-mismatches)
72
+ #### Examples
38
73
 
39
- List dependencies which are required by multiple packages, where the version is not the same across every package.
74
+ ```bash
75
+ # Accept any update in latest (x.x.x)
76
+ syncpack update --target latest
77
+ # Only update minor versions (1.x.x)
78
+ syncpack update --target minor
79
+ # Only update patch versions (1.2.x)
80
+ syncpack update --target patch
81
+ # Check for outdated dependencies in one package
82
+ syncpack update --check --source 'packages/pingu/package.json'
83
+ # Update dependencies and devDependencies in the whole monorepo
84
+ syncpack update --dependency-types dev,prod
85
+ # Only update dependencies with a semver range specifier (^, ~, etc.)
86
+ syncpack update --specifier-types range
87
+ # Update dependencies where name exactly matches 'react'
88
+ syncpack update --dependencies 'react'
89
+ # Update dependencies where name contains 'react'
90
+ syncpack update --dependencies '**react**'
91
+ # Update dependencies with the '@aws-sdk' scope
92
+ syncpack update --dependencies '@aws-sdk/**'
93
+ # See more examples
94
+ syncpack update --help
95
+ # See a short summary of options
96
+ syncpack update -h
97
+ ```
98
+
99
+ ### [format](https://jamiemason.github.io/syncpack/command/format)
100
+
101
+ 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.
40
102
 
41
- ### [prompt](https://jamiemason.github.io/syncpack/command/prompt)
103
+ #### Examples
42
104
 
43
- Displays a series of prompts to fix mismatches which syncpack cannot fix automatically.
105
+ ```bash
106
+ # Fix every formatting issue in the monorepo
107
+ syncpack format
108
+ # List all formatting issues in the monorepo
109
+ syncpack format --check
110
+ # Check the formatting of one package
111
+ syncpack format --check --source 'packages/pingu/package.json'
112
+ # See more examples
113
+ syncpack format --help
114
+ # See a short summary of options
115
+ syncpack format -h
116
+ ```
44
117
 
45
- ### [set-semver-ranges](https://jamiemason.github.io/syncpack/command/set-semver-ranges)
118
+ ### [list](https://jamiemason.github.io/syncpack/command/list)
46
119
 
47
- Ensure dependency versions used within `"dependencies"`, `"devDependencies"` etc follow a consistent format.
120
+ Query and inspect all dependencies in your project, both valid and invalid.
48
121
 
49
- ### [update](https://jamiemason.github.io/syncpack/command/update)
122
+ #### Examples
50
123
 
51
- Interactively update packages to the latest versions from the npm registry, wherever they are in your monorepo. You can update every dependency, just dev/peer/prod dependencies, just packages which match a name filter, and more.
124
+ ```bash
125
+ # Sort dependencies by how many times they are used
126
+ syncpack list --sort count
127
+ # Show every instance of each dependency, not just their names
128
+ syncpack list --show instances
129
+ # Show dependencies ignored in your syncpack config
130
+ syncpack list --show ignored
131
+ # Show highest level of detail
132
+ syncpack list --show all
133
+ # Choose only some values
134
+ syncpack list --show hints,statuses
135
+ # List all "peerDependencies"
136
+ syncpack list --dependency-types peer
137
+ # List all types packages
138
+ syncpack list --dependencies '@types/**'
139
+ # List instances of an exact version being used as a peer dependency
140
+ syncpack list --specifier-types exact --show instances --dependency-types peer
141
+ # See more examples
142
+ syncpack list --help
143
+ # See a short summary of options
144
+ syncpack list -h
145
+ ```
52
146
 
53
147
  ## Badges
54
148
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "syncpack",
3
3
  "description": "Consistent dependency versions in large JavaScript Monorepos",
4
- "version": "14.0.0-alpha.10",
4
+ "version": "14.0.0-alpha.12",
5
5
  "author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
6
6
  "bugs": "https://github.com/JamieMason/syncpack/issues",
7
7
  "contributors": [
@@ -69,12 +69,12 @@
69
69
  "syncpack": "./index.cjs"
70
70
  },
71
71
  "optionalDependencies": {
72
- "syncpack-linux-x64": "14.0.0-alpha.10",
73
- "syncpack-linux-arm64": "14.0.0-alpha.10",
74
- "syncpack-darwin-x64": "14.0.0-alpha.10",
75
- "syncpack-darwin-arm64": "14.0.0-alpha.10",
76
- "syncpack-windows-x64": "14.0.0-alpha.10",
77
- "syncpack-windows-arm64": "14.0.0-alpha.10"
72
+ "syncpack-linux-x64": "14.0.0-alpha.12",
73
+ "syncpack-linux-arm64": "14.0.0-alpha.12",
74
+ "syncpack-darwin-x64": "14.0.0-alpha.12",
75
+ "syncpack-darwin-arm64": "14.0.0-alpha.12",
76
+ "syncpack-windows-x64": "14.0.0-alpha.12",
77
+ "syncpack-windows-arm64": "14.0.0-alpha.12"
78
78
  },
79
79
  "types": "./syncpack.d.ts"
80
80
  }