super-release 0.14.0 → 1.0.0

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.
Files changed (2) hide show
  1. package/README.md +59 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@ update `package.json` files, publish to npm, and create git tags -- across all p
14
14
  - Changelog generation powered by [git-cliff](https://git-cliff.org/)
15
15
  - Auto-detects package manager (npm, yarn, pnpm)
16
16
  - Configurable tag format templates
17
- - Plugin system: changelog, npm, exec (extensible)
17
+ - Build in steps: changelog, npm, exec
18
18
  - Global file dependencies and ignore patterns
19
19
  - Idempotent: safe to rerun after partial failures
20
20
  - Dry-run mode with pretty, truncated output
@@ -35,6 +35,8 @@ pnpm add -D super-release
35
35
 
36
36
  The npm package automatically downloads the prebuilt native binary for your platform on first run.
37
37
 
38
+ Supported platforms: Linux (x86_64, aarch64, musl/Alpine), macOS (x86_64, Apple Silicon), Windows (x86_64).
39
+
38
40
  Alternatively, build from source:
39
41
 
40
42
  ```bash
@@ -70,6 +72,8 @@ Options:
70
72
  --show-next-version Print the next version and exit
71
73
  -p, --package <PACKAGE> Filter to a specific package (for --show-next-version)
72
74
  -v, --verbose Verbose output
75
+ --dangerously-skip-config-check
76
+ Skip config file validation against the JSON schema
73
77
  -h, --help Print help
74
78
  -V, --version Print version
75
79
  ```
@@ -93,7 +97,7 @@ In monorepos, use `--package` to select which package: `super-release --show-nex
93
97
  4. **Associate commits to packages** -- maps changed files to their owning package (respects `dependencies` and `ignore`
94
98
  config)
95
99
  5. **Calculate versions** -- determines bump levels from conventional commits
96
- 6. **Run plugins** -- changelog, npm publish, exec commands
100
+ 6. **Run steps** -- changelog, npm publish, exec commands
97
101
  7. **Git finalize** -- commits modified files, creates tags, optionally pushes
98
102
 
99
103
  ## Conventional Commits
@@ -108,15 +112,25 @@ In monorepos, use `--package` to select which package: `super-release --show-nex
108
112
 
109
113
  ## Configuration
110
114
 
111
- Create a `.release.yaml` (or `.release.yml`, `.super-release.yaml`) in your repository root. All fields are optional
112
- with sensible defaults.
115
+ Create a `.release.yaml` in your repository root. JSON (`.release.json`) and JSONC (`.release.jsonc`) are also
116
+ supported. All fields are optional with sensible defaults.
117
+
118
+ The config is validated against a bundled [JSON Schema](schema.json) at startup. Use `--dangerously-skip-config-check`
119
+ to bypass validation.
113
120
 
114
- A [JSON Schema](schema.json) is available for editor autocompletion:
121
+ For editor autocompletion:
115
122
 
116
123
  ```yaml
117
124
  # yaml-language-server: $schema=https://raw.githubusercontent.com/bowlingx/super-release/main/schema.json
118
125
  ```
119
126
 
127
+ ```jsonc
128
+ // .release.jsonc
129
+ {
130
+ "$schema": "https://raw.githubusercontent.com/bowlingx/super-release/main/schema.json"
131
+ }
132
+ ```
133
+
120
134
  ### Full Example
121
135
 
122
136
  ```yaml
@@ -127,6 +141,7 @@ branches:
127
141
  prerelease: beta
128
142
  - name: "test-*"
129
143
  prerelease: true
144
+ packages: [ "@acme/core" ] # only release core on test branches
130
145
  - name: "1.x"
131
146
  maintenance: true
132
147
 
@@ -150,7 +165,7 @@ ignore:
150
165
  - "docs/**"
151
166
  - "**/*.md"
152
167
 
153
- plugins:
168
+ steps:
154
169
  - name: changelog
155
170
  - name: npm
156
171
  options:
@@ -182,6 +197,17 @@ exits cleanly.
182
197
  | `- name: "test-*"`<br>` prerelease: true` | Prerelease (branch name as channel) | `2.0.0-test-my-feature.1` |
183
198
  | `- name: "1.x"`<br>` maintenance: true` | Maintenance | `1.5.1`, `1.6.0` (major capped) |
184
199
 
200
+ Branches can also filter which packages they release with `packages`:
201
+
202
+ ```yaml
203
+ branches:
204
+ - name: "test-*"
205
+ prerelease: true
206
+ packages: # only release these on test branches
207
+ - "@acme/core"
208
+ - "@acme/utils"
209
+ ```
210
+
185
211
  **Tag filtering by branch**: Stable branches only see stable tags. Prerelease branches see their own channel's tags plus
186
212
  stable tags. Tags on other branches that haven't been merged are ignored.
187
213
 
@@ -233,12 +259,13 @@ exclude:
233
259
  - my-monorepo-root
234
260
  ```
235
261
 
236
- #### `plugins`
262
+ #### `steps`
237
263
 
238
- Ordered list of plugins. Each plugin has a `name`, optional `packages` filter (glob), and `options`.
264
+ Ordered list of steps. Each step has a `name`, optional `packages` and `branches` filters (glob patterns), and
265
+ `options`.
239
266
 
240
267
  ```yaml
241
- plugins:
268
+ steps:
242
269
  - name: changelog
243
270
  options:
244
271
  filename: CHANGELOG.md
@@ -246,6 +273,7 @@ plugins:
246
273
 
247
274
  - name: npm
248
275
  packages: [ "@acme/*" ] # only publish @acme packages
276
+ branches: [ "main", "beta" ] # only run on main and beta branches
249
277
  options:
250
278
  access: public
251
279
  provenance: true
@@ -253,6 +281,7 @@ plugins:
253
281
  tag: next # dist-tag (default: auto from prerelease channel)
254
282
  publish_args: [ "--otp=123456" ]
255
283
  package_manager: yarn # force specific PM (default: auto-detect)
284
+ check_registry: true # check if version exists before publishing (default: true)
256
285
 
257
286
  - name: exec
258
287
  packages: [ "my-rust-lib" ]
@@ -262,19 +291,27 @@ plugins:
262
291
  files: [ Cargo.toml, Cargo.lock ] # include in git commit
263
292
  ```
264
293
 
265
- | Plugin | Prepare | Publish |
266
- |-------------|--------------------------------------------------------------|--------------------------------------------------------|
267
- | `changelog` | Generates/updates changelog per package (parallel) | -- |
268
- | `npm` | Updates `package.json` versions (auto-detects npm/yarn/pnpm) | Publishes packages (parallel within dependency levels) |
269
- | `exec` | Runs custom shell command per package | Runs custom shell command per package |
294
+ Each step can be scoped:
295
+
296
+ - **`packages`** -- glob patterns to filter which packages the step operates on. If empty, the step runs for all
297
+ packages. For example, `packages: ["@acme/*"]` limits an npm publish step to only `@acme`-scoped packages.
298
+ - **`branches`** -- glob patterns for branch names this step runs on. If empty, the step runs on all branches.
299
+ For example, `branches: ["main"]` ensures a step only runs on the main branch.
300
+
301
+ | Step | Prepare | Publish |
302
+ |-------------|----------------------------------------------------|--------------------------------------------------------|
303
+ | `changelog` | Generates/updates changelog per package (parallel) | -- |
304
+ | `npm` | -- | Publishes packages (parallel within dependency levels) |
305
+ | `exec` | Runs custom shell command per package | Runs custom shell command per package |
270
306
 
271
- Plugins return the files they modified. The core git step stages exactly those files for the commit -- no `git add .`.
307
+ Package version bumps (`package.json`) happen automatically before steps run (part of core).
308
+ Steps return the files they modified. The core git step stages exactly those files for the commit -- no `git add .`.
272
309
 
273
310
  Default: `[changelog, npm]`
274
311
 
275
312
  #### `git`
276
313
 
277
- Core git behavior after all plugins run. Not a plugin -- always runs.
314
+ Core git behavior after all steps run. Not a step -- always runs.
278
315
 
279
316
  ```yaml
280
317
  git:
@@ -291,13 +328,13 @@ Commit message placeholders:
291
328
 
292
329
  The git step:
293
330
 
294
- 1. Stages only files reported by plugins
295
- 2. Also stages any tracked-file changes (for exec commands that can't report files)
296
- 3. Commits (or skips if nothing changed)
297
- 4. Creates annotated tags for each release
298
- 5. Pushes commit + tags if `push: true`
331
+ 1. Stages files reported by steps (changelogs, exec `files`, package.json bumps)
332
+ 2. Commits (or skips if nothing changed)
333
+ 3. Creates annotated tags for each release
334
+ 4. Pushes commit + tags if `push: true`
299
335
 
300
- Tags are idempotent -- existing tags are skipped. Already-published npm packages are detected and skipped on rerun.
336
+ Tags are idempotent -- existing tags are skipped. The npm step checks the registry before publishing (`npm view`) and
337
+ skips versions that already exist. Non-404 errors (auth, network) abort the release to prevent partial publishes.
301
338
 
302
339
  ## Monorepo Structure
303
340
 
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "url": "git+https://github.com/BowlingX/super-release.git"
29
29
  },
30
30
  "type": "module",
31
- "version": "0.14.0",
31
+ "version": "1.0.0",
32
32
  "scripts": {
33
33
  "super-release": "node npm/bin/super-release.js"
34
34
  }