Skip to content

Commit a5b408b

Browse files
committed
build: setup ts_project interop structures (#2940)
Set up the interop structures for ts_project PR Close #2940
1 parent 51b5bd1 commit a5b408b

21 files changed

+13892
-4054
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# @generated
2+
# Input hashes for repository rule npm_translate_lock(name = "devinfra_npm", pnpm_lock = "@//:pnpm-lock.yaml").
3+
# This file should be checked into version control along with the pnpm-lock.yaml file.
4+
.npmrc=-1406867100
5+
bazel/package.json=1905073619
6+
bazel/spec-bundling/test/package.json=-1269314228
7+
package.json=-2034275404
8+
pnpm-lock.yaml=1798193673
9+
pnpm-workspace.yaml=1403084380
10+
yarn.lock=1126032185

.npmrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
engine-strict = true
1+
# Yarn Berry doesn't check engines at all, so pnpm shouldn't either.
2+
engine-strict = false
3+
4+
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
5+
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
6+
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
7+
hoist=false
8+
9+
# Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used
10+
# for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue
11+
# to rely on peer dependency placeholders substituted via Bazel.
12+
auto-install-peers=false

BUILD.bazel

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
2-
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
2+
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary", "pkg_npm")
3+
load("@devinfra_npm//:defs.bzl", "npm_link_all_packages")
34
load("@npm//@bazel/typescript:index.bzl", "ts_config")
4-
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
55

66
# BEGIN-INTERNAL
77
load("//:package.bzl", "NPM_PACKAGE_SUBSTITUTIONS")
88

9+
npm_link_all_packages()
10+
911
rules_js_tsconfig(
1012
name = "rjs-tsconfig",
1113
src = "tsconfig.json",
12-
visibility = ["//bazel:__subpackages__"],
14+
visibility = ["//visibility:public"],
1315
)
1416

1517
exports_files([

WORKSPACE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,24 @@ http_archive(
188188
load("@aspect_rules_jasmine//jasmine:dependencies.bzl", "rules_jasmine_dependencies")
189189

190190
rules_jasmine_dependencies()
191+
192+
git_repository(
193+
name = "rules_angular",
194+
commit = "c8af5c0d27c66387e9e7df3c4dd3155ce7582609",
195+
remote = "https://github.com/devversion/rules_angular.git",
196+
)
197+
198+
load("@rules_angular//setup:step_1.bzl", "rules_angular_step1")
199+
200+
rules_angular_step1()
201+
202+
load("@rules_angular//setup:step_2.bzl", "rules_angular_step2")
203+
204+
rules_angular_step2()
205+
206+
load("@rules_angular//setup:step_3.bzl", "rules_angular_step3")
207+
208+
rules_angular_step3(
209+
angular_compiler_cli = "@devinfra//:node_modules/@angular/compiler-cli",
210+
typescript = "@devinfra//:node_modules/typescript",
211+
)

0 commit comments

Comments
 (0)