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

fix(v8/node/nestjs): Use method on current fastify request #15104

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

chargome
Copy link
Member

Backports #15066

The previous code was using fastify `request.routeOptions.method` which
is all methods the current route supports - not the current request
method.
Ex. `@All()` nestjs decorator `request.routeOptions.method = ['GET',
'POST', 'HEAD', ...]`

- Added a test for `@All()`
- Updated instances of fastify request to use `request.method` which
matches express

---------

Co-authored-by: Charly Gomez <[email protected]>
@chargome chargome self-assigned this Jan 21, 2025
@chargome chargome requested a review from mydea January 21, 2025 08:36
@chargome chargome merged commit 8b870ba into v8 Jan 21, 2025
140 checks passed
@chargome chargome deleted the cg/v8-backport-fastify-request-method-fix branch January 21, 2025 09:17
alexandresoro pushed a commit to alexandresoro/ouca-backend that referenced this pull request Jan 22, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@sentry/node](https://github.com/getsentry/sentry-javascript/tree/master/packages/node) ([source](https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.50.0` -> `8.51.0`](https://renovatebot.com/diffs/npm/@sentry%2fnode/8.50.0/8.51.0) |

---

### Release Notes

<details>
<summary>getsentry/sentry-javascript (@&#8203;sentry/node)</summary>

### [`v8.51.0`](https://github.com/getsentry/sentry-javascript/releases/tag/8.51.0)

[Compare Source](getsentry/sentry-javascript@8.50.0...8.51.0)

##### Important Changes

-   **feat(v8/node): Add `prismaInstrumentation` option to Prisma integration as escape hatch for all Prisma versions ([#&#8203;15128](getsentry/sentry-javascript#15128

    This release adds a compatibility API to add support for Prisma version 6.
    To capture performance data for Prisma version 6:

    1.  Install the `@prisma/instrumentation` package on version 6.

    2.  Pass a `new PrismaInstrumentation()` instance as exported from `@prisma/instrumentation` to the `prismaInstrumentation` option:

        ```js
        import { PrismaInstrumentation } from '@&#8203;prisma/instrumentation';

        Sentry.init({
          integrations: [
            prismaIntegration({
              // Override the default instrumentation that Sentry uses
              prismaInstrumentation: new PrismaInstrumentation(),
            }),
          ],
        });
        ```

        The passed instrumentation instance will override the default instrumentation instance the integration would use, while the `prismaIntegration` will still ensure data compatibility for the various Prisma versions.

    3.  Remove the `previewFeatures = ["tracing"]` option from the client generator block of your Prisma schema.

##### Other Changes

-   feat(v8/browser): Add `multiplexedtransport.js` CDN bundle ([#&#8203;15046](getsentry/sentry-javascript#15046))
-   feat(v8/browser): Add Unleash integration ([#&#8203;14948](getsentry/sentry-javascript#14948))
-   feat(v8/deno): Deprecate Deno SDK as published on deno.land ([#&#8203;15121](getsentry/sentry-javascript#15121))
-   feat(v8/sveltekit): Deprecate `fetchProxyScriptNonce` option ([#&#8203;15011](getsentry/sentry-javascript#15011))
-   fix(v8/aws-lambda): Avoid overwriting root span name ([#&#8203;15054](getsentry/sentry-javascript#15054))
-   fix(v8/core): `fatal` events should set session as crashed ([#&#8203;15073](getsentry/sentry-javascript#15073))
-   fix(v8/node/nestjs): Use method on current fastify request ([#&#8203;15104](getsentry/sentry-javascript#15104))

Work in this release was contributed by [@&#8203;tjhiggins](https://github.com/tjhiggins), and [@&#8203;nwalters512](https://github.com/nwalters512). Thank you for your contributions!

#### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) - with treeshaking flags                         | 23.17 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.2 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 66.66 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.51 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.44 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.9 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.7 KB   |
| [@&#8203;sentry/react](https://github.com/sentry/react)                                                    | 25.97 KB  |
| [@&#8203;sentry/react](https://github.com/sentry/react) (incl. Tracing)                                    | 38.68 KB  |
| [@&#8203;sentry/vue](https://github.com/sentry/vue)                                                      | 27.57 KB  |
| [@&#8203;sentry/vue](https://github.com/sentry/vue) (incl. Tracing)                                      | 37.71 KB  |
| [@&#8203;sentry/svelte](https://github.com/sentry/svelte)                                                   | 23.46 KB  |
| CDN Bundle                                                       | 24.5 KB   |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.85 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.21 KB  |
| CDN Bundle - uncompressed                                        | 71.94 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.44 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.69 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.79 KB |
| [@&#8203;sentry/nextjs](https://github.com/sentry/nextjs) (client)                                          | 38.93 KB  |
| [@&#8203;sentry/sveltekit](https://github.com/sentry/sveltekit) (client)                                       | 36.36 KB  |
| [@&#8203;sentry/node](https://github.com/sentry/node)                                                     | 162.83 KB |
| [@&#8203;sentry/node](https://github.com/sentry/node) - without tracing                                   | 99.14 KB  |
| [@&#8203;sentry/aws-serverless](https://github.com/sentry/aws-serverless)                                           | 126.65 KB |

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMjIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEyMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca-backend/pulls/491
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
alexandresoro pushed a commit to alexandresoro/ouca-web that referenced this pull request Jan 22, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@sentry/react](https://github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.50.0` -> `8.51.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.50.0/8.51.0) |

---

### Release Notes

<details>
<summary>getsentry/sentry-javascript (@&#8203;sentry/react)</summary>

### [`v8.51.0`](https://github.com/getsentry/sentry-javascript/releases/tag/8.51.0)

[Compare Source](getsentry/sentry-javascript@8.50.0...8.51.0)

##### Important Changes

-   **feat(v8/node): Add `prismaInstrumentation` option to Prisma integration as escape hatch for all Prisma versions ([#&#8203;15128](getsentry/sentry-javascript#15128

    This release adds a compatibility API to add support for Prisma version 6.
    To capture performance data for Prisma version 6:

    1.  Install the `@prisma/instrumentation` package on version 6.

    2.  Pass a `new PrismaInstrumentation()` instance as exported from `@prisma/instrumentation` to the `prismaInstrumentation` option:

        ```js
        import { PrismaInstrumentation } from '@&#8203;prisma/instrumentation';

        Sentry.init({
          integrations: [
            prismaIntegration({
              // Override the default instrumentation that Sentry uses
              prismaInstrumentation: new PrismaInstrumentation(),
            }),
          ],
        });
        ```

        The passed instrumentation instance will override the default instrumentation instance the integration would use, while the `prismaIntegration` will still ensure data compatibility for the various Prisma versions.

    3.  Remove the `previewFeatures = ["tracing"]` option from the client generator block of your Prisma schema.

##### Other Changes

-   feat(v8/browser): Add `multiplexedtransport.js` CDN bundle ([#&#8203;15046](getsentry/sentry-javascript#15046))
-   feat(v8/browser): Add Unleash integration ([#&#8203;14948](getsentry/sentry-javascript#14948))
-   feat(v8/deno): Deprecate Deno SDK as published on deno.land ([#&#8203;15121](getsentry/sentry-javascript#15121))
-   feat(v8/sveltekit): Deprecate `fetchProxyScriptNonce` option ([#&#8203;15011](getsentry/sentry-javascript#15011))
-   fix(v8/aws-lambda): Avoid overwriting root span name ([#&#8203;15054](getsentry/sentry-javascript#15054))
-   fix(v8/core): `fatal` events should set session as crashed ([#&#8203;15073](getsentry/sentry-javascript#15073))
-   fix(v8/node/nestjs): Use method on current fastify request ([#&#8203;15104](getsentry/sentry-javascript#15104))

Work in this release was contributed by [@&#8203;tjhiggins](https://github.com/tjhiggins), and [@&#8203;nwalters512](https://github.com/nwalters512). Thank you for your contributions!

#### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) - with treeshaking flags                         | 23.17 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.2 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 66.66 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.51 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.44 KB  |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.9 KB   |
| [@&#8203;sentry/browser](https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.7 KB   |
| [@&#8203;sentry/react](https://github.com/sentry/react)                                                    | 25.97 KB  |
| [@&#8203;sentry/react](https://github.com/sentry/react) (incl. Tracing)                                    | 38.68 KB  |
| [@&#8203;sentry/vue](https://github.com/sentry/vue)                                                      | 27.57 KB  |
| [@&#8203;sentry/vue](https://github.com/sentry/vue) (incl. Tracing)                                      | 37.71 KB  |
| [@&#8203;sentry/svelte](https://github.com/sentry/svelte)                                                   | 23.46 KB  |
| CDN Bundle                                                       | 24.5 KB   |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.85 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.21 KB  |
| CDN Bundle - uncompressed                                        | 71.94 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.44 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.69 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.79 KB |
| [@&#8203;sentry/nextjs](https://github.com/sentry/nextjs) (client)                                          | 38.93 KB  |
| [@&#8203;sentry/sveltekit](https://github.com/sentry/sveltekit) (client)                                       | 36.36 KB  |
| [@&#8203;sentry/node](https://github.com/sentry/node)                                                     | 162.83 KB |
| [@&#8203;sentry/node](https://github.com/sentry/node) - without tracing                                   | 99.14 KB  |
| [@&#8203;sentry/aws-serverless](https://github.com/sentry/aws-serverless)                                           | 126.65 KB |

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMjIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEyMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca-web/pulls/45
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
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