Repository navigation
chore(build): run the plugin generator with node - #5943
Merged
norman-abramovitz merged 4 commits intoSep 23, 2026
Merged
norman-abramovitz merged 4 commits into
norman-abramovitz merged 4 commits into
Conversation
The pre-build ran devkit/src/backend.ts through `npx tsx`, but tsx is
not a dependency anywhere in the tree. npx therefore downloaded the
newest tsx from the registry on every build ("npm warn exec The
following package was not found and will be installed: tsx@4.23.15"),
so each build fetched unpinned code over the network, and the build
failed without registry access.
The script needs no transpiler. It imports only Node built-ins and
js-yaml and uses only erasable type syntax, so Node runs it directly by
stripping the types. The engines range, ^24 || ^26, already covers
that. The generated extra_plugins.go is byte-identical under tsx, Node
24.0.0, 24.21.0 and 26. 24.0.0 prints an ExperimentalWarning for type
stripping; 24.21.0, which CI resolves for node-version '24', does not.
The same unpinned fetch as the pre-build generator: e2e:screenshot:compare ran `bunx tsx`, and both screenshot scripts carried a tsx shebang and tsx usage lines, with tsx declared nowhere. bunx resolved the newest tsx from the registry on each run. Both scripts import only Node built-ins plus pngjs and pixelmatch, which are root dev dependencies, so node runs them directly. The report and gallery HTML are byte-identical under bunx tsx and node, across changed, identical, resized and one-sided screenshots.
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.
The pre-build ran the backend plugin generator (
src/frontend/packages/devkit/src/backend.ts) throughnpx tsx, buttsxis not a dependency anywhere in the tree. So on every build npx went to the registry for the newest release:That means each build fetched unpinned code over the network, and the pre-build failed without registry access. The line also shows up in every
make check gaterun.Change
The generator doesn't need a transpiler. It imports only Node built-ins and
js-yamland uses only erasable type syntax, sonoderuns it directly by stripping the types. TheuseTsxflag and thenpx tsxbranch inbuild/build-orchestrator.jsgo away, and every tool now runs withnode. Theenginesrange,^24 || ^26, already includes Node versions that support this.The
angular.jsonbuilder path runs the compileddist-devkit/src/backend.jsand is not affected.The screenshot scripts
e2e:screenshot:comparehad the same problem through bun: it ranbunx tsx, and bothe2e/scripts/compare-screenshots.tsandgallery-screenshots.tscarried a tsx shebang and tsx usage lines. They import only Node built-ins pluspngjsandpixelmatch(root dev dependencies), so they now run withnodetoo. The report and gallery HTML are byte-identical underbunx tsxandnode, across changed, identical, resized and one-sided screenshots, andbun run e2e:screenshot:compareworks through the package script.tools/stbstill documentsnpx tsxfor its model generator. It's left out here: that script uses extensionless relative imports, so it does need tsx, and the fix is pinning tsx intools/stb/package.json.Verification
extra_plugins.gois byte-identical when generated by tsx, Node 24.0.0, Node 24.21.0 and Node 26.ExperimentalWarningfor type stripping. 24.21.0, which CI'snode-version: '24'resolves to, prints nothing.make check gatepasses with nonpm warnlines. The generator step now takes 0.06 s.