syncpack 10.7.2 → 10.7.3
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.
|
@@ -66,5 +66,8 @@ exports.SameRangeVersionGroup = SameRangeVersionGroup;
|
|
|
66
66
|
/** Every range must fall within every other range */
|
|
67
67
|
function hasMismatch(instances) {
|
|
68
68
|
const loose = true;
|
|
69
|
-
return instances.some((a) => instances.some((b) => !(0, intersects_1.default)(a.version, b.version, loose)));
|
|
69
|
+
return instances.some((a) => instances.some((b) => !(0, intersects_1.default)(aliasWorkspaceRange(a.version), aliasWorkspaceRange(b.version), loose)));
|
|
70
|
+
}
|
|
71
|
+
function aliasWorkspaceRange(version) {
|
|
72
|
+
return version.startsWith('workspace:*') ? '*' : version;
|
|
70
73
|
}
|
|
@@ -59,14 +59,6 @@ class StandardVersionGroup extends Data.TaggedClass('Standard') {
|
|
|
59
59
|
const wsVersion = wsFile?.contents?.version;
|
|
60
60
|
const isWorkspacePackage = wsInstance && wsVersion;
|
|
61
61
|
if (isWorkspacePackage) {
|
|
62
|
-
const nonWsInstances = getNonWorkspaceInstances(instances);
|
|
63
|
-
if (!hasMismatch(nonWsInstances)) {
|
|
64
|
-
return Effect.succeed(new _1.VersionGroupReport.Valid({
|
|
65
|
-
name,
|
|
66
|
-
instances,
|
|
67
|
-
isValid: true,
|
|
68
|
-
}));
|
|
69
|
-
}
|
|
70
62
|
return Effect.fail(new _1.VersionGroupReport.WorkspaceMismatch({
|
|
71
63
|
name,
|
|
72
64
|
instances,
|
|
@@ -114,6 +106,3 @@ function hasUnsupported(instances) {
|
|
|
114
106
|
function getWorkspaceInstance(instances) {
|
|
115
107
|
return instances.find((instance) => instance.strategy.name === 'workspace');
|
|
116
108
|
}
|
|
117
|
-
function getNonWorkspaceInstances(instances) {
|
|
118
|
-
return instances.filter((instance) => instance.strategy.name !== 'workspace');
|
|
119
|
-
}
|
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": "10.7.
|
|
4
|
+
"version": "10.7.3",
|
|
5
5
|
"author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
|
|
6
6
|
"bin": {
|
|
7
7
|
"syncpack": "dist/bin.js",
|