zx-bulk-release 2.2.10 → 2.2.12

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,13 @@
1
+ ## [2.2.12](https://github.com/semrel-extra/zx-bulk-release/compare/v2.2.11...v2.2.12) (2023-03-27)
2
+
3
+ ### Fixes & improvements
4
+ * fix: fix git push ([5cc1d8f](https://github.com/semrel-extra/zx-bulk-release/commit/5cc1d8fb25a399a2c69e8fd990f1a6ee73011b28))
5
+
6
+ ## [2.2.11](https://github.com/semrel-extra/zx-bulk-release/compare/v2.2.10...v2.2.11) (2023-03-25)
7
+
8
+ ### Fixes & improvements
9
+ * perf: apply memoize to `gitRoot` ([4f3488b](https://github.com/semrel-extra/zx-bulk-release/commit/4f3488bd4a7faea756e7c5b6ad6e59bbdf81846b))
10
+
1
11
  ## [2.2.10](https://github.com/semrel-extra/zx-bulk-release/compare/v2.2.9...v2.2.10) (2023-03-24)
2
12
 
3
13
  ### Fixes & improvements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zx-bulk-release",
3
- "version": "2.2.10",
3
+ "version": "2.2.12",
4
4
  "description": "zx-based alternative for multi-semantic-release",
5
5
  "type": "module",
6
6
  "exports": {
@@ -50,15 +50,16 @@ export const pushCommit = async ({cwd, from, to, branch, origin, msg, ignoreFile
50
50
  throw e
51
51
  }
52
52
 
53
- await $`git pull --rebase origin ${branch}`
53
+ await $`git fetch origin ${branch} &&
54
+ git rebase origin/${branch}`
54
55
  }
55
56
  }
56
57
  })
57
58
 
58
- export const getRoot = async (cwd) => (await $.o({cwd})`git rev-parse --show-toplevel`).toString().trim()
59
-
60
59
  export const getSha = async (cwd) => (await $.o({cwd})`git rev-parse HEAD`).toString().trim()
61
60
 
61
+ export const getRoot = memoizeBy(async (cwd) => (await $.o({cwd})`git rev-parse --show-toplevel`).toString().trim())
62
+
62
63
  export const getRepo = memoizeBy(async (cwd, {basicAuth} = {}) => {
63
64
  const originUrl = await getOrigin(cwd)
64
65
  const [, , repoHost, repoName] = originUrl.replace(':', '/').replace(/\.git/, '').match(/.+(@|\/\/)([^/]+)\/(.+)$/) || []