Skip to content

fix(*): NodeNext ESM build + Vitest 4.x compatibility (3.1.0)#1013

Merged
omermorad merged 15 commits into
masterfrom
next
May 5, 2026
Merged

fix(*): NodeNext ESM build + Vitest 4.x compatibility (3.1.0)#1013
omermorad merged 15 commits into
masterfrom
next

Conversation

@omermorad

Copy link
Copy Markdown
Collaborator

Summary

Fixes the broken ESM build that prevented 3.1.0 from shipping since December 2025, and adds Vitest 4.x compatibility.

Changes

  • fix(doubles.vitest): guard non-writable properties in mock proxy (Vitest 4.x)
  • fix(doubles.jest): guard non-writable properties in mock proxy
  • fix(doubles.sinon): guard non-writable properties in mock proxy
  • fix(build): add .js extensions to all relative imports for ESM compat
  • fix(ci): restore npm provenance in publishConfig
  • build: migrate to moduleResolution NodeNext with per-format tsconfigs
  • ci: exclude vitest projects from Node 18 in e2e-release workflow

Validation

Test plan

  • CI green on next
  • Local e2e: jest/nestjs, vitest/nestjs, esm/jest/nestjs, esm/jest/nestjs
  • Real-world NodeNext project tested against dev tag

@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.56%. Comparing base (a55cae6) to head (db83d15).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1013      +/-   ##
==========================================
+ Coverage   93.35%   93.56%   +0.21%     
==========================================
  Files          26       26              
  Lines         632      653      +21     
  Branches       99      107       +8     
==========================================
+ Hits          590      611      +21     
  Misses         33       33              
  Partials        9        9              
Flag Coverage Δ
core.unit 93.44% <100.00%> (ø)
di.inversify 93.61% <100.00%> (ø)
di.nestjs 87.25% <ø> (ø)
doubles.jest 100.00% <100.00%> (ø)
doubles.sinon 100.00% <100.00%> (ø)
doubles.vitest 100.00% <100.00%> (ø)
unit 84.00% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

omermorad and others added 2 commits May 5, 2026 16:24
 - @suites/core.unit@3.1.0-dev.0
 - @suites/di.inversify@3.1.0-dev.0
 - @suites/di.nestjs@3.1.0-dev.0
 - @suites/doubles.jest@3.1.0-dev.0
 - @suites/doubles.sinon@3.1.0-dev.0
 - @suites/doubles.vitest@3.1.0-dev.0
 - @suites/types.common@3.1.0-dev.0
 - @suites/types.di@3.1.0-dev.0
 - @suites/types.doubles@3.1.0-dev.0
 - @suites/unit@3.1.0-dev.0
@omermorad omermorad merged commit daa2e91 into master May 5, 2026
47 checks passed
@omermorad omermorad deleted the next branch May 5, 2026 13: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.

bug: ESM build missing .js extensions - breaks Vitest 4.x

1 participant