vercel / edge-runtime

Developing, testing, and defining the runtime Web APIs for Edge infrastructure.
https://edge-runtime.vercel.app
MIT License
830 stars 79 forks source link

Remove access to `Buffer` in `@edge-runtime/jest-environment` #953

Open guisehn opened 3 months ago

guisehn commented 3 months ago

Fixes https://github.com/vercel/edge-runtime/issues/952

Removes access to global Buffer variable from Node when using @edge-runtime/jest-environment.

Buffer will not be available in production when using the edge runtime, so it should also be unavailable in tests. That way, we can catch in tests when unavailable APIs are used.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: ea9a5a442b29ffe749c74f416f06a7a2d50555fe

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

This PR includes changesets to release 1 package | Name | Type | | ------------------------------ | ----- | | @edge-runtime/jest-environment | Major |

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

vercel[bot] commented 3 months ago

@guisehn is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Kikobeats commented 3 months ago

Thanks for this!