Generate npm_packages in internal/e2e/npm_packages/test.sh for smoother local testing Closes #416 PiperOrigin-RevId: 233672246
diff --git a/README.md b/README.md index d696a90..736956d 100644 --- a/README.md +++ b/README.md
@@ -25,8 +25,8 @@ { ... "devDependencies": { - "@bazel/typescript": "0.24.1", - "@bazel/karma": "0.24.1", + "@bazel/typescript": "0.25.0", + "@bazel/karma": "0.25.0", ... }, ...
diff --git a/WORKSPACE b/WORKSPACE index f7cfc7d..e58de6a 100644 --- a/WORKSPACE +++ b/WORKSPACE
@@ -77,7 +77,7 @@ # Test that check_rules_typescript_version works as expected load("//:defs.bzl", "check_rules_typescript_version") -check_rules_typescript_version(version_string = "0.24.1") +check_rules_typescript_version(version_string = "0.25.0") # Dependencies for generating documentation load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
diff --git a/internal/e2e/npm_packages/test.sh b/internal/e2e/npm_packages/test.sh index 12be17e..306b2f7 100755 --- a/internal/e2e/npm_packages/test.sh +++ b/internal/e2e/npm_packages/test.sh
@@ -2,8 +2,9 @@ set -u -e -o pipefail -cd $(dirname "$0") -TESTS_ROOT_DIR=$(pwd) +TESTS_ROOT_DIR=$(cd $(dirname "$0"); pwd) +TYPESCRIPT_ROOT_DIR=$(cd $TESTS_ROOT_DIR/../../..; pwd) +KARMA_ROOT_DIR=$(cd $TESTS_ROOT_DIR/../../../internal/karma; pwd) echo "" echo "#################################################################################" @@ -15,16 +16,19 @@ echo "Run this script with '--update-lock-files' to update yarn.lock files instead of running tests" echo "" -# Determine the absolute paths to the generated @bazel/typescript and @bazel/karma npm packages -cd $TESTS_ROOT_DIR/../../.. +# Generate the npm packages @bazel/typescript and @bazel/karma npm packages and +# determine their absolute paths in bazel-bin +cd $TYPESCRIPT_ROOT_DIR BAZEL=$(pwd)/node_modules/.bin/bazel if [[ ! -f $BAZEL ]] ; then echo "Bazel not found under $BAZEL" exit 1 fi +$BAZEL build //:npm_package BAZEL_BIN_TYPESCRIPT=$($BAZEL info bazel-bin) BAZEL_TYPESCRIPT_NPM_PACKAGE=$BAZEL_BIN_TYPESCRIPT/npm_package -cd $TESTS_ROOT_DIR/../../../internal/karma +cd $KARMA_ROOT_DIR +$BAZEL build //:npm_package BAZEL_BIN_KARMA=$($BAZEL info bazel-bin) BAZEL_KARMA_NPM_PACKAGE=$BAZEL_BIN_KARMA/npm_package echo "@bazel/typescript: $BAZEL_TYPESCRIPT_NPM_PACKAGE"
diff --git a/package.json b/package.json index ba5d33d..b416f5f 100644 --- a/package.json +++ b/package.json
@@ -3,7 +3,7 @@ "description": "TypeScript rules for Bazel", "homepage": "https://github.com/bazelbuild/rules_typescript", "license": "Apache-2.0", - "version": "0.24.1", + "version": "0.25.0", "keywords": [ "typescript", "bazel" @@ -58,7 +58,7 @@ } }, "scripts": { - "pree2e": "webdriver-manager update $CHROMEDRIVER_VERSION_ARG && bazel build //examples/app:e2e //examples/protocol_buffers:e2e //:npm_package && cd internal/karma; bazel build //:npm_package", + "pree2e": "webdriver-manager update $CHROMEDRIVER_VERSION_ARG && bazel build //examples/app:e2e //examples/protocol_buffers:e2e", "e2e": "yarn e2e-bazel-external && yarn e2e-examples-app-devserver && yarn e2e-examples-app-prodserver && yarn e2e-examples-protobuf-devserver && yarn e2e-examples-protobuf-prodserver && yarn e2e-npm_packages && yarn e2e-typescript_3.1", "e2e-bazel-external": "jasmine internal/e2e/default_tsconfig_test.js", "e2e-examples-app-devserver": "concurrently \"bazel run //examples/app:devserver\" \"while ! nc -z 127.0.0.1 8080; do sleep 1; done && protractor --suite app\" --kill-others --success first",
diff --git a/version.bzl b/version.bzl index 42b13de..570c649 100644 --- a/version.bzl +++ b/version.bzl
@@ -17,12 +17,12 @@ load("@build_bazel_rules_nodejs//internal/common:check_version.bzl", "check_version") -VERSION = "0.24.1" +VERSION = "0.25.0" # This version is the minimum version that is API compatible with this version # of rules_typescript. This version should be updated to equal VERSION for # releases with breaking changes and/or new features. -COMPAT_VERSION = "0.24.0" +COMPAT_VERSION = "0.25.0" def check_rules_typescript_version(version_string): """