Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @generated
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
.npmrc=-2023857461
package.json=-1482816862
pnpm-lock.yaml=-2100360822
pnpm-workspace.yaml=1711114604
yarn.lock=-1734434772
12 changes: 7 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Required by `rules_ts`.
common --@aspect_rules_ts//ts:skipLibCheck=always
common --@aspect_rules_ts//ts:default_to_tsc_transpiler

###############################
# Filesystem interactions #
###############################
Expand Down Expand Up @@ -87,11 +91,9 @@ build:remote --google_default_credentials=true

# Setup the toolchain and platform for the remote build execution. The platform
# is provided by the shared dev-infra package and targets k8 remote containers.
build:remote --crosstool_top=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain_suite
build:remote --extra_toolchains=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
build:remote --platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network
build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network
build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network

################################
# Sandbox settings #
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0
6.5.0
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
/.github/ISSUE_TEMPLATE/** @angular/components-googlers

/tools/ @angular/dev-infra-components
/tools/public_api_guard/**/*.md @angular/components-googlers
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Check API Goldens
run: yarn bazel test tools/public_api_guard/...
run: yarn bazel test goldens/...
- uses: ./.github/actions/slack
if: failure()
with:
Expand Down Expand Up @@ -173,6 +173,8 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run tests
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
env:
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
- uses: ./.github/actions/slack
if: failure()
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Check API Goldens
run: yarn bazel test tools/public_api_guard/...
run: yarn bazel test goldens/...

e2e:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -149,6 +149,8 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run tests
run: bazel test --build_tag_filters=-e2e --test_tag_filters=-e2e --build_tests_only -- src/...
env:
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'

