Skip to content

fix(angular): Fix source map generation bugs#963

Merged
Lms24 merged 8 commits intoonur/angular-wizard-basefrom
lms/fix-angular-sourcemap-generation
Apr 16, 2025
Merged

fix(angular): Fix source map generation bugs#963
Lms24 merged 8 commits intoonur/angular-wizard-basefrom
lms/fix-angular-sourcemap-generation

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 16, 2025

While working on #953, I noticed that our source map generation flow has some bugs that we should fix:

  • avoid crash when reading angular.json fails
  • fixed bug where we'd remove production config in angular.json
  • added reporting of read/write file errors to Sentry
  • added a bunch of tests for angular.json manipulation
  • fixed a bunch of lint and TS errors by introducing a defensively typed PartialAngularJson type

#skip-changelog

@Lms24 Lms24 changed the base branch from master to onur/angular-wizard-base April 16, 2025 10:11
@Lms24 Lms24 requested review from lforst and onurtemizkan April 16, 2025 10:14
@Lms24 Lms24 self-assigned this Apr 16, 2025
@codecov
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 49 lines in your changes missing coverage. Please review.

Project coverage is 23.09%. Comparing base (c27f532) to head (82702ef).
Report is 1 commits behind head on onur/angular-wizard-base.

Files with missing lines Patch % Lines
src/angular/codemods/sourcemaps.ts 0.00% 38 Missing ⚠️
src/sourcemaps/tools/angular.ts 0.00% 6 Missing ⚠️
src/sourcemaps/tools/sentry-cli.ts 0.00% 3 Missing ⚠️
src/sourcemaps/sourcemaps-wizard.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           onur/angular-wizard-base     #963      +/-   ##
============================================================
- Coverage                     23.14%   23.09%   -0.05%     
============================================================
  Files                           126      126              
  Lines                         13516    13543      +27     
  Branches                        718      718              
============================================================
  Hits                           3128     3128              
- Misses                        10367    10394      +27     
  Partials                         21       21              
Flag Coverage Δ
unit-tests 23.09% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Lms24 Lms24 mentioned this pull request Apr 16, 2025
8 tasks
@Lms24 Lms24 mentioned this pull request Apr 16, 2025
@Lms24 Lms24 force-pushed the onur/angular-wizard-base branch from 674fd03 to c27f532 Compare April 16, 2025 12:47
@Lms24 Lms24 force-pushed the lms/fix-angular-sourcemap-generation branch from a50567d to d88cd25 Compare April 16, 2025 12:50
@Lms24 Lms24 requested a review from Copilot April 16, 2025 17:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

src/sourcemaps/tools/sentry-cli.ts:24

  • [nitpick] Type names should follow PascalCase conventions in TypeScript. Consider renaming 'configureSentryCLIOptions' to 'ConfigureSentryCLIOptions'.
type configureSentryCLIOptions = SourceMapUploadToolConfigurationOptions & {

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Lms24 Lms24 merged commit aa15260 into onur/angular-wizard-base Apr 16, 2025
37 of 41 checks passed
@Lms24 Lms24 deleted the lms/fix-angular-sourcemap-generation branch April 16, 2025 17:17
Lms24 added a commit that referenced this pull request Apr 22, 2025
- avoid crash when reading `angular.json` fails
- fixed bug where we'd remove production config in `angular.json`
- added reporting of read/write file errors to Sentry
- added a bunch of tests for `angular.json` manipulation
- fixed a bunch of lint and TS errors by introducing a defensively typed `PartialAngularJson` type
Lms24 added a commit that referenced this pull request Apr 22, 2025
* feat(angular): Add Angular menu option and install SDK (#765)

Adds Angular menu option with SDK installation

---------

Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>

* Add CHANGELOG entry.

* feat(angular): Add Sentry setup in `main.ts` (#768)

- Adds Sentry initialization on main.ts with feature selection
- Also adds Prettier run

* feat(angular): Add Sentry setup in App Config (#769)

* feat(angular): Add Sentry setup in App Config

* Use `hasSentryContent` from `ast-utils`

* Bail out if `app-config` is not under pre-defined location

* feat(angular): Configure source map upload. (#770)

* feat(angular): Configure source map upload.

* Use `preSelectedProject` as is

* Fix

* test(angular): Add E2E tests. (#780)

* switch tests to vitest

* fix missing new options

* ref(angular): Fix eslint errors and failing e2e test (#964)

* fix(angular): Fix source map generation bugs (#963)

- avoid crash when reading `angular.json` fails
- fixed bug where we'd remove production config in `angular.json`
- added reporting of read/write file errors to Sentry
- added a bunch of tests for `angular.json` manipulation
- fixed a bunch of lint and TS errors by introducing a defensively typed `PartialAngularJson` type

* .gitignore .envrc

* test(angular): Add tests for enabling source maps generation (#968)

* feat(angular): Add example component (#953)

See PR description for details

* feat(angular): Check for min compatible Angular version with wizard setup (#970)

---------

Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
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.

4 participants