syncpack 14.0.0-alpha.4 → 14.0.0-alpha.41

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 (5) hide show
  1. package/README.md +140 -20
  2. package/index.cjs +24 -10
  3. package/package.json +19 -12
  4. package/schema.json +149 -51
  5. package/syncpack.d.ts +47 -17
package/README.md CHANGED
@@ -1,54 +1,174 @@
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
+ Syncpack is used by [AWS](https://github.com/aws/aws-pdk), [Cloudflare](https://github.com/cloudflare/mcp-server-cloudflare), [DataDog](https://github.com/DataDog/datadog-ci), [Electron](https://github.com/electron/forge), [GoDaddy](https://github.com/godaddy/gasket), [LiveStore](https://github.com/livestorejs/livestore), [Lottie](https://github.com/LottieFiles/dotlottie-web), [Microsoft](https://github.com/microsoft/fluentui), [PostHog](https://github.com/PostHog/posthog), [Qwik](https://github.com/QwikDev/qwik), [Raycast](https://github.com/raycast/extensions), [Salesforce](https://github.com/SalesforceCommerceCloud/pwa-kit), [TopTal](https://github.com/toptal/picasso), [Vercel](https://github.com/vercel/vercel), [VoltAgent](https://github.com/VoltAgent/voltagent), [WooCommerce](https://github.com/woocommerce/woocommerce) and others.
10
+
11
+ > [!NOTE]
12
+ > 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)
13
+
9
14
  ## Installation
10
15
 
11
16
  ```bash
12
- npm install --save-dev syncpack
17
+ npm install --save-dev syncpack@alpha
13
18
  ```
14
19
 
