diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcb1859f..de3b8eeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: install - run: npm install + run: npm install --legacy-peer-deps - name: build run: npm run build -- --skip-nx-cache - name: test diff --git a/apps/example-app-karma/.browserslistrc b/apps/example-app-karma/.browserslistrc deleted file mode 100644 index 427441dc..00000000 --- a/apps/example-app-karma/.browserslistrc +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/apps/example-app-karma/project.json b/apps/example-app-karma/project.json index 75e38aab..eb966a8c 100644 --- a/apps/example-app-karma/project.json +++ b/apps/example-app-karma/project.json @@ -1,4 +1,5 @@ { + "name": "example-app-karma", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "application", "sourceRoot": "apps/example-app-karma/src", diff --git a/apps/example-app-karma/src/app/issues/issue-222.spec.ts b/apps/example-app-karma/src/app/issues/issue-222.spec.ts index b6ac5204..17e9a029 100644 --- a/apps/example-app-karma/src/app/issues/issue-222.spec.ts +++ b/apps/example-app-karma/src/app/issues/issue-222.spec.ts @@ -9,7 +9,7 @@ it('https://github.com/testing-library/angular-testing-library/issues/222 with r expect(screen.getByText('Hello Sarah')).toBeTruthy(); - await rerender({ name: 'Mark' }); + await rerender({ componentProperties: { name: 'Mark' } }); expect(screen.getByText('Hello Mark')).toBeTruthy(); }); diff --git a/apps/example-app-karma/src/test.ts b/apps/example-app-karma/src/test.ts index c2ab726d..60544d54 100644 --- a/apps/example-app-karma/src/test.ts +++ b/apps/example-app-karma/src/test.ts @@ -9,11 +9,5 @@ beforeEach(() => { jasmine.addMatchers(JasmineDOM); }); -declare const require: any; - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {}); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/apps/example-app-karma/tsconfig.app.json b/apps/example-app-karma/tsconfig.app.json index 4de7101b..79a77d1b 100644 --- a/apps/example-app-karma/tsconfig.app.json +++ b/apps/example-app-karma/tsconfig.app.json @@ -3,7 +3,9 @@ "compilerOptions": { "outDir": "../../dist/out-tsc", "types": [], - "allowJs": true + "allowJs": true, + "target": "ES2022", + "useDefineForClassFields": false }, "files": ["src/main.ts", "src/polyfills.ts"], "include": ["src/**/*.d.ts"], diff --git a/apps/example-app-karma/tsconfig.spec.json b/apps/example-app-karma/tsconfig.spec.json index f4b0d715..ff71a7ee 100644 --- a/apps/example-app-karma/tsconfig.spec.json +++ b/apps/example-app-karma/tsconfig.spec.json @@ -2,7 +2,9 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", - "types": ["jasmine", "node", "@testing-library/jasmine-dom"] + "types": ["jasmine", "node", "@testing-library/jasmine-dom"], + "target": "ES2022", + "useDefineForClassFields": false }, "files": ["src/test.ts", "src/polyfills.ts"], "include": ["**/*.spec.ts", "**/*.d.ts"] diff --git a/apps/example-app/.browserslistrc b/apps/example-app/.browserslistrc deleted file mode 100644 index 427441dc..00000000 --- a/apps/example-app/.browserslistrc +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# For the full list of supported browsers by the Angular framework, please see: -# https://angular.io/guide/browser-support - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -last 1 Chrome version -last 1 Firefox version -last 2 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/apps/example-app/project.json b/apps/example-app/project.json index dcc8b341..b31a7efd 100644 --- a/apps/example-app/project.json +++ b/apps/example-app/project.json @@ -1,4 +1,5 @@ { + "name": "example-app", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "application", "sourceRoot": "apps/example-app/src", @@ -75,7 +76,7 @@ "options": { "jestConfig": "apps/example-app/jest.config.ts" }, - "outputs": ["coverage/"] + "outputs": ["{workspaceRoot}/coverage/"] } }, "tags": [] diff --git a/apps/example-app/src/app/app-routing.module.ts b/apps/example-app/src/app/app-routing.module.ts index a553ba61..6a9f0b9e 100644 --- a/apps/example-app/src/app/app-routing.module.ts +++ b/apps/example-app/src/app/app-routing.module.ts @@ -95,7 +95,7 @@ export const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })], + imports: [RouterModule.forRoot(routes, {})], exports: [RouterModule], }) export class AppRoutingModule {} diff --git a/apps/example-app/src/app/examples/04-forms-with-material.ts b/apps/example-app/src/app/examples/04-forms-with-material.ts index 69ea4636..ed510d1f 100644 --- a/apps/example-app/src/app/examples/04-forms-with-material.ts +++ b/apps/example-app/src/app/examples/04-forms-with-material.ts @@ -6,10 +6,12 @@ import { UntypedFormBuilder, Validators } from '@angular/forms'; template: `