-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(angular): Use the Angular compiler to compile the @sentry/angul…
…ar SDK (WEB-622) Switch to the Angular compiler (via Angular CLI) to ensure that all Angular 1st-class support items of the SDK are compiled in a way that the library are compatible with Angular. This fixes the compilation errors when using `TraceDirective` and `TraceModule` that are currently thrown on application compilation. Uses the Angular 10 compiler which ensures compatibility with Angular 10-13 apps. FIXES GH-3282 FIXES WEB-622
- Loading branch information
Showing
20 changed files
with
223 additions
and
50 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 was deleted.
Oops, something went wrong.
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,27 @@ | ||
{ | ||
"$schema": "../.././node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"sentry-angular": { | ||
"projectType": "library", | ||
"root": "lib", | ||
"sourceRoot": "lib/src", | ||
"prefix": "lib", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:ng-packagr", | ||
"options": { | ||
"tsConfig": "lib/tsconfig.lib.json", | ||
"project": "lib/ng-package.json" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"tsConfig": "lib/tsconfig.lib.prod.json" | ||
} | ||
} | ||
} | ||
} | ||
}}, | ||
"defaultProject": "sentry-angular" | ||
} |
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,18 @@ | ||
{ | ||
"$schema": "../node_modules/ng-packagr/ng-package.schema.json", | ||
"dest": "../dist", | ||
"lib": { | ||
"entryFile": "src/index.ts", | ||
"umdModuleIds": { | ||
"@sentry/browser": "Sentry", | ||
"@sentry/utils": "utils" | ||
} | ||
}, | ||
"whitelistedNonPeerDependencies": [ | ||
"@sentry/browser", | ||
"@sentry/utils", | ||
"@sentry/types", | ||
"tslib" | ||
], | ||
"assets": ["README.md"] | ||
} |
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,29 @@ | ||
{ | ||
"name": "@sentry/angular", | ||
"version": "6.18.0", | ||
"description": "Official Sentry SDK for Angular", | ||
"repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular", | ||
"author": "Sentry", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"main": "dist/index.js", | ||
"module": "esm/index.js", | ||
"types": "dist/index.d.ts", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"peerDependencies": { | ||
"@angular/common": "10.x || 11.x || 12.x || 13.x", | ||
"@angular/core": "10.x || 11.x || 12.x || 13.x", | ||
"@angular/router": "10.x || 11.x || 12.x || 13.x" | ||
}, | ||
"dependencies": { | ||
"@sentry/browser": "6.18.0", | ||
"@sentry/types": "6.18.0", | ||
"@sentry/utils": "6.18.0", | ||
"tslib": "^2.0.0" | ||
} | ||
} |
File renamed without changes.
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
File renamed without changes.
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,4 @@ | ||
/* | ||
* Public API Surface of angular | ||
*/ | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,25 @@ | ||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../out-tsc/lib", | ||
"target": "es2015", | ||
"declaration": true, | ||
"declarationMap": true, | ||
"inlineSources": true, | ||
"types": [], | ||
"lib": [ | ||
"dom", | ||
"es2018" | ||
] | ||
}, | ||
"angularCompilerOptions": { | ||
"skipTemplateCodegen": true, | ||
"strictMetadataEmit": true, | ||
"enableResourceInlining": true | ||
}, | ||
"exclude": [ | ||
"src/test.ts", | ||
"**/*.spec.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 @@ | ||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
{ | ||
"extends": "./tsconfig.lib.json", | ||
"compilerOptions": { | ||
"declarationMap": false | ||
}, | ||
"angularCompilerOptions": { | ||
"enableIvy": false, | ||
// "compilationMode": "partial" | ||
} | ||
} |
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 @@ | ||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../out-tsc/spec", | ||
"types": [ | ||
"jasmine" | ||
] | ||
}, | ||
"files": [ | ||
"src/test.ts" | ||
], | ||
"include": [ | ||
"**/*.spec.ts", | ||
"**/*.d.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 @@ | ||
{ | ||
"extends": "../../tslint.json", | ||
"rules": { | ||
"directive-selector": [ | ||
true, | ||
"attribute", | ||
"lib", | ||
"camelCase" | ||
], | ||
"component-selector": [ | ||
true, | ||
"element", | ||
"lib", | ||
"kebab-case" | ||
] | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,25 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
|
||
"include": ["src/**/*"], | ||
|
||
"compileOnSave": false, | ||
"compilerOptions": { | ||
// package-specific options | ||
"experimentalDecorators": true | ||
"baseUrl": "./", | ||
"outDir": "./dist/out-tsc", | ||
"sourceMap": true, | ||
"declaration": false, | ||
"downlevelIteration": true, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "node", | ||
"importHelpers": true, | ||
"target": "es2015", | ||
"module": "es2020", | ||
"lib": [ | ||
"es2018", | ||
"dom" | ||
], | ||
"paths": { | ||
"sentry-angular": [ | ||
"dist/sentry-angular/sentry-angular", | ||
"dist/sentry-angular" | ||
] | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.