zx-bulk-release 1.7.0 → 1.7.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 +16 -0
- package/README.md +5 -0
- package/package.json +1 -1
- package/src/main/js/build.js +8 -4
- package/src/main/js/index.js +4 -4
- package/src/test/js/integration.test.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.7.3](https://github.com/semrel-extra/zx-bulk-release/compare/v1.7.2...v1.7.3) (2022-06-25)
|
|
2
|
+
|
|
3
|
+
### Fixes & improvements
|
|
4
|
+
* fix: mv yarn install to build.js ([3d49325](https://github.com/semrel-extra/zx-bulk-release/commit/3d49325b5348a80ee6c7e4c5647f459e81130af7))
|
|
5
|
+
|
|
6
|
+
## [1.7.2](https://github.com/semrel-extra/zx-bulk-release/compare/v1.7.1...v1.7.2) (2022-06-25)
|
|
7
|
+
|
|
8
|
+
### Fixes & improvements
|
|
9
|
+
* fix: fix npm token path for npm fetching ([33e9b59](https://github.com/semrel-extra/zx-bulk-release/commit/33e9b599f77e0fc77d8964df9da6df2a75e9d227))
|
|
10
|
+
|
|
11
|
+
## [1.7.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.7.0...v1.7.1) (2022-06-25)
|
|
12
|
+
|
|
13
|
+
### Fixes & improvements
|
|
14
|
+
* fix: fix yarn install cwd ([c6f0ae3](https://github.com/semrel-extra/zx-bulk-release/commit/c6f0ae3e0e9e8feca251a567e273380e278fe2a9))
|
|
15
|
+
* fix: update yarn assets after build/fetch ([b2958c4](https://github.com/semrel-extra/zx-bulk-release/commit/b2958c4d3de768bf993faad4816bbb7116d7bd78))
|
|
16
|
+
|
|
1
17
|
## [1.7.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.6.0...v1.7.0) (2022-06-25)
|
|
2
18
|
|
|
3
19
|
### Features
|
package/README.md
CHANGED
package/package.json
CHANGED
package/src/main/js/build.js
CHANGED
|
@@ -4,7 +4,7 @@ import ini from 'ini'
|
|
|
4
4
|
import {traverseDeps} from './deps.js'
|
|
5
5
|
import {parseEnv} from './publish.js'
|
|
6
6
|
|
|
7
|
-
export const build = (pkg, packages) => ctx(async ($) => {
|
|
7
|
+
export const build = (pkg, packages, root) => ctx(async ($) => {
|
|
8
8
|
if (pkg.built) return true
|
|
9
9
|
|
|
10
10
|
await traverseDeps(pkg, packages, async (_, {pkg}) => build(pkg, packages))
|
|
@@ -22,6 +22,9 @@ export const build = (pkg, packages) => ctx(async ($) => {
|
|
|
22
22
|
console.log(`tested '${pkg.name}'`)
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
$.cwd = root
|
|
27
|
+
await $`yarn`
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
pkg.built = true
|
|
@@ -32,10 +35,11 @@ export const build = (pkg, packages) => ctx(async ($) => {
|
|
|
32
35
|
const fetchPkg = (pkg) => ctx(async ($) => {
|
|
33
36
|
try {
|
|
34
37
|
const cwd = pkg.absPath
|
|
35
|
-
const {npmRegistry} = parseEnv($.env)
|
|
38
|
+
const {npmRegistry, npmToken, npmConfig} = parseEnv($.env)
|
|
36
39
|
const temp = tempy.temporaryDirectory()
|
|
37
|
-
const
|
|
38
|
-
|
|
40
|
+
const token = npmToken
|
|
41
|
+
? npmToken
|
|
42
|
+
: getAuthToken(npmRegistry, ini.parse(await fs.readFile(npmConfig, 'utf8')))
|
|
39
43
|
const auth = `Authorization: Bearer ${token}`
|
|
40
44
|
const tarball = getTarballUrl(npmRegistry, pkg.name, pkg.version)
|
|
41
45
|
|
package/src/main/js/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {fs} from 'zx-extra'
|
|
1
|
+
import {fs, ctx} from 'zx-extra'
|
|
2
2
|
import {topo} from '@semrel-extra/topo'
|
|
3
3
|
import {updateDeps} from './deps.js'
|
|
4
4
|
import {getSemanticChanges, resolvePkgVersion} from './analyze.js'
|
|
@@ -6,8 +6,7 @@ import {publish, getLatest} from './publish.js'
|
|
|
6
6
|
import {build} from './build.js'
|
|
7
7
|
|
|
8
8
|
export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} = {}) => {
|
|
9
|
-
|
|
10
|
-
const {packages, queue} = await topo({cwd})
|
|
9
|
+
const {packages, queue, root} = await topo({cwd})
|
|
11
10
|
const dryRun = flags['dry-run'] || flags.dryRun
|
|
12
11
|
|
|
13
12
|
for (let name of queue) {
|
|
@@ -25,7 +24,8 @@ export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} =
|
|
|
25
24
|
if (changes.length === 0) continue
|
|
26
25
|
console.log(`semantic changes of '${name}'`, changes)
|
|
27
26
|
|
|
28
|
-
pkg.build = await build(pkg, packages)
|
|
27
|
+
pkg.build = await build(pkg, packages, cwd)
|
|
28
|
+
|
|
29
29
|
if (dryRun) continue
|
|
30
30
|
|
|
31
31
|
await fs.writeJson(pkg.manifestPath, pkg.manifest, {spaces: 2})
|