bulk-release 2.18.1 → 2.18.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,13 @@
|
|
|
1
|
+
## [2.18.3](https://github.com/semrel-extra/zx-bulk-release/compare/v2.18.2...v2.18.3) (2026-04-05)
|
|
2
|
+
|
|
3
|
+
### Fixes & improvements
|
|
4
|
+
* fix: use default gh username ([5f3ae20](https://github.com/semrel-extra/zx-bulk-release/commit/5f3ae20f4977b8c1f1d09a7367d15d78c211e6a8))
|
|
5
|
+
|
|
6
|
+
## [2.18.2](https://github.com/semrel-extra/zx-bulk-release/compare/v2.18.1...v2.18.2) (2026-04-05)
|
|
7
|
+
|
|
8
|
+
### Fixes & improvements
|
|
9
|
+
* fix: enhance recovery ([2bb5c4d](https://github.com/semrel-extra/zx-bulk-release/commit/2bb5c4dbd9ccf9a54ecc26065f5693517b815472))
|
|
10
|
+
|
|
1
11
|
## [2.18.1](https://github.com/semrel-extra/zx-bulk-release/compare/v2.18.0...v2.18.1) (2026-04-05)
|
|
2
12
|
|
|
3
13
|
### Fixes & improvements
|
package/package.json
CHANGED
package/src/main/js/api/git.js
CHANGED
|
@@ -115,6 +115,9 @@ export const pushTag = async ({cwd, tag, gitCommitterName, gitCommitterEmail}) =
|
|
|
115
115
|
git push origin ${tag}`
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
export const fetchTags = async (cwd) =>
|
|
119
|
+
$({cwd})`git fetch --tags`
|
|
120
|
+
|
|
118
121
|
export const deleteRemoteTag = async ({cwd, tag}) => {
|
|
119
122
|
log()(`rolling back remote tag '${tag}'`)
|
|
120
123
|
await $({cwd, nothrow: true})`git push origin :refs/tags/${tag}`
|
package/src/main/js/config.js
CHANGED
|
@@ -58,7 +58,7 @@ export const normalizeMetaConfig = (meta) =>
|
|
|
58
58
|
|
|
59
59
|
export const parseEnv = ({GH_USER, GH_USERNAME, GH_META, GITHUB_USER, GITHUB_USERNAME, GH_TOKEN, GITHUB_TOKEN, NPM_TOKEN, NPM_REGISTRY, NPMRC, NPM_USERCONFIG, NPM_CONFIG_USERCONFIG, NPM_PROVENANCE, NPM_OIDC, ACTIONS_ID_TOKEN_REQUEST_URL, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL} = process.env) =>
|
|
60
60
|
({
|
|
61
|
-
ghUser: GH_USER || GH_USERNAME || GITHUB_USER || GITHUB_USERNAME,
|
|
61
|
+
ghUser: GH_USER || GH_USERNAME || GITHUB_USER || GITHUB_USERNAME || ((GH_TOKEN || GITHUB_TOKEN) ? 'x-access-token' : undefined),
|
|
62
62
|
ghToken: GH_TOKEN || GITHUB_TOKEN,
|
|
63
63
|
ghMeta: GH_META,
|
|
64
64
|
npmConfig: NPMRC || NPM_USERCONFIG || NPM_CONFIG_USERCONFIG,
|
|
@@ -6,6 +6,7 @@ import {topo, traverseQueue} from './deps.js'
|
|
|
6
6
|
import {createReport} from '../log.js'
|
|
7
7
|
import {exec} from './exec.js'
|
|
8
8
|
import {contextify, recover} from '../steps/contextify.js'
|
|
9
|
+
import {fetchTags} from '../api/git.js'
|
|
9
10
|
import {analyze} from '../steps/analyze.js'
|
|
10
11
|
import {build} from '../steps/build.js'
|
|
11
12
|
import {publish} from '../steps/publish.js'
|
|
@@ -31,6 +32,7 @@ export const run = async ({cwd = process.cwd(), env, flags = {}} = {}) => within
|
|
|
31
32
|
// --recover: standalone mode — clean orphan tags and exit.
|
|
32
33
|
// Run the full pipeline again after this to rebuild and publish affected packages.
|
|
33
34
|
if (flags.recover) {
|
|
35
|
+
await fetchTags(cwd)
|
|
34
36
|
let recovered = 0
|
|
35
37
|
for (const name of queue) {
|
|
36
38
|
const pkg = packages[name]
|
|
@@ -29,6 +29,7 @@ export const rollbackRelease = async (pkg) => {
|
|
|
29
29
|
|
|
30
30
|
const cwd = pkg.context.git.root
|
|
31
31
|
const {ghBasicAuth: basicAuth, ghToken, gitCommitterName, gitCommitterEmail} = pkg.config
|
|
32
|
+
if (!basicAuth) throw new Error('rollback requires git credentials (GH_TOKEN)')
|
|
32
33
|
const {repoName} = await getRepo(cwd, {basicAuth})
|
|
33
34
|
|
|
34
35
|
log({pkg})(`rollback: cleaning up failed release for tag '${tag}'`)
|
|
@@ -98,6 +99,7 @@ export const recover = async (pkg) => {
|
|
|
98
99
|
|
|
99
100
|
const cwd = await getRoot(pkg.absPath)
|
|
100
101
|
const {ghBasicAuth: basicAuth, ghToken, gitCommitterName, gitCommitterEmail} = pkg.config
|
|
102
|
+
if (!basicAuth) throw new Error('recover requires git credentials (GH_TOKEN)')
|
|
101
103
|
const {repoName} = await getRepo(cwd, {basicAuth})
|
|
102
104
|
|
|
103
105
|
log({pkg})(`recover: tag '${tag.ref}' exists but ${pkg.name}@${tag.version} not found on npm, rolling back failed release`)
|