Skip to content

Commit 8b6b28e

Browse files
committed
Merge branch 'main' into fix/automcomplete-overlay-backdrop
2 parents 2cea4f0 + 23269f3 commit 8b6b28e

File tree

145 files changed

+17339
-1469
lines changed

Some content is hidden

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

145 files changed

+17339
-1469
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# @generated
2+
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
3+
# This file should be checked into version control along with the pnpm-lock.yaml file.
4+
.npmrc=-2023857461
5+
package.json=1204886269
6+
pnpm-lock.yaml=1975546108
7+
pnpm-workspace.yaml=1711114604
8+
yarn.lock=824621907

.bazelrc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Required by `rules_ts`.
2+
common --@aspect_rules_ts//ts:skipLibCheck=always
3+
common --@aspect_rules_ts//ts:default_to_tsc_transpiler
4+
15
###############################
26
# Filesystem interactions #
37
###############################
@@ -87,11 +91,9 @@ build:remote --google_default_credentials=true
8791

8892
# Setup the toolchain and platform for the remote build execution. The platform
8993
# is provided by the shared dev-infra package and targets k8 remote containers.
90-
build:remote --crosstool_top=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain_suite
91-
build:remote --extra_toolchains=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain
92-
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
93-
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
94-
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
94+
build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network
95+
build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network
96+
build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network
9597

9698
################################
9799
# Sandbox settings #

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0
1+
6.5.0

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
/.github/ISSUE_TEMPLATE/** @angular/components-googlers
1414

1515
/tools/ @angular/dev-infra-components
16-
/tools/public_api_guard/**/*.md @angular/components-googlers

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Install node modules
6565
run: yarn install --frozen-lockfile
6666
- name: Check API Goldens
67-
run: yarn bazel test tools/public_api_guard/...
67+
run: yarn bazel test goldens/...
6868
- uses: ./.github/actions/slack
6969
if: failure()
7070
with:
@@ -173,6 +173,8 @@ jobs:
173173
run: yarn install --frozen-lockfile
174174
- name: Run tests
175175
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
176+
env:
177+
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
176178
- uses: ./.github/actions/slack
177179
if: failure()
178180
with:

.github/workflows/pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- name: Install node modules
6666
run: yarn install --frozen-lockfile
6767
- name: Check API Goldens
68-
run: yarn bazel test tools/public_api_guard/...
68+
run: yarn bazel test goldens/...
6969

7070
e2e:
7171
runs-on: ubuntu-latest
@@ -149,6 +149,8 @@ jobs:
149149
run: yarn install --frozen-lockfile
150150
- name: Run tests
151151
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
152+
env:
153+
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
152154

153155
build:
154156
runs-on: ubuntu-latest-16core

