zx-bulk-release 2.9.3 → 2.10.0
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 +5 -0
- package/package.json +1 -1
- package/src/main/js/npm.js +3 -1
- package/src/main/js/processor.js +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [2.10.0](https://github.com/semrel-extra/zx-bulk-release/compare/v2.9.3...v2.10.0) (2023-06-27)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
* feat: log `fetch`, `build` & `test` steps duration ([b7b3db3](https://github.com/semrel-extra/zx-bulk-release/commit/b7b3db3af378f3153f8ad8fa62eec79852da6c0b))
|
|
5
|
+
|
|
1
6
|
## [2.9.3](https://github.com/semrel-extra/zx-bulk-release/compare/v2.9.2...v2.9.3) (2023-06-27)
|
|
2
7
|
|
|
3
8
|
### Fixes & improvements
|
package/package.json
CHANGED
package/src/main/js/npm.js
CHANGED
|
@@ -3,6 +3,7 @@ import {$, fs, INI, fetch, tempy} from 'zx-extra'
|
|
|
3
3
|
|
|
4
4
|
export const fetchPkg = async (pkg) => {
|
|
5
5
|
const id = `${pkg.name}@${pkg.version}`
|
|
6
|
+
const now = Date.now()
|
|
6
7
|
|
|
7
8
|
try {
|
|
8
9
|
const cwd = pkg.absPath
|
|
@@ -11,8 +12,9 @@ export const fetchPkg = async (pkg) => {
|
|
|
11
12
|
const bearerToken = getBearerToken(npmRegistry, npmToken, npmConfig)
|
|
12
13
|
const authorization = bearerToken ? `--header='Authorization: ${bearerToken}'` : ''
|
|
13
14
|
log({pkg})(`fetching '${id}' from ${npmRegistry}`)
|
|
14
|
-
await $.raw`wget --timeout=
|
|
15
|
+
await $.raw`wget --timeout=15 --connect-timeout=5 ${authorization} -qO- ${tarballUrl} | tar -xvz --strip-components=1 --exclude='package.json' -C ${cwd}`
|
|
15
16
|
|
|
17
|
+
log({pkg})(`fetch duration '${id}': ${Date.now() - now}`)
|
|
16
18
|
pkg.fetched = true
|
|
17
19
|
} catch (e) {
|
|
18
20
|
log({pkg, level: 'warn'})(`fetching '${id}' failed`, e)
|
package/src/main/js/processor.js
CHANGED
|
@@ -79,10 +79,14 @@ export const run = async ({cwd = process.cwd(), env, flags = {}} = {}) => within
|
|
|
79
79
|
|
|
80
80
|
export const runCmd = async (pkg, name) => {
|
|
81
81
|
const cmd = tpl(pkg.config[name], {...pkg, ...pkg.context})
|
|
82
|
+
const now = Date.now()
|
|
82
83
|
|
|
83
84
|
if (cmd) {
|
|
84
85
|
log({pkg})(`run ${name} '${cmd}'`)
|
|
85
|
-
|
|
86
|
+
const result = await $.o({cwd: pkg.absPath, quote: v => v, preferLocal: true})`${cmd}`
|
|
87
|
+
|
|
88
|
+
log({pkg})(`duration ${name}: ${Date.now() - now}`)
|
|
89
|
+
return result
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
|