diff --git a/packages/build/tests/monitor/snapshots/tests.js.md b/packages/build/tests/monitor/snapshots/tests.js.md index d224593613..00d26f18b3 100644 --- a/packages/build/tests/monitor/snapshots/tests.js.md +++ b/packages/build/tests/monitor/snapshots/tests.js.md @@ -1588,7 +1588,7 @@ Generated by [AVA](https://avajs.dev). ────────────────────────────────────────────────────────────────␊ ␊ Error message␊ - Command failed with exit code 1: deno run --allow-all --no-config --import-map=packages/edge-bundler/deno/vendor/import_map.json --quiet packages/edge-bundler/deno/bundle.ts {"basePath":"packages/build/tests/monitor/fixtures/edge_function_error","destPath":"packages/build/tests/monitor/fixtures/edge_function_error/.netlify/edge-functions-dist/HEXADECIMAL_ID.eszip","externals":[],"functions":[{"name":"trouble","path":"packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/trouble.ts"}],"importMapData":"{/"imports/":{/"@netlify/edge-functions/":/"https://edge.netlify.com/v1.0.0/index.ts/",/"netlify:edge/":/"https://edge.netlify.com/v1.0.0/index.ts?v=legacy/"},/"scopes/":{}}"}␊ + Command failed with exit code 1: deno run --allow-all --no-config --no-lock --import-map=packages/edge-bundler/deno/vendor/import_map.json --quiet packages/edge-bundler/deno/bundle.ts {"basePath":"packages/build/tests/monitor/fixtures/edge_function_error","destPath":"packages/build/tests/monitor/fixtures/edge_function_error/.netlify/edge-functions-dist/HEXADECIMAL_ID.eszip","externals":[],"functions":[{"name":"trouble","path":"packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/trouble.ts"}],"importMapData":"{/"imports/":{/"@netlify/edge-functions/":/"https://edge.netlify.com/v1.0.0/index.ts/",/"netlify:edge/":/"https://edge.netlify.com/v1.0.0/index.ts?v=legacy/"},/"scopes/":{}}"}␊ error: Uncaught (in promise) Error: Error: Could not find file: packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/file.ts␊ const ret = new Error(getStringFromWasm0(arg0, arg1));␊ ^␊ @@ -1606,9 +1606,9 @@ Generated by [AVA](https://avajs.dev). Error monitoring payload:␊ {␊ "errorClass": "functionsBundling",␊ - "errorMessage": "Command failed with exit code 1: deno run --allow-all --no-config --import-map=packages/edge-bundler/deno/vendor/import_map.json --quiet packages/edge-bundler/deno/bundle.ts {/"basePath/":/"packages/build/tests/monitor/fixtures/edge_function_error",/"destPath/":/"packages/build/tests/monitor/fixtures/edge_function_error/.netlify/edge-functions-dist/HEXADECIMAL_ID.eszip",/"externals/":[],/"functions/":[{/"name/":/"trouble/",/"path/":/"packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/trouble.ts"}],/"importMapData/":/"{//"imports//":{//"@netlify/edge-functions//"://"https://edge.netlify.com/v1.0.0/index.ts//",//"netlify:edge//"://"https://edge.netlify.com/v1.0.0/index.ts?v=legacy//"},//"scopes//":{}}/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/file.ts/n const ret = new Error(getStringFromWasm0(arg0, arg1));/n ^/n at __wbg_new_HEXADECIMAL_ID (packages/edge-bundler/deno/vendor/deno.land/x/eszip@v1.0.0/eszip_wasm.generated.js:80:80)/n at (wasm://wasm/HEXADECIMAL_ID:1:80)/n at (wasm://wasm/HEXADECIMAL_ID:1:80)/n at (wasm://wasm/HEXADECIMAL_ID:1:80)/n at __wbg_adapter_40 (packages/edge-bundler/deno/vendor/deno.land/x/eszip@v1.0.0/eszip_wasm.generated.js:80:8)/n at real (packages/edge-bundler/deno/vendor/deno.land/x/eszip@v1.0.0/eszip_wasm.generated.js:80:80)/n at eventLoopTick (ext:core/01_core.js:80:7)",␊ + "errorMessage": "Command failed with exit code 1: deno run --allow-all --no-config --no-lock --import-map=packages/edge-bundler/deno/vendor/import_map.json --quiet packages/edge-bundler/deno/bundle.ts {/"basePath/":/"packages/build/tests/monitor/fixtures/edge_function_error",/"destPath/":/"packages/build/tests/monitor/fixtures/edge_function_error/.netlify/edge-functions-dist/HEXADECIMAL_ID.eszip",/"externals/":[],/"functions/":[{/"name/":/"trouble/",/"path/":/"packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/trouble.ts"}],/"importMapData/":/"{//"imports//":{//"@netlify/edge-functions//"://"https://edge.netlify.com/v1.0.0/index.ts//",//"netlify:edge//"://"https://edge.netlify.com/v1.0.0/index.ts?v=legacy//"},//"scopes//":{}}/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: packages/build/tests/monitor/fixtures/edge_function_error/netlify/edge-functions/file.ts/n const ret = new Error(getStringFromWasm0(arg0, arg1));/n ^/n at __wbg_new_HEXADECIMAL_ID (packages/edge-bundler/deno/vendor/deno.land/x/eszip@v1.0.0/eszip_wasm.generated.js:80:80)/n at (wasm://wasm/HEXADECIMAL_ID:1:80)/n at (wasm://wasm/HEXADECIMAL_ID:1:80)/n at (wasm://wasm/HEXADECIMAL_ID:1:80)/n at __wbg_adapter_40 (packages/edge-bundler/deno/vendor/deno.land/x/eszip@v1.0.0/eszip_wasm.generated.js:80:8)/n at real (packages/edge-bundler/deno/vendor/deno.land/x/eszip@v1.0.0/eszip_wasm.generated.js:80:80)/n at eventLoopTick (ext:core/01_core.js:80:7)",␊ "context": "Bundling of edge function failed",␊ - "groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at /external/path at /external/path at /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path",␊ + "groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config --no-lock /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at /external/path at /external/path at /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path",␊ "severity": "info",␊ "unhandled": false,␊ "location": {␊ @@ -1619,7 +1619,7 @@ Generated by [AVA](https://avajs.dev). "pluginPackageJson": false,␊ "BUILD_ID": "0",␊ "other": {␊ - "groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at /external/path at /external/path at /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path"␊ + "groupingHash": "Bundling of edge function failed/nCommand failed with exit code 0: deno run --allow-all --no-config --no-lock /external/path --quiet /external/path {/"/":/"/",/"/":/"/",/"/":[],/"/":[{/"/":/"/",/"/":/"/"}],/"/":/"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"/external/path"/"}/nerror: Uncaught (in promise) Error: Error: Could not find file: /external/path const ret = new Error(getStringFromWasm0(arg0, arg0));/n ^/n at __wbg_new_hex /external/path at /external/path at /external/path at /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path"␊ }␊ }` diff --git a/packages/build/tests/monitor/snapshots/tests.js.snap b/packages/build/tests/monitor/snapshots/tests.js.snap index b90e6a3e0e..45521f3ca6 100644 Binary files a/packages/build/tests/monitor/snapshots/tests.js.snap and b/packages/build/tests/monitor/snapshots/tests.js.snap differ diff --git a/packages/edge-bundler/node/config.ts b/packages/edge-bundler/node/config.ts index df76405915..8a0fa6ab8f 100644 --- a/packages/edge-bundler/node/config.ts +++ b/packages/edge-bundler/node/config.ts @@ -112,6 +112,7 @@ export const getFunctionConfig = async ({ `--allow-write=${collector.path}`, `--import-map=${importMap.toDataURL()}`, '--no-config', + '--no-lock', '--node-modules-dir=false', '--quiet', extractorPath, diff --git a/packages/edge-bundler/node/formats/eszip.ts b/packages/edge-bundler/node/formats/eszip.ts index 432c07ff36..09df0229de 100644 --- a/packages/edge-bundler/node/formats/eszip.ts +++ b/packages/edge-bundler/node/formats/eszip.ts @@ -57,7 +57,7 @@ const bundleESZIP = async ({ importMapData, vendorDirectory, } - const flags = ['--allow-all', '--no-config', `--import-map=${bundlerImportMap}`] + const flags = ['--allow-all', '--no-config', '--no-lock', `--import-map=${bundlerImportMap}`] if (!debug) { flags.push('--quiet') diff --git a/packages/edge-bundler/node/server/server.ts b/packages/edge-bundler/node/server/server.ts index 43f420bcc8..67c6feaaca 100644 --- a/packages/edge-bundler/node/server/server.ts +++ b/packages/edge-bundler/node/server/server.ts @@ -123,7 +123,7 @@ const prepareServer = ({ // the `stage2Path` file as well as all of their dependencies. // Consumers such as the CLI can use this information to watch all the // relevant files and issue an isolate restart when one of them changes. - const { stdout } = await deno.run(['info', '--json', pathToFileURL(stage2Path).href]) + const { stdout } = await deno.run(['info', '--no-lock', '--json', pathToFileURL(stage2Path).href]) graph = JSON.parse(stdout) } catch { diff --git a/packages/edge-bundler/node/types.test.ts b/packages/edge-bundler/node/types.test.ts index 4d57416dac..917765a02d 100644 --- a/packages/edge-bundler/node/types.test.ts +++ b/packages/edge-bundler/node/types.test.ts @@ -30,7 +30,7 @@ test('`ensureLatestTypes` updates the Deno CLI cache if the local version of typ expect(latestVersionMock.isDone()).toBe(true) expect(mock).toHaveBeenCalledTimes(1) - expect(mock).toHaveBeenCalledWith(['cache', '-r', mockURL]) + expect(mock).toHaveBeenCalledWith(['cache', '--no-lock', '-r', mockURL]) expect(versionFile).toBe(mockVersion) mock.mockRestore() diff --git a/packages/edge-bundler/node/types.ts b/packages/edge-bundler/node/types.ts index 5809d3424a..18ad7dc1a2 100644 --- a/packages/edge-bundler/node/types.ts +++ b/packages/edge-bundler/node/types.ts @@ -29,7 +29,7 @@ const ensureLatestTypes = async (deno: DenoBridge, logger: Logger, customTypesUR logger.system('Local version of types is outdated, updating:', localVersion) try { - await deno.run(['cache', '-r', typesURL]) + await deno.run(['cache', '--no-lock', '-r', typesURL]) } catch (error) { logger.system('Could not download latest types:', error)