Skip to content

Commit

Permalink
Support Angular 19 (#2278)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gingerbenw authored and hannah-smartbear committed Jan 29, 2025
1 parent d1ac45d commit 1063dc4
Show file tree
Hide file tree
Showing 63 changed files with 49,305 additions and 28,281 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Changed

- (plugin-angular) Generate type definition using Angular 17 [#2275](https://github.com/bugsnag/bugsnag-js/pull/2275)
- (plugin-angular) Update Angular support to cover v12 - 19 [#2278](https://github.com/bugsnag/bugsnag-js/pull/2278)

### Fixed

Expand Down
7 changes: 4 additions & 3 deletions bin/local-test-util
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ async function updateNotifiers (notifier) {
await buildNotifiers(notifier)
await packNotifiers(notifier)
await installNotifiers(notifier)
await installNgNotifier(notifier)
await installNgNotifier(notifier, '12')
await installNgNotifier(notifier, '17')
}

async function updateFixtures (fixture) {
Expand Down Expand Up @@ -148,7 +149,7 @@ async function installNotifiers (notifier) {
})
}

async function installNgNotifier (notifier) {
async function installNgNotifier (notifier, version = '12') {
trace('install ng notifier')
if (notifier && ![ 'browser', 'node', 'js', 'plugin-angular', 'web-worker' ].includes(notifier)) return
await ex(`npm`, [
Expand All @@ -161,7 +162,7 @@ async function installNgNotifier (notifier) {
`../../../../../../bugsnag-web-worker-${require('../packages/web-worker/package.json').version}.tgz`,
`../../../../../../bugsnag-plugin-angular-${require('../packages/plugin-angular/package.json').version}.tgz`
], {
cwd: `${__dirname}/../test/browser/features/fixtures/plugin_angular/ng`
cwd: `${__dirname}/../test/browser/features/fixtures/plugin_angular/angular_${version}`
})
}

Expand Down
11 changes: 9 additions & 2 deletions dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN npm run build
RUN npm pack --verbose packages/js/
RUN npm pack --verbose packages/browser/
RUN npm pack --verbose packages/node/
RUN npm pack --verbose packages/plugin-angular/
RUN npm pack --verbose packages/plugin-angular/dist/
RUN npm pack --verbose packages/plugin-react/
RUN npm pack --verbose packages/plugin-vue/
RUN npm pack --verbose packages/web-worker/
Expand All @@ -30,7 +30,14 @@ RUN npm install --no-package-lock --no-save \
../../../../bugsnag-plugin-vue-*.tgz \
../../../../bugsnag-web-worker-*.tgz

WORKDIR plugin_angular/ng
WORKDIR /app/test/browser/features/fixtures/plugin_angular/angular_12
RUN npm install --no-package-lock --no-save \
../../../../../../bugsnag-plugin-angular-*.tgz \
../../../../../../bugsnag-node-*.tgz \
../../../../../../bugsnag-browser-*.tgz \
../../../../../../bugsnag-js-*.tgz

WORKDIR /app/test/browser/features/fixtures/plugin_angular/angular_17
RUN npm install --no-package-lock --no-save \
../../../../../../bugsnag-plugin-angular-*.tgz \
../../../../../../bugsnag-node-*.tgz \
Expand Down
Loading

0 comments on commit 1063dc4

Please sign in to comment.