syncpack 14.3.1 → 15.1.1
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.
- package/README.md +25 -2
- package/index.cjs +13 -2
- package/package.json +9 -9
- package/schema.json +200 -0
- package/syncpack.d.ts +21 -0
package/README.md
CHANGED
|
@@ -6,7 +6,20 @@
|
|
|
6
6
|
<br><a href="https://syncpack.dev">https://syncpack.dev</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), [
|
|
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), [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
|
+
Some of the things it can do are:
|
|
12
|
+
|
|
13
|
+
- Find and fix dependency version mismatches.
|
|
14
|
+
- Enforce a single version policy, or create partitions with separate policies.
|
|
15
|
+
- Find and bump outdated versions from the npm registry.
|
|
16
|
+
- Ensure some dependencies always remain pinned at a specific version.
|
|
17
|
+
- Ban some dependencies from being used: anywhere, or in specific places.
|
|
18
|
+
- Define rules for where exact or loose semver ranges should be used, including in catalogs.
|
|
19
|
+
- Assign packages as the source of truth for specific dependencies' versions.
|
|
20
|
+
- Sort and format package.json files consistently.
|
|
21
|
+
- Auto-migrate all or parts of your repo to [pnpm catalogs](https://pnpm.io/catalogs) or [bun catalogs](https://bun.sh/docs/pm/catalogs).
|
|
22
|
+
- Bump outdated versions in catalogs.
|
|
10
23
|
|
|
11
24
|
## Installation
|
|
12
25
|
|
|
@@ -71,7 +84,7 @@ syncpack fix -h
|
|
|
71
84
|
|
|
72
85
|
### [update](https://syncpack.dev/command/update)
|
|
73
86
|
|
|
74
|
-
Update packages to the latest versions from the npm registry, wherever they are in your monorepo
|
|
87
|
+
Update packages to the latest versions from the npm registry, wherever they are in your monorepo, including pnpm catalog entries in `pnpm-workspace.yaml`.<br/>Semver range preferences are preserved when updating.
|
|
75
88
|
|
|
76
89
|
#### Examples
|
|
77
90
|
|
|
@@ -82,10 +95,20 @@ syncpack update --target latest
|
|
|
82
95
|
syncpack update --target minor
|
|
83
96
|
# Only update patch versions (1.2.x)
|
|
84
97
|
syncpack update --target patch
|
|
98
|
+
# Pick which updates to apply through an interactive prompt
|
|
99
|
+
syncpack update --interactive
|
|
100
|
+
# Interactively pick from patch updates only
|
|
101
|
+
syncpack update --interactive --target patch
|
|
102
|
+
# Interactively pick which @aws-sdk packages to update
|
|
103
|
+
syncpack update --interactive --dependencies '@aws-sdk/**'
|
|
85
104
|
# Check for outdated dependencies in one package
|
|
86
105
|
syncpack update --check --source 'packages/pingu/package.json'
|
|
87
106
|
# Update dependencies and devDependencies in the whole monorepo
|
|
88
107
|
syncpack update --dependency-types dev,prod
|
|
108
|
+
# Update only pnpm catalog entries in pnpm-workspace.yaml
|
|
109
|
+
syncpack update --dependency-types pnpmCatalog
|
|
110
|
+
# Update only the named pnpm catalog 'react18'
|
|
111
|
+
syncpack update --dependency-types 'pnpmCatalog:react18'
|
|
89
112
|
# Only update dependencies with a semver range specifier (^, ~, etc.)
|
|
90
113
|
syncpack update --specifier-types range
|
|
91
114
|
# Update dependencies where name exactly matches 'react'
|
package/index.cjs
CHANGED
|
@@ -6,7 +6,8 @@ const { dirname, join } = require('node:path');
|
|
|
6
6
|
const args = process.argv.slice(2);
|
|
7
7
|
const arch = process.arch;
|
|
8
8
|
const [os, extension] = ['win32', 'cygwin'].includes(process.platform) ? ['windows', '.exe'] : [process.platform, ''];
|
|
9
|
-
const
|
|
9
|
+
const libc = isMusl() ? '-musl' : '';
|
|
10
|
+
const optionalDep = `syncpack-${os}-${arch}${libc}`;
|
|
10
11
|
const binaryName = `syncpack${extension}`;
|
|
11
12
|
|
|
12
13
|
const pathToBinary = resolveBinaryPath();
|
|
@@ -19,6 +20,16 @@ process.exit(
|
|
|
19
20
|
}).status || 0,
|
|
20
21
|
);
|
|
21
22
|
|
|
23
|
+
function isMusl() {
|
|
24
|
+
try {
|
|
25
|
+
if (process.platform !== 'linux') return false;
|
|
26
|
+
const { sharedObjects } = process.report.getReport();
|
|
27
|
+
return sharedObjects.some(obj => obj.includes('musl'));
|
|
28
|
+
} catch (_) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
function resolveBinaryPath() {
|
|
23
34
|
// Strategy 1: Resolve via package.json for pnpm Plug'n'Play
|
|
24
35
|
try {
|
|
@@ -33,6 +44,6 @@ function resolveBinaryPath() {
|
|
|
33
44
|
} catch (_) {}
|
|
34
45
|
|
|
35
46
|
throw new Error(
|
|
36
|
-
`Failed to resolve binary for ${os}-${arch}. Please ensure ${optionalDep} is installed as an optional dependency.`,
|
|
47
|
+
`Failed to resolve binary for ${os}-${arch}${libc}. Please ensure ${optionalDep} is installed as an optional dependency.`,
|
|
37
48
|
);
|
|
38
49
|
}
|
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": "
|
|
4
|
+
"version": "15.1.1",
|
|
5
5
|
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
|
|
6
6
|
"bugs": "https://github.com/JamieMason/syncpack/issues",
|
|
7
7
|
"contributors": [
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"syncpack": "./index.cjs"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
|
-
"syncpack-linux-x64": "
|
|
77
|
-
"syncpack-linux-x64-musl": "
|
|
78
|
-
"syncpack-linux-arm64": "
|
|
79
|
-
"syncpack-linux-arm64-musl": "
|
|
80
|
-
"syncpack-darwin-x64": "
|
|
81
|
-
"syncpack-darwin-arm64": "
|
|
82
|
-
"syncpack-windows-x64": "
|
|
83
|
-
"syncpack-windows-arm64": "
|
|
76
|
+
"syncpack-linux-x64": "15.1.1",
|
|
77
|
+
"syncpack-linux-x64-musl": "15.1.1",
|
|
78
|
+
"syncpack-linux-arm64": "15.1.1",
|
|
79
|
+
"syncpack-linux-arm64-musl": "15.1.1",
|
|
80
|
+
"syncpack-darwin-x64": "15.1.1",
|
|
81
|
+
"syncpack-darwin-arm64": "15.1.1",
|
|
82
|
+
"syncpack-windows-x64": "15.1.1",
|
|
83
|
+
"syncpack-windows-arm64": "15.1.1"
|
|
84
84
|
},
|
|
85
85
|
"types": "./syncpack.d.ts"
|
|
86
86
|
}
|
package/schema.json
CHANGED
|
@@ -218,6 +218,11 @@
|
|
|
218
218
|
"see": "https://syncpack.dev/config/max-concurrent-requests",
|
|
219
219
|
"type": "number"
|
|
220
220
|
},
|
|
221
|
+
"minimumReleaseAge": {
|
|
222
|
+
"description": "Skip dependency updates published less than this many minutes ago. `0` disables the filter. When omitted, the value from the project's `pnpm-workspace.yaml` is used; if neither is set, defaults to `1440` (one day). Setting it here always overrides the pnpm value.",
|
|
223
|
+
"see": "https://pnpm.io/settings#minimumreleaseage",
|
|
224
|
+
"type": "number"
|
|
225
|
+
},
|
|
221
226
|
"semverGroups": {
|
|
222
227
|
"items": {
|
|
223
228
|
"$ref": "#/definitions/SemverGroup.Any"
|
|
@@ -261,6 +266,13 @@
|
|
|
261
266
|
"see": "https://syncpack.dev/config/strict",
|
|
262
267
|
"type": "boolean"
|
|
263
268
|
},
|
|
269
|
+
"updateGroups": {
|
|
270
|
+
"items": {
|
|
271
|
+
"$ref": "#/definitions/UpdateGroup.Any"
|
|
272
|
+
},
|
|
273
|
+
"see": "https://syncpack.dev/update-groups",
|
|
274
|
+
"type": "array"
|
|
275
|
+
},
|
|
264
276
|
"versionGroups": {
|
|
265
277
|
"items": {
|
|
266
278
|
"$ref": "#/definitions/VersionGroup.Any"
|
|
@@ -465,6 +477,194 @@
|
|
|
465
477
|
],
|
|
466
478
|
"type": "object"
|
|
467
479
|
},
|
|
480
|
+
"UpdateGroup.Any": {
|
|
481
|
+
"anyOf": [
|
|
482
|
+
{
|
|
483
|
+
"$ref": "#/definitions/UpdateGroup.Ignored"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"$ref": "#/definitions/UpdateGroup.Targeted"
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
"UpdateGroup.Ignored": {
|
|
491
|
+
"additionalProperties": false,
|
|
492
|
+
"properties": {
|
|
493
|
+
"dependencies": {
|
|
494
|
+
"items": {
|
|
495
|
+
"type": "string"
|
|
496
|
+
},
|
|
497
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#dependencies",
|
|
498
|
+
"type": "array"
|
|
499
|
+
},
|
|
500
|
+
"dependencyTypes": {
|
|
501
|
+
"items": {
|
|
502
|
+
"anyOf": [
|
|
503
|
+
{
|
|
504
|
+
"type": "string"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"enum": [
|
|
508
|
+
"dev",
|
|
509
|
+
"local",
|
|
510
|
+
"overrides",
|
|
511
|
+
"peer",
|
|
512
|
+
"pnpmOverrides",
|
|
513
|
+
"prod",
|
|
514
|
+
"resolutions"
|
|
515
|
+
],
|
|
516
|
+
"type": "string"
|
|
517
|
+
}
|
|
518
|
+
]
|
|
519
|
+
},
|
|
520
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#dependencytypes",
|
|
521
|
+
"type": "array"
|
|
522
|
+
},
|
|
523
|
+
"isIgnored": {
|
|
524
|
+
"const": true,
|
|
525
|
+
"see": "https://syncpack.dev/update-groups/ignored/#isignored",
|
|
526
|
+
"type": "boolean"
|
|
527
|
+
},
|
|
528
|
+
"label": {
|
|
529
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#label",
|
|
530
|
+
"type": "string"
|
|
531
|
+
},
|
|
532
|
+
"packages": {
|
|
533
|
+
"items": {
|
|
534
|
+
"type": "string"
|
|
535
|
+
},
|
|
536
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#packages",
|
|
537
|
+
"type": "array"
|
|
538
|
+
},
|
|
539
|
+
"specifierTypes": {
|
|
540
|
+
"items": {
|
|
541
|
+
"anyOf": [
|
|
542
|
+
{
|
|
543
|
+
"type": "string"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"enum": [
|
|
547
|
+
"alias",
|
|
548
|
+
"exact",
|
|
549
|
+
"file",
|
|
550
|
+
"git",
|
|
551
|
+
"latest",
|
|
552
|
+
"major",
|
|
553
|
+
"minor",
|
|
554
|
+
"missing",
|
|
555
|
+
"range",
|
|
556
|
+
"range-complex",
|
|
557
|
+
"range-major",
|
|
558
|
+
"range-minor",
|
|
559
|
+
"tag",
|
|
560
|
+
"unsupported",
|
|
561
|
+
"url",
|
|
562
|
+
"workspace-protocol"
|
|
563
|
+
],
|
|
564
|
+
"type": "string"
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#specifiertypes",
|
|
569
|
+
"type": "array"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
"required": [
|
|
573
|
+
"isIgnored"
|
|
574
|
+
],
|
|
575
|
+
"type": "object"
|
|
576
|
+
},
|
|
577
|
+
"UpdateGroup.Targeted": {
|
|
578
|
+
"additionalProperties": false,
|
|
579
|
+
"properties": {
|
|
580
|
+
"dependencies": {
|
|
581
|
+
"items": {
|
|
582
|
+
"type": "string"
|
|
583
|
+
},
|
|
584
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#dependencies",
|
|
585
|
+
"type": "array"
|
|
586
|
+
},
|
|
587
|
+
"dependencyTypes": {
|
|
588
|
+
"items": {
|
|
589
|
+
"anyOf": [
|
|
590
|
+
{
|
|
591
|
+
"type": "string"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"enum": [
|
|
595
|
+
"dev",
|
|
596
|
+
"local",
|
|
597
|
+
"overrides",
|
|
598
|
+
"peer",
|
|
599
|
+
"pnpmOverrides",
|
|
600
|
+
"prod",
|
|
601
|
+
"resolutions"
|
|
602
|
+
],
|
|
603
|
+
"type": "string"
|
|
604
|
+
}
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#dependencytypes",
|
|
608
|
+
"type": "array"
|
|
609
|
+
},
|
|
610
|
+
"label": {
|
|
611
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#label",
|
|
612
|
+
"type": "string"
|
|
613
|
+
},
|
|
614
|
+
"packages": {
|
|
615
|
+
"items": {
|
|
616
|
+
"type": "string"
|
|
617
|
+
},
|
|
618
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#packages",
|
|
619
|
+
"type": "array"
|
|
620
|
+
},
|
|
621
|
+
"specifierTypes": {
|
|
622
|
+
"items": {
|
|
623
|
+
"anyOf": [
|
|
624
|
+
{
|
|
625
|
+
"type": "string"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"enum": [
|
|
629
|
+
"alias",
|
|
630
|
+
"exact",
|
|
631
|
+
"file",
|
|
632
|
+
"git",
|
|
633
|
+
"latest",
|
|
634
|
+
"major",
|
|
635
|
+
"minor",
|
|
636
|
+
"missing",
|
|
637
|
+
"range",
|
|
638
|
+
"range-complex",
|
|
639
|
+
"range-major",
|
|
640
|
+
"range-minor",
|
|
641
|
+
"tag",
|
|
642
|
+
"unsupported",
|
|
643
|
+
"url",
|
|
644
|
+
"workspace-protocol"
|
|
645
|
+
],
|
|
646
|
+
"type": "string"
|
|
647
|
+
}
|
|
648
|
+
]
|
|
649
|
+
},
|
|
650
|
+
"see": "https://syncpack.dev/version-groups/highest-semver/#specifiertypes",
|
|
651
|
+
"type": "array"
|
|
652
|
+
},
|
|
653
|
+
"target": {
|
|
654
|
+
"enum": [
|
|
655
|
+
"patch",
|
|
656
|
+
"minor",
|
|
657
|
+
"latest"
|
|
658
|
+
],
|
|
659
|
+
"see": "https://syncpack.dev/update-groups/targeted/#target",
|
|
660
|
+
"type": "string"
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"required": [
|
|
664
|
+
"target"
|
|
665
|
+
],
|
|
666
|
+
"type": "object"
|
|
667
|
+
},
|
|
468
668
|
"VersionGroup.Any": {
|
|
469
669
|
"anyOf": [
|
|
470
670
|
{
|
package/syncpack.d.ts
CHANGED
|
@@ -15,8 +15,18 @@ export interface RcFile {
|
|
|
15
15
|
indent?: string;
|
|
16
16
|
/** @see https://syncpack.dev/config/max-concurrent-requests */
|
|
17
17
|
maxConcurrentRequests?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Skip dependency updates published less than this many minutes ago.
|
|
20
|
+
* `0` disables the filter. When omitted, the value from the project's
|
|
21
|
+
* `pnpm-workspace.yaml` is used; if neither is set, defaults to `1440`
|
|
22
|
+
* (one day). Setting it here always overrides the pnpm value.
|
|
23
|
+
* @see https://pnpm.io/settings#minimumreleaseage
|
|
24
|
+
*/
|
|
25
|
+
minimumReleaseAge?: number;
|
|
18
26
|
/** @see https://syncpack.dev/semver-groups */
|
|
19
27
|
semverGroups?: SemverGroup.Any[];
|
|
28
|
+
/** @see https://syncpack.dev/update-groups */
|
|
29
|
+
updateGroups?: UpdateGroup.Any[];
|
|
20
30
|
/** @see https://syncpack.dev/config/sort-az */
|
|
21
31
|
sortAz?: string[];
|
|
22
32
|
/** @see https://syncpack.dev/config/sort-exports */
|
|
@@ -79,6 +89,17 @@ declare namespace SemverGroup {
|
|
|
79
89
|
}
|
|
80
90
|
type Any = Ignored | WithRange;
|
|
81
91
|
}
|
|
92
|
+
declare namespace UpdateGroup {
|
|
93
|
+
interface Ignored extends GroupSelector {
|
|
94
|
+
/** @see https://syncpack.dev/update-groups/ignored/#isignored */
|
|
95
|
+
isIgnored: true;
|
|
96
|
+
}
|
|
97
|
+
interface Targeted extends GroupSelector {
|
|
98
|
+
/** @see https://syncpack.dev/update-groups/targeted/#target */
|
|
99
|
+
target: 'patch' | 'minor' | 'latest';
|
|
100
|
+
}
|
|
101
|
+
type Any = Ignored | Targeted;
|
|
102
|
+
}
|
|
82
103
|
declare namespace VersionGroup {
|
|
83
104
|
interface Banned extends GroupSelector {
|
|
84
105
|
/** @see https://syncpack.dev/version-groups/banned/#isbanned */
|