Skip to content

chore: modernise tooling — Node 24, remove chalk/fs-extra/globby/jest in favour of native Node APIs#206

Open
MattP007 wants to merge 4 commits into
target:mainfrom
MattP007:updates
Open

chore: modernise tooling — Node 24, remove chalk/fs-extra/globby/jest in favour of native Node APIs#206
MattP007 wants to merge 4 commits into
target:mainfrom
MattP007:updates

Conversation

@MattP007

Copy link
Copy Markdown
Collaborator

Summary

Removes all third-party utility dependencies that are now superseded by Node.js built-ins, and upgrades the project to Node 24.

Changes

Node upgrade

  • Bumped .nvmrc to v24.14.1
  • Updated engines.node to >=22
  • Updated @types/node to 22.15.21

Removed ts-node

  • Was listed as a dev dependency but never used directly in any script — removed.

Removed chalk

  • Was listed as a runtime dependency but never imported anywhere in source — removed.
  • util.styleText (available natively in Node 22+) is available as a replacement when needed.

Replaced fs-extra + globby with node:fs/promises

  • fs.readFile / fs.writeFile → named imports from node:fs/promises
  • glob() → native node:fs/promises glob async iterator with a small gitignore-aware exclude callback
  • Removed @types/fs-extra dev dependency

Replaced jest + ts-jest with node:test

  • All three test suites ported to node:test / node:assert/strict
  • Module mocking via --experimental-test-module-mocks + mock.module()
  • TypeScript run directly via --experimental-transform-types (needed for enum in source)
  • Added scripts/ts-loader.mjs — a tiny ESM loader hook that rewrites .js.ts for relative imports so source files keep .js extensions (correct for tsc NodeNext output) while still resolving at test time
  • Added src/__tests__/helpers.ts with assertion utilities mirroring Jest's expect() matchers (assertCalledWith, stringContaining, objectContaining, etc.)
  • Removed jest, ts-jest, @types/jest, jest.config.js
  • Project converted to "type": "module" (ESM) + tsconfig updated to module: NodeNext

Result

  • 62 tests, 62 pass, 0 fail
  • Zero new runtime or dev dependencies added

MattP007 and others added 4 commits June 23, 2026 13:27
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.com>
Co-authored-by: Dayton <SVDEA001@target.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