bulk-release 2.11.2 → 2.11.4

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,13 @@
1
+ ## [2.11.4](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.3...v2.11.4) (2023-06-29)
2
+
3
+ ### Fixes & improvements
4
+ * fix: do not try to fetch private packages ([a6889bb](https://github.com/semrel-extra/zx-bulk-release/commit/a6889bb45e2bd05f82a05d20c4153baa5c6f1ab3))
5
+
6
+ ## [2.11.3](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.2...v2.11.3) (2023-06-27)
7
+
8
+ ### Fixes & improvements
9
+ * fix: apply dir strip to tar inners ([3f5ccd8](https://github.com/semrel-extra/zx-bulk-release/commit/3f5ccd89134331604859969c8d10887d27d9aa6f))
10
+
1
11
  ## [2.11.2](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.1...v2.11.2) (2023-06-27)
2
12
 
3
13
  ### Fixes & improvements
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bulk-release",
3
3
  "alias": "bulk-release",
4
- "version": "2.11.2",
4
+ "version": "2.11.4",
5
5
  "description": "zx-based alternative for multi-semantic-release",
6
6
  "type": "module",
7
7
  "exports": {
package/src/main/js/gh.js CHANGED
@@ -63,20 +63,24 @@ export const ghPages = queuefy(async (pkg) => {
63
63
  export const ghPrepareAssets = async (assets, _cwd) => {
64
64
  const temp = tempy.temporaryDirectory()
65
65
 
66
- await Promise.all(assets.map(async ({name, source = 'target/**/*', zip, cwd = _cwd}) => {
66
+ await Promise.all(assets.map(async ({name, source = 'target/**/*', zip, cwd = _cwd, strip = true}) => {
67
67
  const patterns = asArray(source)
68
68
  const target = path.join(temp, name)
69
69
  if (patterns.some(s => s.includes('*'))) {
70
70
  zip = true
71
71
  }
72
- const files = await glob(patterns, {cwd, absolute: true, onlyFiles: true})
73
-
72
+ const files = await glob(patterns, {cwd, absolute: false, onlyFiles: true})
74
73
  if (!zip && files.length === 1) {
75
- await fs.copy(files[0], target)
74
+ await fs.copy(path.join(cwd, files[0]), target)
76
75
  return
77
76
  }
78
77
 
79
- return $.raw`tar -C ${cwd} -cv${zip ? 'z' : ''}f ${target} ${files.join(' ')}`
78
+ const common = files.length === 1
79
+ ? files[0].lastIndexOf('/') + 1
80
+ : [...(files[0])].findIndex((c, i) => files.some(f => f.charAt(i) !== c))
81
+ const prefix = files[0].slice(0, common)
82
+
83
+ return $.raw`tar -C ${common ? path.join(cwd, prefix) : cwd} -cv${zip ? 'z' : ''}f ${target} ${files.map(f => common ? f.slice(common) : f).join(' ')}`
80
84
  }))
81
85
 
82
86
  return temp
@@ -129,7 +129,7 @@ const build = memoizeBy(async (pkg, run = runCmd, flags = {}, self = build) => w
129
129
 
130
130
  await Promise.all([
131
131
  traverseDeps({pkg, packages: pkg.context.packages, cb: async({pkg}) => self(pkg, run, flags, self)}),
132
- pkg.changes.length === 0 && pkg.config.npmFetch && flags.npmFetch !== false
132
+ pkg.manifest.private !== true && pkg.changes.length === 0 && pkg.config.npmFetch && flags.npmFetch !== false
133
133
  ? fetchPkg(pkg)
134
134
  : Promise.resolve()
135
135
  ])