Skip to content

chore: refresh dependencies and toolchain (esbuild + Vitest + oxlint)#12

Closed
linhmtran168 wants to merge 5 commits into
masterfrom
APNEWDRAW-8300-upgrade-dependencies
Closed

chore: refresh dependencies and toolchain (esbuild + Vitest + oxlint)#12
linhmtran168 wants to merge 5 commits into
masterfrom
APNEWDRAW-8300-upgrade-dependencies

Conversation

@linhmtran168
Copy link
Copy Markdown

Summary

  • Drop Node 18 support; set engines.node to ^20.19.0 || >=22.12.0
  • Replace Grunt/Browserify/Babel/Jasmine build and test pipeline with esbuild (IIFE/ES2020 bundles) and Vitest + Playwright (browser tests); drop dist/es5/ and all polyfill deps
  • Replace ESLint/prettier-eslint with oxlint + oxfmt; add lint CI job; run codebase-wide reformat
  • Security & maintenance dependency bumps including archiver@8 (with API migration) and uuid@14; production audit: 0 vulnerabilities

Jira: https://88-oct.atlassian.net/browse/APNEWDRAW-8300

Test Plan

  • npm install succeeds on Node 20.19+ and 22.12+
  • npm run build produces dist/exceljs[.bare]{,.min}.js{,.map} and dist/LICENSE (no dist/es5/)
  • node -e "require('./excel.js').Workbook" succeeds
  • npm run test:unit — 883 passing
  • npm run test:integration — 195 passing
  • npm run test:end-to-end — 1 passing
  • npm run test:dist — 5 passing
  • npm run test:typescript — 2 passing
  • npm run test:browser — 3 passing (Vitest + Playwright/Chromium)
  • npm run lint — exits 0 (warnings only)
  • npm audit --omit=dev — 0 vulnerabilities
  • CI matrix passes on Node 20.x, 22.x, 24.x (Ubuntu + Windows)

🤖 Generated with Claude Code

…drop ES5

- New build pipeline: scripts/build.mjs using esbuild (IIFE, ES2020 target)
- Browser tests: spec/browser/vitest.config.mjs + Playwright/Chromium
- lib/exceljs.browser.js simplified to re-export exceljs.bare.js
- spec/utils/verquire.js: drop EXCEL_BUILD=es5 branch
- Delete index.ts (dist/es5 entry), gruntfile.js
- Remove grunt/babel/browserify/core-js/regenerator-runtime deps
- README: remove ES5-imports section

Adds buffer/crypto-browserify/util shim deps + a small process/Buffer inject
shim (scripts/browser-process-shim.mjs) — esbuild does not auto-polyfill
Node built-ins the way browserify did, and the lib/ source reaches for them.
`stream` is aliased to the already-present `readable-stream` runtime dep so
the bundle ships one stream implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
- .oxlintrc.json: correctness+suspicious categories, project rules
- .oxfmtrc.json: JS/TS only, singleQuote+semi matching prior style
- lint: oxlint .; lint:fix: oxfmt . && oxlint --fix .
- lint-staged: oxfmt + oxlint --fix on *.{js,ts}
- Add lint CI job (Node 22)
- Delete .eslintrc, .eslintignore, .prettier, .prettierignore and all per-dir .eslintrc files
- Fix: empty catch params in date-xform.js and defined-name-xform.js
- Fix: redundant x&&x pattern in test-conditional-formatting-sheet.js
- Note: max-len:120 not in oxlint scope; follow-up if needed
- Note: quotes/semi/no-trailing-spaces not in oxlint (formatter territory)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Apply codebase-wide canonical formatting via oxfmt. No logic changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
- @types/chai: ^5.2.3 → ^4.3 (fix type/runtime mismatch with chai@4)
- @types/node: ^24.10.8 → ^24.12.4 (patch)
- dayjs: ^1.11.19 → ^1.11.21 (patch)
- fast-csv: ^5.0.5 → ^5.0.7 (patch)
- mocha: ^11.7.5 → ^11.7.6 (patch)
- rimraf: ^6.1.2 → ^6.1.3 (patch)
- tmp: ^0.2.5 → ^0.2.7 (security)
- archiver: ^7.0.1 → ^8.0.0 (major; API changed to ZipArchive class)
- uuid: ^11.1.0 → ^14.0.0 (major; v4 export stable)

Not bumped:
- lint-staged: keep ^16.2.7 (lint-staged@17 requires Node >=22.22.1; project supports Node ^20.19.0)
- got: keep ^11.8.2 (got@12+ ESM-only, tests are CJS)
- chai: keep ^4.5.0 (chai@5 ESM-only, chai-xml incompatible)
- dirty-chai: keep ^2.0.1 (chai@4 family)
- typescript: keep ^5.9.3 (v6 not stable enough for library)

Production audit: 0 vulnerabilities (npm audit --omit=dev)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@linhmtran168 linhmtran168 force-pushed the APNEWDRAW-8300-upgrade-dependencies branch from c89b979 to 5fbc149 Compare June 1, 2026 04:18
@linhmtran168 linhmtran168 reopened this Jun 1, 2026
@linhmtran168 linhmtran168 deleted the APNEWDRAW-8300-upgrade-dependencies branch June 1, 2026 04:32
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