syncpack 14.0.0-alpha.11 → 14.0.0-alpha.13

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 (3) hide show
  1. package/README.md +58 -11
  2. package/index.cjs +1 -3
  3. package/package.json +8 -8
package/README.md CHANGED
@@ -6,6 +6,9 @@
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
@@ -16,34 +19,49 @@ npm install --save-dev syncpack@alpha
16
19
 
17
20
  > All command line options can be combined to target packages and dependencies in multiple ways.
18
21
 
19
- ### [lint](https://jamiemason.github.io/syncpack/command/lint) and [fix](https://jamiemason.github.io/syncpack/command/fix)
22
+ ### [lint](https://jamiemason.github.io/syncpack/command/lint)
20
23
 
21
- 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`.
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
26
  #### Examples
24
27
 
25
28
  ```bash
26
- # Find every issue in "dependencies" or "devDependencies"
29
+ # Find all issues in "dependencies" or "devDependencies"
27
30
  syncpack lint --dependency-types prod,dev
31
+ # Only lint issues in "react" specifically
32
+ syncpack lint --dependencies react
28
33
  # Look for issues in dependencies containing "react" in the name
29
34
  syncpack lint --dependencies '**react**'
30
- # Autofix the above issues
31
- syncpack fix --dependencies '**react**'
35
+ # Find issues in scoped packages only
36
+ syncpack lint --dependencies '@types/**'
32
37
  # Find issues everywhere except "peerDependencies"
33
38
  syncpack lint --dependency-types '!peer'
34
- # Only look for issues where an exact version is used
35
- syncpack lint --specifier-types exact
36
- # Only look for issues where an exact version is specified
39
+ # Only look for issues where an exact version is used (eg "1.2.3")
37
40
  syncpack lint --specifier-types exact
38
41
  # Sort dependencies by how many times they are used
39
42
  syncpack lint --sort count
40
- # Show a lot more detail about the issues
41
- syncpack lint --show hints,ignored,instances,statuses
42
43
  # See more examples
43
44
  syncpack lint --help
44
- syncpack fix --help
45
45
  # See a short summary of options
46
46
  syncpack lint -h
47
+ ```
48
+
49
+ ### [fix](https://jamiemason.github.io/syncpack/command/fix)
50
+
51
+ Fix every autofixable issue found by `syncpack lint`.
52
+
53
+ #### Examples
54
+
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
47
65
  syncpack fix -h
48
66
  ```
49
67
 
@@ -97,6 +115,35 @@ syncpack format --help
97
115
  syncpack format -h
98
116
  ```
99
117
 
118
+ ### [list](https://jamiemason.github.io/syncpack/command/list)
119
+
120
+ Query and inspect all dependencies in your project, both valid and invalid.
121
+
122
+ #### Examples
123
+
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
+ ```
146
+
100
147
  ## Badges
101
148
 
102
149
  - [![support on ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/C0C4PY4P)
package/index.cjs CHANGED
@@ -4,9 +4,7 @@ const { spawnSync } = require('node:child_process');
4
4
 
5
5
  const args = process.argv.slice(2);
6
6
  const arch = process.arch;
7
- const [os, extension] = ['win32', 'cygwin'].includes(process.platform)
8
- ? ['windows', '.exe']
9
- : [process.platform, ''];
7
+ const [os, extension] = ['win32', 'cygwin'].includes(process.platform) ? ['windows', '.exe'] : [process.platform, ''];
10
8
  const optionalDep = `syncpack-${os}-${arch}`;
11
9
  const pkgSpecifier = `${optionalDep}/bin/syncpack${extension}`;
12
10
  const pathToBinary = require.resolve(pkgSpecifier);
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.11",
4
+ "version": "14.0.0-alpha.13",
5
5
  "author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
6
6
  "bugs": "https://github.com/JamieMason/syncpack/issues",
7
7
  "contributors": [
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "cosmiconfig": "^9.0.0",
39
- "typescript": "^5.7.3"
39
+ "typescript": "^5.8.3"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=14.17.0"
@@ -69,12 +69,12 @@
69
69
  "syncpack": "./index.cjs"
70
70
  },
71
71
  "optionalDependencies": {
72
- "syncpack-linux-x64": "14.0.0-alpha.11",
73
- "syncpack-linux-arm64": "14.0.0-alpha.11",
74
- "syncpack-darwin-x64": "14.0.0-alpha.11",
75
- "syncpack-darwin-arm64": "14.0.0-alpha.11",
76
- "syncpack-windows-x64": "14.0.0-alpha.11",
77
- "syncpack-windows-arm64": "14.0.0-alpha.11"
72
+ "syncpack-linux-x64": "14.0.0-alpha.13",
73
+ "syncpack-linux-arm64": "14.0.0-alpha.13",
74
+ "syncpack-darwin-x64": "14.0.0-alpha.13",
75
+ "syncpack-darwin-arm64": "14.0.0-alpha.13",
76
+ "syncpack-windows-x64": "14.0.0-alpha.13",
77
+ "syncpack-windows-arm64": "14.0.0-alpha.13"
78
78
  },
79
79
  "types": "./syncpack.d.ts"
80
80
  }