Skip to content

Conversation

@eduardoboucas
Copy link
Member

Summary

Emits a system log whenever we bundle an edge function that uses import assertions.

@eduardoboucas eduardoboucas requested a review from a team as a code owner July 30, 2025 11:43
mrstork
mrstork previously approved these changes Jul 30, 2025
@mrstork
Copy link
Contributor

mrstork commented Jul 30, 2025

Curious - why feat instead of fix? I believe we're only adding a new log line for some users.

)

if (stderr.includes('Import assertions are deprecated')) {
log.system(`Edge function uses import assertions: ${func.path}`)
Copy link
Contributor

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?

Copy link
Member Author

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'))(
Copy link
Contributor

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?

Copy link
Member Author

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.

@eduardoboucas eduardoboucas enabled auto-merge (squash) July 30, 2025 15:18
@eduardoboucas eduardoboucas merged commit 1cd7909 into main Jul 31, 2025
64 of 67 checks passed
@eduardoboucas eduardoboucas deleted the feat/import-assert branch July 31, 2025 12:37
This was referenced Jul 31, 2025
This was referenced Aug 11, 2025
This was referenced Sep 24, 2025
This was referenced Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants