@matfsw/docusaurus-plantuml-plugin 1.5.0 → 1.5.2
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 +61 -1
- package/README.md +61 -4
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.5.2] - 2026-08-20
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Development dependencies:** `jsdom` `26` → `29`, `@testing-library/jest-dom` `7.0.0` → `7.0.1`,
|
|
15
|
+
`@testing-library/user-event` `14.6.3` → `14.6.5`, `@types/node` `26.1.2` → `26.2.0`, `globals`
|
|
16
|
+
`17.9.0` → `17.11.0`, `typescript-eslint` `8.66.0` → `8.67.0`. No product code changed; all 651
|
|
17
|
+
tests pass unchanged.
|
|
18
|
+
|
|
19
|
+
jsdom 27 added `@exodus/bytes`, which needs `@noble/hashes` `^1.8.0 || ^2.0.0`, while
|
|
20
|
+
`@docusaurus/core`'s dev server reaches `pkijs`, which pins that package to **exactly** `1.4.0`.
|
|
21
|
+
npm 11 hoists `1.4.0` and leaves the tree invalid without saying so; npm 10 — what Node 20 and
|
|
22
|
+
22 ship, and what CI therefore runs — correctly refuses the resulting lockfile with
|
|
23
|
+
`Missing: @noble/hashes@2.3.0`. An `overrides` entry pins `@noble/hashes` to `^1.8.0`, which
|
|
24
|
+
both consumers accept. Overrides apply only to this repository's own installs, never to a
|
|
25
|
+
consumer's.
|
|
26
|
+
|
|
27
|
+
`.github/dependabot.yml` now ignores **jsdom 30 and above**. jsdom 30 requires Node
|
|
28
|
+
`^22.22.2 || ^24.15.0 || >=26.0.0`, dropping Node 20 outright, and the honest consequence of
|
|
29
|
+
taking it would be raising this package's `engines.node`. That is not ours to raise:
|
|
30
|
+
`@docusaurus/core` still declares `node: >=20.0` as of 3.10.2, and a plugin whose floor sits
|
|
31
|
+
above its host's cannot be installed into a site Docusaurus itself supports. jsdom 29 still
|
|
32
|
+
supports `^20.19.0`, which is what `.nvmrc` pins.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **The Dependabot branch refresh no longer races GitHub.** It selected pull requests by
|
|
37
|
+
`mergeStateStatus == "BEHIND"`, but GitHub recomputes that field asynchronously after a push to
|
|
38
|
+
the base branch — on its first live run it reported nothing behind while two pull requests were
|
|
39
|
+
ten commits behind. It now asks `compare` for `behind_by`, which is computed on demand.
|
|
40
|
+
|
|
41
|
+
- `actions/create-github-app-token` and `dependabot/fetch-metadata` were pinned at `v2`; both are
|
|
42
|
+
at `v3`.
|
|
43
|
+
|
|
44
|
+
## [1.5.1] - 2026-08-20
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **Dependency updates merge themselves, and releases are cut by CI rather than from a laptop.**
|
|
49
|
+
Dependabot now opens **one** pull request a week for npm — covering the plugin and the example
|
|
50
|
+
site together — and one for GitHub Actions. Minor and patch updates auto-merge once the new
|
|
51
|
+
`CI complete` check is green; majors ride in the same pull request and are held for review with
|
|
52
|
+
a comment naming what holds them.
|
|
53
|
+
|
|
54
|
+
Every green `main` then runs `.github/workflows/release.yml`, which reads `## [Unreleased]` to
|
|
55
|
+
decide the version (`### Removed` or `BREAKING` → major, `### Added` → minor, anything else →
|
|
56
|
+
patch, empty → no release), bumps `package.json` and `package-lock.json`, closes the section
|
|
57
|
+
into a dated one, and pushes the commit and the tag **atomically**. The old
|
|
58
|
+
`npm version && git push --follow-tags` recipe could leave a tag pointing at a pre-rebase commit
|
|
59
|
+
whenever a dependency pull request landed in between — and `verify:tag` could not see it,
|
|
60
|
+
because the tag and `package.json` agreed. `publish.yml` now also creates the GitHub Release,
|
|
61
|
+
after npm has accepted the publish. Recorded in
|
|
62
|
+
[ADR 0006](docs/adr/0006-automated-release-from-changelog.md).
|
|
63
|
+
|
|
64
|
+
- `npm run sync:check` now also asserts that `package-lock.json`'s `version` fields match
|
|
65
|
+
`package.json`, and `npm run sync:meta` fixes them. That drift had to be repaired by hand once
|
|
66
|
+
already.
|
|
67
|
+
|
|
10
68
|
## [1.5.0] - 2026-08-14
|
|
11
69
|
|
|
12
70
|
### Added
|
|
@@ -482,7 +540,9 @@ Initial release.
|
|
|
482
540
|
opt-out.
|
|
483
541
|
- Plugin option validation that rejects unknown keys and out-of-range values at build time.
|
|
484
542
|
|
|
485
|
-
[Unreleased]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.
|
|
543
|
+
[Unreleased]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.2...HEAD
|
|
544
|
+
[1.5.2]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.1...v1.5.2
|
|
545
|
+
[1.5.1]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.5.0...v1.5.1
|
|
486
546
|
[1.5.0]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.4.0...v1.5.0
|
|
487
547
|
[1.4.0]: https://github.com/matf/docusaurus-plantuml-plugin/compare/v1.3.1...v1.4.0
|
|
488
548
|
[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
|
|
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
|
-
|
|
1252
|
-
|
|
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
|
|
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.
|
|
3
|
+
"version": "1.5.2",
|
|
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",
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"@eslint/js": "^9.39.5",
|
|
91
91
|
"@playwright/test": "^1.57.0",
|
|
92
92
|
"@testing-library/dom": "^10.4.1",
|
|
93
|
-
"@testing-library/jest-dom": "^7.0.
|
|
93
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
94
94
|
"@testing-library/react": "^16.3.0",
|
|
95
|
-
"@testing-library/user-event": "^14.6.
|
|
96
|
-
"@types/node": "^26.
|
|
95
|
+
"@testing-library/user-event": "^14.6.5",
|
|
96
|
+
"@types/node": "^26.2.0",
|
|
97
97
|
"@types/react": "^19.2.18",
|
|
98
98
|
"@types/react-dom": "^19.2.4",
|
|
99
99
|
"@vitest/coverage-v8": "^4.1.10",
|
|
@@ -101,19 +101,20 @@
|
|
|
101
101
|
"eslint-config-prettier": "^10.1.8",
|
|
102
102
|
"eslint-plugin-react": "^7.37.5",
|
|
103
103
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
104
|
-
"globals": "^17.
|
|
105
|
-
"jsdom": "^
|
|
104
|
+
"globals": "^17.11.0",
|
|
105
|
+
"jsdom": "^29.1.1",
|
|
106
106
|
"prettier": "^3.6.2",
|
|
107
107
|
"react": "^19.2.8",
|
|
108
108
|
"react-dom": "^19.2.8",
|
|
109
109
|
"tsup": "^8.5.0",
|
|
110
110
|
"typescript": "~5.9.3",
|
|
111
|
-
"typescript-eslint": "^8.
|
|
111
|
+
"typescript-eslint": "^8.67.0",
|
|
112
112
|
"vitest": "^4.1.10"
|
|
113
113
|
},
|
|
114
114
|
"overrides": {
|
|
115
115
|
"serialize-javascript": "^7.0.7",
|
|
116
116
|
"uuid": "^11.1.1",
|
|
117
|
-
"esbuild": "^0.28.1"
|
|
117
|
+
"esbuild": "^0.28.1",
|
|
118
|
+
"@noble/hashes": "^1.8.0"
|
|
118
119
|
}
|
|
119
120
|
}
|