Skip to content

Migrate to NodeJS 24 - #1051

Open
bishopbm1 wants to merge 10 commits into
StackStorm:masterfrom
EncoreTechnologies:master
Open

bishopbm1 wants to merge 10 commits into
StackStorm:masterfrom
EncoreTechnologies:master

Conversation

@bishopbm1

Copy link
Copy Markdown

st2web on Node 24 LTS with a current toolchain and dependencies

Moves st2web off its 2019-era toolchain (Node 20.8, gulp + browserify + babel, lerna/yarn,
mocha, zombie, React 16) onto Node 24 LTS, with every dependency on a current release. Also
fixes a set of workflow designer bugs, and builds as a noarch RPM. Per-change detail is in
CHANGELOG.rst.

What changed

  • Toolchain: Node 24 LTS with npm workspaces. Rsbuild 2 replaces gulp, browserify and babel
    (the build output keeps its existing layout, and config.js stays a static file editable on
    the server). Rstest replaces mocha, and ESLint 10 replaces ESLint 6 with babel-eslint. Flow
    types, @connect decorators, lerna, bower, Vagrant and the gulp tasks are removed.
  • React 19: with react-redux 9, redux 5 and react-router 8. Legacy context, propTypes,
    UNSAFE_ lifecycles, react-hotkeys and the history package are replaced. The router keeps
    its Redux-driven design, with a small hash history that decodes the address the way history
    did.
  • Dependencies:
    • Upgraded: axios 1.x, ajv 8, ace-builds (replacing brace), yaml (replacing the unmaintained
      yaml-ast-parser, behind an adapter with parity tests), lodash, moment, prismjs and others.
    • Removed as deprecated or unmaintained: noty, moxios, deep-diff, chai-subset.
    • Production dependencies have no npm audit findings.
  • npm supply-chain guardrails (.npmrc):
    • only versions published at least 14 days ago (two reviewed security fixes are exempted and
      documented);
    • no install scripts;
    • no git dependencies;
    • engine-strict.
  • Tests:
    • every previously untested package now has unit tests, using Testing Library in place of
      react-test-renderer;
    • the zombie functional tests are replaced by Playwright specs that run against a live
      StackStorm.
  • Workflow designer fixes:
    • the zoom buttons covered Undo, Redo, Rearrange and Save (a CSS-modules regression), which
      made Save look missing and Run look disabled;
    • opening a workflow saved without task positions marked it as changed, and autosave then
      rewrote it on open;
    • orquesta's with: <expr> shorthand was reported as must be object;
    • rearranging or dragging tasks is now a layout change: Save lights up, but Run stays enabled;
    • the page title names the workflow (<pack.action> - Workflow Designer, with * for unsaved
      edits);
    • YAML errors on line 1 are now placed correctly, and the metadata error list has keys.
  • Other UI: the login form is drawn as a box. A long-standing typo (style.from) had kept its
    styles from ever applying.
  • Packaging: make rpm works again with the new toolchain, and the RPM is noarch. Debian
    packaging and .circleci are untouched.

Testing

  • 804 unit tests pass (Rstest, jsdom), and ESLint reports no errors.
  • 27 Playwright specs pass against a running StackStorm. They cover login, actions, history,
    rules, packs, triggers, inquiry and the workflow designer: toolbar layout, layout change vs
    edit, and the title.
  • Each regression test was checked to fail with its bug put back.
  • Compared side by side with the 3.9.0 UI against the same StackStorm.
  • RPM: built on RHEL 9 with Node 24 from the nodejs:24 module stream, installed over
    st2web-3.9.0 with dnf, and checked in the browser.

…of the Node 24/Rsbuild toolchain swap. No behaviour change; all 308 unit tests pass on the existing build.
…workspaces in place of gulp, browserify, mocha and lerna. All 310 unit tests pass and the build output keeps its existing layout.
…eplacing legacy context, propTypes, react-hotkeys and the history package. Also fixes the UI failing to load ("process is not defined") since the Rsbuild switch; all 327 unit tests pass and the build loads cleanly in a browser.
…sh, moment and more) and replace noty, moxios, deep-diff and brace, under a new .npmrc with a 14-day release cooldown and install scripts disabled. Production dependencies now have no npm audit findings and all 343 unit tests pass.
… with yaml behind a parity-tested adapter, and lint with ESLint 10. Adds unit tests for every untested package (791 tests, 81% line coverage) and Playwright specs that pass against the docker stack.
…ws opened as changed and autosaved on open, and orquesta's with-items shorthand was flagged; moving tasks is now a layout change that doesn't block Run. Also titles the designer page after its workflow and boxes the login form, with unit and Playwright regression tests.
…and npm run build instead of the removed lerna, and the package is noarch.
…: the router decodes the hash pathname again.
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