bulk-release 2.14.0 → 2.15.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 CHANGED
@@ -1,3 +1,8 @@
1
+ ## [2.15.0](https://github.com/semrel-extra/zx-bulk-release/compare/v2.14.0...v2.15.0) (2024-02-08)
2
+
3
+ ### Features
4
+ * feat: separate test and build steps ([3024a60](https://github.com/semrel-extra/zx-bulk-release/commit/3024a601adc7e2e819149c01c29d813d4467947a))
5
+
1
6
  ## [2.14.0](https://github.com/semrel-extra/zx-bulk-release/compare/v2.13.3...v2.14.0) (2023-12-19)
2
7
 
3
8
  ### Features
package/README.md CHANGED
@@ -44,6 +44,7 @@ GH_TOKEN=ghtoken GH_USER=username NPM_TOKEN=npmtoken npx zx-bulk-release [opts]
44
44
  | `--include-private` | Include `private` packages | `false` |
45
45
  | `--concurrency` | `build/publish` threads limit | `os.cpus.length` |
46
46
  | `--no-build` | Skip `buildCmd` invoke | |
47
+ | `--no-test` | Disable `testCmd` run | |
47
48
  | `--no-npm-fetch` | Disable npm artifacts fetching | |
48
49
  | `--only-workspace-deps` | Recognize only `workspace:` deps as graph edges | |
49
50
  | `--dry-run` / `--no-publish` | Disable any publish logic | |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bulk-release",
3
3
  "alias": "bulk-release",
4
- "version": "2.14.0",
4
+ "version": "2.15.0",
5
5
  "description": "zx-based alternative for multi-semantic-release",
6
6
  "type": "module",
7
7
  "exports": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "c8": "^8.0.1",
36
- "esbuild": "^0.19.9",
36
+ "esbuild": "^0.20.0",
37
37
  "uvu": "^0.5.6",
38
38
  "verdaccio": "^5.29.0"
39
39
  },
@@ -3,7 +3,7 @@ import {log} from '../log.js'
3
3
  import {$} from 'zx-extra'
4
4
 
5
5
  export const exec = async (pkg, name) => {
6
- const cmd = tpl(pkg.config[name], {...pkg, ...pkg.context})
6
+ const cmd = tpl(pkg.context.flags[name] ?? pkg.config[name], {...pkg, ...pkg.context})
7
7
  const now = Date.now()
8
8
 
9
9
  if (cmd) {
@@ -10,6 +10,7 @@ import {analyze} from '../steps/analyze.js'
10
10
  import {build} from '../steps/build.js'
11
11
  import {publish} from '../steps/publish.js'
12
12
  import {clean} from '../steps/clean.js'
13
+ import {test} from '../steps/test.js'
13
14
 
14
15
  export const run = async ({cwd = process.cwd(), env, flags = {}} = {}) => within(async () => {
15
16
  const {version: zbrVersion} = createRequire(import.meta.url)('../../../../package.json')
@@ -54,6 +55,10 @@ export const run = async ({cwd = process.cwd(), env, flags = {}} = {}) => within
54
55
  report.setStatus('building', name)
55
56
  await build(pkg, _exec)
56
57
  }
58
+ if (flags.test !== false) {
59
+ report.setStatus('testing', name)
60
+ await test(pkg, _exec)
61
+ }
57
62
  if (!flags.dryRun && flags.publish !== false) {
58
63
  report.setStatus('publishing', name)
59
64
  await publish(pkg, _exec)
@@ -16,7 +16,7 @@ export const build = memoizeBy(async (pkg, run = exec, flags = {}, self = build)
16
16
 
17
17
  if (!pkg.fetched) {
18
18
  await run(pkg, 'buildCmd')
19
- await run(pkg, 'testCmd')
19
+ // await run(pkg, 'testCmd')
20
20
  }
21
21
 
22
22
  pkg.built = true
@@ -0,0 +1,16 @@
1
+ import {$, within} from 'zx-extra'
2
+ import {memoizeBy} from '../util.js'
3
+ import {exec} from '../processor/exec.js'
4
+ // import {traverseDeps} from "../processor/deps.js";
5
+
6
+ export const test = memoizeBy(async (pkg, run = exec, flags = {}, self = test) => within(async () => {
7
+ $.scope = pkg.name
8
+
9
+ // await traverseDeps({pkg, packages: pkg.context.packages, cb: async({pkg}) => self(pkg, run, flags, self)})
10
+
11
+ if (!pkg.fetched) {
12
+ await run(pkg, 'testCmd')
13
+ }
14
+
15
+ pkg.tested = true
16
+ }))