fix: Node 24 + resolve API history PR versions - #1195
Merged
Conversation
API history tables rendered "Version(s): None" for every entry during local
development. The transformer gates its artifact fetch on an environment
variable, and three separate things kept it from ever being populated:
1. The variable was named GH_TOKEN, but .env.example documented GITHUB_TOKEN,
which nothing read. Standardize on GITHUB_TOKEN so every mapping is an
identity mapping (`GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`) with nothing
to mentally translate. This also matches the existing majority convention
in semantic.yml and update-docs.yml.
2. Nothing loaded .env for `yarn start`/`yarn build` — only the Crowdin
glossary script called dotenv.config(). A token placed in .env was
silently ignored. Load it from docusaurus.config.ts; existing environment
variables still win, so CI behavior is unchanged.
3. Rspack 1.7.11 panicked on a clean start under Node 24
(rspack_core/src/module_graph/mod.rs:722) and emitted four
"Timed out waiting for API structure content" MDX failures, breaking
app.md and webview-tag.md. Bumping to 1.7.12 fixes both, so move .nvmrc
and engines.node to Node 24.19.0 (LTS).
The warning for a missing token now names the variable and states the
consequence, so a stale GH_TOKEN in a shell produces a greppable pointer
instead of silently empty tables.
Rspack is pinned via `yarn set resolution`, so the change is yarn.lock only:
@docusaurus/faster already allows ^1.7.10. Rspack 2.x is available upstream
but no released Docusaurus supports it (3.10.2 still pins ^1.7.10).
The two workflows with hardcoded Node versions have no actions/checkout step,
so .nvmrc is not on disk there and node-version-file cannot be used; they stay
pinned literally. The other six setup-node steps follow .nvmrc automatically.
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Deploying electron-website with
|
| Latest commit: |
85b1ccf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e31b7332.electron-website.pages.dev |
| Branch Preview URL: | https://fix-api-history-versions-nod.electron-website.pages.dev |
erickzhao
marked this pull request as ready for review
August 17, 2026 23:13
dsanders11
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
API history tables rendered
Version(s): Nonefor every entry in local development. Three independent causes; all three had to be fixed to see a populated table.Why it was broken
src/transformers/api-history.tsgates its GitHub Actions artifact fetch on an env var, and:GH_TOKEN;.env.exampledocumentedGITHUB_TOKEN, which nothing read..envwas never loaded byyarn start/yarn build— onlyscripts/update-crowdin-glossary.tscalleddotenv.config(). A token placed in.envwas silently ignored.Timed out waiting for API structure contentMDX failures, breakingapp.mdandwebview-tag.md.There's also a stale-cache trap: the tokenless run eagerly compiles all docs, and the cached MDX output persists. Adding a token changes nothing until
yarn clearandrm -rf node_modules/.cache. This is what made the token look like a red herring.Changes
Standardize on
GITHUB_TOKEN— every mapping is now an identity mapping (GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}) with nothing to translate. This matches the pre-existing majority convention (semantic.yml,update-docs.yml);GH_TOKENwas the minority in three places. Safe for the twogh-CLI callers, sinceghreadsGITHUB_TOKENnatively andGH_TOKENonly wins when both are set.Load
.envfromdocusaurus.config.ts— existing env vars still win, so CI is unchanged.Bump Rspack 1.7.11 → 1.7.12 via
yarn set resolution, so the change isyarn.lock-only;@docusaurus/fasteralready allows^1.7.10. All 11 platform bindings bumped, so CI'slinux-x64-gnuis covered.Node 22 → 24.19.0 (LTS "Krypton") in
.nvmrcandengines.node, now that Rspack no longer panics.Better failure message — names the variable and states the consequence, so a stale
GH_TOKENin a shell yields a greppable pointer instead of silently empty tables.Verification
yarn buildon Node 24.19.0docs/latest/api/image-view>=37.0.0and^36.4.0app/index.html(previously a hard failure)yarn install --immutabletsc --noEmit/oxlint/oxfmt --checknode ./scripts/pre-build.ts)Reviewer notes
GH_TOKENexported will see tables go empty until they switch toGITHUB_TOKEN. The warning tells them what to do.^1.7.10). Going to true latest would mean overriding a major past declared compatibility.yarn.lock. Regenerating the lockfile from scratch could lose it and reintroduce the Node 24 panic. Happy to move it to aresolutionsblock inpackage.jsonif you'd prefer that guarantee.resolve-pr-release-versions.ymlandaudit-docs-version.ymlkeep hardcoded Node versions because neither job has anactions/checkoutstep, so.nvmrcisn't on disk andnode-version-filewould fail. These two are the ones that will drift on the next bump. The other sixsetup-nodesteps follow.nvmrcautomatically.Not addressed (pre-existing, happy to file separately)
pull-request.ymlnever builds the site (lint only), so this code path has no PR coverage — which is why a regression here reachesmainunnoticed.api-history.ts:244/:277: the object copy shares value references with the module-level cache, andbackports.splice()mutates while iterating.entries(). Release resolution happens to be idempotent so I saw no wrong output, but it's fragile.🤖 Generated with Claude Code