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 image integration not working on Node 18+ #5871

Merged
merged 3 commits into from
Jan 17, 2023
Merged

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Jan 16, 2023

Changes

When we removed support for Node 14, we migrated to undici. This caused an issue with our image integration because squoosh uses a fetch to load a local .wasm file, which is not supported by undici (and is unlikely to be for some time).

This PR removes the code for that and instead opt to use the fallback only. This is also what Next.js does, so it should be okay!

Fix #5866
Fix #5714
Fix #5473
Fix #4980

Testing

Tests still pass + manual tests

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2023

🦋 Changeset detected

Latest commit: 4c54eeb

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

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

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Jan 16, 2023
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Looks like it needs a changeset, otherwise this looks good!

I was curious if this would drop support for worker or Deno environments, but it looks like these files are meant to run in Node.js (especially given the file names include _node_), so I think we're safe here too.

Copy link
Contributor

@aFuzzyBear aFuzzyBear left a comment

Choose a reason for hiding this comment

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

Surgical precision 👩‍⚕️

@Princesseuh Princesseuh merged commit 1bd42c6 into main Jan 17, 2023
@Princesseuh Princesseuh deleted the fix/image-node18 branch January 17, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
3 participants