Skip to content

chore(build): replace deprecated glob and move off Node 20 - #203

Open
juliusknorr wants to merge 4 commits into
mainfrom
chore/build-glob-node-lts
Open

juliusknorr wants to merge 4 commits into
mainfrom
chore/build-glob-node-lts

Conversation

@juliusknorr

Copy link
Copy Markdown
Member

Moves sdkjs to Node 26 (active LTS since 2026-10-28) and drops the deprecated glob 8.

Supersedes #125. The first three commits are #125's commits, unchanged:

  • Renovate's commit moves the workflows to 26.
  • .docker moves from setup_20.x to setup_26.x.
  • The workflows install puppeteer's Chrome with @puppeteer/browsers, because puppeteer's own download hangs on Node 26.

This PR adds on top:

Merging either this PR or #125 first works: the other rebases cleanly, since the three commits are identical.

Tests: a new expandGlobs/globFiles test in build/test/sdk-configs.test.cjs. It fails without the helper.

Verification:

  • npm test passes 61 of 61 on Node 26, and on Node 22 and 24 with the new script.
  • Build output: npm run build deploys the same 394 files. The deploy-assets output is byte-identical to a glob 8 build, all 386 assets. check-bundle-ascii scans the 8 bundles.
  • Develop manifests (develop/sdkjs/*/scripts.js, web and desktop, with sdkjs-forms) are byte-identical to main.

Two differences from glob 8, neither affecting the current tree:

  • Symlinked files are no longer matched. There are none in the deployed folders.
  • A literal config entry containing () 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, where fs.globSync does not exist.

@juliusknorr juliusknorr added chore build Build process related changes dependencies labels Nov 16, 2026
@juliusknorr
juliusknorr force-pushed the chore/build-glob-node-lts branch from 976d17a to 2f599b7 Compare November 18, 2026 23:31
renovate Bot and others added 4 commits November 20, 2026 00:12
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
@juliusknorr
juliusknorr force-pushed the chore/build-glob-node-lts branch from 2f599b7 to a8ea3ef Compare November 20, 2026 07:15
@juliusknorr
juliusknorr marked this pull request as ready for review November 30, 2026 22:12
@juliusknorr
juliusknorr requested a review from a team as a code owner November 30, 2026 22:12
@juliusknorr
juliusknorr requested review from MonaAghili, meisam-ui, moodyjmz and rikled and removed request for a team November 30, 2026 22:12
@rikled

rikled commented Dec 1, 2026

Copy link
Copy Markdown
Member

Nice. Old vs new deploy-assets/build-develop output is identical for web and desktop (reproduced).

  • Missing files can be dropped silently: MAGIC_CHARS.test(f) (build/lib/sdk-configs.cjs:121) runs on the already-absolute path, so a checkout under e.g. Euro Office (fork)/ turns every entry into a glob; a missing file then expands to [] instead of failing in sdk-concat (reproduced). Check the raw entry before fixPath, drop ()! from the regex, or fail on zero matches.
  • On Node < 22 it dies with fs.globSync is not a function; engines only warns. Maybe build/.npmrc with engine-strict=true or a version check with a clear message.
  • Is >=26 needed? It works on 22/24 per your description, and 24 is still LTS.
  • Description: DocumentServer Dockerfiles already use Node 26, and fs.globSync never needed a flag (just experimental on 22).

@moodyjmz moodyjmz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dotfiles excluded 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 (...) directory not magic, passed through globbed, []

    Order only matters where the bundles are concatenated, and expandGlobs and check-bundle-ascii sort 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.Dockerfile and packages.bake.Dockerfile have been on setup_26.x since 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.

  • Overlap: #288 becomes moot once this lands, as #126 did.

  • CI: all green at this head, but the run is from 2026-11-19 and main has 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build process related changes chore dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image build still pins Node 20 (EOL since 2026-04-30); npm test in build/ fails on Node 22+

3 participants