-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(nextjs): Fix inject logic for Next.js 13.3.1 canary #7921
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
Conversation
size-limit report 📦
|
Ran the tests here and this fixes it: https://github.com/getsentry/sentry-javascript/actions/runs/4755531643 |
* 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`]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any chance that people would do some mjs|cjs
shenanigans?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes *.cts
and *.d.cts
are valid ts files in TS 5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is messed up in all kinds of ways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢
* 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`]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes *.cts
and *.d.cts
are valid ts files in TS 5
We think that vercel/next.js#47127 likely broke the sdk injection for the server-side of nextjs.
Fixes #7718