fix(nextjs): Fix inject logic for Next.js 13.3.1 canary#7921
Merged
Conversation
Contributor
size-limit report 📦
|
Contributor
Author
|
Ran the tests here and this fixes it: https://github.com/getsentry/sentry-javascript/actions/runs/4755531643 |
Lms24
approved these changes
Apr 21, 2023
| * Gets the absolute path to a sentry config file for a particular platform. Returns `undefined` if it doesn't exist. | ||
| */ | ||
| export function getUserConfigFilePath(projectDir: string, platform: 'server' | 'client' | 'edge'): string | undefined { | ||
| const possibilities = [`sentry.${platform}.config.ts`, `sentry.${platform}.config.js`]; |
Member
There was a problem hiding this comment.
any chance that people would do some mjs|cjs shenanigans?
Contributor
Author
There was a problem hiding this comment.
hm good point. Right now we only allow js and ts but we should probably allow js, ts, mjs, mts, at some point. Dunno about cjs. Does cts even exist? 🤣
Contributor
There was a problem hiding this comment.
Yes *.cts and *.d.cts are valid ts files in TS 5
Contributor
Author
There was a problem hiding this comment.
this is messed up in all kinds of ways
AbhiPrasad
approved these changes
Apr 21, 2023
| * Gets the absolute path to a sentry config file for a particular platform. Returns `undefined` if it doesn't exist. | ||
| */ | ||
| export function getUserConfigFilePath(projectDir: string, platform: 'server' | 'client' | 'edge'): string | undefined { | ||
| const possibilities = [`sentry.${platform}.config.ts`, `sentry.${platform}.config.js`]; |
Contributor
There was a problem hiding this comment.
Yes *.cts and *.d.cts are valid ts files in TS 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We think that vercel/next.js#47127 likely broke the sdk injection for the server-side of nextjs.
Fixes #7718