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

🚸 Delay the warning ExperimentalWarning: WASI is ... for prism/wasm until the actual moment prism is used. #404

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

hoshinotsuyoshi
Copy link
Member

@hoshinotsuyoshi hoshinotsuyoshi commented Dec 27, 2024

Summary

Delay the warning ExperimentalWarning: WASI is ... for prism/wasm until the actual moment prism is used.

Related Issue

Changes

Testing

  1. When displaying usage, no warning is shown:
[cli]$ node dist-cli/bin/cli.js erd
Usage: liam erd [options] [command]

ERD commands

Options:
  -h, --help       display help for command

Commands:
  build [options]  Build ERD html assets
  help [command]   display help for command
  1. Similarly, no warnings are shown when running erd build --format postgres:
[cli]$ node dist-cli/bin/cli.js erd build --input fixtures/input.sql --format postgres
# no warnings

However, when running erd build --format schemarb, a warning is displayed:

$ node dist-cli/bin/cli.js erd build --input https://github.com/mastodon/mastodon/blob/v4.3.2/db/schema.rb --format schemarb
(node:99295) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

Other Information

Copy link

changeset-bot bot commented Dec 27, 2024

🦋 Changeset detected

Latest commit: a2999c5

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

This PR includes changesets to release 2 packages
Name Type
@liam-hq/db-structure Patch
@liam-hq/cli 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

@hoshinotsuyoshi hoshinotsuyoshi changed the title Dynamic import wasm 🚸 Delay the warning ExperimentalWarning: WASI is ... for prism/wasm until the actual moment prism is used. Dec 27, 2024
- To delay the warning `ExperimentalWarning: WASI is an experimental feature and might change at any time` for prism/wasm until the actual moment prism is used.
- Introduced the `renameImportWasi` plugin to address an issue where `import 'wasi';` was being included in the build artifact despite being dynamically imported within the `db-structure` package.
Copy link
Member

@MH4GF MH4GF left a comment

Choose a reason for hiding this comment

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

This is amazing!!
Thanks!!

@MH4GF MH4GF added this pull request to the merge queue Dec 27, 2024
Merged via the queue into main with commit 2eaf1d3 Dec 27, 2024
12 checks passed
@MH4GF MH4GF deleted the dynamic-import-wasm branch December 27, 2024 12:26
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