zx-bulk-release 1.17.0 → 1.17.3
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 +15 -0
- package/README.md +44 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.17.3](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.2...v1.17.3) (2022-06-29)
|
|
2
|
+
|
|
3
|
+
### Fixes & improvements
|
|
4
|
+
* docs: add roadmap ([185a12d](https://github.com/semrel-extra/zx-bulk-release/commit/185a12d8956c3e274035b863682afee3bd64ccb7))
|
|
5
|
+
|
|
6
|
+
## [1.17.2](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.1...v1.17.2) (2022-06-28)
|
|
7
|
+
|
|
8
|
+
### Fixes & improvements
|
|
9
|
+
* docs: add npm badge ([f63dfe3](https://github.com/semrel-extra/zx-bulk-release/commit/f63dfe338208641a8edd910b81e320deeed2446c))
|
|
10
|
+
|
|
11
|
+
## [1.17.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.17.0...v1.17.1) (2022-06-28)
|
|
12
|
+
|
|
13
|
+
### Fixes & improvements
|
|
14
|
+
* docs: describe `analyze` step ([ae611ad](https://github.com/semrel-extra/zx-bulk-release/commit/ae611ada7709d9f9fa72d20f39e74ebe05353a2d))
|
|
15
|
+
|
|
1
16
|
## [1.17.0](https://github.com/semrel-extra/zx-bulk-release/compare/v1.16.2...v1.17.0) (2022-06-28)
|
|
2
17
|
|
|
3
18
|
### Fixes & improvements
|
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
[](https://github.com/semrel-extra/zx-bulk-release/actions)
|
|
5
5
|
[](https://codeclimate.com/github/semrel-extra/zx-bulk-release/maintainability)
|
|
6
6
|
[](https://codeclimate.com/github/semrel-extra/zx-bulk-release/test_coverage)
|
|
7
|
+
[](https://www.npmjs.com/package/zx-bulk-release)
|
|
7
8
|
|
|
8
9
|
🚧 Work in progress. Early access preview
|
|
9
10
|
|
|
@@ -14,7 +15,13 @@
|
|
|
14
15
|
* No default branch blocking (no release commits).
|
|
15
16
|
* Pkg changelogs go to `changelog` branch (configurable).
|
|
16
17
|
* Docs are published to `gh-pages` branch (configurable).
|
|
17
|
-
* No extra builds. The required deps are fetched from the pkg registry (`npmFetch`
|
|
18
|
+
* No extra builds. The required deps are fetched from the pkg registry (`npmFetch` config opt).
|
|
19
|
+
|
|
20
|
+
## Roadmap
|
|
21
|
+
* [ ] Multistack. Add support for java/kt/py.
|
|
22
|
+
* [ ] Self-repair. Restore broken/missing metadata from external registries (npm, pypi, m2).
|
|
23
|
+
* [ ] Semaphore. Let several release agents to serve the monorepo at the same time.
|
|
24
|
+
* [ ] Stats. Store release metrics to `meta`.
|
|
18
25
|
|
|
19
26
|
## Requirements
|
|
20
27
|
* macOS / linux
|
|
@@ -22,6 +29,10 @@
|
|
|
22
29
|
* npm >=7 / yarn >= 3
|
|
23
30
|
|
|
24
31
|
## Usage
|
|
32
|
+
### Install
|
|
33
|
+
```shell
|
|
34
|
+
yarn add zx-bulk-release
|
|
35
|
+
```
|
|
25
36
|
### CLI
|
|
26
37
|
```shell
|
|
27
38
|
GH_TOKEN=ghtoken GH_USER=username NPM_TOKEN=npmtoken npx zx-bulk-release [opts]
|
|
@@ -130,14 +141,43 @@ try {
|
|
|
130
141
|
```
|
|
131
142
|
|
|
132
143
|
### `topo`
|
|
133
|
-
[Toposort](https://github.com/semrel-extra/topo) is used to
|
|
144
|
+
[Toposort](https://github.com/semrel-extra/topo) is used to resolve the pkg release queue.
|
|
134
145
|
By default, it omits the packages marked as `private`. You can override this by setting the `--include-private` flag.
|
|
135
146
|
|
|
136
147
|
### `analyze`
|
|
137
148
|
Determines pkg changes, release type, next version etc.
|
|
149
|
+
```js
|
|
150
|
+
export const analyze = async (pkg, packages, root) => {
|
|
151
|
+
pkg.config = await getConfig(pkg.absPath, root.absPath)
|
|
152
|
+
pkg.latest = await getLatest(pkg)
|
|
153
|
+
|
|
154
|
+
const semanticChanges = await getSemanticChanges(pkg.absPath, pkg.latest.tag?.ref)
|
|
155
|
+
const depsChanges = await updateDeps(pkg, packages)
|
|
156
|
+
const changes = [...semanticChanges, ...depsChanges]
|
|
157
|
+
|
|
158
|
+
pkg.changes = changes
|
|
159
|
+
pkg.version = resolvePkgVersion(changes, pkg.latest.tag?.version || pkg.manifest.version)
|
|
160
|
+
pkg.manifest.version = pkg.version
|
|
161
|
+
|
|
162
|
+
console.log(`[${pkg.name}] semantic changes`, changes)
|
|
163
|
+
}
|
|
164
|
+
```
|
|
138
165
|
|
|
139
166
|
### `build`
|
|
140
|
-
|
|
167
|
+
Applies `config.cmd` to build pkg assets: bundles, docs, etc.
|
|
168
|
+
```js
|
|
169
|
+
export const build = async (pkg, packages) => {
|
|
170
|
+
// ...
|
|
171
|
+
if (!pkg.fetched && config.cmd) {
|
|
172
|
+
console.log(`[${pkg.name}] run cmd '${config.cmd}'`)
|
|
173
|
+
await $.o({cwd: pkg.absPath, quote: v => v})`${config.cmd}`
|
|
174
|
+
}
|
|
175
|
+
// ...
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### `publish`
|
|
180
|
+
Publish the pkg to git, npm, gh-pages, gh-release, etc.
|
|
141
181
|
```js
|
|
142
182
|
export const publish = async (pkg) => {
|
|
143
183
|
await fs.writeJson(pkg.manifestPath, pkg.manifest, {spaces: 2})
|
|
@@ -150,9 +190,6 @@ export const publish = async (pkg) => {
|
|
|
150
190
|
}
|
|
151
191
|
```
|
|
152
192
|
|
|
153
|
-
### `publish`
|
|
154
|
-
Publish the pkg to git, npm, gh-pages, gh-release, etc.
|
|
155
|
-
|
|
156
193
|
### Tags
|
|
157
194
|
[Lerna](https://github.com/lerna/lerna) tags (like `@pkg/name@v1.0.0-beta.0`) are suitable for monorepos, but they don’t follow [semver spec](https://semver.org/). Therefore, we propose another contract:
|
|
158
195
|
```js
|
|
@@ -207,6 +244,7 @@ Each release projects its result into the `meta` branch.
|
|
|
207
244
|
* [conventional-changelog/releaser-tools](https://github.com/conventional-changelog/releaser-tools)
|
|
208
245
|
* [pmowrer/semantic-release-monorepo](https://github.com/pmowrer/semantic-release-monorepo)
|
|
209
246
|
* [jscutlery/semver](https://github.com/jscutlery/semver)
|
|
247
|
+
* [microsoft/rushstack](https://github.com/microsoft/rushstack)
|
|
210
248
|
* [tophat/monodeploy](https://github.com/tophat/monodeploy)
|
|
211
249
|
* [intuit/auto](https://github.com/intuit/auto)
|
|
212
250
|
* [vercel/turborepo](https://github.com/vercel/turborepo)
|