@matfsw/docusaurus-plantuml-plugin 1.5.0 → 1.5.1

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 (3) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/README.md +61 -4
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.5.1] - 2026-08-20
11
+
12
+ ### Changed
13
+
14
+ - **Dependency updates merge themselves, and releases are cut by CI rather than from a laptop.**
15
+ Dependabot now opens **one** pull request a week for npm — covering the plugin and the example
16
+ site together — and one for GitHub Actions. Minor and patch updates auto-merge once the new
17
+ `CI complete` check is green; majors ride in the same pull request and are held for review with
18
+ a comment naming what holds them.
19
+
20
+ Every green `main` then runs `.github/workflows/release.yml`, which reads `## [Unreleased]` to
21
+ decide the version (`### Removed` or `BREAKING` → major, `### Added` → minor, anything else →
22
+ patch, empty → no release), bumps `package.json` and `package-lock.json`, closes the section
23
+ into a dated one, and pushes the commit and the tag **atomically**. The old
24
+ `npm version && git push --follow-tags` recipe could leave a tag pointing at a pre-rebase commit
25
+ whenever a dependency pull request landed in between — and `verify:tag` could not see it,
26
+ because the tag and `package.json` agreed. `publish.yml` now also creates the GitHub Release,
27
+ after npm has accepted the publish. Recorded in
28
+ [ADR 0006](docs/adr/0006-automated-release-from-changelog.md).
29
+
30
+ - `npm run sync:check` now also asserts that `package-lock.json`'s `version` fields match
31
+ `package.json`, and `npm run sync:meta` fixes them. That drift had to be repaired by hand once
32
+ already.
33
+
10
34
  ## [1.5.0] - 2026-08-14
11
35
 
12
36
  ### Added
@@ -482,7 +506,8 @@ Initial release.
482
506
  opt-out.
483
507
  - Plugin option validation that rejects unknown keys and out-of-range values at build time.
484
508
 
485
- [Unreleased]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.0...HEAD
509
+ [Unreleased]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.1...HEAD
510
+ [1.5.1]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.0...v1.5.1
486
511
  [1.5.0]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.4.0...v1.5.0
487
512
  [1.4.0]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.3.1...v1.4.0
488
513
  [1.3.1]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.3.0...v1.3.1
package/README.md CHANGED
@@ -1245,11 +1245,35 @@ DOT-only page that proves the PlantUML engine is never fetched for it.
1245
1245
 
1246
1246
  ## Release process
1247
1247
 
1248
- Releases are triggered by pushing a version tag:
1248
+ Releases are automatic. Nothing is run from a local checkout, and nothing is tagged by hand.
1249
+
1250
+ Every merge into `main` runs CI; when CI goes green, `.github/workflows/release.yml` reads
1251
+ `CHANGELOG.md` and decides whether the merge warrants a release and at what level:
1252
+
1253
+ | `## [Unreleased]` contains | Release |
1254
+ | -------------------------------------------------- | ------- |
1255
+ | `### Removed`, or the word `BREAKING` | major |
1256
+ | `### Added` | minor |
1257
+ | any other section (`Fixed`, `Changed`, `Security`) | patch |
1258
+ | nothing, but only dependency bumps since the tag | patch |
1259
+ | nothing else | none |
1260
+
1261
+ That is why `CONTRIBUTING.md` insists on a `## [Unreleased]` entry in every pull request: the
1262
+ entry is what sets the version. Dependency-only merges need no entry — the workflow writes one
1263
+ from the commit subjects.
1264
+
1265
+ Having decided, the workflow runs `scripts/next-release.mjs`, which bumps `package.json` and
1266
+ `package-lock.json`, closes `## [Unreleased]` into a dated section, opens a fresh empty one and
1267
+ adds the compare link at the foot of the changelog. It then pushes the `Release <version>`
1268
+ commit and the `v<version>` tag **atomically** — both land or neither does, so a tag can never
1269
+ describe a tree that is not on `main`. If `main` moved underneath, it rebuilds the release from
1270
+ the new `main` rather than forcing anything.
1271
+
1272
+ To release a specific version, or to see what would happen without touching anything:
1249
1273
 
1250
1274
  ```bash
1251
- npm version 1.2.3 # updates package.json and creates the v1.2.3 tag
1252
- git push --follow-tags
1275
+ gh workflow run release.yml -f dry_run=true # decide and print, push nothing
1276
+ gh workflow run release.yml -f version=2.0.0 # release a version explicitly
1253
1277
  ```
