Skip to content

Commit 1092fe0

Browse files
committed
refactor: move rules_browsers into repo
1 parent 6b394a3 commit 1092fe0

89 files changed

Lines changed: 20730 additions & 61 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,34 @@ jobs:
3333
test:
3434
timeout-minutes: 15
3535
runs-on: ubuntu-latest
36-
steps:
37-
# Because the checkout and setup node action is contained in the dev-infra repo, we must
38-
# checkout the repo to be able to run the action we have created. Other repos will skip
39-
# this step.
40-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41-
- uses: ./github-actions/npm/checkout-and-setup-node
42-
- uses: ./github-actions/bazel/setup
43-
- uses: ./github-actions/bazel/configure-remote
44-
with:
45-
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
46-
- run: pnpm install --frozen-lockfile
47-
- run: pnpm bazel test -- //...
48-
49-
rules_angular:
50-
timeout-minutes: 15
51-
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
folder:
40+
[
41+
'.',
42+
'bazel/rules/rules_angular',
43+
'bazel/rules/rules_browsers',
44+
'bazel/rules/rules_browsers/test',
45+
]
5246
defaults:
5347
run:
54-
working-directory: bazel/rules/rules_angular
48+
working-directory: ${{ matrix.folder }}
5549
steps:
5650
# Because the checkout and setup node action is contained in the dev-infra repo, we must
5751
# checkout the repo to be able to run the action we have created. Other repos will skip
5852
# this step.
5953
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6054
- uses: ./github-actions/npm/checkout-and-setup-node
55+
with:
56+
disable-package-manager-cache: ${{ matrix.folder == 'bazel/rules/rules_browsers/test' }}
6157
- uses: ./github-actions/bazel/setup
6258
- uses: ./github-actions/bazel/configure-remote
6359
with:
6460
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
65-
- run: pnpm install --frozen-lockfile
61+
- name: Install NPM dependencies
62+
if: matrix.folder != 'bazel/rules/rules_browsers/test'
63+
run: pnpm install --frozen-lockfile
6664
- run: pnpm bazel test -- //...
6765

6866
# macos testing is disabled as we do not have any targets we currently test.

.github/workflows/pr.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,32 @@ jobs:
4444
test:
4545
timeout-minutes: 15
4646
runs-on: ubuntu-latest
47-
steps:
48-
# Because the checkout and setup node action is contained in the dev-infra repo, we must
49-
# checkout the repo to be able to run the action we have created. Other repos will skip
50-
# this step.
51-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
52-
- uses: ./github-actions/npm/checkout-and-setup-node
53-
- uses: ./github-actions/bazel/setup
54-
- uses: ./github-actions/bazel/configure-remote
55-
- run: pnpm install --frozen-lockfile
56-
- run: pnpm bazel test -- //...
57-
58-
rules_angular:
59-
timeout-minutes: 15
60-
runs-on: ubuntu-latest
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
folder:
51+
[
52+
'.',
53+
'bazel/rules/rules_angular',
54+
'bazel/rules/rules_browsers',
55+
'bazel/rules/rules_browsers/test',
56+
]
6157
defaults:
6258
run:
63-
working-directory: bazel/rules/rules_angular
59+
working-directory: ${{ matrix.folder }}
6460
steps:
6561
# Because the checkout and setup node action is contained in the dev-infra repo, we must
6662
# checkout the repo to be able to run the action we have created. Other repos will skip
6763
# this step.
6864
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6965
- uses: ./github-actions/npm/checkout-and-setup-node
66+
with:
67+
disable-package-manager-cache: ${{ matrix.folder == 'bazel/rules/rules_browsers/test' }}
7068
- uses: ./github-actions/bazel/setup
7169
- uses: ./github-actions/bazel/configure-remote
72-
- run: pnpm install --frozen-lockfile
70+
- name: Install NPM dependencies
71+
if: matrix.folder != 'bazel/rules/rules_browsers/test'
72+
run: pnpm install --frozen-lockfile
7373
- run: pnpm bazel test -- //...
7474

7575
# macos testing is disabled as we do not have any targets we currently test.

MODULE.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ bazel_dep(name = "aspect_rules_esbuild", version = "0.25.0")
2222
bazel_dep(name = "aspect_rules_ts", version = "3.8.5")
2323
bazel_dep(name = "rules_nodejs", version = "6.7.3")
2424
bazel_dep(name = "rules_browsers")
25-
git_override(
25+
local_path_override(
2626
module_name = "rules_browsers",
27-
commit = "7043f918640169063a6281ab4afb61389a0aad6d",
28-
remote = "https://github.com/angular/rules_browsers.git",
27+
path = "bazel/rules/rules_browsers",
2928
)
3029

3130
bazel_dep(name = "rules_sass")

bazel/rules/rules_angular/MODULE.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ bazel_dep(name = "rules_nodejs", version = "6.7.3")
1111

1212
# Dev dependencies
1313
bazel_dep(name = "rules_browsers", dev_dependency = True)
14-
git_override(
14+
local_path_override(
1515
module_name = "rules_browsers",
16-
commit = "7043f918640169063a6281ab4afb61389a0aad6d",
17-
remote = "https://github.com/angular/rules_browsers.git",
16+
path = "../rules_browsers",
1817
)
1918

2019
bazel_dep(name = "rules_sass", dev_dependency = True)

bazel/rules/rules_angular/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@
3737
"@angular/platform-browser": "22.0.0-next.1",
3838
"@babel/core": "^7.28.5",
3939
"@bazel/bazelisk": "1.26.0",
40-
"@bazel/buildifier": "^8.0.0",
4140
"@rollup/plugin-commonjs": "^29.0.0",
4241
"@rollup/plugin-node-resolve": "^16.0.0",
4342
"@types/node": "^22.10.1",
4443
"json-stable-stringify": "^1.2.1",
4544
"lru-cache": "^11.1.0",
4645
"magic-string": "0.30.17",
4746
"memfs": "^4.14.0",
48-
"prettier": "^3.4.1",
4947
"rollup": "^4.59.0",
5048
"rollup-plugin-dts": "6.1.1",
5149
"rollup-plugin-sourcemaps2": "^0.5.0",

bazel/rules/rules_angular/pnpm-lock.yaml

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/rules/rules_angular/pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ minimumReleaseAge: 1440
55
minimumReleaseAgeExclude:
66
- '@angular-devkit/*'
77
- '@angular/*'
8+
- '@schematics/*'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
try-import ../../../.bazelrc
2+
3+
# Toolchain and platform related flags
4+
build:remote --extra_execution_platforms=@devinfra//bazel/remote-execution:platform_with_network
5+
build:remote --host_platform=@devinfra//bazel/remote-execution:platform_with_network
6+
build:remote --platforms=@devinfra//bazel/remote-execution:platform_with_network
7+
8+
####################################################
9+
# User bazel configuration
10+
# NOTE: This needs to be the *last* entry in the config to allow for it to override other
11+
# configuration in this file.
12+
####################################################
13+
14+
# Load any settings which are specific to the current user. Needs to be *last* statement
15+
# in this config, as the user configuration should be able to overwrite flags from this file.
16+
try-import ../../../.bazelrc.user
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.6.0

bazel/rules/rules_browsers/.npmrc

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

0 commit comments

Comments
 (0)