Skip to content

Commit 7118e67

Browse files
authored
test(deps): replace Angular example with version 19 (#517)
* test(deps): replace Angular example with version 19 * add wait-on for angular e2e
1 parent 147db2a commit 7118e67

File tree

74 files changed

+12953
-20176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+12953
-20176
lines changed

.circleci/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ workflows:
112112
working-directory: examples/angular-app
113113
cypress-cache-key: cypress-cache-{{ arch }}-{{ checksum "examples/angular-app/package.json" }}
114114
start-command: "npm run start"
115-
cypress-command: "npx cypress run --browser chrome"
115+
cypress-command: "npx wait-on@latest http://localhost:4200 && npx cypress run --browser chrome"
116116
install-browsers: true
117117
- cypress/run:
118118
filters: *filters

examples/angular-app/.browserslistrc

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

examples/angular-app/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[*.ts]
1212
quote_type = single
13+
ij_typescript_use_double_quotes = false
1314

1415
[*.md]
1516
max_line_length = off

examples/angular-app/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
22

33
# Compiled output
44
/dist

examples/angular-app/.vscode/extensions.json

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

examples/angular-app/.vscode/launch.json

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

examples/angular-app/.vscode/tasks.json

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

examples/angular-app/README.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,59 @@
1-
# AngularApp
1+
# AngularStandalone
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.6.
3+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.1.
44

55
## Development server
66

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
7+
To start a local development server, run:
8+
9+
```bash
10+
ng serve
11+
```
12+
13+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
814

915
## Code scaffolding
1016

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
17+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
18+
19+
```bash
20+
ng generate component component-name
21+
```
22+
23+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
24+
25+
```bash
26+
ng generate --help
27+
```
1228

13-
## Build
29+
## Building
1430

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
31+
To build the project run:
32+
33+
```bash
34+
ng build
35+
```
36+
37+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
1638

1739
## Running unit tests
1840

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
41+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
42+
43+
```bash
44+
ng test
45+
```
2046

2147
## Running end-to-end tests
2248

23-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
49+
For end-to-end (e2e) testing, run:
50+
51+
```bash
52+
ng e2e
53+
```
54+
55+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
2456

25-
## Further help
57+
## Additional Resources
2658

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
59+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

examples/angular-app/angular.json

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,36 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"angular-app": {
6+
"angular-standalone": {
77
"projectType": "application",
8-
"schematics": {},
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
913
"root": "",
1014
"sourceRoot": "src",
1115
"prefix": "app",
1216
"architect": {
1317
"build": {
14-
"builder": "@angular-devkit/build-angular:browser",
18+
"builder": "@angular-devkit/build-angular:application",
1519
"options": {
16-
"outputPath": "dist/angular-app",
20+
"outputPath": "dist/angular-standalone",
1721
"index": "src/index.html",
18-
"main": "src/main.ts",
19-
"polyfills": "src/polyfills.ts",
22+
"browser": "src/main.ts",
23+
"polyfills": [
24+
"zone.js"
25+
],
2026
"tsConfig": "tsconfig.app.json",
27+
"inlineStyleLanguage": "scss",
2128
"assets": [
22-
"src/favicon.ico",
23-
"src/assets"
29+
{
30+
"glob": "**/*",
31+
"input": "public"
32+
}
2433
],
2534
"styles": [
26-
"src/styles.css"
35+
"src/styles.scss"
2736
],
2837
"scripts": []
2938
},
@@ -32,30 +41,21 @@
3241
"budgets": [
3342
{
3443
"type": "initial",
35-
"maximumWarning": "500kb",
36-
"maximumError": "1mb"
44+
"maximumWarning": "500kB",
45+
"maximumError": "1MB"
3746
},
3847
{
3948
"type": "anyComponentStyle",
40-
"maximumWarning": "2kb",
41-
"maximumError": "4kb"
42-
}
43-
],
44-
"fileReplacements": [
45-
{
46-
"replace": "src/environments/environment.ts",
47-
"with": "src/environments/environment.prod.ts"
49+
"maximumWarning": "4kB",
50+
"maximumError": "8kB"
4851
}
4952
],
5053
"outputHashing": "all"
5154
},
5255
"development": {
53-
"buildOptimizer": false,
5456
"optimization": false,
55-
"vendorChunk": true,
5657
"extractLicenses": false,
57-
"sourceMap": true,
58-
"namedChunks": true
58+
"sourceMap": true
5959
}
6060
},
6161
"defaultConfiguration": "production"
@@ -64,33 +64,34 @@
6464
"builder": "@angular-devkit/build-angular:dev-server",
6565
"configurations": {
6666
"production": {
67-
"buildTarget": "angular-app:build:production"
67+
"buildTarget": "angular-standalone:build:production"
6868
},
6969
"development": {
70-
"buildTarget": "angular-app:build:development"
70+
"buildTarget": "angular-standalone:build:development"
7171
}
7272
},
7373
"defaultConfiguration": "development"
7474
},
7575
"extract-i18n": {
76-
"builder": "@angular-devkit/build-angular:extract-i18n",
77-
"options": {
78-
"buildTarget": "angular-app:build"
79-
}
76+
"builder": "@angular-devkit/build-angular:extract-i18n"
8077
},
8178
"test": {
8279
"builder": "@angular-devkit/build-angular:karma",
8380
"options": {
84-
"main": "src/test.ts",
85-
"polyfills": "src/polyfills.ts",
81+
"polyfills": [
82+
"zone.js",
83+
"zone.js/testing"
84+
],
8685
"tsConfig": "tsconfig.spec.json",
87-
"karmaConfig": "karma.conf.js",
86+
"inlineStyleLanguage": "scss",
8887
"assets": [
89-
"src/favicon.ico",
90-
"src/assets"
88+
{
89+
"glob": "**/*",
90+
"input": "public"
91+
}
9192
],
9293
"styles": [
93-
"src/styles.css"
94+
"src/styles.scss"
9495
],
9596
"scripts": []
9697
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import { defineConfig } from 'cypress';
1+
import { defineConfig } from "cypress";
22

33
export default defineConfig({
44
projectId: 'mx9dpd',
5+
component: {
6+
devServer: {
7+
framework: "angular",
8+
bundler: "webpack",
9+
webpackConfig: { stats: "errors-only" }, // see issue https://github.com/cypress-io/cypress/issues/26456
10+
},
11+
specPattern: "**/*.cy.ts",
12+
},
513
e2e: {
6-
baseUrl: 'http://localhost:4200',
14+
supportFile: false,
715
setupNodeEvents(on, config) {
816
// implement node event listeners here
917
},
1018
},
11-
12-
component: {
13-
devServer: {
14-
framework: 'angular',
15-
bundler: 'webpack',
16-
},
17-
specPattern: '**/*.cy.ts',
18-
},
1919
});

0 commit comments

Comments
 (0)