-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a29d9f5
commit d36884e
Showing
21 changed files
with
386 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/browser/features/fixtures/plugin_angular/angular_17/.npmrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node-options="--openssl-legacy-provider" |
114 changes: 114 additions & 0 deletions
114
test/browser/features/fixtures/plugin_angular/angular_17/angular.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"example": { | ||
"root": "", | ||
"sourceRoot": "src", | ||
"projectType": "application", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"tsConfig": "tsconfig.app.json", | ||
"polyfills": "src/polyfills.ts", | ||
"allowedCommonJsDependencies": [ | ||
"@bugsnag/browser" | ||
], | ||
"assets": [ | ||
"src/assets", | ||
"src/favicon.ico" | ||
], | ||
"styles": [ | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"namedChunks": false, | ||
"aot": true, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"buildTarget": "example:build:development" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"buildTarget": "example:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"buildTarget": "example:build" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"tsconfig.app.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"example-e2e": { | ||
"root": "e2e", | ||
"sourceRoot": "e2e", | ||
"projectType": "application", | ||
"architect": { | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "./protractor.conf.js", | ||
"devServerTarget": "example:serve" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"e2e/tsconfig.e2e.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"schematics": { | ||
"@schematics/angular:component": { | ||
"prefix": "app" | ||
}, | ||
"@schematics/angular:directive": { | ||
"prefix": "app" | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
test/browser/features/fixtures/plugin_angular/angular_17/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "example", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"lint": "ng lint", | ||
"e2e": "ng e2e" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "^17.0.0", | ||
"@angular/common": "^17.0.0", | ||
"@angular/compiler": "^17.0.0", | ||
"@angular/core": "^17.0.0", | ||
"@angular/forms": "^17.0.0", | ||
"@angular/platform-browser": "^17.0.0", | ||
"@angular/platform-browser-dynamic": "^17.0.0", | ||
"@angular/router": "^17.0.0", | ||
"rxjs": "^7.4.0", | ||
"tslib": "^2.0.0", | ||
"zone.js": "~0.14.0" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "^17.0.0", | ||
"@angular/cli": "^17.0.0", | ||
"@angular/compiler-cli": "^17.0.0", | ||
"@types/node": "^12.11.1", | ||
"codelyzer": "^6.0.0", | ||
"core-js": "^3.39.0", | ||
"globalthis": "^1.0.4", | ||
"protractor": "~7.0.0", | ||
"ts-node": "~8.3.0", | ||
"tslint": "~6.1.0", | ||
"typescript": "~5.2.0" | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
test/browser/features/fixtures/plugin_angular/angular_17/src/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Hello world</h1> |
16 changes: 16 additions & 0 deletions
16
test/browser/features/fixtures/plugin_angular/angular_17/src/app/app.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component } from '@angular/core'; | ||
import bugsnagClient from './bugsnag'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
|
||
export class AppComponent { | ||
title = 'app'; | ||
ngOnInit() { | ||
// @ts-expect-error | ||
this.nothing.here = 'will cause an error' | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
test/browser/features/fixtures/plugin_angular/angular_17/src/app/app.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule, ErrorHandler } from '@angular/core'; | ||
import { BugsnagErrorHandler } from '@bugsnag/plugin-angular'; | ||
import bugsnagClient from './bugsnag'; | ||
|
||
export function errorHandlerFactory() { | ||
return new BugsnagErrorHandler(bugsnagClient); | ||
} | ||
import { AppComponent } from './app.component'; | ||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule | ||
], | ||
providers: [ | ||
{ provide: ErrorHandler, useFactory: errorHandlerFactory } | ||
], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } |
17 changes: 17 additions & 0 deletions
17
test/browser/features/fixtures/plugin_angular/angular_17/src/app/bugsnag.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Bugsnag from '@bugsnag/js'; | ||
|
||
var NOTIFY = decodeURIComponent(window.location.search.match(/NOTIFY=([^&]+)/)[1]) | ||
var SESSIONS = decodeURIComponent(window.location.search.match(/SESSIONS=([^&]+)/)[1]) | ||
var API_KEY = decodeURIComponent(window.location.search.match(/API_KEY=([^&]+)/)[1]) | ||
|
||
const bugsnagClient = Bugsnag.createClient({ | ||
apiKey: API_KEY, | ||
endpoints: { | ||
notify: NOTIFY, | ||
sessions: SESSIONS | ||
}, | ||
onError: (event) => { | ||
} | ||
}); | ||
|
||
export default bugsnagClient; |
Empty file.
3 changes: 3 additions & 0 deletions
3
.../browser/features/fixtures/plugin_angular/angular_17/src/environments/environment.prod.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const environment = { | ||
production: true | ||
}; |
16 changes: 16 additions & 0 deletions
16
test/browser/features/fixtures/plugin_angular/angular_17/src/environments/environment.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// This file can be replaced during build by using the `fileReplacements` array. | ||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. | ||
// The list of file replacements can be found in `angular.json`. | ||
|
||
export const environment = { | ||
production: false | ||
}; | ||
|
||
/* | ||
* For easier debugging in development mode, you can import the following file | ||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. | ||
* | ||
* This import should be commented out in production mode because it will have a negative impact | ||
* on performance if an error is thrown. | ||
*/ | ||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI. |
Binary file added
BIN
+948 Bytes
test/browser/features/fixtures/plugin_angular/angular_17/src/favicon.ico
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
test/browser/features/fixtures/plugin_angular/angular_17/src/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Bugsnag Angular Example</title> | ||
<base href="/docs/plugin_angular/angular_19/dist/"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico"> | ||
</head> | ||
<body> | ||
<pre id="bugsnag-test-should-run">PENDING</pre> | ||
<script> | ||
var el = document.getElementById('bugsnag-test-should-run') | ||
el.textContent = el.innerText = ( | ||
typeof Set !== 'undefined' && | ||
typeof Promise !== 'undefined' && | ||
typeof Array.from === 'function' | ||
) ? 'YES' : 'NO' | ||
</script> | ||
<app-root></app-root> | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
test/browser/features/fixtures/plugin_angular/angular_17/src/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { environment } from './environments/environment'; | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
} | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
68 changes: 68 additions & 0 deletions
68
test/browser/features/fixtures/plugin_angular/angular_17/src/polyfills.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* This file includes polyfills needed by Angular and is loaded before the app. | ||
* You can add your own extra polyfills to this file. | ||
* | ||
* This file is divided into 2 sections: | ||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | ||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main | ||
* file. | ||
* | ||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that | ||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), | ||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. | ||
* | ||
* Learn more in https://angular.io/guide/browser-support | ||
*/ | ||
|
||
/*************************************************************************************************** | ||
* BROWSER POLYFILLS | ||
*/ | ||
|
||
import 'globalthis/auto'; | ||
import 'core-js/modules/web.queue-microtask'; | ||
|
||
/** | ||
* IE11 requires the following for NgClass support on SVG elements | ||
*/ | ||
// import 'classlist.js'; // Run `npm install --save classlist.js`. | ||
|
||
/** | ||
* Web Animations `@angular/platform-browser/animations` | ||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. | ||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). | ||
*/ | ||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. | ||
|
||
/** | ||
* By default, zone.js will patch all possible macroTask and DomEvents | ||
* user can disable parts of macroTask/DomEvents patch by setting following flags | ||
* because those flags need to be set before `zone.js` being loaded, and webpack | ||
* will put import in the top of bundle, so user need to create a separate file | ||
* in this directory (for example: zone-flags.ts), and put the following flags | ||
* into that file, and then add the following code before importing zone.js. | ||
* import './zone-flags'; | ||
* | ||
* The flags allowed in zone-flags.ts are listed here. | ||
* | ||
* The following flags will work for all browsers. | ||
* | ||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame | ||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick | ||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames | ||
* | ||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js | ||
* with the following flag, it will bypass `zone.js` patch for IE/Edge | ||
* | ||
* (window as any).__Zone_enable_cross_context_check = true; | ||
* | ||
*/ | ||
|
||
/*************************************************************************************************** | ||
* Zone JS is required by default for Angular itself. | ||
*/ | ||
import 'zone.js'; // Included with Angular CLI. | ||
|
||
|
||
/*************************************************************************************************** | ||
* APPLICATION IMPORTS | ||
*/ |
1 change: 1 addition & 0 deletions
1
test/browser/features/fixtures/plugin_angular/angular_17/src/styles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* You can add global styles to this file, and also import other style files */ |
Oops, something went wrong.