From d73536ad6e0fab033bfcc0935f06cdfe51b9b3c5 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Fri, 3 Jun 2022 09:54:47 -0700 Subject: [PATCH] chore: update to rules_js 0.10.0 (#40) --- swc/BUILD.bazel | 14 +++++++------- swc/cli_repositories.bzl | 4 ++-- swc/dependencies.bzl | 12 ++++++------ swc/repositories.bzl | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/swc/BUILD.bazel b/swc/BUILD.bazel index 9490415..174d4ba 100644 --- a/swc/BUILD.bazel +++ b/swc/BUILD.bazel @@ -1,7 +1,7 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") -load("@aspect_rules_js//js:defs.bzl", "link_js_package") +load("@aspect_rules_js//npm:defs.bzl", "link_npm_package") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("@swc_cli//:defs.bzl", "link_js_packages") +load("@swc_cli//:defs.bzl", "link_all_npm_packages") load("@swc_cli//swc/@swc/cli:package_json.bzl", swc_cli_bin = "bin") write_source_files( @@ -11,14 +11,14 @@ write_source_files( }, ) -link_js_package( - name = "link_core", +link_all_npm_packages(name = "node_modules") + +link_npm_package( + name = "node_modules/@swc/core", src = "@npm__at_swc_core__1.2.185//:jsp", root_package = "swc", ) -link_js_packages() - # For stardoc to reference the files exports_files(["defs.bzl"]) @@ -45,7 +45,7 @@ bzl_library( swc_cli_bin.swc_binary( name = "cli", data = [ - ":link_core", + ":node_modules/@swc/core", ], visibility = ["//visibility:public"], ) diff --git a/swc/cli_repositories.bzl b/swc/cli_repositories.bzl index f95ad81..fc9ee73 100644 --- a/swc/cli_repositories.bzl +++ b/swc/cli_repositories.bzl @@ -1,6 +1,6 @@ -"@generated by @aspect_rules_js//js/private:translate_pnpm_lock.bzl from pnpm lock file @aspect_rules_swc@aspect_rules_swc//swc:pnpm-lock.yaml" +"@generated by @aspect_rules_js//npm/private:translate_pnpm_lock.bzl from pnpm lock file @aspect_rules_swc@aspect_rules_swc//swc:pnpm-lock.yaml" -load("@aspect_rules_js//js:npm_import.bzl", "npm_import") +load("@aspect_rules_js//npm:npm_import.bzl", "npm_import") def npm_repositories(): "Generated npm_import repository rules corresponding to npm packages in @aspect_rules_swc@aspect_rules_swc//swc:pnpm-lock.yaml" diff --git a/swc/dependencies.bzl b/swc/dependencies.bzl index de92492..029bba7 100644 --- a/swc/dependencies.bzl +++ b/swc/dependencies.bzl @@ -33,15 +33,15 @@ def rules_swc_dependencies(): maybe( http_archive, name = "aspect_bazel_lib", - sha256 = "a8b47eeaf3c1bd41c4f4b633ef4c959daf83fdee343379495098b50571d4b3b8", - strip_prefix = "bazel-lib-0.11.1", - url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v0.11.1.tar.gz", + sha256 = "91aa7356b22ecdb87dcf5f1cc8a6a147e23a1ef425221bab75e5f857cd6b2716", + strip_prefix = "bazel-lib-0.12.1", + url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v0.12.1.tar.gz", ) maybe( http_archive, name = "aspect_rules_js", - sha256 = "f01010e1f6bd49a8da6f7350c60992b7eb2eb62058cfe7aa6abd9e416bc2158b", - strip_prefix = "rules_js-0.9.1", - url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v0.9.1.tar.gz", + sha256 = "2db66bedabc30f2dfa87bd4845e42b0dbc80fa9344d2dfbaa2685cdced2f1e03", + strip_prefix = "rules_js-0.10.0", + url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v0.10.0.tar.gz", ) diff --git a/swc/repositories.bzl b/swc/repositories.bzl index b7c42ee..5b6c9a3 100644 --- a/swc/repositories.bzl +++ b/swc/repositories.bzl @@ -4,7 +4,7 @@ These are needed for local dev, and users must install them as well. See https://docs.bazel.build/versions/main/skylark/deploying.html#dependencies """ -load("@aspect_rules_js//js:npm_import.bzl", "npm_import", "translate_pnpm_lock") +load("@aspect_rules_js//npm:npm_import.bzl", "npm_import", "translate_pnpm_lock") load("//swc/private:toolchains_repo.bzl", "PLATFORMS", "toolchains_repo") load("//swc/private:versions.bzl", "TOOL_VERSIONS") load("//swc:cli_repositories.bzl", _cli_repositories = "npm_repositories")