-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use --enable-source-maps
#761
Merged
Merged
Conversation
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
We can get rid of the stack trace support in skuba-dive in favour of this Node.js CLI flag. This is stable in Node.js 14.18 which we require as of #760. - https://github.com/seek-oss/skuba-dive#register - https://nodejs.org/api/cli.html#cli_enable_source_maps Closes #399.
🦋 Changeset detectedLatest commit: c646cdd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
72636c
added a commit
to seek-oss/skuba-dive
that referenced
this pull request
Feb 9, 2022
Node.js 14.18+ now supports this natively. BREAKING CHANGE: `skuba-dive/register` no longer configures `source-map-support` for your project. Upgrade to Node.js 14.18+ and use the built-in `--enable-source-maps` option. For a containerised application, update your Dockerfile: ```diff - FROM gcr.io/distroless/nodejs:14 AS runtime + FROM gcr.io/distroless/nodejs:16 AS runtime + # https://nodejs.org/api/cli.html#cli_node_options_options + ENV NODE_OPTIONS --enable-source-maps ``` For a Serverless Lambda application, update your `serverless.yml`: ```diff provider: - runtime: nodejs12.x + runtime: nodejs14.x functions: Worker: environment: + # https://nodejs.org/api/cli.html#cli_node_options_options + NODE_OPTIONS: --enable-source-maps ``` For a CDK Lambda application, update your stack: ```diff new aws_lambda.Function(this, 'worker', { - runtime: aws_lambda.Runtime.NODEJS_12_X, + runtime: aws_lambda.Runtime.NODEJS_14_X, environment: { + // https://nodejs.org/api/cli.html#cli_node_options_options + NODE_OPTIONS: '--enable-source-maps', }, }); ``` See seek-oss/skuba#761 for more examples.
72636c
added a commit
to seek-oss/skuba-dive
that referenced
this pull request
Feb 9, 2022
Node.js 14.18+ now supports this natively. BREAKING CHANGE: `skuba-dive/register` no longer configures `source-map-support` for your project. Upgrade to Node.js 14.18+ and use the built-in `--enable-source-maps` option. For a containerised application, update your Dockerfile: ```diff - FROM gcr.io/distroless/nodejs:14 AS runtime + FROM gcr.io/distroless/nodejs:16 AS runtime + # https://nodejs.org/api/cli.html#cli_node_options_options + ENV NODE_OPTIONS --enable-source-maps ``` For a Serverless Lambda application, update your `serverless.yml`: ```diff provider: - runtime: nodejs12.x + runtime: nodejs14.x functions: Worker: environment: + # https://nodejs.org/api/cli.html#cli_node_options_options + NODE_OPTIONS: --enable-source-maps ``` For a CDK Lambda application, update your stack: ```diff new aws_lambda.Function(this, 'worker', { - runtime: aws_lambda.Runtime.NODEJS_12_X, + runtime: aws_lambda.Runtime.NODEJS_14_X, environment: { + // https://nodejs.org/api/cli.html#cli_node_options_options + NODE_OPTIONS: '--enable-source-maps', }, }); ``` See seek-oss/skuba#761 for more examples.
etaoins
approved these changes
Feb 10, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We can get rid of the stack trace support in skuba-dive in favour of this Node.js CLI flag. This is stable in Node.js 14.18 which we require as of #760.
Closes #399.