Skip to content

Commit 9b28873

Browse files
committed
build: update to latest Angular and fix test failures
Updates to the latest version of Angular and fixes some tests that were broken by the CLI switching to generating standalone apps by default.
1 parent cc3428e commit 9b28873

File tree

15 files changed

+590
-524
lines changed

15 files changed

+590
-524
lines changed

integration/yarn-pnp-compat/.yarn/releases/yarn-3.5.1.cjs renamed to integration/yarn-pnp-compat/.yarn/releases/yarn-3.6.3.cjs

Lines changed: 241 additions & 240 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: pnp
22

3-
yarnPath: .yarn/releases/yarn-3.5.1.cjs
3+
yarnPath: .yarn/releases/yarn-3.6.3.cjs

integration/yarn-pnp-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@
4040
"karma-jasmine-html-reporter": "~1.7.0",
4141
"typescript": "~5.0.2"
4242
},
43-
"packageManager": "yarn@3.5.1"
43+
"packageManager": "yarn@3.6.3"
4444
}

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
},
5858
"version": "17.0.0-next.5",
5959
"dependencies": {
60-
"@angular/animations": "^17.0.0-next.4",
61-
"@angular/common": "^17.0.0-next.4",
62-
"@angular/compiler": "^17.0.0-next.4",
63-
"@angular/core": "^17.0.0-next.4",
64-
"@angular/forms": "^17.0.0-next.4",
65-
"@angular/platform-browser": "^17.0.0-next.4",
60+
"@angular/animations": "^17.0.0-next.6",
61+
"@angular/common": "^17.0.0-next.6",
62+
"@angular/compiler": "^17.0.0-next.6",
63+
"@angular/core": "^17.0.0-next.6",
64+
"@angular/forms": "^17.0.0-next.6",
65+
"@angular/platform-browser": "^17.0.0-next.6",
6666
"@types/google.maps": "^3.52.4",
6767
"@types/youtube": "^0.0.46",
6868
"rxjs": "^6.6.7",
@@ -71,18 +71,18 @@
7171
"zone.js": "~0.13.0"
7272
},
7373
"devDependencies": {
74-
"@angular-devkit/build-angular": "^17.0.0-next.4",
75-
"@angular-devkit/core": "^17.0.0-next.4",
76-
"@angular-devkit/schematics": "^17.0.0-next.4",
74+
"@angular-devkit/build-angular": "^17.0.0-next.6",
75+
"@angular-devkit/core": "^17.0.0-next.6",
76+
"@angular-devkit/schematics": "^17.0.0-next.6",
7777
"@angular/bazel": "https://github.com/angular/bazel-builds.git#bac9c1abe1e6ac1801fbbccb53353a1ed7126469",
7878
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#22a9a75114d5e80907054f01b9fa360972de1c05",
79-
"@angular/cli": "^17.0.0-next.4",
80-
"@angular/compiler-cli": "^17.0.0-next.4",
81-
"@angular/localize": "^17.0.0-next.4",
79+
"@angular/cli": "^17.0.0-next.6",
80+
"@angular/compiler-cli": "^17.0.0-next.6",
81+
"@angular/localize": "^17.0.0-next.6",
8282
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#2c4d983ef0f1f000a8554b3b7fbf7f1061c877d3",
83-
"@angular/platform-browser-dynamic": "^17.0.0-next.4",
84-
"@angular/platform-server": "^17.0.0-next.4",
85-
"@angular/router": "^17.0.0-next.4",
83+
"@angular/platform-browser-dynamic": "^17.0.0-next.6",
84+
"@angular/platform-server": "^17.0.0-next.6",
85+
"@angular/router": "^17.0.0-next.6",
8686
"@babel/core": "^7.16.12",
8787
"@babel/helper-explode-assignable-expression": "^7.18.6",
8888
"@babel/helper-string-parser": "^7.22.5",
@@ -148,7 +148,7 @@
148148
"@octokit/rest": "18.3.5",
149149
"@rollup/plugin-commonjs": "^21.0.0",
150150
"@rollup/plugin-node-resolve": "^13.1.3",
151-
"@schematics/angular": "^17.0.0-next.4",
151+
"@schematics/angular": "^17.0.0-next.6",
152152
"@types/babel__core": "^7.1.18",
153153
"@types/browser-sync": "^2.26.3",
154154
"@types/fs-extra": "^9.0.13",

src/cdk/schematics/ng-generate/drag-drop/index.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('CDK drag-drop schematic', () => {
1919
});
2020

2121
it('should create drag-drop files and add them to module', async () => {
22-
const app = await createTestApp(runner);
22+
const app = await createTestApp(runner, {standalone: false});
2323
const tree = await runner.runSchematic('drag-drop', baseOptions, app);
2424
const moduleContent = getFileContent(tree, '/projects/material/src/app/app.module.ts');
2525
const files = tree.files;
@@ -34,7 +34,7 @@ describe('CDK drag-drop schematic', () => {
3434
});
3535

3636
it('should add drag-drop module', async () => {
37-
const app = await createTestApp(runner);
37+
const app = await createTestApp(runner, {standalone: false});
3838
const tree = await runner.runSchematic('drag-drop', baseOptions, app);
3939
const moduleContent = getFileContent(tree, '/projects/material/src/app/app.module.ts');
4040

@@ -43,7 +43,7 @@ describe('CDK drag-drop schematic', () => {
4343

4444
describe('standalone option', () => {
4545
it('should generate a standalone component', async () => {
46-
const app = await createTestApp(runner);
46+
const app = await createTestApp(runner, {standalone: false});
4747
const tree = await runner.runSchematic('drag-drop', {...baseOptions, standalone: true}, app);
4848
const module = getFileContent(tree, '/projects/material/src/app/app.module.ts');
4949
const component = getFileContent(tree, '/projects/material/src/app/foo/foo.component.ts');
@@ -83,7 +83,7 @@ describe('CDK drag-drop schematic', () => {
8383
});
8484

8585
it('should respect the deprecated "styleext" option value', async () => {
86-
let tree = await createTestApp(runner);
86+
let tree = await createTestApp(runner, {standalone: false});
8787
tree.overwrite(
8888
'angular.json',
8989
JSON.stringify({
@@ -185,7 +185,7 @@ describe('CDK drag-drop schematic', () => {
185185
});
186186

187187
it('should respect the deprecated global "spec" option value', async () => {
188-
let tree = await createTestApp(runner);
188+
let tree = await createTestApp(runner, {standalone: false});
189189
tree.overwrite(
190190
'angular.json',
191191
JSON.stringify({

src/material/schematics/ng-add/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('ng-add schematic', () => {
2626

2727
beforeEach(async () => {
2828
runner = new SchematicTestRunner('schematics', COLLECTION_PATH);
29-
appTree = await createTestApp(runner);
29+
appTree = await createTestApp(runner, {standalone: false});
3030

3131
errorOutput = [];
3232
warnOutput = [];

src/material/schematics/ng-generate/address-form/index.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Material address-form schematic', () => {
1616
});
1717

1818
it('should create address-form files and add them to module', async () => {
19-
const app = await createTestApp(runner);
19+
const app = await createTestApp(runner, {standalone: false});
2020
const tree = await runner.runSchematic('address-form', baseOptions, app);
2121
const files = tree.files;
2222

@@ -31,7 +31,7 @@ describe('Material address-form schematic', () => {
3131
});
3232

3333
it('should add address-form imports to module', async () => {
34-
const app = await createTestApp(runner);
34+
const app = await createTestApp(runner, {standalone: false});
3535
const tree = await runner.runSchematic('address-form', baseOptions, app);
3636
const moduleContent = getFileContent(tree, '/projects/material/src/app/app.module.ts');
3737

@@ -52,7 +52,7 @@ describe('Material address-form schematic', () => {
5252

5353
describe('standalone option', () => {
5454
it('should generate a standalone component', async () => {
55-
const app = await createTestApp(runner);
55+
const app = await createTestApp(runner, {standalone: false});
5656
const tree = await runner.runSchematic(
5757
'address-form',
5858
{...baseOptions, standalone: true},

src/material/schematics/ng-generate/dashboard/index.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('material-dashboard-schematic', () => {
1616
});
1717

1818
it('should create dashboard files and add them to module', async () => {
19-
const app = await createTestApp(runner);
19+
const app = await createTestApp(runner, {standalone: false});
2020
const tree = await runner.runSchematic('dashboard', baseOptions, app);
2121
const files = tree.files;
2222

@@ -31,7 +31,7 @@ describe('material-dashboard-schematic', () => {
3131
});
3232

3333
it('should add dashboard imports to module', async () => {
34-
const app = await createTestApp(runner);
34+
const app = await createTestApp(runner, {standalone: false});
3535
const tree = await runner.runSchematic('dashboard', baseOptions, app);
3636
const moduleContent = getFileContent(tree, '/projects/material/src/app/app.module.ts');
3737

@@ -60,7 +60,7 @@ describe('material-dashboard-schematic', () => {
6060

6161
describe('standalone option', () => {
6262
it('should generate a standalone component', async () => {
63-
const app = await createTestApp(runner);
63+
const app = await createTestApp(runner, {standalone: false});
6464
const tree = await runner.runSchematic('dashboard', {...baseOptions, standalone: true}, app);
6565
const module = getFileContent(tree, '/projects/material/src/app/app.module.ts');
6666
const component = getFileContent(tree, '/projects/material/src/app/foo/foo.component.ts');

src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-styles.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ describe('card styles', () => {
1919

2020
beforeEach(async () => {
2121
runner = createNewTestRunner();
22-
cliAppTree = patchDevkitTreeToExposeTypeScript(await createTestApp(runner));
22+
cliAppTree = patchDevkitTreeToExposeTypeScript(
23+
await createTestApp(runner, {standalone: false}),
24+
);
2325
});
2426

2527
describe('mixin migrations', () => {

src/material/schematics/ng-generate/mdc-migration/rules/components/card/card-template.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ describe('card template migrator', () => {
1919

2020
beforeEach(async () => {
2121
runner = createNewTestRunner();
22-
cliAppTree = patchDevkitTreeToExposeTypeScript(await createTestApp(runner));
22+
cliAppTree = patchDevkitTreeToExposeTypeScript(
23+
await createTestApp(runner, {standalone: false}),
24+
);
2325
});
2426

2527
it('should not update other elements', async () => {

0 commit comments

Comments
 (0)