-
-
Notifications
You must be signed in to change notification settings - Fork 57
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(angular): Add Sentry setup in App Config #769
base: onur/angular-wizard-base
Are you sure you want to change the base?
feat(angular): Add Sentry setup in App Config #769
Conversation
|
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.
Thanks! Looking good generally, one concern but otherwise ready to go soon!
const appConfigFilename = 'app.config.ts'; | ||
const appConfigPath = path.join( | ||
process.cwd(), | ||
'src', | ||
'app', | ||
appConfigFilename, | ||
); |
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.
hmm I'm a bit concerned that we don't find this file, given it's in src/app/app.config.ts only by convention but afaik not required. Suggestion: let's check if the file exists and add a tag so that we can track hit/miss rates. If the file doesn't exist, we can bail out of this step and link to the setup docs. Depending on the hit/miss rate, we can make our detection logic or fallback behaviour smarter later. WDYT? (cc @andreiborza)
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.
Just adding to this since I re-checked documentation: I think we can just go with the suggested tracking and bail approach. I don't think this should be a major concern, given that docs don't mention renaming or moving these files. Nevertheless, tracking hit/miss is still helpful
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.
Updated 👍
src/angular/sdk-setup.ts
Outdated
import { updateAppConfigMod } from './codemods/app-config'; | ||
import type { SemVer } from 'semver'; | ||
|
||
export function hasSentryContent( |
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.
l (already suggested in #768): let's use the ast-utils version if possible
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.
Updated 👍
Supersedes #741 - Part 3
Targeted to the epic branch.
Adds Sentry setup in
app-config
filesLocally tested on Angular 17/19
#skip-changelog