-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
|
Curious - why |
| ) | ||
|
|
||
| if (stderr.includes('Import assertions are deprecated')) { | ||
| log.system(`Edge function uses import assertions: ${func.path}`) |
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.
Any insight as to why the new test isn't detecting this message?
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.
Because Deno 1.39.0 (the lowest version we support, and used in the tests) doesn't even print the warning. 😢
| // entirely, and what we're asserting here is that we emit a system log when | ||
| // import assertions are detected on successful builds. Also, running it on | ||
| // earlier versions won't work either, since those won't even show a warning. | ||
| test.skipIf(lt(denoVersion, '1.46.3') || gte(denoVersion, '2.0.0'))( |
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.
Summary
Emits a system log whenever we bundle an edge function that uses import assertions.