Skip to content

tooling: upgrade Jest and TypeScript - #186

Draft
rtfpessoa wants to merge 3 commits into
rodrigo/upgrade-cli-lintfrom
rodrigo/upgrade-cli-tooling
Draft

rtfpessoa wants to merge 3 commits into
rodrigo/upgrade-cli-lintfrom
rodrigo/upgrade-cli-tooling

Conversation

@rtfpessoa

@rtfpessoa rtfpessoa commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

This is 4 of 4. Review CI, runtime, and ESLint first. No production dependency or CLI engine changes in this draft.

  • Use Jest 30 with one ts-jest transform and explicit Jest imports. Remove direct Babel, ts-node, and ambient Jest typings. Keep the V8 coverage thresholds unchanged.
  • Use TypeScript 6.0.3 rather than 7, which is outside the tooling peer ranges. Keep CommonJS/ES2019, Node 12 types, and the existing Node resolution mode.
  • Upgrade Husky, lint-staged, and Prettier. Restore issue-template YAML metadata that the formatter exposed as invalid; the body wording is unchanged. Hold is-ci-cli and markdown-toc.

Verified: Frozen Yarn Classic and full validation on Node 22.23.5, 24.22.3, and 26.13.1 (27 tests each), CI-mode npm tests, and isolated hook staging and rejection checks. Final tarball: nine fresh, strict production installs and smoke checks including exact Node 12.0.0, with zero production advisories in the consumer trees at audit time. Desktop dispatch was stubbed; HTTP used loopback.

Reviewer focus: the single transform, hooks, and independence of the packed CLI from modern dev tools. Review follow-ups addressed: Jest now uses the same discovery globs as ESLint, and the README documents Git 2.32+ for pre-commit hooks. All 27 tests passed again on each contributor Node version; only the README changed in the packed artifact. This base does not trigger the master-only PR workflow. Authored +38/-39; generated lockfile +1287/-2343.

Jest transform and thresholds | Compiler target

Use ts-jest alone with Jest 30, preserve the Node 12 build with TypeScript 6, and migrate Husky, lint-staged, and Prettier without changing runtime dependencies.

Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>
Pin Jest to the test patterns ESLint checks so new module extensions do not silently bypass Jest lint rules.

Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>
Signed-off-by: Rodrigo Fernandes <rodrigo.fernandes@datadoghq.com>

This branch has not been deployed

No deployments
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