Repository navigation
chore(build): replace deprecated glob and move off Node 20 - #203
juliusknorr wants to merge 4 commits into
Conversation
976d17a to
2f599b7
Compare
Matches the workflows, which already run on 26. Node 20 is EOL since 2026-04-30. No-test: CI/image config Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
On Node 26 QUnit had no Chrome: puppeteer 24's postinstall unzips Chrome with extract-zip, which never settles on Node 26. The process exits 0 and leaves a half-extracted Chrome without the executable. npm 11's allowScripts warning does not stop the postinstall. Skip puppeteer's own download and install the Chrome version it pins with @puppeteer/browsers 3.2.6 (no extract-zip), into a per-job cache since self-hosted runners keep ~/.cache/puppeteer. The runner's own Chrome is not an option: formula tests compare floats exactly and differ in the last digit on another Chrome version. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
…de 26 Node 26 is the active LTS and has fs.globSync without a flag. The test script names its files so it also runs on Node 22 and 24 (#104). Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5
2f599b7 to
a8ea3ef
Compare
|
Nice. Old vs new
|
moodyjmz
left a comment
There was a problem hiding this comment.
fs.globSync also stops traversing symlinked directories, not only symlinked files; #288 (glob 15) conflicts in build/package.json; and CI last ran 47 commits ago. rikled's four points are all still open; the silent drop of a missing entry under a (...) path reproduces.
Details
-
Glob semantics against glob 8.1.0:
Case glob 8 fs.globSync*and dotfilesexcluded excluded */sdk-all{,-min}.js(empty brace alternative)matches both matches both result order sorted traversal order symlinked file matched not matched symlinked directory under **traversed not traversed missing literal under a (...)directorynot magic, passed through globbed, []Order only matters where the bundles are concatenated, and
expandGlobsandcheck-bundle-asciisort afterwards. The tree has no symlinks today, so the symlink rows are a description fix rather than a behaviour change. -
Node versions: DocumentServer's
develop.bake.Dockerfileandpackages.bake.Dockerfilehave been onsetup_26.xsince Euro-Office/DocumentServer@312e6e4 (2026-11-04), so the description's follow-up is already done. DesktopEditors builds sdkjs through this repo's.docker/sdkjs.bake.Dockerfile, which this PR moves to 26. -
CI: all green at this head, but the run is from 2026-11-19 and
mainhas added build tests since. It needs a rebase and a fresh run.
Repro: a temp tree compared with glob 8.1.0 and fs.globSync on Node 25. expandGlobs(['/tmp/p(x)/missing.js']) returns [] on this head, while require('glob').hasMagic on the same path returns false on main.
Moves sdkjs to Node 26 (active LTS since 2026-10-28) and drops the deprecated
glob8.Supersedes #125. The first three commits are #125's commits, unchanged:
.dockermoves fromsetup_20.xtosetup_26.x.@puppeteer/browsers, because puppeteer's own download hangs on Node 26.This PR adds on top:
build/package.json:enginesgoes to>=26, the only Node the CI and the image now run.glob^8.1.0 is replaced byfs.globSync(no flag needed on 26) through a smallglobFileshelper inbuild/lib/sdk-configs.cjs. It is used byexpandGlobs,deploy-assets.cjsandcheck-bundle-ascii.cjs. The shrinkwrap drops glob and its 8 dependencies. This also supersedes the Renovate PR for glob 14 (fix(deps): update dependency glob to v14 - autoclosed #126).node --test test/becomesnode --test "test/*.test.cjs". The old form fails withMODULE_NOT_FOUNDon Node 22 and 24. Fixes Image build still pins Node 20 (EOL since 2026-04-30);npm testin build/ fails on Node 22+ #104.Merging either this PR or #125 first works: the other rebases cleanly, since the three commits are identical.
Tests: a new
expandGlobs/globFilestest inbuild/test/sdk-configs.test.cjs. It fails without the helper.Verification:
npm testpasses 61 of 61 on Node 26, and on Node 22 and 24 with the new script.npm run builddeploys the same 394 files. Thedeploy-assetsoutput is byte-identical to a glob 8 build, all 386 assets.check-bundle-asciiscans the 8 bundles.develop/sdkjs/*/scripts.js, web and desktop, with sdkjs-forms) are byte-identical tomain.Two differences from glob 8, neither affecting the current tree:
()or!is now treated as a pattern. It still matches itself, and no config entry contains these characters.Follow-up outside this repo: DocumentServer's dev container (
develop.bake.Dockerfile,packages.bake.Dockerfile) still installs Node 20, wherefs.globSyncdoes not exist.