bulk-release 2.11.5 → 2.11.7

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,14 @@
1
+ ## [2.11.7](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.6...v2.11.7) (2023-09-19)
2
+
3
+ ### Fixes & improvements
4
+ * perf: up deps ([ae0d80a](https://github.com/semrel-extra/zx-bulk-release/commit/ae0d80ac82b3fc49c2fc046b4b52bc17ea24f466))
5
+ * perf: add `npmPersist` helper with debug notice ([3790f4d](https://github.com/semrel-extra/zx-bulk-release/commit/3790f4dbed97e52bc937bedfacac69ce4acb5529))
6
+
7
+ ## [2.11.6](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.5...v2.11.6) (2023-09-19)
8
+
9
+ ### Fixes & improvements
10
+ * docs: mention generic-semantic-version-processing ([f9e1750](https://github.com/semrel-extra/zx-bulk-release/commit/f9e175094910f8fb27f5bed137b2a54aa5a7bdce))
11
+
1
12
  ## [2.11.5](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.4...v2.11.5) (2023-07-07)
2
13
 
3
14
  ### Fixes & improvements
package/README.md CHANGED
@@ -322,6 +322,8 @@ zx-bulk-release
322
322
  * [ojkelly/yarn.build](https://github.com/ojkelly/yarn.build)
323
323
  * [antfu/bumpp](https://github.com/antfu/bumpp)
324
324
  * [googleapis/release-please](https://github.com/googleapis/release-please)
325
+ * [generic-semantic-version-processing](https://about.gitlab.com/blog/2021/09/28/generic-semantic-version-processing/)
326
+ * [jchip/fynpo](https://github.com/jchip/fynpo)
325
327
 
326
328
  ## License
327
329
  [MIT](./LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bulk-release",
3
3
  "alias": "bulk-release",
4
- "version": "2.11.5",
4
+ "version": "2.11.7",
5
5
  "description": "zx-based alternative for multi-semantic-release",
6
6
  "type": "module",
7
7
  "exports": {
@@ -23,15 +23,15 @@
23
23
  "docs": "mkdir -p docs && cp ./README.md ./docs/README.md"
24
24
  },
25
25
  "dependencies": {
26
- "@semrel-extra/topo": "^1.13.0",
27
- "cosmiconfig": "^8.2.0",
26
+ "@semrel-extra/topo": "^1.14.0",
27
+ "cosmiconfig": "^8.3.6",
28
28
  "queuefy": "^1.2.1",
29
- "zx-extra": "^2.5.4"
29
+ "zx-extra": "^2.5.5"
30
30
  },
31
31
  "devDependencies": {
32
- "c8": "^8.0.0",
32
+ "c8": "^8.0.1",
33
33
  "uvu": "^0.5.6",
34
- "verdaccio": "^5.25.0"
34
+ "verdaccio": "^5.26.2"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -38,6 +38,18 @@ export const fetchManifest = async (pkg, {nothrow} = {}) => {
38
38
  }
39
39
  }
40
40
 
41
+ export const npmPersist = async (pkg) => {
42
+ const {name, version, manifest, manifestAbsPath} = pkg
43
+ log({pkg})(`updating ${manifestAbsPath} inners: ${name} ${version}`)
44
+ await fs.writeJson(manifestAbsPath, manifest, {spaces: 2})
45
+ }
46
+
47
+ export const npmRestore = async (pkg) => {
48
+ const {manifestRaw, manifestAbsPath} = pkg
49
+ log({pkg})(`rolling back ${manifestAbsPath} inners to manifestRaw`)
50
+ await fs.writeFile(manifestAbsPath, manifestRaw, {encoding: 'utf8'})
51
+ }
52
+
41
53
  export const npmPublish = async (pkg) => {
42
54
  const {absPath: cwd, name, version, manifest, config: {npmPublish, npmRegistry, npmToken, npmConfig, npmProvenance}} = pkg
43
55
 
@@ -1,6 +1,6 @@
1
1
  import os from 'node:os'
2
2
  import {createRequire} from 'node:module'
3
- import {$, fs, within} from 'zx-extra'
3
+ import {$, within} from 'zx-extra'
4
4
  import {queuefy} from 'queuefy'
5
5
  import {analyze} from './analyze.js'
6
6
  import {pushChangelog} from './changelog.js'
@@ -10,7 +10,7 @@ import {ghPages, ghRelease} from './gh.js'
10
10
  import {getRoot, getSha, unsetUserConfig} from './git.js'
11
11
  import {log, createReport} from './log.js'
12
12
  import {getLatest, pushMeta, pushReleaseTag} from './meta.js'
13
- import {fetchPkg, npmPublish} from './npm.js'
13
+ import {fetchPkg, npmPersist, npmPublish, npmRestore} from './npm.js'
14
14
  import {memoizeBy, tpl} from './util.js'
15
15
 
16
16
  export const run = async ({cwd = process.cwd(), env, flags = {}} = {}) => within(async () => {
@@ -153,7 +153,7 @@ const publish = memoizeBy(async (pkg, run = runCmd) => within(async () => {
153
153
  throw new Error('package.json version not synced')
154
154
  }
155
155
 
156
- await fs.writeJson(pkg.manifestPath, pkg.manifest, {spaces: 2})
156
+ await npmPersist(pkg)
157
157
 
158
158
  if (pkg.context.flags.snapshot) {
159
159
  await Promise.all([
@@ -176,7 +176,5 @@ const publish = memoizeBy(async (pkg, run = runCmd) => within(async () => {
176
176
 
177
177
  const clean = async (cwd, packages) => {
178
178
  await unsetUserConfig(cwd)
179
- await Promise.all(Object.values(packages).map(({manifestPath, manifestRaw}) =>
180
- fs.writeFile(manifestPath, manifestRaw, {encoding: 'utf8'})
181
- ))
179
+ await Promise.all(Object.values(packages).map(npmRestore))
182
180
  }