Skip to content

Commit 6e1e70d

Browse files
alan-agius4AndrewKushnir
authored andcommitted
ci: use application builder for integration tests (angular#55660)
This updates the integration tests to use the application builder. PR Close angular#55660
1 parent 554a1be commit 6e1e70d

File tree

38 files changed

+165
-230
lines changed

38 files changed

+165
-230
lines changed
Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,55 @@
11
{
22
"cli-hello-world": {
33
"uncompressed": {
4-
"runtime": 908,
54
"main": 127322,
65
"polyfills": 33792
76
}
87
},
98
"cli-hello-world-ivy-i18n": {
109
"uncompressed": {
11-
"runtime": 926,
12-
"main": 125263,
10+
"main": 130590,
1311
"polyfills": 34676
1412
}
1513
},
1614
"cli-hello-world-lazy": {
1715
"uncompressed": {
18-
"runtime": 2734,
19-
"main": 236470,
16+
"main": 108611,
2017
"polyfills": 34169,
21-
"src_app_lazy_lazy_routes_ts": 487
18+
"lazy.routes": 388
2219
}
2320
},
2421
"forms": {
2522
"uncompressed": {
26-
"runtime": 888,
27-
"main": 166256,
23+
"main": 171726,
2824
"polyfills": 33772
2925
}
3026
},
3127
"animations": {
3228
"uncompressed": {
33-
"runtime": 2704,
34-
"main": 283017,
35-
"polyfills": 33817,
36-
"src_app_open-close_component_ts": 1321
29+
"main": 143167,
30+
"polyfills": 34023,
31+
"open-close.component": 1190
3732
}
3833
},
3934
"animations-async": {
4035
"uncompressed": {
41-
"runtime": 2906,
42-
"main": 221187,
36+
"main": 86540,
4337
"polyfills": 33782,
44-
"node_modules_angular_animations_fesm2022_browser_mjs": 63949,
45-
"default-node_modules_angular_animations_fesm2022_animations_mjs": 4264,
46-
"src_app_open-close_component_ts": 1321
38+
"browser": 63949,
39+
"open-close.component": 1218
4740
}
4841
},
4942
"standalone-bootstrap": {
5043
"uncompressed": {
51-
"runtime": 918,
5244
"main": 85055,
5345
"polyfills": 33802
5446
}
5547
},
5648
"defer": {
5749
"uncompressed": {
58-
"runtime": 2689,
59-
"main": 115193,
50+
"main": 12148,
6051
"polyfills": 33807,
61-
"src_app_defer_component_ts": 473
52+
"defer.component": 371
6253
}
6354
}
6455
}

integration/animations-async/angular.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
"prefix": "app",
1212
"architect": {
1313
"build": {
14-
"builder": "@angular-devkit/build-angular:browser",
14+
"builder": "@angular-devkit/build-angular:application",
1515
"options": {
16+
"outputHashing": "none",
1617
"namedChunks": true,
17-
"outputPath": "dist",
18+
"outputPath": {
19+
"base": "dist",
20+
"browser": ""
21+
},
1822
"index": "src/index.html",
19-
"main": "src/main.ts",
2023
"polyfills": [
2124
"zone.js"
2225
],
@@ -31,17 +34,16 @@
3134
],
3235
"scripts": [],
3336
"optimization": false,
34-
"buildOptimizer": false,
35-
"progress": false
37+
"progress": false,
38+
"browser": "src/main.ts"
3639
},
3740
"configurations": {
3841
"production": {
42+
"namedChunks": true,
3943
"optimization": true,
40-
"outputHashing": "all",
44+
"outputHashing": "none",
4145
"sourceMap": false,
4246
"extractLicenses": true,
43-
"vendorChunk": false,
44-
"buildOptimizer": true,
4547
"budgets": [
4648
{
4749
"type": "initial",

integration/animations-async/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"baseUrl": "./",
55
"outDir": "./dist/out-tsc",
66
"sourceMap": true,
7+
"esModuleInterop": true,
78
"declaration": false,
8-
"downlevelIteration": true,
99
"experimentalDecorators": true,
1010
"module": "esnext",
1111
"moduleResolution": "node",

integration/animations/angular.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
"prefix": "app",
1212
"architect": {
1313
"build": {
14-
"builder": "@angular-devkit/build-angular:browser",
14+
"builder": "@angular-devkit/build-angular:application",
1515
"options": {
16+
"outputHashing": "none",
1617
"namedChunks": true,
17-
"outputPath": "dist",
18+
"outputPath": {
19+
"base": "dist",
20+
"browser": ""
21+
},
1822
"index": "src/index.html",
19-
"main": "src/main.ts",
2023
"polyfills": [
2124
"zone.js"
2225
],
@@ -31,17 +34,16 @@
3134
],
3235
"scripts": [],
3336
"optimization": false,
34-
"buildOptimizer": false,
35-
"progress": false
37+
"progress": false,
38+
"browser": "src/main.ts"
3639
},
3740
"configurations": {
3841
"production": {
42+
"namedChunks": true,
3943
"optimization": true,
40-
"outputHashing": "all",
44+
"outputHashing": "none",
4145
"sourceMap": false,
4246
"extractLicenses": true,
43-
"vendorChunk": false,
44-
"buildOptimizer": true,
4547
"budgets": [
4648
{
4749
"type": "initial",

integration/animations/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"baseUrl": "./",
55
"outDir": "./dist/out-tsc",
66
"sourceMap": true,
7+
"esModuleInterop": true,
78
"declaration": false,
8-
"downlevelIteration": true,
99
"experimentalDecorators": true,
1010
"module": "esnext",
1111
"moduleResolution": "node",

integration/cli-elements-universal/angular.json

Lines changed: 16 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,31 @@
1515
"prefix": "app",
1616
"architect": {
1717
"build": {
18-
"builder": "@angular-devkit/build-angular:browser",
18+
"builder": "@angular-devkit/build-angular:application",
1919
"options": {
20-
"outputPath": "dist/cli-elements-universal/browser",
20+
"outputHashing": "none",
21+
"outputPath": "dist/cli-elements-universal",
2122
"index": "src/index.html",
22-
"main": "src/main.ts",
23-
"polyfills": [
24-
"zone.js"
25-
],
23+
"polyfills": ["zone.js"],
2624
"tsConfig": "tsconfig.app.json",
2725
"aot": true,
28-
"assets": [
29-
"src/favicon.ico",
30-
"src/assets"
31-
],
32-
"styles": [
33-
"src/styles.css"
34-
],
26+
"assets": ["src/favicon.ico", "src/assets"],
27+
"styles": ["src/styles.css"],
3528
"scripts": [],
3629
"progress": false,
37-
"buildOptimizer": false,
38-
"optimization": false
30+
"optimization": false,
31+
"browser": "src/main.ts",
32+
"server": "src/main.server.ts",
33+
"prerender": true,
34+
"ssr": false
3935
},
4036
"configurations": {
4137
"production": {
4238
"optimization": true,
43-
"outputHashing": "all",
39+
"outputHashing": "none",
4440
"sourceMap": false,
4541
"namedChunks": false,
4642
"extractLicenses": true,
47-
"vendorChunk": false,
48-
"buildOptimizer": true,
4943
"budgets": [
5044
{
5145
"type": "initial",
@@ -81,19 +75,11 @@
8175
"test": {
8276
"builder": "@angular-devkit/build-angular:karma",
8377
"options": {
84-
"polyfills": [
85-
"zone.js",
86-
"zone.js/testing"
87-
],
78+
"polyfills": ["zone.js", "zone.js/testing"],
8879
"tsConfig": "tsconfig.spec.json",
8980
"karmaConfig": "karma.conf.js",
90-
"assets": [
91-
"src/favicon.ico",
92-
"src/assets"
93-
],
94-
"styles": [
95-
"src/styles.css"
96-
],
81+
"assets": ["src/favicon.ico", "src/assets"],
82+
"styles": ["src/styles.css"],
9783
"scripts": [],
9884
"watch": false
9985
}
@@ -107,9 +93,7 @@
10793
"e2e/tsconfig.json",
10894
"tsconfig.server.json"
10995
],
110-
"exclude": [
111-
"**/node_modules/**"
112-
]
96+
"exclude": ["**/node_modules/**"]
11397
}
11498
},
11599
"e2e": {
@@ -124,37 +108,6 @@
124108
"devServerTarget": "cli-elements-universal:serve:production"
125109
}
126110
}
127-
},
128-
"server": {
129-
"builder": "@angular-devkit/build-angular:server",
130-
"options": {
131-
"outputPath": "dist/cli-elements-universal/server",
132-
"main": "src/main.server.ts",
133-
"tsConfig": "tsconfig.server.json",
134-
"progress": false,
135-
"optimization": false
136-
},
137-
"configurations": {
138-
"production": {
139-
"outputHashing": "media",
140-
"sourceMap": false,
141-
"optimization": true
142-
}
143-
}
144-
},
145-
"app-shell": {
146-
"builder": "@angular-devkit/build-angular:app-shell",
147-
"options": {
148-
"browserTarget": "cli-elements-universal:build",
149-
"serverTarget": "cli-elements-universal:server",
150-
"route": ""
151-
},
152-
"configurations": {
153-
"production": {
154-
"browserTarget": "cli-elements-universal:build:production",
155-
"serverTarget": "cli-elements-universal:server:production"
156-
}
157-
}
158111
}
159112
}
160113
}

integration/cli-elements-universal/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"test": "ng test && yarn e2e --configuration production && yarn test-ssr",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e --port 0",
12-
"pretest-ssr": "yarn ng run cli-elements-universal:app-shell:production",
13-
"test-ssr": "node --eval \"assert(fs.readFileSync('dist/cli-elements-universal/browser/index.html', 'utf8').includes('<app-title-ce>'), 'Expected \\'index.html\\' to contain \\'<app-title-ce>\\'.');\""
12+
"pretest-ssr": "yarn build",
13+
"test-ssr": "node --eval \"assert(fs.readFileSync('dist/cli-elements-universal/browser/index.html', 'utf8').includes('<app-title-ce>'), 'Expected \\'index.html\\' to contain \\'<app-title-ce>\\'.');\"",
14+
"serve:ssr:cli-elements-universal": "node dist/cli-elements-universal/server/server.mjs"
1415
},
1516
"private": true,
1617
"dependencies": {
@@ -31,6 +32,7 @@
3132
"@angular-devkit/build-angular": "file:../../node_modules/@angular-devkit/build-angular",
3233
"@angular/cli": "file:../../node_modules/@angular/cli",
3334
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
35+
"@types/express": "^4.17.17",
3436
"@types/jasmine": "file:../../node_modules/@types/jasmine",
3537
"@types/node": "file:../../node_modules/@types/node",
3638
"jasmine-core": "~3.6.0",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import {NgModule} from '@angular/core';
22
import {ServerModule} from '@angular/platform-server';
3-
import {RouterModule} from '@angular/router';
43

54
import {AppModule} from './app.module';
65
import {AppComponent} from './app.component';
76

87
@NgModule({
98
bootstrap: [AppComponent],
10-
imports: [AppModule, RouterModule.forRoot([]), ServerModule],
9+
imports: [AppModule, ServerModule],
1110
})
1211
export class AppServerModule {}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
import '@angular/platform-server/init';
2-
3-
export {AppServerModule} from './app/app.server.module';
1+
export {AppServerModule as default} from './app/app.server.module';

integration/cli-elements-universal/tsconfig.app.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
"extends": "./tsconfig.json",
44
"compilerOptions": {
55
"outDir": "./out-tsc/app",
6-
"types": []
6+
"types": [
7+
"node"
8+
]
79
},
810
"files": [
9-
"src/main.ts"
11+
"src/main.ts",
12+
"src/main.server.ts"
1013
],
1114
"include": [
1215
"src/**/*.d.ts"

0 commit comments

Comments
 (0)