@internetderdinge/api 1.229.17 → 1.229.18
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/package.json
CHANGED
|
@@ -68,25 +68,38 @@ const updateDependencyVersion = (
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
const currentRange = dependencies[dependencyName];
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const isLocalReference = /^(file:|link:|workspace:|portal:)/.test(
|
|
72
|
+
currentRange,
|
|
73
|
+
);
|
|
74
|
+
let currentDependencyVersion = null;
|
|
75
|
+
|
|
76
|
+
if (!isLocalReference) {
|
|
77
|
+
const currentDependencyMin = semver.minVersion(currentRange);
|
|
78
|
+
if (!currentDependencyMin) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
`Unsupported dependency version for ${dependencyName} in ${packageJsonPath}: ${currentRange}`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
currentDependencyVersion = currentDependencyMin.version;
|
|
76
84
|
}
|
|
77
|
-
const currentDependencyVersion = currentDependencyMin.version;
|
|
78
85
|
|
|
79
|
-
if (
|
|
86
|
+
if (
|
|
87
|
+
expectedVersion &&
|
|
88
|
+
currentDependencyVersion &&
|
|
89
|
+
currentDependencyVersion !== expectedVersion
|
|
90
|
+
) {
|
|
80
91
|
throw new Error(
|
|
81
92
|
`paperlesspaper-api dependency is ${currentRange} (expected ${expectedVersion}). Update it before bumping.`,
|
|
82
93
|
);
|
|
83
94
|
}
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
? "
|
|
89
|
-
: ""
|
|
96
|
+
// Convert local references (e.g. file:.yalc/...) to a published semver dependency.
|
|
97
|
+
const prefix =
|
|
98
|
+
isLocalReference || currentRange.startsWith("^")
|
|
99
|
+
? "^"
|
|
100
|
+
: currentRange.startsWith("~")
|
|
101
|
+
? "~"
|
|
102
|
+
: "";
|
|
90
103
|
|
|
91
104
|
dependencies[dependencyName] = `${prefix}${newVersion}`;
|
|
92
105
|
packageJson.dependencies = dependencies;
|