Skip to content

Commit f11677a

Browse files
committed
build: update dependency aspect_rules_js to v3
See associated pull request for more information.
1 parent 1e1aced commit f11677a

23 files changed

Lines changed: 95 additions & 216 deletions

File tree

.github/local-actions/branch-manager/main.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.github/local-actions/labels-sync/main.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.github/local-actions/lock-closed/main.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ register_toolchains(
1212

1313
bazel_dep(name = "yq.bzl", version = "0.3.5")
1414
bazel_dep(name = "tar.bzl", version = "0.9.0")
15-
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
15+
bazel_dep(name = "bazel_lib", version = "3.2.2")
1616
bazel_dep(name = "bazel_skylib", version = "1.9.0")
17-
bazel_dep(name = "aspect_rules_js", version = "2.9.2")
17+
bazel_dep(name = "aspect_rules_js", version = "3.0.2")
1818
bazel_dep(name = "rules_pkg", version = "1.2.0")
1919
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.4")
2020
bazel_dep(name = "platforms", version = "1.0.0")

MODULE.bazel.lock

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

bazel/api-golden/api_golden_test.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
21
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
2+
load("@bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
33
load("@bazel_skylib//rules:write_file.bzl", "write_file")
44
load("//bazel/api-golden:api_golden_test_npm_package.bzl", "api_golden_test_npm_package", "default_strip_export_pattern")
55

bazel/api-golden/test/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
1+
load("@bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
22
load("//bazel/api-golden:index.bzl", "api_golden_test", "api_golden_test_npm_package")
33

44
package(default_visibility = ["//bazel/api-golden/test:__pkg__"])

bazel/api-golden/test/fixtures/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
21
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
2+
load("@bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
33

44
package(default_visibility = ["//bazel/api-golden/test:__pkg__"])
55

bazel/http-server/server.mts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import path from 'node:path';
1313
import send from 'send';
1414
import assert from 'node:assert';
1515

16-
// The current working directory is the runfiles root.
17-
const runfilesRoot = process.env['RUNFILES']!;
18-
assert(runfilesRoot, 'Expected `RUNFILES` to be set.');
19-
2016
/**
2117
* Http Server implementation that uses browser-sync internally. This server
2218
* supports Bazel runfile resolution in order to make it work in a Bazel sandbox
@@ -32,6 +28,9 @@ export class HttpServer {
3228
/** Options of the browser-sync server. */
3329
options: browserSync.Options;
3430

31+
/** The runfiles root directory. */
32+
private readonly runfilesRoot: string;
33+
3534
constructor(
3635
readonly port: number,
3736
private _rootPaths: string[],
@@ -40,6 +39,11 @@ export class HttpServer {
4039
private _environmentVariables: string[] = [],
4140
private _relaxCors: boolean = false,
4241
) {
42+
// The current working directory is the runfiles root.
43+
const runfilesRoot = process.env['JS_BINARY__RUNFILES'];
44+
assert(runfilesRoot, 'Expected `JS_BINARY__RUNFILES` to be set.');
45+
this.runfilesRoot = runfilesRoot;
46+
4347
this.options = {
4448
open: false,
4549
online: false,
@@ -141,7 +145,7 @@ export class HttpServer {
141145
private _resolveUrlFromRunfiles(url: string): string | null {
142146
for (let rootPath of this._rootPaths) {
143147
const fragment = path.posix.join(rootPath, getManifestPath(url));
144-
const diskPath = path.join(runfilesRoot, fragment);
148+
const diskPath = path.join(this.runfilesRoot, fragment);
145149

146150
if (fs.existsSync(diskPath)) {
147151
return diskPath;

bazel/jasmine/stack-traces.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {install} from 'source-map-support';
55
install();
66

77
/** The root path that the test files are running from within. */
8-
let rootPath = `${process.env.RUNFILES}/${process.env.TEST_WORKSPACE}/`;
8+
let rootPath = `${process.env.JS_BINARY__RUNFILES}/${process.env.TEST_WORKSPACE}/`;
99
/** The root path match for when test files are not within the sandbox, but the executation is happening within the sandbox. */
1010
let sandboxPath = `/.*${process.env.JS_BINARY__WORKSPACE}/${process.env.JS_BINARY__BINDIR}/`;
1111
/** Regex to capture the content and name of the function in the stack trace. */

0 commit comments

Comments
 (0)