zx-bulk-release 1.7.0 → 1.7.1

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,9 @@
1
+ ## [1.7.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.7.0...v1.7.1) (2022-06-25)
2
+
3
+ ### Fixes & improvements
4
+ * fix: fix yarn install cwd ([c6f0ae3](https://github.com/semrel-extra/zx-bulk-release/commit/c6f0ae3e0e9e8feca251a567e273380e278fe2a9))
5
+ * fix: update yarn assets after build/fetch ([b2958c4](https://github.com/semrel-extra/zx-bulk-release/commit/b2958c4d3de768bf993faad4816bbb7116d7bd78))
6
+
1
7
  ## [1.7.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.6.0...v1.7.0) (2022-06-25)
2
8
 
3
9
  ### Features
package/README.md CHANGED
@@ -3,6 +3,11 @@
3
3
 
4
4
  🚧 Work in progress. Early access preview
5
5
 
6
+ ## Requirements
7
+ * macOS / linux
8
+ * Node.js >= 16.0.0
9
+ * yarn >= 4.0.0-rc.5
10
+
6
11
  ## Usage
7
12
  ```shell
8
13
  GH_TOKEN=foo NPM_TOKEN=bar npx zx-bulk-release [opts]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zx-bulk-release",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "zx-based alternative for multi-semantic-release",
5
5
  "type": "module",
6
6
  "exports": "./src/main/js/index.js",
@@ -1,13 +1,12 @@
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'
5
5
  import {publish, getLatest} from './publish.js'
6
6
  import {build} from './build.js'
7
7
 
8
- export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} = {}) => {
9
- console.log('Run zx bulk release')
10
- const {packages, queue} = await topo({cwd})
8
+ export const run = ({cwd = process.cwd(), env = process.env, flags = {}} = {}) => ctx(async ($) => {
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) {
@@ -26,9 +25,13 @@ export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} =
26
25
  console.log(`semantic changes of '${name}'`, changes)
27
26
 
28
27
  pkg.build = await build(pkg, packages)
28
+
29
+ $.cwd = cwd
30
+ await $`yarn`
31
+
29
32
  if (dryRun) continue
30
33
 
31
34
  await fs.writeJson(pkg.manifestPath, pkg.manifest, {spaces: 2})
32
35
  await publish(pkg, env)
33
36
  }
34
- }
37
+ })
@@ -21,7 +21,8 @@ const cwd = await createFakeRepo({
21
21
  relpath: './package.json',
22
22
  contents: {
23
23
  name: 'root',
24
- workspaces: ['packages/*']
24
+ workspaces: ['packages/*'],
25
+ private: true,
25
26
  }
26
27
  }
27
28
  ]