-
Notifications
You must be signed in to change notification settings - Fork 82
feat: emit system log on import assertions #6590
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
678a29d
0386ddd
d1dc564
0a7500d
2e0e0e1
a57b64b
bc20747
997aa9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,11 +96,12 @@ export const getFunctionConfig = async ({ | |
| // with the extractor. | ||
| const collector = await tmp.file() | ||
|
|
||
| // Retrieving the version of Deno. | ||
| const version = new SemVer((await deno.getBinaryVersion((await deno.getBinaryPath({ silent: true })).path)) || '') | ||
|
|
||
| // The extractor will use its exit code to signal different error scenarios, | ||
| // based on the list of exit codes we send as an argument. We then capture | ||
| // the exit code to know exactly what happened and guide people accordingly. | ||
| const version = new SemVer((await deno.getBinaryVersion((await deno.getBinaryPath({ silent: true })).path)) || '') | ||
|
|
||
| const { exitCode, stderr, stdout } = await deno.run( | ||
| [ | ||
| 'run', | ||
|
|
@@ -121,6 +122,10 @@ export const getFunctionConfig = async ({ | |
| { rejectOnExitCode: false }, | ||
| ) | ||
|
|
||
| if (stderr.includes('Import assertions are deprecated')) { | ||
| log.system(`Edge function uses import assertions: ${func.path}`) | ||
|
Contributor
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. Any insight as to why the new test isn't detecting this message?
Member
Author
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. Because Deno 1.39.0 (the lowest version we support, and used in the tests) doesn't even print the warning. 😢 |
||
| } | ||
|
|
||
| if (exitCode !== ConfigExitCode.Success) { | ||
| handleConfigError(func, exitCode, stderr, log) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "foo": "bar" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import dict from './dict.json' assert { type: "json" } | ||
|
|
||
|
|
||
| export default async () => Response.json(dict) |
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.
I believe the current CI setup only runs in 1.39.0 and 2.2.4, so this test will not run in CI. Are we okay with this being a local development only test?
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.
Yes. I have explained in more detail here. The only option would be to add 1.46.3 to the matrix just for this test, but feels like an overkill.