Skip to content

Node 24 and related upgrades#14

Open
kookster wants to merge 7 commits intomasterfrom
feat/node_24_and_related_upgrades
Open

Node 24 and related upgrades#14
kookster wants to merge 7 commits intomasterfrom
feat/node_24_and_related_upgrades

Conversation

@kookster
Copy link
Copy Markdown
Member

So many upgrades!

Node 24 related updates:

  1. Source imports — added .js extensions (11 files)
  • index.js, lib/wavefile-converter.js, lib/wavefile-creator.js, lib/wavefile-parser.js, lib/wavefile-reader.js, lib/wavefile-tag-editor.js,
    lib/wavefile-cue-editor.js, lib/mpeg-reader.js, lib/riff-file.js, lib/resampler/index.js, lib/parsers/binary/index.js, lib/parsers/write-string.js
  • Required for native ESM module resolution (directory imports → /index.js)
  1. package.json
  • Added "type": "module" — enables native ES modules
  • Updated engines from >=8 to >=18
  • Replaced nyc with c8 (V8-native coverage, works with modern Node)
  • Upgraded mocha from ^6.2.2 to ^11.0.0
  • Upgraded typescript from ^3.7.4 to ^5.0.0
  • Removed esm (broken on Node 24, native ESM replaces it)
  • Removed codecov and mocha-lcov-reporter (deprecated)
  • Updated all npm scripts for modern tooling
  1. New files
  • test/package.json — {"type": "commonjs"} keeps 129+ test files as CJS
  • dist/package.json — {"type": "commonjs"} keeps UMD bundle as CJS
  1. test/loader.js — removed esm package, uses Node 24's native require(esm) support

  2. test/dist/from-scratch/12bit-from-scratch.js — removed esm usage for byte-data

  3. bin/wavefile.js — converted to ESM imports (uses dist/wrapper.mjs)

Rollup upgrade from 1 -> 4

  • rollup 1.x → 4.x
  • @rollup/plugin-commonjs 11 → 29
  • @rollup/plugin-node-resolve 6 → 16
  • Replaced @ampproject/rollup-plugin-closure-compiler with @rollup/plugin-terser
  • Removed IE10 polyfill wrapper and ES3 class check from test loader

Miscellaneous Clean-up!

Dead files from closure compiler removal:

  • externs/ directory — only used by closure compiler, no longer referenced
  • scripts/polyfills.js — IE10 Uint8Array polyfill, was injected by closure compiler's outputWrapper

Outdated CI configs:

  • .travis.yml — tests Node 8/9/10/12 on Travis CI (Travis free tier for open source is gone)
  • appveyor.yml — same, Windows CI for Node 8-12

Vulnerability fixes:

  • jsdoc 3.x → 4.x fixes the taffydb vulnerability (3 of 8 vulns)
  • npm audit fix alone fixes the serialize-javascript issue in mocha (2 vulns)

Minor:

  • The .jshintrc sets "esversion": 6 — bump to 11 to match modern JS

- Add "type": "module" to package.json for native ESM support
- Add .js extensions to all relative imports in lib/ and index.js
- Add nested package.json files in test/ and dist/ with "type": "commonjs"
  to keep CJS test files and UMD bundle working
- Replace esm package with Node 24's native require(esm) in test loader
- Upgrade mocha 6 -> 11, replace nyc with c8, upgrade typescript 3 -> 5
- Remove deprecated esm, codecov, and mocha-lcov-reporter packages
- Convert bin/wavefile.js to ESM imports
- Update engines field to >=18
- Add coverage/ to .gitignore
- Upgrade rollup ^1.27.14 -> ^4.0.0
- Upgrade @rollup/plugin-commonjs ^11.0.0 -> ^29.0.0
- Upgrade @rollup/plugin-node-resolve ^6.0.0 -> ^16.0.0
- Replace @ampproject/rollup-plugin-closure-compiler with @rollup/plugin-terser
- Remove ES3 class check from test loader (no longer transpiling to ES3)
- Bundle build time reduced from ~4.5s to ~450ms
- Remove externs/ directory (only used by Google Closure Compiler)
- Remove scripts/polyfills.js (IE10 Uint8Array.slice polyfill, no longer injected)
- Remove references to externs and scripts from package.json directories, files, and lint script
These configs tested against Node 8/9/10/12, which are all EOL.
Travis CI free tier for open source is also discontinued.
jsdoc 3.x depended on taffydb which has a known data access
vulnerability (GHSA-mxhp-79qh-mcx6). jsdoc 4.x drops this dependency.
Reduces npm audit vulnerabilities from 8 to 6.
Matches the modern ES syntax now used in the project.
docdash 1.x depended on taffydb (via jsdoc 3.x). Since jsdoc was
upgraded to 4.x which dropped taffydb, docdash needed to be upgraded
to 2.x which uses @jsdoc/salty instead.
This was referenced Apr 10, 2026
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