Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typescript module mappings #1738

Merged
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
5 changes: 4 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ install_bazel_dependencies()
git_repository(
name = "build_bazel_rules_typescript",
commit = "10a5a86885f95ab788fd841ade47b6a16e0c13d6",
patches = ["//:rules_typescript_pr_496.patch"],
patches = [
"//:rules_typescript_pr_494.patch",
"//:rules_typescript_pr_496.patch",
],
remote = "http://github.com/bazelbuild/rules_typescript.git",
shallow_since = "1582757372 -0800",
)
Expand Down
13 changes: 13 additions & 0 deletions rules_typescript_pr_494.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git internal/common/module_mappings.bzl internal/common/module_mappings.bzl
index b74e5b8..286c3b3 100644
--- internal/common/module_mappings.bzl
+++ internal/common/module_mappings.bzl
@@ -76,7 +76,7 @@ def get_module_mappings(label, attrs, srcs = [], workspace_name = None, mappings
workspace_name or label.workspace_root,
label.package,
] if p])
- if attrs.module_root and attrs.module_root != ".":
+ if hasattr(attrs, "module_root") and attrs.module_root and attrs.module_root != ".":
mr = "%s/%s" % (mr, attrs.module_root)
if attrs.module_root.endswith(".ts"):
if workspace_name: