Skip to content

Conversation

@chmanie
Copy link
Member

@chmanie chmanie commented Jun 21, 2023

Description

This PR adds better support for pure ESM modules, loosely following this guide.

This roughly means the following:

  • Adding the .js extension to all imports and exports
  • Replace directory default imports with explicit file imports (index.js)
  • Add an eslint rule to enforce this
  • Adjust tsconfig settings accordingly
  • Create artificial package.json files to not break compatibility with commonjs modules
  • Upgrade TypeChain to the newest version which (almost) supports ESM suffixes

Todo

@chmanie chmanie force-pushed the maintenance/proper-esm-support branch 4 times, most recently from be58e5d to 12a70a5 Compare June 22, 2023 17:45
@changeset-bot
Copy link

changeset-bot bot commented Jun 22, 2023

🦋 Changeset detected

Latest commit: f85b955

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@colony/event-metadata Patch
@colony/contractor Patch
@colony/colony-js Patch
@colony/events Patch
@colony/tokens Patch
@colony/core Patch
@colony/sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chmanie chmanie force-pushed the maintenance/proper-esm-support branch from 12a70a5 to fd287ee Compare June 22, 2023 18:41
@chmanie chmanie force-pushed the maintenance/proper-esm-support branch from fd287ee to 5ae3708 Compare June 22, 2023 19:25
@chmanie chmanie force-pushed the main branch 6 times, most recently from 3fa8279 to b42e2f7 Compare June 26, 2023 12:23
@chmanie chmanie force-pushed the maintenance/proper-esm-support branch 2 times, most recently from 12a70a5 to 5ae3708 Compare June 26, 2023 13:04
@chmanie chmanie marked this pull request as ready for review June 26, 2023 13:05
@chmanie chmanie merged commit 542ffad into main Jun 26, 2023
@chmanie chmanie deleted the maintenance/proper-esm-support branch June 26, 2023 16:54
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