From dba72501bfcc5ad6dcf3bc1334b35de0405ce825 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 21 Feb 2019 13:57:46 -0800 Subject: [PATCH] Fix @bazel/typescript package for downstream usage --- packages/typescript/BUILD.bazel | 2 ++ packages/typescript/internal/build_defs.bzl | 2 +- packages/typescript/internal/ts_repositories.bzl | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/typescript/BUILD.bazel b/packages/typescript/BUILD.bazel index 90b53c6ede..90a39c0ddb 100644 --- a/packages/typescript/BUILD.bazel +++ b/packages/typescript/BUILD.bazel @@ -60,6 +60,8 @@ npm_package( # Do a simple replacement needed to make the local development differ # from how our release is used. "//devserver:devserver_bin": "//devserver", + # This file gets vendored into our repo + "@build_bazel_rules_typescript//internal:common": "//internal:common", }, vendor_external = ["build_bazel_rules_typescript"], deps = [ diff --git a/packages/typescript/internal/build_defs.bzl b/packages/typescript/internal/build_defs.bzl index 2ad35721e3..c8980fad35 100644 --- a/packages/typescript/internal/build_defs.bzl +++ b/packages/typescript/internal/build_defs.bzl @@ -20,7 +20,7 @@ load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeMod # pylint: disable=missing-docstring load("@build_bazel_rules_typescript//internal:common/compilation.bzl", "COMMON_ATTRIBUTES", "DEPS_ASPECTS", "compile_ts", "ts_providers_dict_to_struct") load("@build_bazel_rules_typescript//internal:common/tsconfig.bzl", "create_tsconfig") -load("@build_bazel_rules_typescript//internal:ts_config.bzl", "TsConfigInfo") +load("//internal:ts_config.bzl", "TsConfigInfo") _DEFAULT_COMPILER = "@npm//@bazel/typescript/bin:tsc_wrapped" diff --git a/packages/typescript/internal/ts_repositories.bzl b/packages/typescript/internal/ts_repositories.bzl index 16c3e40cd3..189b9afea8 100644 --- a/packages/typescript/internal/ts_repositories.bzl +++ b/packages/typescript/internal/ts_repositories.bzl @@ -14,12 +14,12 @@ "Install toolchain dependencies" -# BEGIN-DEV-ONLY +# BEGIN-INTERNAL # Parts of this BUILD file only necessary when building within the bazelbuild/rules_typescript repo. # The generated `@bazel/typescript` npm package contains a trimmed BUILD file using # DEV-ONLY fences. load("@bazel_gazelle//:deps.bzl", "go_repository") -# END-DEV-ONLY +# END-INTERNAL load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "check_rules_nodejs_version", "yarn_install") def ts_setup_workspace(): @@ -56,7 +56,7 @@ def ts_setup_workspace(): yarn_lock = "@npm_bazel_typescript//internal/protobufjs:yarn.lock", ) -# BEGIN-DEV-ONLY +# BEGIN-INTERNAL def ts_setup_dev_workspace(): """ Setup the toolchain needed for local development, but not needed by users. @@ -79,4 +79,4 @@ def ts_setup_dev_workspace(): importpath = "github.com/mattn/go-isatty", ) -# END-DEV-ONLY +# END-INTERNAL