zx-bulk-release 1.10.1 → 1.11.2

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,18 @@
1
+ ## [1.11.2](https://github.com/semrel-extra/zx-bulk-release/compare/v1.11.1...v1.11.2) (2022-06-26)
2
+
3
+ ### Fixes & improvements
4
+ * fix: add global try-catch ([9255cb1](https://github.com/semrel-extra/zx-bulk-release/commit/9255cb1606ecb78a47e4fc1941cf26b3318f85ac))
5
+
6
+ ## [1.11.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.11.0...v1.11.1) (2022-06-26)
7
+
8
+ ### Fixes & improvements
9
+ * fix: sort tags by version ([0c0dfde](https://github.com/semrel-extra/zx-bulk-release/commit/0c0dfdea415a6507492beed0c6b643eaab9f92d7))
10
+
11
+ ## [1.11.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.10.1...v1.11.0) (2022-06-26)
12
+
13
+ ### Features
14
+ * feat: pass $.argv as default flags ([e07f619](https://github.com/semrel-extra/zx-bulk-release/commit/e07f619f85bccd2f8592ff3f1c3e6bc4af05b38d))
15
+
1
16
  ## [1.10.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.10.0...v1.10.1) (2022-06-26)
2
17
 
3
18
  ### Fixes & improvements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zx-bulk-release",
3
- "version": "1.10.1",
3
+ "version": "1.11.2",
4
4
  "description": "zx-based alternative for multi-semantic-release",
5
5
  "type": "module",
6
6
  "exports": "./src/main/js/index.js",
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import {argv} from 'zx-extra'
3
4
  import {run} from './index.js'
4
5
 
5
- run()
6
+ run({flags: argv})
@@ -7,6 +7,7 @@ import {build} from './build.js'
7
7
  import {getConfig} from './config.js'
8
8
 
9
9
  export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} = {}) => {
10
+ try {
10
11
  const {packages, queue, root} = await topo({cwd})
11
12
  const dryRun = flags['dry-run'] || flags.dryRun
12
13
 
@@ -33,4 +34,8 @@ export const run = async ({cwd = process.cwd(), env = process.env, flags = {}} =
33
34
  await fs.writeJson(pkg.manifestPath, pkg.manifest, {spaces: 2})
34
35
  await publish(pkg, env)
35
36
  }
37
+ } catch (e) {
38
+ console.error(e)
39
+ throw e
40
+ }
36
41
  }
@@ -88,10 +88,11 @@ export const formatTag = (tag) => f0.format(tag) || f1.format(tag) || null
88
88
  export const getTags = (cwd) => ctx(async ($) => {
89
89
  $.cwd = cwd
90
90
 
91
- return (await $`git tag -l --sort=-v:refname`).toString()
91
+ return (await $`git tag -l`).toString()
92
92
  .split('\n')
93
93
  .map(tag => parseTag(tag.trim()))
94
94
  .filter(Boolean)
95
+ .sort((a, b) => semver.rcompare(a.version, b.version))
95
96
  })
96
97
 
97
98
  export const getLatestTag = async (cwd, name) =>