Skip to content

Commit 5fe2280

Browse files
committed
build: update tooling to generate APF version 16 packages (#26906)
This commit updates the tooling to generate APF version 16 packages. See angular/angular#49332 for more information. (cherry picked from commit 44c3c52)
1 parent c98c2c5 commit 5fe2280

File tree

22 files changed

+84
-82
lines changed

22 files changed

+84
-82
lines changed

WORKSPACE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ yarn_install(
7373
"//:.yarn/releases/yarn-1.22.17.cjs",
7474
"//:.yarnrc",
7575
"//:tools/postinstall/apply-patches.js",
76-
"//:tools/postinstall/patches/@angular+bazel+16.0.0-next.0.patch",
76+
"//:tools/postinstall/patches/@angular+bazel+16.0.0-next.6.patch",
77+
"//:tools/postinstall/patches/@bazel+concatjs+5.8.1.patch",
7778
],
7879
# Currently disabled due to:
7980
# 1. Missing Windows support currently.

integration/linker/link-packages-test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if (failedPackages) {
5656
* @returns An object containing linker failures and passed files.
5757
*/
5858
function testPackage(pkg) {
59-
const entryPointFesmFiles = glob.sync(`+(fesm2015|fesm2020)/**/*.mjs`, {cwd: pkg.pkgPath});
59+
const entryPointFesmFiles = glob.sync(`fesm2022/**/*.mjs`, {cwd: pkg.pkgPath});
6060
const passedFiles = [];
6161
const failures = [];
6262

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"@angular-devkit/build-angular": "^16.0.0-next.7",
7474
"@angular-devkit/core": "^16.0.0-next.7",
7575
"@angular-devkit/schematics": "^16.0.0-next.7",
76-
"@angular/bazel": "https://github.com/angular/bazel-builds.git#8b1e899d38c5781662ff01812d5e71aa014b861c",
76+
"@angular/bazel": "https://github.com/angular/bazel-builds.git#bac9c1abe1e6ac1801fbbccb53353a1ed7126469",
7777
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#fb897a1ae4b084da69f77b3fc09848b57a321421",
7878
"@angular/cli": "^16.0.0-next.7",
7979
"@angular/compiler-cli": "^16.0.0-next.7",

src/bazel-tsconfig-build.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@
2020
"importHelpers": true,
2121
"strictBindCallApply": true,
2222
"esModuleInterop": true,
23+
// Keep the below in sync with https://github.com/angular/angular/blob/f9b821f07d8dba57a6a7e5fc127dc096247424aa/packages/bazel/src/ng_module/ng_module.bzl#L214
24+
"useDefineForClassFields": false,
2325
"newLine": "lf",
2426
// Bazel either uses "umd" or "esnext". We replicate this here for IDE support.
2527
// https://github.com/bazelbuild/rules_typescript/blob/master/internal/common/tsconfig.bzl#L199
2628
"module": "esnext",
2729
"moduleResolution": "node",
2830
"sourceMap": true,
2931
"inlineSources": true,
30-
"target": "es2020",
32+
"target": "es2022",
3133
"lib": ["es2020", "dom"],
3234
"skipLibCheck": true,
3335
"types": ["tslib"]

src/cdk-experimental/selection/row-selection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import {CdkSelection} from './selection';
2626
},
2727
})
2828
export class CdkRowSelection<T> {
29-
@Input('cdkRowSelectionValue') value: T;
29+
// We need an initializer here to avoid a TS error.
30+
@Input('cdkRowSelectionValue') value: T = undefined!;
3031

3132
@Input('cdkRowSelectionIndex')
3233
get index(): number | undefined {

src/cdk/schematics/update-tool/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {createFileSystemCompilerHost} from './utils/virtual-host';
2424
* the context can provide the necessary specifics to the migrations in a type-safe way.
2525
*/
2626
export class UpdateProject<Context> {
27-
private readonly _typeChecker: ts.TypeChecker = this._program.getTypeChecker();
27+
private readonly _typeChecker: ts.TypeChecker;
2828

2929
constructor(
3030
/** Context provided to all migrations. */
@@ -40,7 +40,9 @@ export class UpdateProject<Context> {
4040
private _analyzedFiles: Set<WorkspacePath> = new Set(),
4141
/** Logger used for printing messages. */
4242
private _logger: UpdateLogger = defaultLogger,
43-
) {}
43+
) {
44+
this._typeChecker = this._program.getTypeChecker();
45+
}
4446

4547
/**
4648
* Migrates the project to the specified target version.

src/material-experimental/selection/selection-toggle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ import {Directive, Input} from '@angular/core';
2727
})
2828
export class MatSelectionToggle<T> extends CdkSelectionToggle<T> {
2929
/** The value that is associated with the toggle */
30-
@Input('matSelectionToggleValue') override value: T;
30+
@Input('matSelectionToggleValue') override value: T = undefined!;
3131
}

src/material/chips/chip-grid.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ export class MatChipGrid
261261
// indirect descendants if it's left as false.
262262
descendants: true,
263263
})
264-
override _chips: QueryList<MatChipRow>;
264+
// We need an initializer here to avoid a TS error. The value will be set in `ngAfterViewInit`.
265+
override _chips: QueryList<MatChipRow> = undefined!;
265266

266267
constructor(
267268
elementRef: ElementRef,

src/material/chips/chip-listbox.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ export class MatChipListbox
206206
// indirect descendants if it's left as false.
207207
descendants: true,
208208
})
209-
override _chips: QueryList<MatChipOption>;
209+
// We need an initializer here to avoid a TS error. The value will be set in `ngAfterViewInit`.
210+
override _chips: QueryList<MatChipOption> = undefined!;
210211

211212
ngAfterContentInit() {
212213
if (this._pendingInitialValue !== undefined) {

src/material/legacy-tabs/tab.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ export class MatLegacyTab extends _MatTabBase {
4949
* Template provided in the tab content that will be used if present, used to enable lazy-loading
5050
*/
5151
@ContentChild(MAT_TAB_CONTENT, {read: TemplateRef, static: true})
52-
override _explicitContent: TemplateRef<any>;
52+
// We need an initializer here to avoid a TS error. The value will be set in `ngAfterViewInit`.
53+
override _explicitContent: TemplateRef<any> = undefined!;
5354
}

0 commit comments

Comments
 (0)