zx-bulk-release 1.17.4 → 1.17.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 +15 -0
- package/README.md +2 -0
- package/package.json +4 -6
- package/renovate.json +6 -0
- package/src/main/js/npm.js +3 -5
- package/src/main/js/repo.js +2 -3
- package/src/test/js/npm.test.js +17 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.17.7](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.6...v1.17.7) (2022-07-06)
|
|
2
|
+
|
|
3
|
+
### Fixes & improvements
|
|
4
|
+
* fix: fix `fetchPkg` target dir ([5ebf5f1](https://github.com/semrel-extra/zx-bulk-release/commit/5ebf5f10d42bad4c6903ef3a195da037d455e446))
|
|
5
|
+
|
|
6
|
+
## [1.17.6](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.5...v1.17.6) (2022-07-06)
|
|
7
|
+
|
|
8
|
+
### Fixes & improvements
|
|
9
|
+
* perf: update zx-extra to v2.4.0, rm own `ini` dep ([e746a72](https://github.com/semrel-extra/zx-bulk-release/commit/e746a72d28abc5f941a74dd191e54dac300a9aa7))
|
|
10
|
+
|
|
11
|
+
## [1.17.5](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.4...v1.17.5) (2022-07-05)
|
|
12
|
+
|
|
13
|
+
### Fixes & improvements
|
|
14
|
+
* perf: update zx-extra to v2.3.0 ([9de650f](https://github.com/semrel-extra/zx-bulk-release/commit/9de650fb84e1a33a1d670c394c94b565e7d11f3c))
|
|
15
|
+
|
|
1
16
|
## [1.17.4](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.3...v1.17.4) (2022-07-03)
|
|
2
17
|
|
|
3
18
|
### Fixes & improvements
|
package/README.md
CHANGED
|
@@ -243,10 +243,12 @@ Each release projects its result into the `meta` branch.
|
|
|
243
243
|
* [semantic-release/semantic-release](https://github.com/semantic-release/semantic-release)
|
|
244
244
|
* [conventional-changelog/releaser-tools](https://github.com/conventional-changelog/releaser-tools)
|
|
245
245
|
* [pmowrer/semantic-release-monorepo](https://github.com/pmowrer/semantic-release-monorepo)
|
|
246
|
+
* [ext/semantic-release-lerna](https://github.com/ext/semantic-release-lerna)
|
|
246
247
|
* [jscutlery/semver](https://github.com/jscutlery/semver)
|
|
247
248
|
* [microsoft/rushstack](https://github.com/microsoft/rushstack)
|
|
248
249
|
* [tophat/monodeploy](https://github.com/tophat/monodeploy)
|
|
249
250
|
* [intuit/auto](https://github.com/intuit/auto)
|
|
251
|
+
* [rushjs.io](https://rushjs.io/)
|
|
250
252
|
* [vercel/turborepo](https://github.com/vercel/turborepo)
|
|
251
253
|
* [lerna/lerna](https://github.com/lerna/lerna)
|
|
252
254
|
* [nrwl/nx](https://github.com/nrwl/nx)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zx-bulk-release",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.7",
|
|
4
4
|
"description": "zx-based alternative for multi-semantic-release",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./src/main/js/index.js",
|
|
@@ -11,15 +11,13 @@
|
|
|
11
11
|
"docs": "mkdir -p docs && cp ./README.md ./docs/README.md"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@semrel-extra/topo": "^1.4.
|
|
14
|
+
"@semrel-extra/topo": "^1.4.2",
|
|
15
15
|
"cosmiconfig": "^7.0.1",
|
|
16
|
-
"
|
|
17
|
-
"ini": "^3.0.0",
|
|
18
|
-
"zx-extra": "^2.1.0"
|
|
16
|
+
"zx-extra": "^2.4.0"
|
|
19
17
|
},
|
|
20
18
|
"devDependencies": {
|
|
21
19
|
"c8": "^7.11.3",
|
|
22
|
-
"uvu": "^0.5.
|
|
20
|
+
"uvu": "^0.5.6",
|
|
23
21
|
"verdaccio": "^5.13.1"
|
|
24
22
|
},
|
|
25
23
|
"publishConfig": {
|
package/renovate.json
ADDED
package/src/main/js/npm.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {parseEnv} from './config.js'
|
|
2
|
-
import {$, ctx, fs, path, tempy} from 'zx-extra'
|
|
3
|
-
import ini from 'ini'
|
|
4
|
-
import {copy} from 'git-glob-cp'
|
|
2
|
+
import {$, ctx, fs, path, tempy, copy, INI} from 'zx-extra'
|
|
5
3
|
|
|
6
4
|
export const fetchPkg = async (pkg, {env = $.env} = {}) => {
|
|
7
5
|
try {
|
|
@@ -12,7 +10,7 @@ export const fetchPkg = async (pkg, {env = $.env} = {}) => {
|
|
|
12
10
|
const tarball = getTarballUrl(npmRegistry, pkg.name, pkg.version)
|
|
13
11
|
|
|
14
12
|
await $.raw`wget --header='Authorization: ${bearerToken}' -qO- ${tarball} | tar xvz -C ${temp}`
|
|
15
|
-
await copy({from: ['**/*', '!package.json'], to: cwd,
|
|
13
|
+
await copy({from: ['**/*', '!package.json'], to: cwd, baseFrom: `${temp}/package`})
|
|
16
14
|
|
|
17
15
|
pkg.fetched = true
|
|
18
16
|
console.log(`[${pkg.name}] fetched '${pkg.name}@${pkg.version}'`)
|
|
@@ -57,7 +55,7 @@ export const getManifestUrl = (registry, name, version) => `${registry}/${name}/
|
|
|
57
55
|
|
|
58
56
|
export const getBearerToken = async (npmRegistry, npmToken, npmConfig) => {
|
|
59
57
|
const token = npmConfig
|
|
60
|
-
? getAuthToken(npmRegistry,
|
|
58
|
+
? getAuthToken(npmRegistry, INI.parse(await fs.readFile(npmConfig, 'utf8')))
|
|
61
59
|
: npmToken
|
|
62
60
|
return `Bearer ${token}`
|
|
63
61
|
}
|
package/src/main/js/repo.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {$, ctx, fs, path, tempy} from 'zx-extra'
|
|
1
|
+
import {$, ctx, fs, path, tempy, copy} from 'zx-extra'
|
|
2
2
|
import {parseEnv} from './config.js'
|
|
3
|
-
import {copydir} from 'git-glob-cp'
|
|
4
3
|
|
|
5
4
|
const branches = {}
|
|
6
5
|
export const fetch = async ({cwd: _cwd, branch, origin: _origin}) => ctx(async ($) => {
|
|
@@ -32,7 +31,7 @@ export const push = async ({cwd, from, to, branch, origin, msg, ignoreFiles, fil
|
|
|
32
31
|
const _contents = typeof contents === 'string' ? contents : JSON.stringify(contents, null, 2)
|
|
33
32
|
await fs.outputFile(path.resolve(_cwd, to, relpath), _contents)
|
|
34
33
|
}
|
|
35
|
-
if (from) await
|
|
34
|
+
if (from) await copy({baseFrom: cwd, from, baseTo: _cwd, to, ignoreFiles, cwd})
|
|
36
35
|
|
|
37
36
|
$.cwd = _cwd
|
|
38
37
|
|
package/src/test/js/npm.test.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {suite} from 'uvu'
|
|
2
2
|
import * as assert from 'uvu/assert'
|
|
3
|
-
import {fetchManifest} from '../../main/js/npm.js'
|
|
3
|
+
import {fetchManifest, fetchPkg} from '../../main/js/npm.js'
|
|
4
|
+
import {tempy, fs} from 'zx-extra'
|
|
4
5
|
|
|
5
6
|
const test = suite('npm')
|
|
6
7
|
|
|
@@ -19,4 +20,19 @@ test('fetchManifest()', async () => {
|
|
|
19
20
|
assert.is(notfound, null)
|
|
20
21
|
})
|
|
21
22
|
|
|
23
|
+
test('fetchPkg()', async () => {
|
|
24
|
+
const env = {NPM_REGISTRY: 'https://registry.npmjs.org'}
|
|
25
|
+
const temp = tempy.temporaryDirectory()
|
|
26
|
+
const pkg = {
|
|
27
|
+
name: '@semrel-extra/zxbr-test-a',
|
|
28
|
+
version: '1.9.0',
|
|
29
|
+
absPath: temp
|
|
30
|
+
}
|
|
31
|
+
await fetchPkg(pkg, {env})
|
|
32
|
+
|
|
33
|
+
// https://www.npmjs.com/package/@semrel-extra/zxbr-test-a/v/1.9.0
|
|
34
|
+
assert.equal((await fs.readFile(`${temp}/random.txt`, 'utf-8')).trim(), `vcbf
|
|
35
|
+
fffff`)
|
|
36
|
+
})
|
|
37
|
+
|
|
22
38
|
test.run()
|