Skip to content

Commit 6885074

Browse files
committed
build: update public API golden infra and move to goldens/
* Moves the public API goldens to `goldens/` * Switches us to the `npm_package` variant of the golden testing rule. This variant is more future proof and will work well with the `rules_js` migration (as it takes arbitrary Bazel tree artifacts)
1 parent 8c35b62 commit 6885074

File tree

122 files changed

+372
-488
lines changed

Some content is hidden

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

122 files changed

+372
-488
lines changed

.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx

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

.bazelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ build:remote --google_default_credentials=true
9191

9292
# Setup the toolchain and platform for the remote build execution. The platform
9393
# is provided by the shared dev-infra package and targets k8 remote containers.
94-
build:remote --extra_execution_platforms=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
95-
build:remote --host_platform=@npm//@angular/build-tooling/bazel/remote-execution:platform_with_network
96-
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
9797

9898
################################
9999
# Sandbox settings #

.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: 1 addition & 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:

.github/workflows/pr.yml

Lines changed: 1 addition & 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

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
204204

205205
git_repository(
206206
name = "devinfra",
207-
commit = "47572aba6019f368057c00966ac7ce354b1d65bc",
207+
commit = "cc73dde52b557f831cc3b6e48daf8c3b542a33df",
208208
remote = "https://github.com/angular/dev-infra.git",
209209
)
210210

@@ -218,7 +218,7 @@ setup_dependencies_2()
218218

219219
git_repository(
220220
name = "rules_angular",
221-
commit = "b1e419e5f6b5e897c07260780cfef2b0aac128fb",
221+
commit = "e10bf488aca18c159399f4c1163324a40f45a5dc",
222222
remote = "https://github.com/devversion/rules_angular.git",
223223
)
224224

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)

0 commit comments

Comments
 (0)