Skip to content
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

Support Angular 19 #2278

Merged
merged 28 commits into from
Jan 17, 2025
Merged

Support Angular 19 #2278

merged 28 commits into from
Jan 17, 2025

Conversation

gingerbenw
Copy link
Member

@gingerbenw gingerbenw commented Dec 18, 2024

Goal

This PR fixes a number of bugs and updates the current level of Angular support, using the latest build system

Changeset

  • Update angular dev dependencies to v19
  • Build plugin using ng-packagr with partial ivy compilation mode, in order to support Angular 12 and above
  • Use publishConfig.directory to ensure only the dist directory is published for updated angular package
  • Use prepack script to re-build and ensure correct version number is used for published package

Testing

  • Update Angular 17 end-to-end fixture to use browser-esbuild builder
  • Add Angular 12 end-to-end fixture

@gingerbenw gingerbenw force-pushed the PLAT-12867/angular-main-package-entry branch from caeed8a to 89bf476 Compare December 18, 2024 15:09
Copy link

github-actions bot commented Dec 18, 2024

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 45.89 kB 13.78 kB
After 45.89 kB 13.78 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against afc82ab

@gingerbenw gingerbenw changed the title Plat 12867/angular main package entry Update angular dependencies Jan 8, 2025
@gingerbenw gingerbenw changed the title Update angular dependencies Update Angular build Jan 10, 2025
@gingerbenw gingerbenw force-pushed the PLAT-12867/angular-main-package-entry branch from 26424d3 to d36884e Compare January 10, 2025 11:52
@gingerbenw gingerbenw force-pushed the PLAT-12867/angular-main-package-entry branch from d36884e to 76f8949 Compare January 10, 2025 11:55
@gingerbenw gingerbenw requested a review from djskinner January 10, 2025 16:19
@gingerbenw gingerbenw marked this pull request as ready for review January 10, 2025 16:19
@gingerbenw gingerbenw changed the title Update Angular build Support Angular 19 Jan 10, 2025
Comment on lines 37 to 38
// ErrorHandler.prototype.handleError.call(this, error)
console.error(error)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this meant to be like this?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, not the commented out code - but yes! this is the default behaviour of the angular error handler which we're replicating. calling the prototype to do this can cause a mismatch between the compiled code and the angular version. I'll add a comment covering this.

@gingerbenw gingerbenw force-pushed the PLAT-12867/angular-main-package-entry branch 2 times, most recently from bc48859 to 7b9d7d9 Compare January 15, 2025 11:10
@gingerbenw gingerbenw requested a review from djskinner January 15, 2025 17:41
@gingerbenw gingerbenw merged commit 1952d4b into next Jan 17, 2025
59 checks passed
@gingerbenw gingerbenw deleted the PLAT-12867/angular-main-package-entry branch January 17, 2025 09:31
This was referenced Jan 23, 2025
hannah-smartbear pushed a commit that referenced this pull request Jan 31, 2025
* chore(@bugnsnag/plugin-angular): ⬆️ update angular dependency to v17

* test: ✅ create angular 12 test fixture

* test: ✅ remove extra package from package json

* test: 🔥 remove unused fixture

* build plugin using ng-packager

* refactor: ♻️ refactor plugin-angular

* set openssl-legacy-provider

* update typescript version

* update build directory

* test: remove ErrorHandler.prototype.handleError.call

* reinstate handleError prototype call

* build angular 12 fixture with ivy

* add console error to replicate default angular error handler behavior

* change build to browser-esbuild

* docs: 📝 update CHANGELOG.md

* docs: 📝 explain console error left in angular plugin

* chore: 👷 update build script to remove dist

* fixup package lock

* refactor: ♻️ remove angular workspace directory

* add directory to publishConfig

* run npm build during prepack
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.

3 participants