Skip to content

fix: ESM module types#1889

Closed
petertonysmith94 wants to merge 23 commits intomasterfrom
ps/bug/import-esm-abi-typegen
Closed

fix: ESM module types#1889
petertonysmith94 wants to merge 23 commits intomasterfrom
ps/bug/import-esm-abi-typegen

Conversation

@petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Mar 18, 2024

Closes: #1776


Summary

Using AreTheTypesWrong, we can see that our ESM distributions have the following issues.

Demo

# Install
mkdir fixed-esm &&
  cd fixed-esm &&
  pnpm init &&
  pnpm install "@fuel-ts/abi-typegen@0.0.0-pr-1889-20240404191825" &&
  echo 'import "@fuel-ts/abi-typegen";' > main.mjs

# Run
node main.mjs

Note: if you install the latest for @fuel-ts/abi-typegen the following error will be occur.

@petertonysmith94 petertonysmith94 changed the base branch from master to ps/docs/migrate-wallet-docs-from-fuel-guage March 18, 2024 17:26
@petertonysmith94 petertonysmith94 changed the base branch from ps/docs/migrate-wallet-docs-from-fuel-guage to master March 18, 2024 17:27
@petertonysmith94 petertonysmith94 force-pushed the ps/bug/import-esm-abi-typegen branch from d30fe9f to 94288d4 Compare March 18, 2024 17:39
@petertonysmith94 petertonysmith94 deleted the ps/bug/import-esm-abi-typegen branch March 18, 2024 17:40
@petertonysmith94 petertonysmith94 restored the ps/bug/import-esm-abi-typegen branch March 18, 2024 17:40
@petertonysmith94 petertonysmith94 deleted the ps/bug/import-esm-abi-typegen branch March 18, 2024 17:40
@petertonysmith94 petertonysmith94 restored the ps/bug/import-esm-abi-typegen branch March 18, 2024 17:41
@petertonysmith94 petertonysmith94 changed the title bug: import esm abi typegen fix: import esm abi typegen Mar 18, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2024

This PR is published in NPM with version 0.0.0-pr-1889-20240405150458

@petertonysmith94 petertonysmith94 changed the title fix: import esm abi typegen fix: ESM module types Mar 25, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2024

Coverage Report:

Lines Branches Functions Statements
81.04%(-0.01%) 71.6%(+0%) 79.09%(+0%) 81.12%(-0.01%)
Changed Files:

Coverage values did not change👌.

"textlint-rule-no-dead-link": "^5.1.2",
"ts-generator": "^0.1.1",
"tsup": "^6.7.0",
"tsup": "^8.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgraded tsup to 8.0.0. We could go to 7.1.0 to allow for the following change, which enables the correct type files to be generated.

@petertonysmith94 petertonysmith94 added the bug Issue is a bug label Apr 8, 2024
@petertonysmith94
Copy link
Contributor Author

Superseded by #2060

@petertonysmith94 petertonysmith94 deleted the ps/bug/import-esm-abi-typegen branch May 9, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors when importing from ESM

1 participant