Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(serverless): Re-add missing modules in Node AWS Lambda Layer (#4982)
This PR fixes the AWS Lambda layer in @sentry/serverless. The problem was caused by changes introduced in #4882. Some unintended consequences of these changes were: - By centralising most .npmignore files, npm-packlist did not find all the necessary (but also unnecessary) files when creating the list of files that should end up in the lambda layer Zip file. Due to the missing .npmignore files, it resorted to .gitignore which ignores generated JS files. This PR re-adds local .npmignore files in the dependencies of @sentry/serverless to fix this. - @sentry/tracing is a special case where we need to execute prepack.ts also after building. The call to prepack was missing the --bundles flag, resulting in a weird directory structure. This PR adds the flag and adjusts the sideEffects entry we need for our integration tests. As a hotfix, this PR ensures further that the directory structure in the Lambda layer conforms to the NODE_OPTIONS environment variable set by Sentry
- Loading branch information
Showing
7 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied | ||
# into it by the prepack script `scripts/prepack.ts`. | ||
|
||
* | ||
|
||
# TODO remove bundles (which in the tarball are inside `build`) in v7 | ||
!/build/**/* | ||
|
||
!/dist/**/* | ||
!/esm/**/* | ||
!/types/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied | ||
# into it by the prepack script `scripts/prepack.ts`. | ||
|
||
* | ||
|
||
# TODO remove bundles (which in the tarball are inside `build`) in v7 | ||
!/build/**/* | ||
|
||
!/dist/**/* | ||
!/esm/**/* | ||
!/types/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied | ||
# into it by the prepack script `scripts/prepack.ts`. | ||
|
||
* | ||
|
||
# TODO remove bundles (which in the tarball are inside `build`) in v7 | ||
!/build/**/* | ||
|
||
!/dist/**/* | ||
!/esm/**/* | ||
!/types/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied | ||
# into it by the prepack script `scripts/prepack.ts`. | ||
|
||
* | ||
|
||
# TODO remove bundles (which in the tarball are inside `build`) in v7 | ||
!/build/**/* | ||
|
||
!/dist/**/* | ||
!/esm/**/* | ||
!/types/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied | ||
# into it by the prepack script `scripts/prepack.ts`. | ||
|
||
* | ||
|
||
# TODO remove bundles (which in the tarball are inside `build`) in v7 | ||
!/build/**/* | ||
|
||
!/dist/**/* | ||
!/esm/**/* | ||
!/types/**/* |