1
1
diff --git node_modules/@bazel/typescript/internal/build_defs.bzl node_modules/@bazel/typescript/internal/build_defs.bzl
2
- index 7fef44c..4e25ed7 100644
2
+ index 03cb68fdf..2f604234c 100755
3
3
--- node_modules/@bazel/typescript/internal/build_defs.bzl
4
4
+++ node_modules/@bazel/typescript/internal/build_defs.bzl
5
- @@ -93,25 +93,23 @@ def _filter_ts_inputs(all_inputs):
6
- if f.path.endswith(". js") or f.path.endswith(". ts") or f.path.endswith(". json")
5
+ @@ -102,17 +102,17 @@ def _filter_ts_inputs(all_inputs):
6
+ if f.extension in [" js", "jsx", " ts", "tsx", " json"]
7
7
]
8
-
8
+
9
9
+ def _filter_compile_outputs(all_outputs):
10
10
+ return [
11
11
+ f
@@ -24,41 +24,51 @@ index 7fef44c..4e25ed7 100644
24
24
- ctx.actions.write(output, content = "")
25
25
- else:
26
26
- action_outputs.append(output)
27
- -
28
- - # TODO(plf): For now we mock creation of files other than {name}.js.
29
- - for externs_file in externs_files:
30
- - ctx.actions.write(output = externs_file, content = "")
31
27
+ compile_outputs = _filter_compile_outputs(outputs)
32
-
28
+
29
+ # TODO(plf): For now we mock creation of files other than {name}.js.
30
+ for externs_file in externs_files:
31
+ @@ -120,7 +120,9 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
32
+
33
33
# A ts_library that has only .d.ts inputs will have no outputs,
34
34
# therefore there are no actions to execute
35
35
- if not action_outputs:
36
36
+ if not compile_outputs:
37
37
+ for file in [f for f in outputs if not f in compile_outputs]:
38
- + ctx.actions.write(output = file, content = "")
38
+ + ctx.actions.write(output = file, content = "")
39
39
return None
40
-
40
+
41
41
action_inputs.extend(_filter_ts_inputs(ctx.files.node_modules))
42
- @@ -146,7 +142,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
43
- progress_message = "Compiling TypeScript (%s) %s" % (description, ctx.label),
44
- mnemonic = mnemonic,
45
- inputs = action_inputs,
46
- - outputs = action_outputs,
47
- + outputs = outputs,
48
- # Use the built-in shell environment
49
- # Allow for users who set a custom shell that can locate standard binaries like tr and uname
50
- # See https://github.com/NixOS/nixpkgs/issues/43955#issuecomment-407546331
51
- @@ -163,7 +159,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
42
+ @@ -156,7 +158,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
43
+ progress_message = "Compiling TypeScript (%s) %s" % (description, ctx.label),
44
+ mnemonic = "TypeScriptCompile",
45
+ inputs = action_inputs,
46
+ - outputs = action_outputs,
47
+ + outputs = outputs,
48
+ # Use the built-in shell environment
49
+ # Allow for users who set a custom shell that can locate standard binaries like tr and uname
50
+ # See https://github.com/NixOS/nixpkgs/issues/43955#issuecomment-407546331
51
+ @@ -179,7 +181,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
52
+ progress_message = "Compiling TypeScript (%s) %s" % (description, ctx.label),
53
+ mnemonic = "tsc",
54
+ inputs = action_inputs,
55
+ - outputs = action_outputs,
56
+ + outputs = compile_outputs,
57
+ # Use the built-in shell environment
58
+ # Allow for users who set a custom shell that can locate standard binaries like tr and uname
59
+ # See https://github.com/NixOS/nixpkgs/issues/43955#issuecomment-407546331
60
+ @@ -194,7 +196,7 @@ def _compile_action(ctx, inputs, outputs, tsconfig_file, node_opts, description
52
61
label = ctx.label,
53
62
tsconfig = tsconfig_file,
54
63
inputs = action_inputs,
55
64
- outputs = action_outputs,
56
65
+ outputs = compile_outputs,
57
66
compiler = ctx.executable.compiler,
58
67
)
68
+
59
69
60
70
diff --git node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js
61
- index 0346123..3d9bc64 100644
71
+ index ec813f654..738342a8f 100755
62
72
--- node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js
63
73
+++ node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js
64
74
@@ -381,6 +381,23 @@ function createProgramAndEmit(fileLoader, options, bazelOpts, files, disabledTse
@@ -84,4 +94,4 @@ index 0346123..3d9bc64 100644
84
94
+ }
85
95
}
86
96
if (diagnostics.length > 0) {
87
- worker_1.debug('compilation failed at', new Error().stack);
97
+ worker_1.debug('compilation failed at', new Error().stack);
0 commit comments