-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add transform to extract node config into separate file #41
Conversation
* Whether the transformer requires user input to run | ||
* If true, the transformer won't show a spinner to avoid cluttering the spinner with user prompts. | ||
*/ | ||
requiresUserInput?: boolean; |
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.
This was necessary b/c otherwise the spinner would show while the user input prompt was showing and the process is waiting for user input. This would severely decrease UX because users might see the spinner as a sign that something is still loading or already going on, not making it clear that they actually need to provide input.
'@sentry/deno', | ||
'@sentry/bun', |
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.
sneaking this into the PR, we should add Deno and Bun to this list
After you've done that, remove import of ${chalk.cyan('instrument.js')} from your file(s). | ||
|
||
This only applies if you are actually using ESM natively with Node. | ||
If you use ${chalk.gray('import')} syntax but transpile to CommonJS (e.g. TypeScript), you're all set up already! |
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.
👍 nice!
This transform will try to detect
Sentry.init()
when using@sentry/node
, and extract it into a separate fileinstrument.js
that is required/imported at the very top of the file.