@take-out/scripts 0.0.69 → 0.0.70
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 +3 -3
- package/src/up.ts +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@take-out/scripts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/run.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@take-out/helpers": "0.0.
|
|
31
|
+
"@take-out/helpers": "0.0.69"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"vxrn": "
|
|
34
|
+
"vxrn": "1.4.10-1770207233041"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/up.ts
CHANGED
|
@@ -200,11 +200,16 @@ function updatePackageJsonVersions(
|
|
|
200
200
|
if (pkg in depsObject && !depsObject[pkg].startsWith('workspace:')) {
|
|
201
201
|
const newVersion = versionMap.get(pkg)
|
|
202
202
|
if (newVersion) {
|
|
203
|
-
|
|
204
|
-
// preserve version prefix (^, ~, >=, etc)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
// for tagged versions (canary, rc, etc), use exact version (no prefix)
|
|
204
|
+
// otherwise preserve version prefix (^, ~, >=, etc)
|
|
205
|
+
if (globalTag) {
|
|
206
|
+
depsObject[pkg] = newVersion
|
|
207
|
+
} else {
|
|
208
|
+
const currentVersion = depsObject[pkg]
|
|
209
|
+
const prefixMatch = currentVersion.match(/^([^\d]*)/)
|
|
210
|
+
const prefix = prefixMatch?.[1] || ''
|
|
211
|
+
depsObject[pkg] = `${prefix}${newVersion}`
|
|
212
|
+
}
|
|
208
213
|
updatedCount++
|
|
209
214
|
}
|
|
210
215
|
}
|