Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/edge-bundler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ Intelligently prepare Netlify Edge Functions for deployment.
To avoid pulling in additional dependencies at runtime, this package vendors some Deno modules in the `deno/vendor`
directory.

You can recreate this directory by running `npm run vendor`.
This will go away soon as we move away from the ESZIP format.

> [!WARNING]
> At the time of writing, the underlying Deno CLI command doesn't correctly pull the WASM binary required by the ESZIP
> module. If you run the command to update the list of vendores modules, please ensure you're not deleting
> `eszip_wasm_bg.wasm`.
> The `eszip` module contains a set of custom changes that diverge from the upstream. If you need to update this module,
> make sure to backport them.

## Contributors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ class V2 {
const imports: Record<string, string> = {};

for (const specifier of this.specifiers) {
// NOTE: This is specific to Netlify, to address the fact that we can't
// unpack remote URL specifiers to paths on disk.
// https://github.com/netlify/build/pull/6716
// https://github.com/netlify/build/pull/6720
// https://github.com/netlify/build/pull/6722
if (new URL(specifier).protocol !== "file:") continue
const module = await this.parser.getModuleSource(specifier);
await write(join(dest, "source", url2path(specifier)), module);
Expand Down
4 changes: 4 additions & 0 deletions packages/edge-bundler/node/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ const getFunctionConfigs = async ({
throw err
}

log.user(
'WARNING: Import assertions are deprecated and will be removed soon. Refer to https://ntl.fyi/import-assert for more information.',
)

try {
// We failed to extract the configuration because there is an import assert
// in the function code, a deprecated feature that we used to support with
Expand Down
3 changes: 1 addition & 2 deletions packages/edge-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"test:dev:deno": "deno test --allow-all deno",
"test:ci:vitest": "vitest run --coverage",
"test:ci:deno": "deno test --allow-all deno",
"test:integration": "node --experimental-modules test/integration/test.js",
"vendor": "deno vendor --force --output deno/vendor https://deno.land/x/eszip@v0.55.2/mod.ts https://deno.land/x/retry@v2.0.0/mod.ts https://deno.land/x/std@0.177.0/path/mod.ts"
"test:integration": "node --experimental-modules test/integration/test.js"
},
"keywords": [],
"license": "MIT",
Expand Down
Loading