Skip to content

chore: replace grunt with npm scripts - #265

Open
littlespex wants to merge 4 commits into
sandflow:integration/v2from
littlespex:chore/remove-grunt
Open

chore: replace grunt with npm scripts#265
littlespex wants to merge 4 commits into
sandflow:integration/v2from
littlespex:chore/remove-grunt

Conversation

@littlespex

Copy link
Copy Markdown

Follow-up to #264, and stacked on that branch. Until #264 merges, the diff here shows both changes; the grunt removal is the single commit cc938c1.

What changed

The build was already tsc plus rollup. Grunt ran both through grunt-exec and did native work in only two places: assembling the test webapp in build/public_html (grunt-sync, grunt-npmcopy) and deleting build output (grunt-contrib-clean).

  • npm run build, build:debug, and build:release now call tsc, rollup, and node scripts/build.js directly. build is still an alias of build:debug, and prepublishOnly still runs the release build. A clean script replaces the grunt clean task.
  • scripts/build.js is a small dependency-free node script. It reads the same properties.json, copies the webapp harness, test resources, and the sax/FileSaver/jszip browser libs, and picks the debug or minified bundle for libs/imsc.js. The imsc-tests submodule copies skip missing sources, the same behavior the grunt-sync globs had when the submodule is not checked out.
  • grunt, grunt-contrib-clean, grunt-exec, grunt-npmcopy, and grunt-sync are gone from devDependencies. The lockfile drops from 257 packages to 169. Three of the removed packages were pinned to latest.
  • README updated in the three places that pointed at the Gruntfile.

Notes for review

  • Build output is byte-identical to the grunt pipeline: SHA-256 over all 53 files in build/ and dist/ matches for both the debug and release builds.
  • fs.cpSync is stable as of Node 22.3, which covers the Node 22 CI image.
  • Lint still runs inside build, as it did under grunt, so CI behavior is unchanged.

Testing

From a clean tree (node_modules, build, and dist removed): npm ci, npm run lint, npm run build, and npm test (7 of 7) all pass. npm run build:release and npm run clean verified as well. Output hashes compared against a grunt baseline built from the #264 branch.

🤖 Generated with Claude Code

littlespex and others added 2 commits August 31, 2026 13:50
- sax 1.2.1 -> ^1.6.1: hardening against hostile input (quadratic
  CDATA allocation fix, attribute count/depth limits, invalid code
  point checks, stricter char-ref validation in strict mode).
  Note: sax relicensed ISC -> BlueOak-1.0.0 as of 1.4.2.
- @rollup/plugin-commonjs ^29, @rollup/plugin-node-resolve ^16,
  globals ^17: major bumps, no config changes required.
- eslint / @eslint/js floors raised to current 9.x.
- Lockfile regenerated; npm audit reports 0 vulnerabilities.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The build was already tsc and rollup, with grunt shelling out to both
via grunt-exec. The remaining native grunt work (assembling the test
webapp in build/public_html and cleaning build output) moves to
scripts/build.js, a dependency-free node script driven by the same
properties.json. npm run build, build:debug, build:release, clean, and
prepublishOnly keep their previous behavior; build output is
byte-identical to the grunt pipeline. Removes grunt and its four
plugins, 88 packages out of the lockfile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@littlespex
littlespex marked this pull request as ready for review August 31, 2026 19:14
littlespex and others added 2 commits August 31, 2026 18:03
Resolves conflicts with the DOMParser parameterization (665e022):
- Gruntfile.cjs: kept deleted; its upstream change (stop copying sax
  to the webapp libs) is ported to scripts/build.js
- package-lock.json: regenerated from the upstream lockfile with the
  grunt packages pruned

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant