Skip to content

chore: modernize tsconfig settings across all packages#1685

Open
mrgrain wants to merge 2 commits into
mainfrom
modern-ts
Open

chore: modernize tsconfig settings across all packages#1685
mrgrain wants to merge 2 commits into
mainfrom
modern-ts

Conversation

@mrgrain

@mrgrain mrgrain commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Modernizes the TypeScript baseline for all packages: es2022, module: node18, esModuleInterop, and noEmitOnError, replacing a set of per-package tsconfig overrides with one shared config.

The rest of the change adapts the code to esModuleInterop. Modules whose top-level export is used directly (chalk, nock, mock-fs, assert) become default imports, since under interop a namespace import drops the call signature and non-enumerable members — leaving them as-is would compile but fail at runtime (e.g. chalk.green is not a function).

In tests, modules mocked via jest.spyOn/sinon.stub/withMocked (fs, os, child_process, https) also become default imports so they stay mutable under interop, and one dynamic import() became static to satisfy node16 resolution.

Checklist

  • This change contains a major version upgrade for a dependency and I confirm all breaking changes are addressed
    • Release notes for the new version:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.59%. Comparing base (3560ff5) to head (fbe3e9f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1685   +/-   ##
=======================================
  Coverage   89.59%   89.59%           
=======================================
  Files          77       77           
  Lines       11716    11716           
  Branches     1624     1638   +14     
=======================================
  Hits        10497    10497           
  Misses       1190     1190           
  Partials       29       29           
Flag Coverage Δ
suite.unit 89.59% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants