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 module types #1889

Closed
wants to merge 23 commits into from
Closed

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 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
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
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👌.

@@ -99,7 +100,7 @@
"textlint": "^13.3.2",
"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