File tree Expand file tree Collapse file tree 4 files changed +62
-0
lines changed Expand file tree Collapse file tree 4 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Disable NG CLI TTY mode
2
2
build --action_env=NG_FORCE_TTY=false
3
3
4
+ # Required by `rules_ts`.
5
+ common --@aspect_rules_ts//ts:skipLibCheck=always
6
+ common --@aspect_rules_ts//ts:default_to_tsc_transpiler
7
+
4
8
# Make TypeScript compilation fast, by keeping a few copies of the compiler
5
9
# running as daemons, and cache SourceFile AST's to reduce parse time.
6
10
build --strategy=TypeScriptCompile=worker
Original file line number Diff line number Diff line change
1
+ load ("@aspect_rules_ts//ts:defs.bzl" , rules_js_tsconfig = "ts_config" )
2
+
1
3
# Copyright Google Inc. All Rights Reserved.
2
4
#
3
5
# Use of this source code is governed by an MIT-style license that can be
@@ -24,6 +26,15 @@ npm_link_all_packages(
24
26
name = "node_modules" ,
25
27
)
26
28
29
+ rules_js_tsconfig (
30
+ name = "build-tsconfig" ,
31
+ src = "tsconfig-build.json" ,
32
+ deps = [
33
+ "tsconfig.json" ,
34
+ "//:node_modules/@types/node" ,
35
+ ],
36
+ )
37
+
27
38
# Files required by e2e tests
28
39
copy_to_bin (
29
40
name = "config-files" ,
Original file line number Diff line number Diff line change @@ -195,3 +195,20 @@ npm_translate_lock(
195
195
load ("@npm2//:repositories.bzl" , "npm_repositories" )
196
196
197
197
npm_repositories ()
198
+
199
+ http_archive (
200
+ name = "aspect_rules_ts" ,
201
+ patch_args = ["-p1" ],
202
+ patches = ["//tools:rules_ts_windows.patch" ],
203
+ sha256 = "9acd128abe77397505148eaa6895faed57839560dbf2177dd6285e51235e2724" ,
204
+ strip_prefix = "rules_ts-3.3.1" ,
205
+ url = "https://github.com/aspect-build/rules_ts/releases/download/v3.3.1/rules_ts-v3.3.1.tar.gz" ,
206
+ )
207
+
208
+ load ("@aspect_rules_ts//ts:repositories.bzl" , "rules_ts_dependencies" )
209
+
210
+ rules_ts_dependencies (
211
+ # ts_version_from = "//:package.json",
212
+ # TODO: Support in https://github.com/aspect-build/rules_ts/blob/main/ts/private/npm_repositories.bzl
213
+ ts_version = "5.6.2" ,
214
+ )
Original file line number Diff line number Diff line change
1
+ diff --git a/ts/private/ts_project.bzl b/ts/private/ts_project.bzl
2
+ index 367bba0..a112f8f 100644
3
+ --- a/ts/private/ts_project.bzl
4
+ +++ b/ts/private/ts_project.bzl
5
+ @@ -93,25 +93,6 @@ def _ts_project_impl(ctx):
6
+ elif ctx.attr.supports_workers == 0:
7
+ supports_workers = False
8
+
9
+ - host_is_windows = platform_utils.host_platform_is_windows()
10
+ - if host_is_windows and supports_workers:
11
+ - supports_workers = False
12
+ -
13
+ - # buildifier: disable=print
14
+ - print("""\
15
+ - WARNING: disabling ts_project workers which are not currently supported on Windows hosts.
16
+ - See https://github.com/aspect-build/rules_ts/issues/228 for more details.
17
+ - """)
18
+ -
19
+ - if ctx.attr.is_typescript_5_or_greater and supports_workers:
20
+ - supports_workers = False
21
+ -
22
+ - # buildifier: disable=print
23
+ - print("""\
24
+ - WARNING: disabling ts_project workers which are not currently supported with TS >= 5.0.0.
25
+ - See https://github.com/aspect-build/rules_ts/issues/361 for more details.
26
+ - """)
27
+ -
28
+ if supports_workers:
29
+ execution_requirements["supports-workers"] = "1"
30
+ execution_requirements["worker-key-mnemonic"] = "TsProject"
You can’t perform that action at this time.
0 commit comments