build:
runs-on: ubuntu-latest-16core
Expand Down
1 change: 1 addition & 0 deletions .ng-dev/release.mts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const releasePackages = [

/** Configuration for the `ng-dev release` command. */
export const release: ReleaseConfig = {
rulesJsInteropMode: true,
releaseNotes: {
useReleaseTitle: true,
groupOrder: releasePackages,
Expand Down
8 changes: 7 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
engine-strict = true
# Yarn Berry doesn't check engines at all, so pnpm shouldn't either.
engine-strict = false

# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
hoist=false
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.1
22.0.0
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ src/cdk/schematics/ng-update/test-cases/**/*_input.ts
src/cdk/schematics/ng-update/test-cases/**/*_expected_output.ts
src/material/schematics/ng-update/test-cases/**/*_input.ts
src/material/schematics/ng-update/test-cases/**/*_expected_output.ts

pnpm-lock.yaml
5 changes: 5 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS")
load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS")
load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS")
load("//src/material-experimental:config.bzl", "MATERIAL_EXPERIMENTAL_ENTRYPOINTS", "MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS")
load("@npm2//:defs.bzl", "npm_link_all_packages")

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

Expand All @@ -12,6 +13,10 @@ exports_files([
"package.json",
])

npm_link_all_packages(
name = "node_modules",
)

nodejs_binary(
name = "yarn_vendored",
data = [".yarn/releases/yarn-1.22.17.cjs"],
Expand Down
4 changes: 2 additions & 2 deletions DEV_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ packages locally and test them by either of the following ways:
### Approving public API changes
If you're making changes to a public API, they need to be propagated to our public API golden files.
To save the changes you can run `yarn approve-api <target>` and to review the changes, you can look
at the file under `tools/public_api_guard/<target>.d.ts`.
at the file under `goldens/<package>/<entry-point>.api.md`.


### Disabling Git hooks
Expand All @@ -86,7 +86,7 @@ export HUSKY=0

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

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

Expand Down
118 changes: 104 additions & 14 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Workspace for angular material
workspace(
name = "angular_material",
managed_directories = {"@npm": ["node_modules"]},
)

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

build_bazel_rules_nodejs_dependencies()

http_archive(
name = "aspect_rules_js",
sha256 = "75c25a0f15a9e4592bbda45b57aa089e4bf17f9176fd735351e8c6444df87b52",
strip_prefix = "rules_js-2.1.0",
url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.0/rules_js-v2.1.0.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")

NODE_VERSION = "22.0.0"

NODE_REPOSITORIES = {
"22.0.0-darwin_arm64": ("node-v22.0.0-darwin-arm64.tar.gz", "node-v22.0.0-darwin-arm64", "ea96d349cfaa67aa87ceeaa3e5b52c9167f7ac302fd8d1ff162d0785e9dc0785"),
"22.0.0-darwin_amd64": ("node-v22.0.0-darwin-x64.tar.gz", "node-v22.0.0-darwin-x64", "422a3887ff5418f0a4552d89cf99346ab8ab51bb5d384660baa88b8444d2c111"),
"22.0.0-linux_arm64": ("node-v22.0.0-linux-arm64.tar.xz", "node-v22.0.0-linux-arm64", "83711d29cbe46375bdffab5419f3d831892e24294169272f6c39edc364556241"),
"22.0.0-linux_ppc64le": ("node-v22.0.0-linux-ppc64le.tar.xz", "node-v22.0.0-linux-ppc64le", "2b3fb8707a79243bfb3131312b86716ddc3855bce21bb168095b6b916798e5e9"),
"22.0.0-linux_s390x": ("node-v22.0.0-linux-s390x.tar.xz", "node-v22.0.0-linux-s390x", "89a8efeeb9f94ce9ea251b8109e079c14919f4c0dc2cbc9f545ec47ef0886737"),
"22.0.0-linux_amd64": ("node-v22.0.0-linux-x64.tar.xz", "node-v22.0.0-linux-x64", "9122e50f2642afd5f6078cafd1f52ede60fc464284384f05c18a04d13d07ae5a"),
"22.0.0-windows_amd64": ("node-v22.0.0-win-x64.zip", "node-v22.0.0-win-x64", "32d639b47d4c0a651ff8f8d7d41a454168a3d4045be37985f9a810cf8cef6174"),
}

nodejs_register_toolchains(
name = "nodejs",
node_repositories = {
"18.19.1-darwin_arm64": ("node-v18.19.1-darwin-arm64.tar.gz", "node-v18.19.1-darwin-arm64", "0c7249318868877032ed21cc0ed450015ee44b31b9b281955521cd3fc39fbfa3"),
"18.19.1-darwin_amd64": ("node-v18.19.1-darwin-x64.tar.gz", "node-v18.19.1-darwin-x64", "ab67c52c0d215d6890197c951e1bd479b6140ab630212b96867395e21d813016"),
"18.19.1-linux_arm64": ("node-v18.19.1-linux-arm64.tar.xz", "node-v18.19.1-linux-arm64", "228ad1eee660fba3f9fd2cccf02f05b8ebccc294d27f22c155d20b233a9d76b3"),
"18.19.1-linux_ppc64le": ("node-v18.19.1-linux-ppc64le.tar.xz", "node-v18.19.1-linux-ppc64le", "2e5812b8fc00548e2e8ab9daa88ace13974c16b6ba5595a7a50c35f848f7d432"),
"18.19.1-linux_s390x": ("node-v18.19.1-linux-s390x.tar.xz", "node-v18.19.1-linux-s390x", "15106acf4c9e3aca02416dd89fb5c71af77097042455a73f9caa064c1988ead5"),
"18.19.1-linux_amd64": ("node-v18.19.1-linux-x64.tar.xz", "node-v18.19.1-linux-x64", "f35f24edd4415cd609a2ebc03be03ed2cfe211d7333d55c752d831754fb849f0"),
"18.19.1-windows_amd64": ("node-v18.19.1-win-x64.zip", "node-v18.19.1-win-x64", "ff08f8fe253fba9274992d7052e9d9a70141342d7b36ddbd6e84cbe823e312c6"),
},
node_version = "18.19.1",
node_repositories = NODE_REPOSITORIES,
node_version = NODE_VERSION,
)

load("@aspect_rules_js//js:toolchains.bzl", "rules_js_register_toolchains")

rules_js_register_toolchains(
node_repositories = NODE_REPOSITORIES,
node_version = NODE_VERSION,
)

load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
Expand All @@ -92,6 +113,7 @@ yarn_install(
"//:.yarnrc",
"//:tools/postinstall/apply-patches.js",
"//:tools/postinstall/patches/@angular+bazel+20.0.0-next.1.patch",
"//:tools/postinstall/patches/@angular+build-tooling+0.0.0-335a273d3eb2a73c51efb97930fc1e0cd72e0d32.patch",
"//:tools/postinstall/patches/@bazel+concatjs+5.8.1.patch",
],
# Currently disabled due to:
Expand All @@ -102,9 +124,6 @@ yarn_install(
manual_build_file_contents = create_npm_package_archive_build_file(),
package_json = "//:package.json",
quiet = False,
# We prefer to symlink the `node_modules` to only maintain a single install.
# See https://github.com/angular/dev-infra/pull/446#issuecomment-1059820287 for details.
symlink_node_modules = True,
yarn = "//:.yarn/releases/yarn-1.22.17.cjs",
yarn_lock = "//:yarn.lock",
)
Expand Down Expand Up @@ -139,3 +158,74 @@ load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "
esbuild_repositories(
npm_repository = "npm",
)

load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock")

npm_translate_lock(
name = "npm2",
data = [
"//:package.json",
"//:pnpm-workspace.yaml",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
update_pnpm_lock = True,
verify_node_modules_ignored = "//:.bazelignore",
yarn_lock = "//:yarn.lock",
)

load("@npm2//:repositories.bzl", "npm_repositories")

npm_repositories()

http_archive(
name = "aspect_rules_ts",
sha256 = "9acd128abe77397505148eaa6895faed57839560dbf2177dd6285e51235e2724",
strip_prefix = "rules_ts-3.3.1",
url = "https://github.com/aspect-build/rules_ts/releases/download/v3.3.1/rules_ts-v3.3.1.tar.gz",
)

load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")

rules_ts_dependencies(
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.8.2 | jq -r '.dist.integrity'
ts_integrity = "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
ts_version_from = "//:package.json",
)

http_archive(
name = "aspect_rules_rollup",
sha256 = "c4062681968f5dcd3ce01e09e4ba73670c064744a7046211763e17c98ab8396e",
strip_prefix = "rules_rollup-2.0.0",
url = "https://github.com/aspect-build/rules_rollup/releases/download/v2.0.0/rules_rollup-v2.0.0.tar.gz",
)

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "devinfra",
commit = "cc73dde52b557f831cc3b6e48daf8c3b542a33df",
remote = "https://github.com/angular/dev-infra.git",
)

load("@devinfra//bazel:setup_dependencies_1.bzl", "setup_dependencies_1")

setup_dependencies_1()

load("@devinfra//bazel:setup_dependencies_2.bzl", "setup_dependencies_2")

setup_dependencies_2()

git_repository(
name = "rules_angular",
commit = "e10bf488aca18c159399f4c1163324a40f45a5dc",
remote = "https://github.com/devversion/rules_angular.git",
)

load("@rules_angular//setup:step_1.bzl", "step_1")

step_1()

load("@rules_angular//setup:step_2.bzl", "step_2")

step_2()
34 changes: 34 additions & 0 deletions goldens/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
load("@devinfra//bazel/api-golden:index.bzl", "api_golden_test_npm_package")

exports_files([
"size-test.yaml",
"tsec-exemption.json",
])

api_golden_test_npm_package(
name = "cdk_api",
data = glob(["cdk/**"]) + [
"//src/cdk:npm_package",
],
golden_dir = "angular_material/goldens/cdk",
npm_package = "angular_material/src/cdk/npm_package",
)

api_golden_test_npm_package(
name = "material_api",
data = glob(["material/**"]) + ["//src/material:npm_package"],
golden_dir = "angular_material/goldens/material",
npm_package = "angular_material/src/material/npm_package",
)

api_golden_test_npm_package(
name = "google_maps_api",
data = glob(["google-maps/**"]) + ["//src/google-maps:npm_package"],
golden_dir = "angular_material/goldens/google-maps",
npm_package = "angular_material/src/google-maps/npm_package",
types = ["@npm//@types/google.maps"],
)

api_golden_test_npm_package(
name = "youtube_player_api",
data = glob(["youtube-player/**"]) + ["//src/youtube-player:npm_package"],
golden_dir = "angular_material/goldens/youtube-player",
npm_package = "angular_material/src/youtube-player/npm_package",
types = ["@npm//@types/youtube"],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Report File for "components-srcs"
## API Report File for "@angular/cdk_a11y"

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

Expand Down Expand Up @@ -30,7 +30,7 @@ export class A11yModule {
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<A11yModule>;
// (undocumented)
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]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<A11yModule, never, [typeof ObserversModule, typeof CdkAriaLive, typeof CdkTrapFocus, typeof CdkMonitorFocus], [typeof CdkAriaLive, typeof CdkTrapFocus, typeof CdkMonitorFocus]>;
}

// @public (undocumented)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Report File for "components-srcs"
## API Report File for "@angular/cdk_accordion"

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

Expand Down Expand Up @@ -74,7 +74,7 @@ export class CdkAccordionModule {
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<CdkAccordionModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkAccordionModule, never, [typeof i1.CdkAccordion, typeof i2.CdkAccordionItem], [typeof i1.CdkAccordion, typeof i2.CdkAccordionItem]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkAccordionModule, never, [typeof CdkAccordion, typeof CdkAccordionItem], [typeof CdkAccordion, typeof CdkAccordionItem]>;
}

// (No @packageDocumentation comment for this package)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Report File for "components-srcs"
## API Report File for "@angular/cdk_bidi"

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

Expand All @@ -17,7 +17,7 @@ export class BidiModule {
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<BidiModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<BidiModule, never, [typeof i1.Dir], [typeof i1.Dir]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<BidiModule, never, [typeof Dir], [typeof Dir]>;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Report File for "components-srcs"
## API Report File for "@angular/cdk_clipboard"

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

Expand Down Expand Up @@ -51,7 +51,7 @@ export class ClipboardModule {
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<ClipboardModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<ClipboardModule, never, [typeof i1.CdkCopyToClipboard], [typeof i1.CdkCopyToClipboard]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<ClipboardModule, never, [typeof CdkCopyToClipboard], [typeof CdkCopyToClipboard]>;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## API Report File for "components-srcs"
## API Report File for "@angular/cdk_coercion"

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