bulk-release 2.11.6 → 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 +6 -0
- package/package.json +6 -6
- package/src/main/js/npm.js +12 -0
- package/src/main/js/processor.js +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
## [2.11.6](https://github.com/semrel-extra/zx-bulk-release/compare/v2.11.5...v2.11.6) (2023-09-19)
|
|
2
8
|
|
|
3
9
|
### 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.
|
|
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.
|
|
27
|
-
"cosmiconfig": "^8.
|
|
26
|
+
"@semrel-extra/topo": "^1.14.0",
|
|
27
|
+
"cosmiconfig": "^8.3.6",
|
|
28
28
|
"queuefy": "^1.2.1",
|
|
29
|
-
"zx-extra": "^2.5.
|
|
29
|
+
"zx-extra": "^2.5.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"c8": "^8.0.
|
|
32
|
+
"c8": "^8.0.1",
|
|
33
33
|
"uvu": "^0.5.6",
|
|
34
|
-
"verdaccio": "^5.
|
|
34
|
+
"verdaccio": "^5.26.2"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
package/src/main/js/npm.js
CHANGED
|
@@ -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
|
|
package/src/main/js/processor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from 'node:os'
|
|
2
2
|
import {createRequire} from 'node:module'
|
|
3
|
-
import {$,
|
|
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
|
|
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(
|
|
180
|
-
fs.writeFile(manifestPath, manifestRaw, {encoding: 'utf8'})
|
|
181
|
-
))
|
|
179
|
+
await Promise.all(Object.values(packages).map(npmRestore))
|
|
182
180
|
}
|