bulk-release 4.0.1 → 4.0.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [4.0.2](https://github.com/semrel-extra/zx-bulk-release/compare/v4.0.1...v4.0.2) (2026-11-29)
2
+
3
+ ### Fixes & improvements
4
+ * fix(deps): never publish a declared dependency version the dependency does not satisfy ([a9a10e8](https://github.com/semrel-extra/zx-bulk-release/commit/a9a10e80648fb4f94fd6886cdd0ae810f3691df5))
5
+
1
6
  ## [4.0.1](https://github.com/semrel-extra/zx-bulk-release/compare/v4.0.0...v4.0.1) (2026-10-12)
2
7
 
3
8
  ### Fixes & improvements
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bulk-release",
3
3
  "alias": "bulk-release",
4
- "version": "4.0.1",
4
+ "version": "4.0.2",
5
5
  "description": "zx-based alternative for multi-semantic-release",
6
6
  "type": "module",
7
7
  "exports": {
@@ -35,7 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@vitest/coverage-v8": "^5.0.4",
37
37
  "esbuild": "^0.28.2",
38
- "verdaccio": "6.10.5",
38
+ "verdaccio": "6.11.3",
39
39
  "vite": "^8.3.4",
40
40
  "vitest": "^5.0.4"
41
41
  },
@@ -23,7 +23,7 @@ export const updateDeps = async (pkg) => {
23
23
  const prev = pkg.latest.meta?.[scope]?.[name]
24
24
  const actual = dep?.version
25
25
  const next = resolveNextVersion(version, actual, prev)
26
- const _version = dep?.preversion || next || subsWorkspace(version, actual) // NOTE preversion should always be pinned
26
+ const _version = dep?.preversion || resolvePin(version, actual) // NOTE preversion should always be pinned
27
27
 
28
28
  pkg[scope] = {...pkg[scope], [name]: _version} // Update pkg context
29
29
  deps[name] = _version // Update manifest
@@ -40,15 +40,19 @@ export const updateDeps = async (pkg) => {
40
40
  return changes
41
41
  }
42
42
 
43
- export const resolveNextVersion = (decl, actual, prev) => {
44
- if (!decl) return null
45
-
43
+ // The pin a release carries: the declaration if the dependency's version satisfies it, else that version. The manifest
44
+ // is never written back, so an old exact pin there would otherwise go out again on every release that keeps it.
45
+ export const resolvePin = (decl, actual) => {
46
46
  // https://yarnpkg.com/features/workspaces
47
- decl = subsWorkspace(decl, actual)
48
-
49
- if (!semver.satisfies(actual, decl)) return actual === prev ? null : actual
47
+ const range = subsWorkspace(decl, actual)
48
+ return actual && !semver.satisfies(actual, range) ? actual : range
49
+ }
50
50
 
51
- return decl === prev ? null : decl
51
+ // The new pin, or null if the last release (prev) went out with it already.
52
+ export const resolveNextVersion = (decl, actual, prev) => {
53
+ if (!decl) return null
54
+ const pin = resolvePin(decl, actual)
55
+ return pin === prev ? null : pin
52
56
  }
53
57
 
54
58
  export const subsWorkspace = (decl, actual) => {