Skip to content

Commit 5801b37

Browse files
authored
Merge branch 'main' into alexeagle-patch-5
2 parents 23a9b99 + 4b4e2ec commit 5801b37

Some content is hidden

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

50 files changed

+648
-686
lines changed

.aspect/workflows/config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# See https://docs.aspect.build/workflows/configuration
22
tasks:
33
- test:
4-
bazel:
5-
flags:
6-
- --config=ci
4+
flags:
5+
- --config=ci
76
notifications:
87
github: {}

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
bazel: 7.1.1
2+
bazel: 7.3.1
33
# Note, this will tell the user to do the wrong thing (manually run buildifer)
44
# See https://github.com/bazelbuild/continuous-integration/issues/1161
55
buildifier:

.bazelrc

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,8 @@
1-
# TODO: migrate all root WORKSPACE dependencies to MODULE.bazel
2-
# https://github.com/bazel-contrib/rules_nodejs/issues/3695
3-
common --noenable_bzlmod
4-
common --enable_workspace
1+
import %workspace%/tools/preset.bazelrc
52

6-
# Specifies desired output mode for running tests.
7-
# Valid values are
8-
# 'summary' to output only test status summary
9-
# 'errors' to also print test logs for failed tests
10-
# 'all' to print logs for all tests
11-
# 'streamed' to output logs for all tests in real time
12-
# (this will force tests to be executed locally one at a time regardless of --test_strategy value).
13-
common --test_output=errors
14-
15-
# Turn on --incompatible_strict_action_env which was on by default
16-
# in Bazel 0.21.0 but turned off again in 0.22.0. Follow
17-
# https://github.com/bazelbuild/bazel/issues/7026 for more details.
18-
# This flag is needed to so that the bazel cache is not invalidated
19-
# when running bazel via `yarn bazel`.
20-
# See https://github.com/angular/angular/issues/27514.
21-
common --incompatible_strict_action_env
22-
23-
# Turn off legacy external runfiles
24-
# This prevents accidentally depending on this feature, which Bazel will remove.
25-
common --nolegacy_external_runfiles
26-
27-
# Don’t want to push a rules author to update their deps if not needed.
28-
# https://bazel.build/reference/command-line-reference#flag--check_direct_dependencies
29-
# https://bazelbuild.slack.com/archives/C014RARENH0/p1691158021917459?thread_ts=1691156601.420349&cid=C014RARENH0
30-
common --check_direct_dependencies=off
3+
common --config=ruleset
314

325
# In the root MODULE.bazel file we don't set include_headers on the nodejs toolchain
336
# so the `//nodejs/headers:current_node_cc_headers`` target will not build. This target
347
# is instead tested in `e2e/headers``
358
common --deleted_packages=nodejs/headers
36-
37-
# Load any settings specific to the current user.
38-
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
39-
# This needs to be last statement in this
40-
# config, as the user configuration should be able to overwrite flags from this file.
41-
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
42-
# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing,
43-
# rather than user.bazelrc as suggested in the Bazel docs)
44-
try-import %workspace%/.bazelrc.user

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.3.1
1+
7.5.0

.bcr/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bcr_test_module:
22
module_path: "e2e/smoke"
33
matrix:
4-
bazel: ["7.x"]
4+
bazel: ["7.x", "8.x", "rolling"]
55
platform: ["debian10", "macos", "ubuntu2004", "windows"]
66
tasks:
77
run_tests:

.bcr/source.template.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"integrity": "**leave this alone**",
3-
"strip_prefix": "{REPO}-{VERSION}",
4-
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_nodejs-{TAG}.tar.gz"
2+
"integrity": "**leave this alone**",
3+
"strip_prefix": "{REPO}-{VERSION}",
4+
"docs_url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_nodejs-{TAG}.docs.tar.gz",
5+
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_nodejs-{TAG}.tar.gz"
56
}

.github/workflows/ci.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
jobs:
1919
test:
20-
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v6
20+
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v7.2.3
2121
with:
2222
folders: '[".", "e2e/headers", "e2e/smoke", "e2e/nodejs_host", "e2e/conflicting_toolchains"]'
2323
# stardoc generated docs fail on diff_test with Bazel 6.4.0 so don't test against it in root repository
@@ -27,7 +27,6 @@ jobs:
2727
{"bazelversion": "6.4.0", "os": "macos-latest"},
2828
{"bazelversion": "6.4.0", "os": "windows-latest"},
2929
{"bazelversion": "6.4.0", folder: "."},
30-
{"bazelversion": "6.4.0", bzlmodEnabled: true}
31-
# this test is for bzlmod only
32-
{folder: "e2e/conflicting_toolchains", bzlmodEnabled: false},
30+
{"bazelversion": "6.4.0", bzlmodEnabled: true},
31+
{folder: "e2e/conflicting_toolchains", bzlmodEnabled: false}
3332
]

.github/workflows/publish.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
required: true
88
type: string
99
secrets:
10-
publish_token:
10+
BCR_PUBLISH_TOKEN:
1111
required: true
1212
# In case of problems, let release engineers retry by manually dispatching
1313
# the workflow from the GitHub UI
@@ -19,15 +19,16 @@ on:
1919

2020
jobs:
2121
publish:
22-
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4
22+
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.0.0
2323
with:
2424
tag_name: ${{ inputs.tag_name }}
2525
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
2626
registry_fork: bazel-contrib/bazel-central-registry
27+
draft: false
2728
permissions:
2829
attestations: write
2930
contents: write
3031
id-token: write
3132
secrets:
3233
# Necessary to push to the BCR fork, and to open a pull request against a registry
33-
publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
34+
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
with:
2929
tag_name: ${{ inputs.tag_name || github.ref_name }}
3030
secrets:
31-
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}
31+
BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }}

.github/workflows/release_prep.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ ARCHIVE="rules_nodejs-$TAG.tar.gz"
1111
git archive --format=tar --prefix="${PREFIX}/" "${TAG}" | gzip > "$ARCHIVE"
1212
SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}')
1313

14+
# Add generated API docs to the release, see https://github.com/bazelbuild/bazel-central-registry/issues/5593
15+
docs="$(mktemp -d)"; targets="$(mktemp)"
16+
bazel --output_base="$docs" query --output=label --output_file="$targets" 'kind("starlark_doc_extract rule", //...)'
17+
bazel --output_base="$docs" build --target_pattern_file="$targets" --remote_download_regex='.*doc_extract\.binaryproto'
18+
tar --create --auto-compress \
19+
--directory "$(bazel --output_base="$docs" info bazel-bin)" \
20+
--file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" .
21+
1422
cat << EOF
1523
## Using Bzlmod with Bazel 6 or greater
1624

0 commit comments

Comments
 (0)