.ng-dev/release.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const releasePackages = [
2323

2424
/** Configuration for the `ng-dev release` command. */
2525
export const release: ReleaseConfig = {
26+
rulesJsInteropMode: true,
2627
releaseNotes: {
2728
useReleaseTitle: true,
2829
groupOrder: releasePackages,

.npmrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
engine-strict = true
1+
# Yarn Berry doesn't check engines at all, so pnpm shouldn't either.
2+
engine-strict = false
3+
4+
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
5+
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
6+
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
7+
hoist=false

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ src/cdk/schematics/ng-update/test-cases/**/*_input.ts
1212
src/cdk/schematics/ng-update/test-cases/**/*_expected_output.ts
1313
src/material/schematics/ng-update/test-cases/**/*_input.ts
1414
src/material/schematics/ng-update/test-cases/**/*_expected_output.ts
15+
16+
pnpm-lock.yaml

BUILD.bazel

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS")
44
load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS")
55
load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS")
66
load("//src/material-experimental:config.bzl", "MATERIAL_EXPERIMENTAL_ENTRYPOINTS", "MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS")
7+
load("@npm2//:defs.bzl", "npm_link_all_packages")
78

89
package(default_visibility = ["//visibility:public"])
910

@@ -12,6 +13,10 @@ exports_files([
1213
"package.json",
1314
])
1415

16+
npm_link_all_packages(
17+
name = "node_modules",
18+
)
19+
1520
nodejs_binary(
1621
name = "yarn_vendored",
1722
data = [".yarn/releases/yarn-1.22.17.cjs"],

DEV_ENVIRONMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ packages locally and test them by either of the following ways:
6666
### Approving public API changes
6767
If you're making changes to a public API, they need to be propagated to our public API golden files.
6868
To save the changes you can run `yarn approve-api <target>` and to review the changes, you can look
69-
at the file under `tools/public_api_guard/<target>.d.ts`.
69+
at the file under `goldens/<package>/<entry-point>.api.md`.
7070

7171

7272
### Disabling Git hooks
@@ -86,7 +86,7 @@ export HUSKY=0
8686

8787
A set of environment variables is made available within the dev-app. Such variables
8888
will be injected into the dev-app, so that e.g. API keys can be used for development
89-
without requiring secrets to be committed.
89+
without requiring secrets to be committed.
9090

9191
The following variables are currently used in the dev-app:
9292

WORKSPACE

Lines changed: 103 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#Workspace for angular material
22
workspace(
33
name = "angular_material",
4-
managed_directories = {"@npm": ["node_modules"]},
54
)
65

76
# Point to the nested WORKSPACE we merged from github.com/angular/material.angular.io
@@ -64,20 +63,42 @@ load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_d
6463

6564
build_bazel_rules_nodejs_dependencies()
6665

66+
http_archive(
67+
name = "aspect_rules_js",
68+
sha256 = "75c25a0f15a9e4592bbda45b57aa089e4bf17f9176fd735351e8c6444df87b52",
69+
strip_prefix = "rules_js-2.1.0",
70+
url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.0/rules_js-v2.1.0.tar.gz",
71+
)
72+
73+
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
74+
75+
rules_js_dependencies()
76+
6777
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
6878

79+
NODE_VERSION = "22.0.0"
80+
81+
NODE_REPOSITORIES = {
82+
"22.0.0-darwin_arm64": ("node-v22.0.0-darwin-arm64.tar.gz", "node-v22.0.0-darwin-arm64", "ea96d349cfaa67aa87ceeaa3e5b52c9167f7ac302fd8d1ff162d0785e9dc0785"),
83+
"22.0.0-darwin_amd64": ("node-v22.0.0-darwin-x64.tar.gz", "node-v22.0.0-darwin-x64", "422a3887ff5418f0a4552d89cf99346ab8ab51bb5d384660baa88b8444d2c111"),
84+
"22.0.0-linux_arm64": ("node-v22.0.0-linux-arm64.tar.xz", "node-v22.0.0-linux-arm64", "83711d29cbe46375bdffab5419f3d831892e24294169272f6c39edc364556241"),
85+
"22.0.0-linux_ppc64le": ("node-v22.0.0-linux-ppc64le.tar.xz", "node-v22.0.0-linux-ppc64le", "2b3fb8707a79243bfb3131312b86716ddc3855bce21bb168095b6b916798e5e9"),
86+
"22.0.0-linux_s390x": ("node-v22.0.0-linux-s390x.tar.xz", "node-v22.0.0-linux-s390x", "89a8efeeb9f94ce9ea251b8109e079c14919f4c0dc2cbc9f545ec47ef0886737"),
87+
"22.0.0-linux_amd64": ("node-v22.0.0-linux-x64.tar.xz", "node-v22.0.0-linux-x64", "9122e50f2642afd5f6078cafd1f52ede60fc464284384f05c18a04d13d07ae5a"),
88+
"22.0.0-windows_amd64": ("node-v22.0.0-win-x64.zip", "node-v22.0.0-win-x64", "32d639b47d4c0a651ff8f8d7d41a454168a3d4045be37985f9a810cf8cef6174"),
89+
}
90+
6991
nodejs_register_toolchains(
7092
name = "nodejs",
71-
node_repositories = {
72-
"22.0.0-darwin_arm64": ("node-v22.0.0-darwin-arm64.tar.gz", "node-v22.0.0-darwin-arm64", "ea96d349cfaa67aa87ceeaa3e5b52c9167f7ac302fd8d1ff162d0785e9dc0785"),
73-
"22.0.0-darwin_amd64": ("node-v22.0.0-darwin-x64.tar.gz", "node-v22.0.0-darwin-x64", "422a3887ff5418f0a4552d89cf99346ab8ab51bb5d384660baa88b8444d2c111"),
74-
"22.0.0-linux_arm64": ("node-v22.0.0-linux-arm64.tar.xz", "node-v22.0.0-linux-arm64", "83711d29cbe46375bdffab5419f3d831892e24294169272f6c39edc364556241"),
75-
"22.0.0-linux_ppc64le": ("node-v22.0.0-linux-ppc64le.tar.xz", "node-v22.0.0-linux-ppc64le", "2b3fb8707a79243bfb3131312b86716ddc3855bce21bb168095b6b916798e5e9"),
76-
"22.0.0-linux_s390x": ("node-v22.0.0-linux-s390x.tar.xz", "node-v22.0.0-linux-s390x", "89a8efeeb9f94ce9ea251b8109e079c14919f4c0dc2cbc9f545ec47ef0886737"),
77-
"22.0.0-linux_amd64": ("node-v22.0.0-linux-x64.tar.xz", "node-v22.0.0-linux-x64", "9122e50f2642afd5f6078cafd1f52ede60fc464284384f05c18a04d13d07ae5a"),
78-
"22.0.0-windows_amd64": ("node-v22.0.0-win-x64.zip", "node-v22.0.0-win-x64", "32d639b47d4c0a651ff8f8d7d41a454168a3d4045be37985f9a810cf8cef6174"),
79-
},
80-
node_version = "22.0.0",
93+
node_repositories = NODE_REPOSITORIES,
94+
node_version = NODE_VERSION,
95+
)
96+
97+
load("@aspect_rules_js//js:toolchains.bzl", "rules_js_register_toolchains")
98+
99+
rules_js_register_toolchains(
100+
node_repositories = NODE_REPOSITORIES,
101+
node_version = NODE_VERSION,
81102
)
82103

83104
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
@@ -103,9 +124,6 @@ yarn_install(
103124
manual_build_file_contents = create_npm_package_archive_build_file(),
104125
package_json = "//:package.json",
105126
quiet = False,
106-
# We prefer to symlink the `node_modules` to only maintain a single install.
107-
# See https://github.com/angular/dev-infra/pull/446#issuecomment-1059820287 for details.
108-
symlink_node_modules = True,
109127
yarn = "//:.yarn/releases/yarn-1.22.17.cjs",
110128
yarn_lock = "//:yarn.lock",
111129
)
@@ -140,3 +158,74 @@ load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "
140158
esbuild_repositories(
141159
npm_repository = "npm",
142160
)
161+
162+
load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")
163+
164+
npm_translate_lock(
165+
name = "npm2",
166+
data = [
167+
"//:package.json",
168+
"//:pnpm-workspace.yaml",
169+
],
170+
npmrc = "//:.npmrc",
171+
pnpm_lock = "//:pnpm-lock.yaml",
172+
update_pnpm_lock = True,
173+
verify_node_modules_ignored = "//:.bazelignore",
174+
yarn_lock = "//:yarn.lock",
175+
)
176+
177+
load("@npm2//:repositories.bzl", "npm_repositories")
178+
179+
npm_repositories()
180+
181+
http_archive(
182+
name = "aspect_rules_ts",
183+
sha256 = "9acd128abe77397505148eaa6895faed57839560dbf2177dd6285e51235e2724",
184+
strip_prefix = "rules_ts-3.3.1",
185+
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.3.1/rules_ts-v3.3.1.tar.gz",
186+
)
187+
188+
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
189+
190+
rules_ts_dependencies(
191+
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.8.2 | jq -r '.dist.integrity'
192+
ts_integrity = "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
193+
ts_version_from = "//:package.json",
194+
)
195+
196+
http_archive(
197+
name = "aspect_rules_rollup",
198+
sha256 = "c4062681968f5dcd3ce01e09e4ba73670c064744a7046211763e17c98ab8396e",
199+
strip_prefix = "rules_rollup-2.0.0",
200+
url = "https://github.com/aspect-build/rules_rollup/releases/download/v2.0.0/rules_rollup-v2.0.0.tar.gz",
201+
)
202+
203+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
204+
205+
git_repository(
206+
name = "devinfra",
207+
commit = "cc73dde52b557f831cc3b6e48daf8c3b542a33df",
208+
remote = "https://github.com/angular/dev-infra.git",
209+
)
210+
211+
load("@devinfra//bazel:setup_dependencies_1.bzl", "setup_dependencies_1")
212+
213+
setup_dependencies_1()
214+
215+
load("@devinfra//bazel:setup_dependencies_2.bzl", "setup_dependencies_2")
216+
217+
setup_dependencies_2()
218+
219+
git_repository(
220+
name = "rules_angular",
221+
commit = "e10bf488aca18c159399f4c1163324a40f45a5dc",
222+
remote = "https://github.com/devversion/rules_angular.git",
223+
)
224+
225+
load("@rules_angular//setup:step_1.bzl", "step_1")
226+
227+
step_1()
228+
229+
load("@rules_angular//setup:step_2.bzl", "step_2")
230+
231+
step_2()

goldens/BUILD.bazel

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
1+
load("@devinfra//bazel/api-golden:index.bzl", "api_golden_test_npm_package")
2+
13
exports_files([
24
"size-test.yaml",
35
"tsec-exemption.json",
46
])
7+
8+
api_golden_test_npm_package(
9+
name = "cdk_api",
10+
data = glob(["cdk/**"]) + [
11+
"//src/cdk:npm_package",
12+
],
13+
golden_dir = "angular_material/goldens/cdk",
14+
npm_package = "angular_material/src/cdk/npm_package",
15+
)
16+
17+
api_golden_test_npm_package(
18+
name = "material_api",
19+
data = glob(["material/**"]) + ["//src/material:npm_package"],
20+
golden_dir = "angular_material/goldens/material",
21+
npm_package = "angular_material/src/material/npm_package",
22+
)
23+
24+
api_golden_test_npm_package(
25+
name = "google_maps_api",
26+
data = glob(["google-maps/**"]) + ["//src/google-maps:npm_package"],
27+
golden_dir = "angular_material/goldens/google-maps",
28+
npm_package = "angular_material/src/google-maps/npm_package",
29+
types = ["@npm//@types/google.maps"],
30+
)
31+
32+
api_golden_test_npm_package(
33+
name = "youtube_player_api",
34+
data = glob(["youtube-player/**"]) + ["//src/youtube-player:npm_package"],
35+
golden_dir = "angular_material/goldens/youtube-player",
36+
npm_package = "angular_material/src/youtube-player/npm_package",
37+
types = ["@npm//@types/youtube"],
38+
)

tools/public_api_guard/cdk/a11y.md renamed to goldens/cdk/a11y/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "components-srcs"
1+
## API Report File for "@angular/cdk_a11y"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44
@@ -30,7 +30,7 @@ export class A11yModule {
3030
// (undocumented)
3131
static ɵinj: i0.ɵɵInjectorDeclaration<A11yModule>;
3232
// (undocumented)
33-
static ɵmod: i0.ɵɵNgModuleDeclaration<A11yModule, never, [typeof i1.ObserversModule, typeof i2.CdkAriaLive, typeof i3.CdkTrapFocus, typeof i4.CdkMonitorFocus], [typeof i2.CdkAriaLive, typeof i3.CdkTrapFocus, typeof i4.CdkMonitorFocus]>;
33+
static ɵmod: i0.ɵɵNgModuleDeclaration<A11yModule, never, [typeof ObserversModule, typeof CdkAriaLive, typeof CdkTrapFocus, typeof CdkMonitorFocus], [typeof CdkAriaLive, typeof CdkTrapFocus, typeof CdkMonitorFocus]>;
3434
}
3535

3636
// @public (undocumented)

tools/public_api_guard/cdk/accordion.md renamed to goldens/cdk/accordion/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "components-srcs"
1+
## API Report File for "@angular/cdk_accordion"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44
@@ -74,7 +74,7 @@ export class CdkAccordionModule {
7474
// (undocumented)
7575
static ɵinj: i0.ɵɵInjectorDeclaration<CdkAccordionModule>;
7676
// (undocumented)
77-
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkAccordionModule, never, [typeof i1.CdkAccordion, typeof i2.CdkAccordionItem], [typeof i1.CdkAccordion, typeof i2.CdkAccordionItem]>;
77+
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkAccordionModule, never, [typeof CdkAccordion, typeof CdkAccordionItem], [typeof CdkAccordion, typeof CdkAccordionItem]>;
7878
}
7979

8080
// (No @packageDocumentation comment for this package)

tools/public_api_guard/cdk/bidi.md renamed to goldens/cdk/bidi/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "components-srcs"
1+
## API Report File for "@angular/cdk_bidi"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44
@@ -17,7 +17,7 @@ export class BidiModule {
1717
// (undocumented)
1818
static ɵinj: i0.ɵɵInjectorDeclaration<BidiModule>;
1919
// (undocumented)
20-
static ɵmod: i0.ɵɵNgModuleDeclaration<BidiModule, never, [typeof i1.Dir], [typeof i1.Dir]>;
20+
static ɵmod: i0.ɵɵNgModuleDeclaration<BidiModule, never, [typeof Dir], [typeof Dir]>;
2121
}
2222

2323
// @public

tools/public_api_guard/cdk/clipboard.md renamed to goldens/cdk/clipboard/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "components-srcs"
1+
## API Report File for "@angular/cdk_clipboard"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44
@@ -51,7 +51,7 @@ export class ClipboardModule {
5151
// (undocumented)
5252
static ɵinj: i0.ɵɵInjectorDeclaration<ClipboardModule>;
5353
// (undocumented)
54-
static ɵmod: i0.ɵɵNgModuleDeclaration<ClipboardModule, never, [typeof i1.CdkCopyToClipboard], [typeof i1.CdkCopyToClipboard]>;
54+
static ɵmod: i0.ɵɵNgModuleDeclaration<ClipboardModule, never, [typeof CdkCopyToClipboard], [typeof CdkCopyToClipboard]>;
5555
}
5656

5757
// @public

tools/public_api_guard/cdk/coercion.md renamed to goldens/cdk/coercion/index.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "components-srcs"
1+
## API Report File for "@angular/cdk_coercion"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44

0 commit comments

Comments
 (0)