zx-bulk-release 3.1.2 → 3.1.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [3.1.3](https://github.com/semrel-extra/zx-bulk-release/compare/v3.1.2...v3.1.3) (2026-04-13)
2
+
3
+ ### Fixes & improvements
4
+ * fix: ensure temp tar dirs ([ffc0b25](https://github.com/semrel-extra/zx-bulk-release/commit/ffc0b2512c16540a4d260ffc6e02488a96b68194))
5
+
1
6
  ## [3.1.2](https://github.com/semrel-extra/zx-bulk-release/compare/v3.1.1...v3.1.2) (2026-04-13)
2
7
 
3
8
  ### Fixes & improvements
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.2",
4
+ "version": "3.1.3",
5
5
  "description": "zx-based alternative for multi-semantic-release",
6
6
  "type": "module",
7
7
  "exports": {
@@ -1,3 +1,4 @@
1
+ import crypto from 'node:crypto'
1
2
  import {$, tempy, fs, path} from 'zx-extra'
2
3
  import {memoizeBy, asTuple} from '../../../util.js'
3
4
  import {prepare, getActiveChannels} from '../../courier/index.js'
@@ -41,7 +42,7 @@ export const pack = memoizeBy(async (pkg, ctx = pkg.ctx) => {
41
42
  const tars = []
42
43
  for (const {channel, manifest, files} of parcels) {
43
44
  // Two-pass: pack to temp, hash, rename to final name.
44
- const tmpPath = path.join(stageDir, `_tmp.${channel}.tar`)
45
+ const tmpPath = path.join(stageDir, `_tmp.${crypto.randomUUID()}.tar`)
45
46
  await packTar(tmpPath, manifest, files)
46
47
  const hash = await hashFile(tmpPath)
47
48
  const sha7 = ctx.git.sha.slice(0, 7)
@@ -5,6 +5,7 @@ import {pipeline} from 'node:stream/promises'
5
5
  import {createWriteStream, createReadStream} from 'node:fs'
6
6
 
7
7
  export const packTar = async (tarPath, manifest, files = []) => {
8
+ await fs.ensureDir(path.dirname(tarPath))
8
9
  const pack = tar.pack()
9
10
  const json = JSON.stringify(manifest, null, 2)
10
11
  pack.entry({name: 'manifest.json', size: Buffer.byteLength(json)}, json)