1254
1278
 
1255
1279
  Pushing `v<version>` runs `.github/workflows/publish.yml`, which:
@@ -1262,6 +1286,9 @@ Pushing `v<version>` runs `.github/workflows/publish.yml`, which:
1262
1286
  match the `version` in `package.json` (tag `v1.2.3` ⇒ version `1.2.3`).
1263
1287
  4. Publishes with `npm publish --access public` — the package is scoped, so `--access public`
1264
1288
  is required for the first and every subsequent publish.
1289
+ 5. Creates the GitHub Release, with that version's changelog section as its notes. This runs
1290
+ only after npm has accepted the publish, so a GitHub Release never exists without the npm
1291
+ release behind it.
1265
1292
 
1266
1293
  Prereleases follow the same path: a version like `1.2.3-beta.1` is published under a
1267
1294
  non-`latest` dist-tag, so `npm install @matfsw/docusaurus-plantuml-plugin` keeps resolving to
@@ -1270,7 +1297,13 @@ the last stable release.
1270
1297
  Authentication is npm **trusted publishing** over GitHub Actions OIDC. There is no long-lived
1271
1298
  npm token anywhere in this repository, in its workflows, or in its secrets. The workflow runs
1272
1299
  in a GitHub environment named `npm`, so maintainers can require manual approval before a
1273
- release proceeds. Provenance is attested automatically by trusted publishing.
1300
+ release proceeds — that environment is the one place to put a brake on the automation.
1301
+ Provenance is attested automatically by trusted publishing.
1302
+
1303
+ The release commit and the tag are pushed with a GitHub App installation token rather than
1304
+ `GITHUB_TOKEN`, because a push made with `GITHUB_TOKEN` triggers no further workflow runs — the
1305
+ tag would sit there and `publish.yml` would never fire. See
1306
+ `docs/adr/0006-automated-release-from-changelog.md`.
1274
1307
 
1275
1308
  ## npm trusted publisher: one-time setup
1276
1309
 
@@ -1304,6 +1337,30 @@ _installing_ private dependencies. This repository has no private dependencies,
1304
1337
  add a read token to CI. Add one only if the repository genuinely starts consuming a private
1305
1338
  package.
1306
1339
 
1340
+ ## Release GitHub App: one-time setup
1341
+
1342
+ `release.yml` and `dependabot-auto-merge.yml` push and merge with a GitHub App installation
1343
+ token rather than `GITHUB_TOKEN`. This is not a preference: GitHub deliberately does not trigger
1344
+ workflow runs from events created with `GITHUB_TOKEN`, so under that token an auto-merge would
1345
+ not run CI on `main` and a pushed tag would not run `publish.yml`. Nothing would ever reach npm.
1346
+
1347
+ Done once, by a repository admin:
1348
+
1349
+ 1. **Create a GitHub App** owned by the repository owner, with the webhook **inactive**.
1350
+ 2. **Repository permissions, and nothing else**: Contents **Read and write** (push the release
1351
+ commit and tag), Pull requests **Read and write** (enable auto-merge, comment, update a
1352
+ branch), Metadata Read-only (mandatory).
1353
+ 3. **Install it on this repository only**, and generate a private key.
1354
+ 4. **Store the credentials** under _Settings → Secrets and variables → Actions_:
1355
+ `RELEASE_APP_ID` and `RELEASE_APP_PRIVATE_KEY` (the whole `.pem`, BEGIN/END lines included).
1356
+ 5. **Add the App as a bypass actor** on the `main` ruleset. A ruleset's required-status-checks
1357
+ rule blocks direct pushes as well as merges, and the release commit is a direct push. The
1358
+ safety net is `publish.yml`, which re-runs the entire suite on the tagged tree before
1359
+ `npm publish`, so a bad release commit cannot reach npm even though it can reach `main`.
1360
+
1361
+ Installation tokens are repo-scoped and expire in an hour. A personal access token would work
1362
+ too and was rejected: it carries one person's account reach and expires on a calendar.
1363
+
1307
1364
  ## Limitations
1308
1365
 
1309
1366
  - **A theme providing `MDXComponents/Code` must already be installed.** The plugin wraps that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matfsw/docusaurus-plantuml-plugin",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Render PlantUML diagrams in Docusaurus 3 entirely in the browser - no Java, no PlantUML server, no CDN.",
5
5
  "keywords": [
6
6
  "docusaurus",