-
Notifications
You must be signed in to change notification settings - Fork 78
feat: update deno version range to include v2 #6118
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
Changes from all commits
3b6fd58
5b70819
2f28aa7
dd4fe19
6c8d22a
fb244c5
244612e
3dc077a
c581470
c61416e
a76d54f
cfeb63e
2308d5b
bfb14cf
005c36f
252fab1
6f0e94e
749b8be
09c01fa
5f05556
6c42058
17cdb7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1606,7 +1606,7 @@ 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//":{//"builtins//"://"node:builtins//",//"@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//":{}}/",/"vendorDirectory/":/"/external/path"}/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/[email protected]/eszip_wasm.generated.js:80:80)/n at <anonymous> (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:80)/n at <anonymous> (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:80)/n at <anonymous> (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:80)/n at __wbg_adapter_40 (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm.generated.js:80:8)/n at real (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/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 --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//":{//"builtins//"://"node:builtins//",//"@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//":{}}/",/"vendorDirectory/":/"/external/path"}/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/[email protected]/eszip_wasm.generated.js:80:80)/n at <anonymous> (wasm://wasm/HEXADECIMAL_ID:1:80)/n at <anonymous> (wasm://wasm/HEXADECIMAL_ID:1:80)/n at <anonymous> (wasm://wasm/HEXADECIMAL_ID:1:80)/n at __wbg_adapter_40 (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm.generated.js:80:8)/n at real (packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/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"/"/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 <anonymous> /external/path at <anonymous> /external/path at <anonymous> /external/path at __wbg_adapter_0 /external/path at real /external/path at eventLoopTick /external/path",β | ||
"severity": "info",β | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Adds a custom error property to user errors during bundling 1`] = ` | ||
"error: Uncaught (in promise) Error: The module's source code could not be parsed: Unexpected eof at file:///root/functions/func1.ts:1:27 | ||
|
||
export default async () => | ||
~ | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
^ | ||
at <anonymous> (file://build/packages/edge-bundler/deno/vendor/deno.land/x/[email protected]/eszip_wasm.generated.js:443:19)" | ||
`; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,6 +1,7 @@ | ||||||||||||||||||||||||||||||||||
import type { WriteStream } from 'fs' | ||||||||||||||||||||||||||||||||||
import { readdir, unlink } from 'fs/promises' | ||||||||||||||||||||||||||||||||||
import { join } from 'path' | ||||||||||||||||||||||||||||||||||
import { pathToFileURL } from 'url' | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
import { DenoBridge, OnAfterDownloadHook, OnBeforeDownloadHook, ProcessRef } from '../bridge.js' | ||||||||||||||||||||||||||||||||||
import { getFunctionConfig, FunctionConfig } from '../config.js' | ||||||||||||||||||||||||||||||||||
|
@@ -125,7 +126,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', stage2Path]) | ||||||||||||||||||||||||||||||||||
const { stdout } = await deno.run(['info', '--json', pathToFileURL(stage2Path).href]) | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we already were using this setup in build/packages/edge-bundler/node/config.ts Lines 98 to 113 in 1b9f2f4
Without it, deno 2 fails this with this kind of errors on windows:
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
graph = JSON.parse(stdout) | ||||||||||||||||||||||||||||||||||
} catch { | ||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do note, that if system doesn't have deno installed, or installed version doesn't match the range, we will continue to download
1.39.0
for our use due to way this is implemented:build/packages/edge-bundler/node/downloader.ts
Lines 90 to 108 in 17cdb7c
And fact that actually latest version of Deno today is 2.2.6 (and will continue to be bumped), so that latest version is not in our range and the function falling back to min version.
I think this might be desirable to be the case at least temporarily to possibly migrate with slower pace to catch things we didn't catch here, but I just want to at least flag it here