Skip to content

chore: replace ts-node with tsx, update dependencies, move to ESLint 10 - #13

Merged
tmack8001 merged 1 commit into
mainfrom
chore/modernize-toolchain
Oct 22, 2026
Merged

tmack8001 merged 1 commit into
mainfrom
chore/modernize-toolchain

Conversation

@tmack8001

@tmack8001 tmack8001 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Pull Request

Description

Clears the deprecation warnings from yarn test and yarn lint, then audits and updates the dependency tree.

  • --experimental-loader and [DEP0180] fs.Stats constructor come from ts-node, which is unmaintained. Replaced with tsx.
  • "TypeScript version not officially supported by @typescript-eslint" comes from eslint-config-oclif-typescript@3 (typescript-eslint 6, TS < 5.4; the package is no longer supported on npm). Moved to ESLint 10 with eslint-config-oclif@7 (typescript-eslint 8, flat config). ESLint 9 itself is now flagged unsupported by npm.

Type of Change

  • Code refactoring

Changes Made

Tooling

  • .mocharc.json: import=tsx instead of the ts-node loader and require; bin/dev.js / bin/dev.cmd run through tsx; ts-node block removed from tsconfig.json.
  • eslint.config.mjs replaces .eslintrc.json / .eslintignore; lint is eslint .. Rules that would reshuffle code (switch cases, object keys, union members, spacing) and the newer stylistic / type-safety packs the old config never had are off, each with a comment. Findings that remain are 0 errors and 19 warnings (jsdoc, complexity, nested callbacks).
  • TypeScript 6. Both tsconfigs now list types explicitly, since TS 6 stops auto-including @types/*. test/tsconfig.json now actually includes the test files (it inherited include: src), so linting can parse them.
  • Small safe code fixes: node: prefixes in examples/, === -1 index checks, String.raw, a namespace cheerio import and Element from domhandler in a test helper, one disable for a type-position Response.

Dependencies

  • Updated: mocha 12, chai 6, eslint 10, @eslint/compat 2, moment-timezone 0.6, cheerio 1.2, axios, impit, domhandler 6, tsx.
  • Kept @oclif/core 4, @oclif/plugin-help 6, @oclif/test 4, oclif 4: the next majors require Node 22, and docs/RELEASING.md treats raising the floor to 22 as a major release.
  • Removed unused packages: node-persist, json2csv, node-localstorage, shx, @oclif/plugin-plugins (bundled the whole npm CLI and is not in oclif.plugins), and the matching @types/*. The build and postpack clear files with Node. docs/ARCHITECTURE.md no longer claims node-persist caching, which the code never did.
  • npm audit: production dependencies 0 vulnerabilities. Dev-only findings remain (9: 4 high, 5 low) from the braces chain under oclif 4 (no patched braces exists) and a low katex chain under eslint-config-oclif 7. Neither runs in the published CLI.
  • [email protected] is reported deprecated by npm; it comes from cheerio 1.2 via encoding-sniffer, upstream.

Lockfiles

  • package-lock.json and yarn.lock regenerated from a clean tree against the public registry. This removes ~490 resolved URLs that pointed at an internal packages.atlassian.com mirror (which made npm ci hang outside that network). The first push of this PR failed npm ci in CI because the lockfile was generated from a partly-installed tree and lacked other platforms' optional packages; fixed by regenerating with no node_modules present.

Platform(s) Affected

  • Core functionality

(Tooling and dependencies only; no parser or CLI behaviour changes.)

Testing

  • Existing tests pass (npm test): 557 passing, no ts-node warnings
  • tsc -b and tsc -p test/tsconfig.json clean; eslint . 0 errors
  • npm ci from the regenerated lockfile; npm run smoke:install passes; node bin/run.js --help works without @oclif/plugin-plugins
  • yarn install --frozen-lockfile accepts yarn.lock (with --ignore-engines, see notes)

Not run: CI on the new head, bin/dev.js through tsx end to end.

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Documentation

  • Updated CHANGELOG.md
  • Updated relevant docs in docs/ folder

Additional Notes

  • Dev tooling now needs recent Node: ESLint 10 / mocha 12 want 20.19+ or 22.13+, and one lint dependency (jsdoc-type-pratt-parser) wants 22.22.2+, which yarn install enforces (npm only warns). The published CLI's engines is unchanged (>=20.18.1).
  • Not taken: @types/node (kept at ^20 to match engines) and TypeScript 7 (typescript-eslint supports < 6.1).

🤖 Generated with Claude Code

https://claude.ai/code/session_01W9Y5xJdDbjzZFbNfVFKS5b

…nt 10

Tooling
- ts-node (unmaintained; source of the --experimental-loader and DEP0180
  warnings) is replaced by tsx for mocha and bin/dev.
- ESLint 10 with eslint-config-oclif 7 (flat config, typescript-eslint 8)
  replaces the config that warned on TypeScript 5.4+. Ordering, spacing and
  newer stylistic/type-safety rules the old config never had are off.
- TypeScript 6; tsconfigs now list their types explicitly.

Dependencies
- Updated: mocha 12, chai 6, ESLint 10, moment-timezone 0.6, cheerio, axios,
  impit, domhandler 6, tsx. Production dependencies audit clean.
- @oclif/* stays on the current majors; the next ones need Node 22 and the
  project policy makes raising the floor a major release.
- Removed unused packages: node-persist, json2csv, node-localstorage, shx,
  @oclif/plugin-plugins (bundled npm itself and was never loaded) and the
  matching @types. The build clears dist/ with Node.
- Lockfiles regenerated from a clean tree against the public registry: all
  platforms' optional packages are present (npm ci failed in CI without them)
  and the internal packages.atlassian.com URLs are gone.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01W9Y5xJdDbjzZFbNfVFKS5b
@tmack8001
tmack8001 force-pushed the chore/modernize-toolchain branch from 4ecd9f8 to 93ba01e Compare October 22, 2026 15:46
@tmack8001 tmack8001 changed the title chore: replace ts-node with tsx, move to ESLint 9 and typescript-eslint 8 chore: replace ts-node with tsx, update dependencies, move to ESLint 10 Oct 22, 2026
@tmack8001
tmack8001 merged commit 8a9b92c into main Oct 22, 2026
10 checks passed
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.

2 participants