20
+ ## Guides
21
+
22
+ - [Getting Started](https://jamiemason.github.io/syncpack/)
23
+ - [Migrate to 14](https://jamiemason.github.io/syncpack/guide/migrate-v14/)
24
+
15
25
  ## Commands
16
26
 
17
- ### [fix-mismatches](https://jamiemason.github.io/syncpack/command/fix-mismatches)
27
+ > All command line options can be combined to target packages and dependencies in multiple ways.
18
28
 
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`.
29
+ ### [lint](https://jamiemason.github.io/syncpack/command/lint)
20
30
 
21
- ### [format](https://jamiemason.github.io/syncpack/command/format)
31
+ 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
32
 
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.
33
+ #### Examples
24
34
 
25
- ### [lint](https://jamiemason.github.io/syncpack/command/lint)
35
+ ```bash
36
+ # Find all issues in "dependencies" or "devDependencies"
37
+ syncpack lint --dependency-types prod,dev
38
+ # Only lint issues in "react" specifically
39
+ syncpack lint --dependencies react
40
+ # Look for issues in dependencies containing "react" in the name
41
+ syncpack lint --dependencies '**react**'
42
+ # Find issues in scoped packages only
43
+ syncpack lint --dependencies '@types/**'
44
+ # Find issues everywhere except "peerDependencies"
45
+ syncpack lint --dependency-types '!peer'
46
+ # Only look for issues where an exact version is used (eg "1.2.3")
47
+ syncpack lint --specifier-types exact
48
+ # Sort dependencies by how many times they are used
49
+ syncpack lint --sort count
50
+ # See more examples
51
+ syncpack lint --help
52
+ # See a short summary of options
53
+ syncpack lint -h
54
+ ```
26
55
 
27
- Lint all versions and ranges and exit with 0 or 1 based on whether all files match your Syncpack configuration file.
56
+ ### [fix](https://jamiemason.github.io/syncpack/command/fix)
28
57
 
29
- ### [lint-semver-ranges](https://jamiemason.github.io/syncpack/command/lint-semver-ranges)
58
+ Fix every autofixable issue found by `syncpack lint`.
30
59
 
31
- Check whether dependency versions used within "dependencies", "devDependencies", etc follow a consistent format.
60
+ #### Examples
32
61
 
33
- ### [list](https://jamiemason.github.io/syncpack/command/list)
62
+ ```bash
63
+ # Only fix issues in dependencies and devDependencies
64
+ syncpack fix --dependency-types prod,dev
65
+ # Only fix inconsistencies with exact versions (eg "1.2.3")
66
+ syncpack fix --specifier-types exact
67
+ # Only fix issues in "react" specifically
68
+ syncpack fix --dependencies react
69
+ # See more examples
70
+ syncpack fix --help
71
+ # See a short summary of options
72
+ syncpack fix -h
73
+ ```
34
74
 
35
- List all dependencies required by your packages.
75
+ ### [update](https://jamiemason.github.io/syncpack/command/update)
36
76
 
37
- ### [list-mismatches](https://jamiemason.github.io/syncpack/command/list-mismatches)
77
+ Update packages to the latest versions from the npm registry, wherever they are in your monorepo.<br/>Semver range preferences are preserved when updating.
38
78
 
39
- List dependencies which are required by multiple packages, where the version is not the same across every package.
79
+ #### Examples
40
80
 
41
- ### [prompt](https://jamiemason.github.io/syncpack/command/prompt)
81
+ ```bash
82
+ # Accept any update in latest (x.x.x)
83
+ syncpack update --target latest
84
+ # Only update minor versions (1.x.x)
85
+ syncpack update --target minor
86
+ # Only update patch versions (1.2.x)
87
+ syncpack update --target patch
88
+ # Check for outdated dependencies in one package
89
+ syncpack update --check --source 'packages/pingu/package.json'
90
+ # Update dependencies and devDependencies in the whole monorepo
91
+ syncpack update --dependency-types dev,prod
92
+ # Only update dependencies with a semver range specifier (^, ~, etc.)
93
+ syncpack update --specifier-types range
94
+ # Update dependencies where name exactly matches 'react'
95
+ syncpack update --dependencies 'react'
96
+ # Update dependencies where name contains 'react'
97
+ syncpack update --dependencies '**react**'
98
+ # Update dependencies with the '@aws-sdk' scope
99
+ syncpack update --dependencies '@aws-sdk/**'
100
+ # See more examples
101
+ syncpack update --help
102
+ # See a short summary of options
103
+ syncpack update -h
104
+ ```
42
105
 
43
- Displays a series of prompts to fix mismatches which syncpack cannot fix automatically.
106
+ ### [format](https://jamiemason.github.io/syncpack/command/format)
44
107
 
45
- ### [set-semver-ranges](https://jamiemason.github.io/syncpack/command/set-semver-ranges)
108
+ 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.
46
109
 
47
- Ensure dependency versions used within `"dependencies"`, `"devDependencies"` etc follow a consistent format.
110
+ #### Examples
48
111
 
49
- ### [update](https://jamiemason.github.io/syncpack/command/update)
112
+ ```bash
113
+ # Fix every formatting issue in the monorepo
114
+ syncpack format
115
+ # List all formatting issues in the monorepo
116
+ syncpack format --check
117
+ # Check the formatting of one package
118
+ syncpack format --check --source 'packages/pingu/package.json'
119
+ # See more examples
120
+ syncpack format --help
121
+ # See a short summary of options
122
+ syncpack format -h
123
+ ```
124
+
125
+ ### [list](https://jamiemason.github.io/syncpack/command/list)
126
+
127
+ Query and inspect all dependencies in your project, both valid and invalid.
128
+
129
+ #### Examples
50
130
 
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.
131
+ ```bash
132
+ # Sort dependencies by how many times they are used
133
+ syncpack list --sort count
134
+ # Show every instance of each dependency, not just their names
135
+ syncpack list --show instances
136
+ # Show dependencies ignored in your syncpack config
137
+ syncpack list --show ignored
138
+ # Show highest level of detail
139
+ syncpack list --show all
140
+ # Choose only some values
141
+ syncpack list --show hints,statuses
142
+ # List all "peerDependencies"
143
+ syncpack list --dependency-types peer
144
+ # List all types packages
145
+ syncpack list --dependencies '@types/**'
146
+ # List instances of an exact version being used as a peer dependency
147
+ syncpack list --specifier-types exact --show instances --dependency-types peer
148
+ # See more examples
149
+ syncpack list --help
150
+ # See a short summary of options
151
+ syncpack list -h
152
+ ```
153
+
154
+ ### [json](https://jamiemason.github.io/syncpack/command/json)
155
+
156
+ Output the state of every instance of every dependency as a JSON object, one per line. This command is best used with tools like [`jq`](https://jqlang.org/) for filtering and processing.
157
+
158
+ #### Examples
159
+
160
+ ```bash
161
+ # Output all dependencies as JSON
162
+ syncpack json
163
+ # Output only AWS SDK dependencies
164
+ syncpack json --dependencies '@aws-sdk/**'
165
+ # Count dependencies by type
166
+ syncpack json | jq -r '.dependencyType' | sort | uniq -c
167
+ # See more examples
168
+ syncpack json --help
169
+ # See a short summary of options
170
+ syncpack json -h
171
+ ```
52
172
 
53
173
  ## Badges
54
174
 
package/index.cjs CHANGED
@@ -1,24 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { spawnSync } = require('node:child_process');
4
+ const { dirname, join } = require('node:path');
4
5
 
5
6
  const args = process.argv.slice(2);
6
7
  const arch = process.arch;
7
- const [os, extension] = ['win32', 'cygwin'].includes(process.platform)
8
- ? ['windows', '.exe']
9
- : [process.platform, ''];
8
+ const [os, extension] = ['win32', 'cygwin'].includes(process.platform) ? ['windows', '.exe'] : [process.platform, ''];
10
9
  const optionalDep = `syncpack-${os}-${arch}`;
11
- const pkgSpecifier = `${optionalDep}/bin/syncpack${extension}`;
12
- const pathToBinary = require.resolve(pkgSpecifier);
10
+ const binaryName = `syncpack${extension}`;
11
+
12
+ const pathToBinary = resolveBinaryPath();
13
13
 
14
14
  process.exit(
15
15
  spawnSync(pathToBinary, args, {
16
16
  cwd: process.cwd(),
17
17
  stdio: ['ignore', 'inherit', 'inherit'],
18
- env: {
19
- ...process.env,
20
- COSMICONFIG_REQUIRE_PATH: require.resolve('cosmiconfig'),
21
- RUST_BACKTRACE: 'full',
22
- },
18
+ env: process.env,
23
19
  }).status || 0,
24
20
  );
21
+
22
+ function resolveBinaryPath() {
23
+ // Strategy 1: Resolve via package.json for pnpm Plug'n'Play
24
+ try {
25
+ const packageJsonPath = require.resolve(`${optionalDep}/package.json`);
26
+ const packageDir = dirname(packageJsonPath);
27
+ return join(packageDir, 'bin', binaryName);
28
+ } catch (_) {}
29
+
30
+ // Strategy 2: Original approach (works with traditional node_modules)
31
+ try {
32
+ return require.resolve(`${optionalDep}/bin/${binaryName}`);
33
+ } catch (_) {}
34
+
35
+ throw new Error(
36
+ `Failed to resolve binary for ${os}-${arch}. Please ensure ${optionalDep} is installed as an optional dependency.`,
37
+ );
38
+ }
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.4",
4
+ "version": "14.0.0-alpha.41",
5
5
  "author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
6
6
  "bugs": "https://github.com/JamieMason/syncpack/issues",
7
7
  "contributors": [
@@ -16,6 +16,7 @@
16
16
  "Chase Holdren (https://github.com/chaseholdren)",
17
17
  "Chase Tamnoon (https://github.com/chase-tamnoon)",
18
18
  "Daniel Silva (https://github.com/dsilvasc)",
19
+ "Dustin McCormick (https://github.com/djmccormick)",
19
20
  "Elchin Valiyev (https://github.com/evaliyev)",
20
21
  "Gabriel Pereira Woitechen (https://github.com/wtchnm)",
21
22
  "Jamie Haywood (https://github.com/jamiehaywood)",
@@ -28,15 +29,16 @@
28
29
  "Matt Sprague (https://github.com/uforic)",
29
30
  "Max Rohde (https://github.com/mxro)",
30
31
  "Michał Warać (https://github.com/auto200)",
32
+ "Mike North (https://github.com/mike-north)",
31
33
  "Nick Saunders (https://github.com/nsaunders)",
34
+ "Nikolas Schröter (https://github.com/nwidynski)",
35
+ "Petter Sæther Moen (https://github.com/petter)",
36
+ "Samuel Attard (https://github.com/MarshallOfSound)",
32
37
  "Siraj (https://github.com/Syhner)",
38
+ "Steve Beaugé (https://github.com/stevebeauge)",
33
39
  "Stuart Knightley (https://github.com/Stuk)",
34
40
  "Tom Fletcher (https://github.com/tom-fletcher)"
35
41
  ],
36
- "dependencies": {
37
- "cosmiconfig": "9.0.0",
38
- "typescript": "5.7.3"
39
- },
40
42
  "engines": {
41
43
  "node": ">=14.17.0"
42
44
  },
@@ -63,17 +65,22 @@
63
65
  "yarn"
64
66
  ],
65
67
  "license": "MIT",
66
- "repository": "JamieMason/syncpack",
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/JamieMason/syncpack.git"
71
+ },
67
72
  "bin": {
68
73
  "syncpack": "./index.cjs"
69
74
  },
70
75
  "optionalDependencies": {
71
- "syncpack-linux-x64": "14.0.0-alpha.4",
72
- "syncpack-linux-arm64": "14.0.0-alpha.4",
73
- "syncpack-darwin-x64": "14.0.0-alpha.4",
74
- "syncpack-darwin-arm64": "14.0.0-alpha.4",
75
- "syncpack-windows-x64": "14.0.0-alpha.4",
76
- "syncpack-windows-arm64": "14.0.0-alpha.4"
76
+ "syncpack-linux-x64": "14.0.0-alpha.41",
77
+ "syncpack-linux-x64-musl": "14.0.0-alpha.41",
78
+ "syncpack-linux-arm64": "14.0.0-alpha.41",
79
+ "syncpack-linux-arm64-musl": "14.0.0-alpha.41",
80
+ "syncpack-darwin-x64": "14.0.0-alpha.41",
81
+ "syncpack-darwin-arm64": "14.0.0-alpha.41",
82
+ "syncpack-windows-x64": "14.0.0-alpha.41",
83
+ "syncpack-windows-arm64": "14.0.0-alpha.41"
77
84
  },
78
85
  "types": "./syncpack.d.ts"
79
86
  }
package/schema.json CHANGED
@@ -185,7 +185,7 @@
185
185
  "additionalProperties": false,
186
186
  "properties": {
187
187
  "$schema": {
188
- "see": "https://jamiemason.github.io/syncpack/integrations/json-schema",
188
+ "see": "https://jamiemason.github.io/syncpack/config/syncpackrc/#json",
189
189
  "type": "string"
190
190
  },
191
191
  "customTypes": {
@@ -214,11 +214,15 @@
214
214
  "see": "https://jamiemason.github.io/syncpack/config/indent",
215
215
  "type": "string"
216
216
  },
217
+ "maxConcurrentRequests": {
218
+ "see": "https://jamiemason.github.io/syncpack/config/max-concurrent-requests",
219
+ "type": "number"
220
+ },
217
221
  "semverGroups": {
218
222
  "items": {
219
223
  "$ref": "#/definitions/SemverGroup.Any"
220
224
  },
221
- "see": "https://jamiemason.github.io/syncpack/config/semver-groups",
225
+ "see": "https://jamiemason.github.io/syncpack/semver-groups",
222
226
  "type": "array"
223
227
  },
224
228
  "sortAz": {
@@ -253,11 +257,15 @@
253
257
  "see": "https://jamiemason.github.io/syncpack/config/source",
254
258
  "type": "array"
255
259
  },
260
+ "strict": {
261
+ "see": "https://jamiemason.github.io/syncpack/config/strict",
262
+ "type": "boolean"
263
+ },
256
264
  "versionGroups": {
257
265
  "items": {
258
266
  "$ref": "#/definitions/VersionGroup.Any"
259
267
  },
260
- "see": "https://jamiemason.github.io/syncpack/config/version-groups",
268
+ "see": "https://jamiemason.github.io/syncpack/version-groups",
261
269
  "type": "array"
262
270
  }
263
271
  },
@@ -280,7 +288,7 @@
280
288
  "items": {
281
289
  "type": "string"
282
290
  },
283
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
291
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
284
292
  "type": "array"
285
293
  },
286
294
  "dependencyTypes": {
@@ -303,23 +311,23 @@
303
311
  }
304
312
  ]
305
313
  },
306
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
314
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
307
315
  "type": "array"
308
316
  },
309
317
  "isIgnored": {
310
318
  "const": true,
311
- "see": "https://jamiemason.github.io/syncpack/config/semver-groups/ignored/#isignored",
319
+ "see": "https://jamiemason.github.io/syncpack/semver-groups/ignored/#isignored",
312
320
  "type": "boolean"
313
321
  },
314
322
  "label": {
315
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
323
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
316
324
  "type": "string"
317
325
  },
318
326
  "packages": {
319
327
  "items": {
320
328
  "type": "string"
321
329
  },
322
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
330
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
323
331
  "type": "array"
324
332
  },
325
333
  "specifierTypes": {
@@ -351,7 +359,7 @@
351
359
  }
352
360
  ]
353
361
  },
354
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
362
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
355
363
  "type": "array"
356
364
  }
357
365
  },
@@ -367,7 +375,7 @@
367
375
  "items": {
368
376
  "type": "string"
369
377
  },
370
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
378
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
371
379
  "type": "array"
372
380
  },
373
381
  "dependencyTypes": {
@@ -390,18 +398,18 @@
390
398
  }
391
399
  ]
392
400
  },
393
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
401
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
394
402
  "type": "array"
395
403
  },
396
404
  "label": {
397
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
405
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
398
406
  "type": "string"
399
407
  },
400
408
  "packages": {
401
409
  "items": {
402
410
  "type": "string"
403
411
  },
404
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
412
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
405
413
  "type": "array"
406
414
  },
407
415
  "range": {
@@ -416,7 +424,7 @@
416
424
  "^",
417
425
  "~"
418
426
  ],
419
- "see": "https://jamiemason.github.io/syncpack/config/semver-groups/with-range/#range",
427
+ "see": "https://jamiemason.github.io/syncpack/semver-groups/with-range/#range",
420
428
  "type": "string"
421
429
  },
422
430
  "specifierTypes": {
@@ -448,7 +456,7 @@
448
456
  }
449
457
  ]
450
458
  },
451
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
459
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
452
460
  "type": "array"
453
461
  }
454
462
  },
@@ -471,6 +479,9 @@
471
479
  {
472
480
  "$ref": "#/definitions/VersionGroup.SameRange"
473
481
  },
482
+ {
483
+ "$ref": "#/definitions/VersionGroup.SameMinor"
484
+ },
474
485
  {
475
486
  "$ref": "#/definitions/VersionGroup.SnappedTo"
476
487
  },
@@ -486,7 +497,7 @@
486
497
  "items": {
487
498
  "type": "string"
488
499
  },
489
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
500
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
490
501
  "type": "array"
491
502
  },
492
503
  "dependencyTypes": {
@@ -509,23 +520,23 @@
509
520
  }
510
521
  ]
511
522
  },
512
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
523
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
513
524
  "type": "array"
514
525
  },
515
526
  "isBanned": {
516
527
  "const": true,
517
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/banned/#isbanned",
528
+ "see": "https://jamiemason.github.io/syncpack/version-groups/banned/#isbanned",
518
529
  "type": "boolean"
519
530
  },
520
531
  "label": {
521
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
532
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
522
533
  "type": "string"
523
534
  },
524
535
  "packages": {
525
536
  "items": {
526
537
  "type": "string"
527
538
  },
528
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
539
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
529
540
  "type": "array"
530
541
  },
531
542
  "specifierTypes": {
@@ -557,7 +568,7 @@
557
568
  }
558
569
  ]
559
570
  },
560
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
571
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
561
572
  "type": "array"
562
573
  }
563
574
  },
@@ -573,7 +584,7 @@
573
584
  "items": {
574
585
  "type": "string"
575
586
  },
576
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
587
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
577
588
  "type": "array"
578
589
  },
579
590
  "dependencyTypes": {
@@ -596,23 +607,23 @@
596
607
  }
597
608
  ]
598
609
  },
599
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
610
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
600
611
  "type": "array"
601
612
  },
602
613
  "isIgnored": {
603
614
  "const": true,
604
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/ignored/#isignored",
615
+ "see": "https://jamiemason.github.io/syncpack/version-groups/ignored/#isignored",
605
616
  "type": "boolean"
606
617
  },
607
618
  "label": {
608
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
619
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
609
620
  "type": "string"
610
621
  },
611
622
  "packages": {
612
623
  "items": {
613
624
  "type": "string"
614
625
  },
615
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
626
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
616
627
  "type": "array"
617
628
  },
618
629
  "specifierTypes": {
@@ -644,7 +655,7 @@
644
655
  }
645
656
  ]
646
657
  },
647
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
658
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
648
659
  "type": "array"
649
660
  }
650
661
  },
@@ -660,7 +671,7 @@
660
671
  "items": {
661
672
  "type": "string"
662
673
  },
663
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
674
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
664
675
  "type": "array"
665
676
  },
666
677
  "dependencyTypes": {
@@ -683,22 +694,22 @@
683
694
  }
684
695
  ]
685
696
  },
686
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
697
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
687
698
  "type": "array"
688
699
  },
689
700
  "label": {
690
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
701
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
691
702
  "type": "string"
692
703
  },
693
704
  "packages": {
694
705
  "items": {
695
706
  "type": "string"
696
707
  },
697
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
708
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
698
709
  "type": "array"
699
710
  },
700
711
  "pinVersion": {
701
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/pinned/#pinversion",
712
+ "see": "https://jamiemason.github.io/syncpack/version-groups/pinned/#pinversion",
702
713
  "type": "string"
703
714
  },
704
715
  "specifierTypes": {
@@ -730,7 +741,7 @@
730
741
  }
731
742
  ]
732
743
  },
733
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
744
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
734
745
  "type": "array"
735
746
  }
736
747
  },
@@ -739,6 +750,93 @@
739
750
  ],
740
751
  "type": "object"
741
752
  },
753
+ "VersionGroup.SameMinor": {
754
+ "additionalProperties": false,
755
+ "properties": {
756
+ "dependencies": {
757
+ "items": {
758
+ "type": "string"
759
+ },
760
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
761
+ "type": "array"
762
+ },
763
+ "dependencyTypes": {
764
+ "items": {
765
+ "anyOf": [
766
+ {
767
+ "type": "string"
768
+ },
769
+ {
770
+ "enum": [
771
+ "dev",
772
+ "local",
773
+ "overrides",
774
+ "peer",
775
+ "pnpmOverrides",
776
+ "prod",
777
+ "resolutions"
778
+ ],
779
+ "type": "string"
780
+ }
781
+ ]
782
+ },
783
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
784
+ "type": "array"
785
+ },
786
+ "label": {
787
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
788
+ "type": "string"
789
+ },
790
+ "packages": {
791
+ "items": {
792
+ "type": "string"
793
+ },
794
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
795
+ "type": "array"
796
+ },
797
+ "policy": {
798
+ "const": "sameMinor",
799
+ "see": "https://jamiemason.github.io/syncpack/version-groups/same-minor/#policy",
800
+ "type": "string"
801
+ },
802
+ "specifierTypes": {
803
+ "items": {
804
+ "anyOf": [
805
+ {
806
+ "type": "string"
807
+ },
808
+ {
809
+ "enum": [
810
+ "alias",
811
+ "exact",
812
+ "file",
813
+ "git",
814
+ "latest",
815
+ "major",
816
+ "minor",
817
+ "missing",
818
+ "range",
819
+ "range-complex",
820
+ "range-major",
821
+ "range-minor",
822
+ "tag",
823
+ "unsupported",
824
+ "url",
825
+ "workspace-protocol"
826
+ ],
827
+ "type": "string"
828
+ }
829
+ ]
830
+ },
831
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
832
+ "type": "array"
833
+ }
834
+ },
835
+ "required": [
836
+ "policy"
837
+ ],
838
+ "type": "object"
839
+ },
742
840
  "VersionGroup.SameRange": {
743
841
  "additionalProperties": false,
744
842
  "properties": {
@@ -746,7 +844,7 @@
746
844
  "items": {
747
845
  "type": "string"
748
846
  },
749
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
847
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
750
848
  "type": "array"
751
849
  },
752
850
  "dependencyTypes": {
@@ -769,23 +867,23 @@
769
867
  }
770
868
  ]
771
869
  },
772
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
870
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
773
871
  "type": "array"
774
872
  },
775
873
  "label": {
776
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
874
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
777
875
  "type": "string"
778
876
  },
779
877
  "packages": {
780
878
  "items": {
781
879
  "type": "string"
782
880
  },
783
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
881
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
784
882
  "type": "array"
785
883
  },
786
884
  "policy": {
787
885
  "const": "sameRange",
788
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/same-range/#policy",
886
+ "see": "https://jamiemason.github.io/syncpack/version-groups/same-range/#policy",
789
887
  "type": "string"
790
888
  },
791
889
  "specifierTypes": {
@@ -817,7 +915,7 @@
817
915
  }
818
916
  ]
819
917
  },
820
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
918
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
821
919
  "type": "array"
822
920
  }
823
921
  },
@@ -833,7 +931,7 @@
833
931
  "items": {
834
932
  "type": "string"
835
933
  },
836
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
934
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
837
935
  "type": "array"
838
936
  },
839
937
  "dependencyTypes": {
@@ -856,25 +954,25 @@
856
954
  }
857
955
  ]
858
956
  },
859
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
957
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
860
958
  "type": "array"
861
959
  },
862
960
  "label": {
863
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
961
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
864
962
  "type": "string"
865
963
  },
866
964
  "packages": {
867
965
  "items": {
868
966
  "type": "string"
869
967
  },
870
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
968
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
871
969
  "type": "array"
872
970
  },
873
971
  "snapTo": {
874
972
  "items": {
875
973
  "type": "string"
876
974
  },
877
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/snapped-to/#snapto",
975
+ "see": "https://jamiemason.github.io/syncpack/version-groups/snapped-to/#snapto",
878
976
  "type": "array"
879
977
  },
880
978
  "specifierTypes": {
@@ -906,7 +1004,7 @@
906
1004
  }
907
1005
  ]
908
1006
  },
909
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
1007
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
910
1008
  "type": "array"
911
1009
  }
912
1010
  },
@@ -922,7 +1020,7 @@
922
1020
  "items": {
923
1021
  "type": "string"
924
1022
  },
925
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies",
1023
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies",
926
1024
  "type": "array"
927
1025
  },
928
1026
  "dependencyTypes": {
@@ -945,18 +1043,18 @@
945
1043
  }
946
1044
  ]
947
1045
  },
948
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes",
1046
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes",
949
1047
  "type": "array"
950
1048
  },
951
1049
  "label": {
952
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#label",
1050
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label",
953
1051
  "type": "string"
954
1052
  },
955
1053
  "packages": {
956
1054
  "items": {
957
1055
  "type": "string"
958
1056
  },
959
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages",
1057
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages",
960
1058
  "type": "array"
961
1059
  },
962
1060
  "preferVersion": {
@@ -964,7 +1062,7 @@
964
1062
  "highestSemver",
965
1063
  "lowestSemver"
966
1064
  ],
967
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/lowest-version/#preferversion",
1065
+ "see": "https://jamiemason.github.io/syncpack/version-groups/lowest-semver/#preferversion",
968
1066
  "type": "string"
969
1067
  },
970
1068
  "specifierTypes": {
@@ -996,7 +1094,7 @@
996
1094
  }
997
1095
  ]
998
1096
  },
999
- "see": "https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes",
1097
+ "see": "https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes",
1000
1098
  "type": "array"
1001
1099
  }
1002
1100
  },
package/syncpack.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export interface RcFile {
2
- /** @see https://jamiemason.github.io/syncpack/integrations/json-schema */
2
+ /** @see https://jamiemason.github.io/syncpack/config/syncpackrc/#json */
3
3
  $schema?: string;
4
4
  /** @see https://jamiemason.github.io/syncpack/config/custom-types */
5
5
  customTypes?: {
@@ -13,7 +13,9 @@ export interface RcFile {
13
13
  formatRepository?: boolean;
14
14
  /** @see https://jamiemason.github.io/syncpack/config/indent */
15
15
  indent?: string;
16
- /** @see https://jamiemason.github.io/syncpack/config/semver-groups */
16
+ /** @see https://jamiemason.github.io/syncpack/config/max-concurrent-requests */
17
+ maxConcurrentRequests?: number;
18
+ /** @see https://jamiemason.github.io/syncpack/semver-groups */
17
19
  semverGroups?: SemverGroup.Any[];
18
20
  /** @see https://jamiemason.github.io/syncpack/config/sort-az */
19
21
  sortAz?: string[];
@@ -25,7 +27,9 @@ export interface RcFile {
25
27
  sortPackages?: boolean;
26
28
  /** @see https://jamiemason.github.io/syncpack/config/source */
27
29
  source?: string[];
28
- /** @see https://jamiemason.github.io/syncpack/config/version-groups */
30
+ /** @see https://jamiemason.github.io/syncpack/config/strict */
31
+ strict?: boolean;
32
+ /** @see https://jamiemason.github.io/syncpack/version-groups */
29
33
  versionGroups?: VersionGroup.Any[];
30
34
  /** @deprecated */
31
35
  dependencyTypes?: never;
@@ -41,15 +45,15 @@ export interface RcFile {
41
45
  specifierTypes?: never;
42
46
  }
43
47
  export interface GroupSelector {
44
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencies */
48
+ /** @see https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencies */
45
49
  dependencies?: string[];
46
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/standard/#dependencytypes */
50
+ /** @see https://jamiemason.github.io/syncpack/version-groups/highest-semver/#dependencytypes */
47
51
  dependencyTypes?: DependencyType[];
48
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/standard/#label */
52
+ /** @see https://jamiemason.github.io/syncpack/version-groups/highest-semver/#label */
49
53
  label?: string;
50
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/standard/#packages */
54
+ /** @see https://jamiemason.github.io/syncpack/version-groups/highest-semver/#packages */
51
55
  packages?: string[];
52
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/standard/#specifiertypes */
56
+ /** @see https://jamiemason.github.io/syncpack/version-groups/highest-semver/#specifiertypes */
53
57
  specifierTypes?: SpecifierType[];
54
58
  }
55
59
  export interface DependencyGroup {
@@ -66,41 +70,45 @@ export interface DependencyGroup {
66
70
  }
67
71
  declare namespace SemverGroup {
68
72
  interface Ignored extends GroupSelector {
69
- /** @see https://jamiemason.github.io/syncpack/config/semver-groups/ignored/#isignored */
73
+ /** @see https://jamiemason.github.io/syncpack/semver-groups/ignored/#isignored */
70
74
  isIgnored: true;
71
75
  }
72
76
  interface WithRange extends GroupSelector {
73
- /** @see https://jamiemason.github.io/syncpack/config/semver-groups/with-range/#range */
77
+ /** @see https://jamiemason.github.io/syncpack/semver-groups/with-range/#range */
74
78
  range: SemverRange;
75
79
  }
76
80
  type Any = Ignored | WithRange;
77
81
  }
78
82
  declare namespace VersionGroup {
79
83
  interface Banned extends GroupSelector {
80
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/banned/#isbanned */
84
+ /** @see https://jamiemason.github.io/syncpack/version-groups/banned/#isbanned */
81
85
  isBanned: true;
82
86
  }
83
87
  interface Ignored extends GroupSelector {
84
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/ignored/#isignored */
88
+ /** @see https://jamiemason.github.io/syncpack/version-groups/ignored/#isignored */
85
89
  isIgnored: true;
86
90
  }
87
91
  interface Pinned extends GroupSelector {
88
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/pinned/#pinversion */
92
+ /** @see https://jamiemason.github.io/syncpack/version-groups/pinned/#pinversion */
89
93
  pinVersion: string;
90
94
  }
91
95
  interface SnappedTo extends GroupSelector {
92
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/snapped-to/#snapto */
96
+ /** @see https://jamiemason.github.io/syncpack/version-groups/snapped-to/#snapto */
93
97
  snapTo: string[];
94
98
  }
95
99
  interface SameRange extends GroupSelector {
96
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/same-range/#policy */
100
+ /** @see https://jamiemason.github.io/syncpack/version-groups/same-range/#policy */
97
101
  policy: 'sameRange';
98
102
  }
103
+ interface SameMinor extends GroupSelector {
104
+ /** @see https://jamiemason.github.io/syncpack/version-groups/same-minor/#policy */
105
+ policy: 'sameMinor';
106
+ }
99
107
  interface Standard extends GroupSelector {
100
- /** @see https://jamiemason.github.io/syncpack/config/version-groups/lowest-version/#preferversion */
108
+ /** @see https://jamiemason.github.io/syncpack/version-groups/lowest-semver/#preferversion */
101
109
  preferVersion?: 'highestSemver' | 'lowestSemver';
102
110
  }
103
- type Any = Banned | Ignored | Pinned | SameRange | SnappedTo | Standard;
111
+ type Any = Banned | Ignored | Pinned | SameRange | SameMinor | SnappedTo | Standard;
104
112
  }
105
113
  declare namespace CustomType {
106
114
  interface NameAndVersionProps {
@@ -135,4 +143,26 @@ type SemverRange = '' | '*' | '>' | '>=' | '.x' | '<' | '<=' | '^' | '~';
135
143
  type DependencyType = 'dev' | 'local' | 'overrides' | 'peer' | 'pnpmOverrides' | 'prod' | 'resolutions' | AnyString;
136
144
  type SpecifierType = 'alias' | 'exact' | 'file' | 'git' | 'latest' | 'major' | 'minor' | 'missing' | 'range' | 'range-complex' | 'range-major' | 'range-minor' | 'tag' | 'unsupported' | 'url' | 'workspace-protocol' | AnyString;
137
145
  type AnyString = string & {};
146
+ /** Each Instance printed by `syncpack json` */
147
+ export type JsonOutput = {
148
+ dependency: string;
149
+ dependencyGroup: string;
150
+ dependencyType: DependencyType;
151
+ package: string;
152
+ property: ['dependencies'];
153
+ strategy: CustomType.Any['strategy'];
154
+ versionGroup: VersionGroupVariant;
155
+ preferredSemverRange: SemverRange | null;
156
+ statusCode: StatusCode;
157
+ actual: {
158
+ raw: string;
159
+ type: SpecifierType;
160
+ };
161
+ expected: {
162
+ raw: string;
163
+ type: SpecifierType;
164
+ } | null;
165
+ };
166
+ export type VersionGroupVariant = 'Banned' | 'HighestSemver' | 'Ignored' | 'LowestSemver' | 'Pinned' | 'SameRange' | 'SameMinor' | 'SnappedTo';
167
+ export type StatusCode = 'IsHighestOrLowestSemver' | 'IsIdenticalToLocal' | 'IsIdenticalToPin' | 'IsIdenticalToSnapTarget' | 'IsIgnored' | 'IsLocalAndValid' | 'IsNonSemverButIdentical' | 'SatisfiesHighestOrLowestSemver' | 'SatisfiesLocal' | 'SatisfiesSameRangeGroup' | 'SatisfiesSameMinorGroup' | 'SatisfiesSnapTarget' | 'DiffersToHighestOrLowestSemver' | 'DiffersToLocal' | 'DiffersToNpmRegistry' | 'DiffersToPin' | 'DiffersToSnapTarget' | 'IsBanned' | 'PinOverridesSemverRange' | 'PinOverridesSemverRangeMismatch' | 'SameMinorOverridesSemverRange' | 'SameMinorOverridesSemverRangeMismatch' | 'SemverRangeMismatch' | 'DependsOnInvalidLocalPackage' | 'NonSemverMismatch' | 'SameRangeMismatch' | 'SameMinorMismatch' | 'DependsOnMissingSnapTarget' | 'InvalidLocalVersion' | 'RefuseToBanLocal' | 'RefuseToPinLocal' | 'RefuseToSnapLocal' | 'MatchConflictsWithHighestOrLowestSemver' | 'MatchConflictsWithLocal' | 'MatchConflictsWithSnapTarget' | 'MismatchConflictsWithHighestOrLowestSemver' | 'MismatchConflictsWithLocal' | 'MismatchConflictsWithSnapTarget';
138
168
  export {};