Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ESM modules #1632

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Fix ESM modules #1632

merged 3 commits into from
Nov 13, 2024

Conversation

notaphplover
Copy link
Member

Description

Produce ESM modules compatible with both NodeJS and bundlers.

Related Issue

#1626

Motivation and Context

Currently, ESM modules produced by inversify packages are suitable for bundlers but NodeJS ESM module resolution algorithm is not compatible with them. We were "safe" until 6.1.0 because NodeJs was targeting CJS inversify build.

Providing modules ESM compatible with NodeJS is something we should have provided long ago.

How Has This Been Tested?

  • Tests passes successfully.

Types of changes

  • Updated docs / Refactor code / Added a tests case (non-breaking change)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the changelog.

@notaphplover notaphplover self-assigned this Nov 13, 2024
@notaphplover notaphplover merged commit 5370a50 into master Nov 13, 2024
8 checks passed
@notaphplover notaphplover deleted the fix/esm-modules branch November 13, 2024 15:37
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.53%. Comparing base (aec9df3) to head (bd591bd).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1632   +/-   ##
=======================================
  Coverage   99.53%   99.53%           
=======================================
  Files          50       50           
  Lines        1496     1496           
  Branches      192      192           
=======================================
  Hits         1489     1489           
  Misses          4        4           
  Partials        3        3           

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

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