zx-bulk-release 3.1.11 → 3.1.12

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
+ ## [3.1.12](https://github.com/semrel-extra/zx-bulk-release/compare/v3.1.11...v3.1.12) (2026-04-13)
2
+
3
+ ### Fixes & improvements
4
+ * refactor: inline queuefy ([dcb3b36](https://github.com/semrel-extra/zx-bulk-release/commit/dcb3b3655a9200a861672be7a8d23e82110465a9))
5
+
1
6
  ## [3.1.11](https://github.com/semrel-extra/zx-bulk-release/compare/v3.1.10...v3.1.11) (2026-04-13)
2
7
 
3
8
  ### Fixes & improvements
package/README.md CHANGED
@@ -437,8 +437,8 @@ See [DELIVER_SPEC.md](./docs/DELIVER_SPEC.md) for the full protocol specificatio
437
437
  ### Credential flow
438
438
  ```
439
439
  depot (build phase) courier (deliver phase)
440
- manifest: { token: '${{NPM_TOKEN}}' } resolveManifest(manifest, env)
441
- { token: 'actual-secret' }
440
+ manifest: { token: '${{NPM_TOKEN}}' } -> resolveManifest(manifest, env)
441
+ -> { token: 'actual-secret' }
442
442
  ```
443
443
  Template credentials (`${{ENV_VAR}}`) are written into manifests at pack time. Courier resolves them from `process.env` at delivery time. This means the build phase never sees real secrets — including git push credentials (`GH_TOKEN`, `GIT_COMMITTER_NAME`, `GIT_COMMITTER_EMAIL`) which are now resolved by the `git-tag` channel at delivery time.
444
444
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zx-bulk-release",
3
3
  "alias": "bulk-release",
4
- "version": "3.1.11",
4
+ "version": "3.1.12",
5
5
  "description": "zx-based alternative for multi-semantic-release",
6
6
  "type": "module",
7
7
  "exports": {
@@ -28,7 +28,6 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@semrel-extra/topo": "^1.14.1",
31
- "queuefy": "^1.2.1",
32
31
  "tar-stream": "^3.1.8",
33
32
  "zx-extra": "4.0.20"
34
33
  },
@@ -1,5 +1,5 @@
1
1
  import {fs, path} from 'zx-extra'
2
- import {queuefy} from 'queuefy'
2
+ import {queuefy} from '../../../util.js'
3
3
  import {api} from '../../api/index.js'
4
4
  import {log} from '../../log.js'
5
5
  import {hasHigherVersion} from '../seniority.js'
@@ -1,5 +1,5 @@
1
1
  import {path} from 'zx-extra'
2
- import {queuefy} from 'queuefy'
2
+ import {queuefy} from '../../../util.js'
3
3
  import {log} from '../../log.js'
4
4
  import {api} from '../../api/index.js'
5
5
  import {hasHigherVersion} from '../seniority.js'
@@ -1,4 +1,4 @@
1
- import {queuefy} from 'queuefy'
1
+ import {queuefy} from '../../../util.js'
2
2
  import {log} from '../../log.js'
3
3
  import {api} from '../../api/index.js'
4
4
  import {getArtifactPath, isAssetMode, prepareMeta} from '../../depot/generators/meta.js'
@@ -1,7 +1,7 @@
1
1
  import os from 'node:os'
2
2
  import {createRequire} from 'node:module'
3
3
  import {$, within} from 'zx-extra'
4
- import {queuefy} from 'queuefy'
4
+ import {queuefy} from '../util.js'
5
5
 
6
6
  import {createReport, log} from './log.js'
7
7
  import {topo} from './depot/deps.js'
@@ -73,18 +73,23 @@ export const camelize = s => s.replace(/-./g, x => x[1].toUpperCase())
73
73
 
74
74
  export const asArray = v => Array.isArray(v) ? v : [v]
75
75
 
76
- export const pool = async (tasks, concurrency, fn) => {
77
- const active = new Set()
78
- let i = 0
79
- await new Promise((resolve, reject) => {
80
- const next = () => {
81
- if (i >= tasks.length && active.size === 0) return resolve()
82
- while (active.size < concurrency && i < tasks.length) {
83
- const t = tasks[i++]
84
- const p = fn(t).then(() => { active.delete(p); next() }, reject)
85
- active.add(p)
86
- }
87
- }
76
+ export const queuefy = (fn, concurrency = 1) => {
77
+ const queue = []
78
+ let active = 0
79
+ const next = () => {
80
+ if (active >= concurrency || queue.length === 0) return
81
+ active++
82
+ const {args, resolve, reject} = queue.shift()
83
+ Promise.resolve().then(() => fn(...args)).then(
84
+ v => { active--; resolve(v); next() },
85
+ e => { active--; reject(e); next() }
86
+ )
87
+ }
88
+ return (...args) => new Promise((resolve, reject) => {
89
+ queue.push({args, resolve, reject})
88
90
  next()
89
91
  })
90
92
  }
93
+
94
+ export const pool = async (tasks, concurrency, fn) =>
95
+ Promise.all(tasks.map(queuefy(fn, concurrency)))