Uh oh!
There was an error while loading. Please reload this page.
fix(nuxt): include sentry.config.server.ts in nuxt app types - #18971
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Uh oh!
There was an error while loading. Please reload this page.
| // Should be relative to `root/.nuxt` | ||
| const relativePath = path.relative(nuxt.options.buildDir, serverConfigFile); | ||
| tsConfig.include.push(relativePath); | ||
| }); |
There was a problem hiding this comment.
Fix PR lacks regression test per review rules
Low Severity · Bugbot Rules
This fix PR doesn't include any tests, which violates the specified review rules. The rules state that fix PRs require at least one unit, integration, or e2e test that tests the regression being fixed. While the PR author noted "Not sure how this could be tested tho, since it is purely types," testing that the prepare:types hook is registered and modifies tsConfig.include correctly would be valuable.
Uh oh!
There was an error while loading. Please reload this page.
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #18971 Co-authored-by: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
The #17830 fixes the error explained in #17781 only for the sentry.client.config.ts but the error still exists for the sentry.server.config.ts.
With this PR we add the sentry.config.server.ts to the auto generated tsconfig by extending the types via the prepare:types hook.
This allows useRuntimeConfig to be properly typed in the root sentry.server.config.ts, or where ever the client file is found.
Not sure how this could be tested tho, since it is purely types.