Skip to content

Commit 863f752

Browse files
authored
chore: update gazelle generation in pnpm-workspaces examples (#370)
1 parent 262eca6 commit 863f752

File tree

8 files changed

+14
-11
lines changed

8 files changed

+14
-11
lines changed

.bazeliskrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BAZELISK_BASE_URL=https://static.aspect.build/aspect
2-
USE_BAZEL_VERSION=aspect/2024.41.17
2+
USE_BAZEL_VERSION=aspect/2024.42.3
33

44
# Aspect CLI (aspect) is wrapper for Bazel, built on top of Bazelisk, that adds
55
# additional features and extensibility to the popular polyglot build system from Google.

pnpm-workspaces/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ tsconfig_to_swcconfig.t2s(
3737
js_library(
3838
name = "pkg",
3939
srcs = ["package.json"],
40+
visibility = ["//visibility:public"],
4041
)

pnpm-workspaces/apps/alpha/BUILD.bazel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ ts_project(
1010
declaration = True,
1111
tsconfig = "//:tsconfig",
1212
deps = [
13-
":node_modules/inspirational-quotes", # this uses the version defined in the local package.json
13+
":node_modules/inspirational-quotes",
1414
"//:node_modules/@bazel-poc/one",
1515
"//:node_modules/@bazel-poc/shared",
16-
"//:node_modules/@types/node", # keep
16+
"//:node_modules/@types/node",
1717
"//:node_modules/star-wars-quotes",
1818
],
1919
)
2020

2121
js_library(
2222
name = "pkg",
2323
srcs = ["package.json"],
24+
visibility = ["//visibility:public"],
2425
deps = [":tsc"],
2526
)
2627

pnpm-workspaces/apps/alpha/src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { platform, arch } from 'node:os';
12
import { one } from '@bazel-poc/one';
23
import { shared } from '@bazel-poc/shared';
34
import { getRandomQuote } from 'inspirational-quotes';
@@ -7,3 +8,5 @@ shared();
78
one();
89
console.log(getRandomQuote());
910
console.log(quotes());
11+
console.log('Platform: ' + platform());
12+
console.log('Architecture: ' + arch());

pnpm-workspaces/packages/one/BUILD.bazel

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ ts_project(
99
srcs = ["src/lib.ts"],
1010
declaration = True,
1111
tsconfig = "//:tsconfig",
12-
deps = [
13-
"//:node_modules/@types/node", # keep
14-
],
12+
deps = ["//:node_modules/@types/node"],
1513
)
1614

1715
js_library(
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { format } from 'node:util';
12
export function one() {
2-
console.log('I am One, not Two!');
3+
console.log(format('I am %s, not %s!', 'One', 'Two'));
34
}

pnpm-workspaces/packages/shared/BUILD.bazel

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ ts_project(
99
srcs = ["src/lib.ts"],
1010
declaration = True,
1111
tsconfig = "//:tsconfig",
12-
deps = [
13-
"//:node_modules/@types/node", # keep
14-
],
12+
deps = ["//:node_modules/@types/node"],
1513
)
1614

1715
js_library(
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { format } from 'node:util';
12
export function shared() {
2-
console.log('Sharing is indeed caring!');
3+
console.log(format('Sharing is indeed %s!', 'caring'));
34
}

0 commit comments

Comments
 (0)