diff --git a/test/src/jest-config.ts b/test/src/jest-config.ts index d99100a..9af9403 100644 --- a/test/src/jest-config.ts +++ b/test/src/jest-config.ts @@ -1,5 +1,6 @@ export function jestConfig() { return { + moduleFileExtensions: ["js", "json"], modulePathIgnorePatterns: [`${process.env.JEST_ROOT}/bazel/`], testPathIgnorePatterns: [`${process.env.JEST_ROOT}/bazel/`], testTimeout: 60 * 1000, diff --git a/ts-proto/rules.bzl b/ts-proto/rules.bzl index 97ee9a2..be44b35 100644 --- a/ts-proto/rules.bzl +++ b/ts-proto/rules.bzl @@ -189,6 +189,10 @@ def _ts_proto_libraries_impl(ctx): js.append(map) js_outputs.append(map) + # Include .ts file with source map. Used by VSCode debugger as + # well as Istanbul's code coverage reports (interactive HTML). + js.append(ts_) + path = file.path[len(lib.path + "/"):] if declaration_prefix: path = "%s/%s" % (declaration_prefix, path) diff --git a/typescript/rules.bzl b/typescript/rules.bzl index 9952f31..41d8c1a 100644 --- a/typescript/rules.bzl +++ b/typescript/rules.bzl @@ -245,6 +245,12 @@ def _ts_library_impl(ctx): map = actions.declare_file(map_path(js_path(js_path_, jsx))) js.append(map) js_outputs.append(map) + + # Include .ts file with source map. Used by VSCode debugger + # as well as Istanbul's code coverage reports (interactive + # HTML). + js.append(ts_) + declaration = actions.declare_file(declaration_path(declaration_path_)) declarations.append(declaration) outputs.append(declaration)