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 11# Disable NG CLI TTY mode
22build --action_env=NG_FORCE_TTY=false
33
4+ # Required by `rules_ts`.
5+ common --@aspect_rules_ts//ts:skipLibCheck=always
6+ common --@aspect_rules_ts//ts:default_to_tsc_transpiler
7+
48# Make TypeScript compilation fast, by keeping a few copies of the compiler
59# running as daemons, and cache SourceFile AST's to reduce parse time.
610build --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+
13# Copyright Google Inc. All Rights Reserved.
24#
35# Use of this source code is governed by an MIT-style license that can be
@@ -24,6 +26,15 @@ npm_link_all_packages(
2426 name = "node_modules" ,
2527)
2628
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+
2738# Files required by e2e tests
2839copy_to_bin (
2940 name = "config-files" ,
Original file line number Diff line number Diff line change @@ -195,3 +195,20 @@ npm_translate_lock(
195195load ("@npm2//:repositories.bzl" , "npm_repositories" )
196196
197197npm_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