Skip to content

feat: Replace entries option with releaseInjectionTargets #123

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

Merged
merged 7 commits into from
Nov 17, 2022

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Nov 16, 2022

We faced problems when dogfooding the bundler plugin in https://github.com/getsentry/gib-potato.

  1. We tried to inject the release in non-JS files.

    • This PR addresses this by only injecting the release code when we encounter a file that ends in a JS-like file ending (.js, .ts, .jsx, .tsx, .cjs or .mjs).
  2. Considering the above fixed, if an app's entry point was a non-JS file (e.g. a .html file) we didn't inject the release anywhere at all.

    • We address this by injecting the release code in all user code modules (the bundlers will take care of only actually including the code once per bundle) and replacing the entries option with a new releaseInjectionTargets option to allow for more fine-grained control in overriding in which modules the release code should be injected. This is a breaking change so we added an entry in the migration docs.

@lforst lforst requested a review from Lms24 November 16, 2022 13:42
@lforst lforst self-assigned this Nov 16, 2022
Lms24
Lms24 previously approved these changes Nov 16, 2022
Copy link
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.

🚢 it

@lforst lforst changed the title fix: Inject release in all JavaScript-like files feat: Replace entries option with releaseInjectionTargets Nov 16, 2022
@lforst lforst force-pushed the lforst-yeet-is-entry-logic branch from ee755ee to 1c727a5 Compare November 16, 2022 14:12
@lforst lforst requested a review from Lms24 November 16, 2022 14:44
@lforst lforst force-pushed the lforst-yeet-is-entry-logic branch from 57d0e1b to 02636cc Compare November 16, 2022 16:11
@lforst lforst changed the base branch from main to lforst-snapshot-e2e-tests November 16, 2022 16:12
Base automatically changed from lforst-snapshot-e2e-tests to main November 17, 2022 08:26
@lforst lforst enabled auto-merge (squash) November 17, 2022 09:33
@lforst lforst merged commit c576aff into main Nov 17, 2022
@lforst lforst deleted the lforst-yeet-is-entry-logic branch November 17, 2022 10:09
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.

2 participants