zx-bulk-release 2.2.10 → 2.2.11
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/git.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## [2.2.11](https://github.com/semrel-extra/zx-bulk-release/compare/v2.2.10...v2.2.11) (2023-03-25)
|
|
2
|
+
|
|
3
|
+
### Fixes & improvements
|
|
4
|
+
* perf: apply memoize to `gitRoot` ([4f3488b](https://github.com/semrel-extra/zx-bulk-release/commit/4f3488bd4a7faea756e7c5b6ad6e59bbdf81846b))
|
|
5
|
+
|
|
1
6
|
## [2.2.10](https://github.com/semrel-extra/zx-bulk-release/compare/v2.2.9...v2.2.10) (2023-03-24)
|
|
2
7
|
|
|
3
8
|
### Fixes & improvements
|
package/package.json
CHANGED
package/src/main/js/git.js
CHANGED
|
@@ -55,10 +55,10 @@ export const pushCommit = async ({cwd, from, to, branch, origin, msg, ignoreFile
|
|
|
55
55
|
}
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
export const getRoot = async (cwd) => (await $.o({cwd})`git rev-parse --show-toplevel`).toString().trim()
|
|
59
|
-
|
|
60
58
|
export const getSha = async (cwd) => (await $.o({cwd})`git rev-parse HEAD`).toString().trim()
|
|
61
59
|
|
|
60
|
+
export const getRoot = memoizeBy(async (cwd) => (await $.o({cwd})`git rev-parse --show-toplevel`).toString().trim())
|
|
61
|
+
|
|
62
62
|
export const getRepo = memoizeBy(async (cwd, {basicAuth} = {}) => {
|
|
63
63
|
const originUrl = await getOrigin(cwd)
|
|
64
64
|
const [, , repoHost, repoName] = originUrl.replace(':', '/').replace(/\.git/, '').match(/.+(@|\/\/)([^/]+)\/(.+)$/) || []
|