Skip to content

Commit

Permalink
chore: update gazelle generation in pnpm-workspaces examples (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan authored Oct 17, 2024
1 parent 262eca6 commit 863f752
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BAZELISK_BASE_URL=https://static.aspect.build/aspect
USE_BAZEL_VERSION=aspect/2024.41.17
USE_BAZEL_VERSION=aspect/2024.42.3

# Aspect CLI (aspect) is wrapper for Bazel, built on top of Bazelisk, that adds
# additional features and extensibility to the popular polyglot build system from Google.
Expand Down
1 change: 1 addition & 0 deletions pnpm-workspaces/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ tsconfig_to_swcconfig.t2s(
js_library(
name = "pkg",
srcs = ["package.json"],
visibility = ["//visibility:public"],
)
5 changes: 3 additions & 2 deletions pnpm-workspaces/apps/alpha/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ ts_project(
declaration = True,
tsconfig = "//:tsconfig",
deps = [
":node_modules/inspirational-quotes", # this uses the version defined in the local package.json
":node_modules/inspirational-quotes",
"//:node_modules/@bazel-poc/one",
"//:node_modules/@bazel-poc/shared",
"//:node_modules/@types/node", # keep
"//:node_modules/@types/node",
"//:node_modules/star-wars-quotes",
],
)

js_library(
name = "pkg",
srcs = ["package.json"],
visibility = ["//visibility:public"],
deps = [":tsc"],
)

Expand Down
3 changes: 3 additions & 0 deletions pnpm-workspaces/apps/alpha/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { platform, arch } from 'node:os';
import { one } from '@bazel-poc/one';
import { shared } from '@bazel-poc/shared';
import { getRandomQuote } from 'inspirational-quotes';
Expand All @@ -7,3 +8,5 @@ shared();
one();
console.log(getRandomQuote());
console.log(quotes());
console.log('Platform: ' + platform());
console.log('Architecture: ' + arch());
4 changes: 1 addition & 3 deletions pnpm-workspaces/packages/one/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ ts_project(
srcs = ["src/lib.ts"],
declaration = True,
tsconfig = "//:tsconfig",
deps = [
"//:node_modules/@types/node", # keep
],
deps = ["//:node_modules/@types/node"],
)

js_library(
Expand Down
3 changes: 2 additions & 1 deletion pnpm-workspaces/packages/one/src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { format } from 'node:util';
export function one() {
console.log('I am One, not Two!');
console.log(format('I am %s, not %s!', 'One', 'Two'));
}
4 changes: 1 addition & 3 deletions pnpm-workspaces/packages/shared/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ ts_project(
srcs = ["src/lib.ts"],
declaration = True,
tsconfig = "//:tsconfig",
deps = [
"//:node_modules/@types/node", # keep
],
deps = ["//:node_modules/@types/node"],
)

js_library(
Expand Down
3 changes: 2 additions & 1 deletion pnpm-workspaces/packages/shared/src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { format } from 'node:util';
export function shared() {
console.log('Sharing is indeed caring!');
console.log(format('Sharing is indeed %s!', 'caring'));
}

0 comments on commit 863f752

Please sign in to comment.