Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/src/jest-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export function jestConfig() {
return {
moduleFileExtensions: ["js", "json"],
Copy link
Contributor Author

@nevadaperry nevadaperry Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same setting used in the rivet repo. Now required so jest doesn't try to run .ts files directly. (See below for more context).

modulePathIgnorePatterns: [`${process.env.JEST_ROOT}/bazel/`],
testPathIgnorePatterns: [`${process.env.JEST_ROOT}/bazel/`],
testTimeout: 60 * 1000,
Expand Down
4 changes: 4 additions & 0 deletions ts-proto/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions typescript/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down