Skip to content

Commit 1fbd9c4

Browse files
Lukas StrackeLukas Stracke
Lukas Stracke
authored and
Lukas Stracke
committed
Flatten directory structure, simplify tsconfig
1 parent 425811a commit 1fbd9c4

9 files changed

+120
-661
lines changed

packages/angular/angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"builder": "@angular-devkit/build-angular:ng-packagr",
1414
"options": {
1515
"tsConfig": "lib/tsconfig.lib.json",
16-
"project": "lib/ng-package.json"
16+
"project": "ng-package.json"
1717
},
1818
"configurations": {
1919
"production": {

packages/angular/lib/package.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

packages/angular/lib/src/public-api copy.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/angular/lib/tsconfig.lib.prod.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"declarationMap": false
66
},
77
"angularCompilerOptions": {
8+
// As per Angular 10, the recommendation from the library creation guide
9+
// is to disable compilation for Ivy in production builds to ensure
10+
// compatibility with Angular 10.
11+
// For Angular 11-13 applications, ngcc and the Angular linker ensure that
12+
// the library code is processed to match the specific Angular runtime version.
813
"enableIvy": false,
9-
// "compilationMode": "partial"
1014
}
1115
}
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "../node_modules/ng-packagr/ng-package.schema.json",
3-
"dest": "../dist",
2+
"$schema": "node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "dist",
44
"lib": {
5-
"entryFile": "src/index.ts",
5+
"entryFile": "lib/src/index.ts",
66
"umdModuleIds": {
77
"@sentry/browser": "Sentry",
88
"@sentry/utils": "utils"
@@ -12,7 +12,9 @@
1212
"@sentry/browser",
1313
"@sentry/utils",
1414
"@sentry/types",
15-
"tslib"
15+
"tslib",
16+
"rxjs"
1617
],
17-
"assets": ["README.md"]
18+
"assets": ["README.md"],
19+
"keepLifecycleScripts": true
1820
}

packages/angular/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,27 @@
2323
"private": true,
2424

2525
"dependencies": {
26-
"@angular/animations": "~10.2.5",
27-
"@angular/common": "~10.2.5",
28-
"@angular/compiler": "~10.2.5",
29-
"@angular/core": "~10.2.5",
30-
"@angular/forms": "~10.2.5",
31-
"@angular/platform-browser": "~10.2.5",
32-
"@angular/platform-browser-dynamic": "~10.2.5",
33-
"@angular/router": "~10.2.5",
3426
"@sentry/browser": "^6.18.0",
3527
"@sentry/types": "^6.18.0",
3628
"@sentry/utils": "^6.18.0",
3729
"rxjs": "~6.6.0",
38-
"tslib": "^2.0.0",
39-
"zone.js": "~0.10.2"
30+
"tslib": "^2.0.0"
4031
},
4132
"devDependencies": {
33+
"@angular/common": "~10.2.5",
34+
"@angular/compiler": "~10.2.5",
35+
"@angular/core": "~10.2.5",
36+
"@angular/router": "~10.2.5",
4237
"@angular-devkit/build-angular": "~0.1002.4",
4338
"@angular/cli": "~10.2.4",
4439
"@angular/compiler-cli": "~10.2.5",
45-
"@types/jasmine": "~3.5.0",
46-
"@types/jasminewd2": "~2.0.3",
4740
"@types/node": "^12.11.1",
4841
"codelyzer": "^6.0.0",
49-
"jasmine-core": "~3.6.0",
50-
"jasmine-spec-reporter": "~5.0.0",
51-
"karma": "~5.0.0",
52-
"karma-chrome-launcher": "~3.1.0",
53-
"karma-coverage-istanbul-reporter": "~3.0.2",
54-
"karma-jasmine": "~4.0.0",
55-
"karma-jasmine-html-reporter": "~1.5.0",
5642
"ng-packagr": "^10.1.0",
57-
"protractor": "~7.0.0",
5843
"ts-node": "~8.3.0",
5944
"tslint": "~6.1.0",
60-
"typescript": "~4.0.2"
45+
"typescript": "~4.0.2",
46+
"zone.js": "~0.10.2"
6147
},
6248
"scripts": {
6349
"build": "run-p build:esm #**not necessary** build:cjs",

packages/angular/tsconfig.json

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
11
{
2-
"compileOnSave": false,
2+
"extends": "../../tsconfig.json",
3+
4+
"include": ["lib/src/**/*"],
5+
36
"compilerOptions": {
4-
"baseUrl": "./",
5-
"outDir": "./dist/out-tsc",
6-
"sourceMap": true,
7-
"declaration": false,
8-
"downlevelIteration": true,
7+
// package-specific options
98
"experimentalDecorators": true,
10-
"moduleResolution": "node",
11-
"importHelpers": true,
12-
"target": "es2015",
13-
"module": "es2020",
14-
"lib": [
15-
"es2018",
16-
"dom"
17-
],
18-
"paths": {
19-
"sentry-angular": [
20-
"dist/sentry-angular/sentry-angular",
21-
"dist/sentry-angular"
22-
]
23-
}
9+
"baseUrl": "./",
2410
}
2511
}

packages/angular/tsconfig.test.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
4+
"include": ["test/**/*"],
5+
6+
"compilerOptions": {
7+
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8+
"types": ["jest"]
9+
10+
// other package-specific, test-specific options
11+
}
12+
}

0 commit comments

Comments
 (0)