-
Notifications
You must be signed in to change notification settings - Fork 27.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow subset of node.js APIs for edge (#69675)
### What? Allow using modules listed in https://developers.cloudflare.com/workers/runtime-apis/nodejs/ in edge runtime. ### Why? It's supported. ### How?
- Loading branch information
Showing
4 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
crates/next-custom-transforms/tests/fixture/edge-assert/nodejs-import-allowed/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Allowed because a subset of Node.js APIs are allowed. | ||
import 'node:util' | ||
import 'node:stream' | ||
import 'node:process' | ||
import 'node:path' | ||
import 'node:events' | ||
import 'node:diagnostics_channel' | ||
import 'node:crypto' | ||
import 'node:buffer' | ||
import 'node:async_hooks' | ||
import 'node:assert' |
11 changes: 11 additions & 0 deletions
11
crates/next-custom-transforms/tests/fixture/edge-assert/nodejs-import-allowed/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Allowed because a subset of Node.js APIs are allowed. | ||
import 'node:util'; | ||
import 'node:stream'; | ||
import 'node:process'; | ||
import 'node:path'; | ||
import 'node:events'; | ||
import 'node:diagnostics_channel'; | ||
import 'node:crypto'; | ||
import 'node:buffer'; | ||
import 'node:async_hooks'; | ||
import 'node:assert'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters