Skip to content

fix(aws-serverless): Add awslambda-auto to package.json exports#12021

Merged
s1gr1d merged 3 commits intodevelopfrom
sig/fix-lambdalayer
May 14, 2024
Merged

fix(aws-serverless): Add awslambda-auto to package.json exports#12021
s1gr1d merged 3 commits intodevelopfrom
sig/fix-lambdalayer

Conversation

@s1gr1d
Copy link
Copy Markdown
Member

@s1gr1d s1gr1d commented May 14, 2024

In v7, the exports were not explicitly defined. In v8, the awslambda-auto export has to be added to the list of exports (done in this PR). Also added a variant without the dist, so it can be added to the NODE_OPTIONS as -r @sentry/aws-serverless/awslambda-auto

fixes #12012

@s1gr1d s1gr1d requested review from Lms24, andreiborza and lforst May 14, 2024 11:19
Comment on lines +44 to +48
"./awslambda-auto": {
"import": {
"default": "./build/npm/cjs/awslambda-auto.js"
}
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import is used for ESM but the file is CJS. I don't think this will work (or is necessary) and we can remove this block

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks - copy paste error :D
I added this block, as this is a cleaner way to declare the import (without the dist). I left dist for compatibility reasons.

Copy link
Copy Markdown
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser 21.65 KB (0%)
@sentry/browser (incl. Tracing) 32.69 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.03 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.43 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.07 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.08 KB (0%)
@sentry/browser (incl. Feedback) 37.57 KB (0%)
@sentry/browser (incl. sendFeedback) 26.21 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.57 KB (0%)
@sentry/react 24.33 KB (0%)
@sentry/react (incl. Tracing) 35.65 KB (+0.02% 🔺)
@sentry/vue 25.48 KB (0%)
@sentry/vue (incl. Tracing) 34.48 KB (0%)
@sentry/svelte 21.77 KB (0%)
CDN Bundle 24.13 KB (0%)
CDN Bundle (incl. Tracing) 34.06 KB (0%)
CDN Bundle (incl. Tracing, Replay) 67.73 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 72.71 KB (0%)
CDN Bundle - uncompressed 70.98 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101.02 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.64 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 222.94 KB (0%)
@sentry/nextjs (client) 34.88 KB (0%)
@sentry/sveltekit (client) 33.25 KB (0%)
@sentry/node 147.42 KB (0%)

@s1gr1d s1gr1d merged commit 2405201 into develop May 14, 2024
@s1gr1d s1gr1d deleted the sig/fix-lambdalayer branch May 14, 2024 12:00
@Lms24 Lms24 mentioned this pull request May 14, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when using v8 lambda layer

4 participants