Skip to content
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

feat(react-component-annotate): Handle function body returning a ternary #598

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Aug 29, 2024

Addresses one of the issues I'm having with habittrack.me:

Before:

<div role="button" tabindex="0" aria-disabled="true" aria-roledescription="sortable" aria-describedby="DndDescribedBy-3"><div class="flex w-full bg-white text-gray-800 py-2 px-4 border border-gray-400 rounded shadow habit-item disable-touch"><div class="w-8 mr-2"></div><div class="w-5/6 mt-0.5">Make coffee at home</div><div class="w-1/6 text-right"><div class="flex w-full"><div class="w-2/4"></div><div class="w-2/4"><input type="checkbox" name="habit-160d3672-0d20-4037-a990-5fde4a22274f" class="w-4 h-4 mt-2"></div></div></div></div></div>

After:

<div role="button" tabindex="0" aria-disabled="true" aria-roledescription="sortable" aria-describedby="DndDescribedBy-3" data-sentry-component="HabitListItem" data-sentry-source-file="habit-list-item.tsx" style="transition: transform linear;"><div class="flex w-full bg-white text-gray-800 py-2 px-4 border border-gray-400 rounded shadow habit-item disable-touch"><div class="w-8 mr-2"></div><div class="w-5/6 mt-0.5">D&amp;D (advanced)</div><div class="w-1/6 text-right"><div class="flex w-full"><div class="w-2/4"></div><div class="w-2/4"><input type="checkbox" name="habit-153cae01-3d34-4c84-9d4d-1a54aeede12e" class="w-4 h-4 mt-2"></div></div></div></div></div>

@lforst lforst requested a review from 0Calories August 29, 2024 08:25
@lforst lforst changed the title feat: handle function body returning a ternary feat: Handle function body returning a ternary Aug 29, 2024
@lforst lforst changed the title feat: Handle function body returning a ternary feat(react-component-annotate): Handle function body returning a ternary Aug 29, 2024
@lforst
Copy link
Member

lforst commented Aug 29, 2024

@0Calories this looks good to me so I am gonna merge it but please scream at me if you spot anything here

@lforst lforst merged commit 687a9f5 into main Aug 29, 2024
18 checks passed
@lforst lforst deleted the handle-ternary branch August 29, 2024 08:26
@0Calories
Copy link
Member

No problems, this looks great!

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 5, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 6, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 7, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 8, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 9, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 10, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 11, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 13, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 14, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 15, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 16, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 17, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 18, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 19, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 20, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 22, 2024
| datasource | package             | from   | to     |
| ---------- | ------------------- | ------ | ------ |
| npm        | @sentry/vite-plugin | 2.22.1 | 2.22.4 |


## [v2.22.4](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2224)

-   feat(react-component-annotate): Handle function body returning a ternary ([#598](getsentry/sentry-javascript-bundler-plugins#598))
-   fix: Allow injection plugins to apply to files with query parameters and fragments in their name ([#597](getsentry/sentry-javascript-bundler-plugins#597))

Work in this release contributed by [@Thristhart](https://github.com/Thristhart). Thank you for your contribution!


## [v2.22.3](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2223)

-   fix(core): Always instantiate global `Error` class in injected code snippets ([#594](getsentry/sentry-javascript-bundler-plugins#594))


## [v2.22.2](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#2222)

-   fix: Disable debug ID injection when `sourcemaps.disable` is set ([#589](getsentry/sentry-javascript-bundler-plugins#589))
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.

3 participants