Skip to content

Commit

Permalink
latest rules_js
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Apr 26, 2022
1 parent 0e383f6 commit 7142a9c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 10 deletions.
11 changes: 11 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")

rules_ts_dependencies()

load("@aspect_bazel_lib//lib:repositories.bzl", "DEFAULT_YQ_VERSION", "register_yq_toolchains")

register_yq_toolchains(
version = DEFAULT_YQ_VERSION,
)

load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")

nodejs_register_toolchains(
Expand All @@ -37,6 +47,7 @@ load("@aspect_rules_js//js:npm_import.bzl", "translate_pnpm_lock")

translate_pnpm_lock(
name = "esbuild_plugins",
node_repository = "node16",
pnpm_lock = "//examples/plugins:pnpm-lock.json",
)

Expand Down
1 change: 0 additions & 1 deletion esbuild/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ bzl_library(
visibility = ["//visibility:public"],
deps = [
"//esbuild/private:esbuild",
"@aspect_rules_js//js:js_binary",
"@bazel_skylib//lib:types",
"@bazel_skylib//rules:write_file",
],
Expand Down
6 changes: 3 additions & 3 deletions esbuild/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def rules_esbuild_dependencies():
maybe(
http_archive,
name = "aspect_rules_js",
sha256 = "67fd0f62d701a451e17fb48be7208250c203f1e652085d9ee217ed7877fde91b",
strip_prefix = "rules_js-84c810238db555f5775993b1360d2380d098164c",
url = "https://github.com/aspect-build/rules_js/archive/84c810238db555f5775993b1360d2380d098164c.tar.gz",
sha256 = "e5de2d6aa3c6987875085c381847a216b1053b095ec51c11e97b781309406ad4",
strip_prefix = "rules_js-0.5.0",
url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v0.5.0.tar.gz",
)
maybe(
http_archive,
Expand Down
5 changes: 3 additions & 2 deletions esbuild/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ def _esbuild_repo_impl(repository_ctx):
)
build_content = """#Generated by esbuild/repositories.bzl
load("@aspect_rules_esbuild//esbuild:toolchain.bzl", "esbuild_toolchain")
load("@aspect_rules_js//js:js_binary.bzl", "js_binary")
load("@aspect_rules_js//js:defs.bzl", "js_binary")
load("@npm__esbuild_{version}//:node_package.bzl", "node_package")
node_package()
js_binary(
name = "launcher",
entry_point = "launcher.js",
data = ["//:npm__esbuild"],
data = ["//:np__esbuild"],
)
esbuild_toolchain(
Expand Down Expand Up @@ -99,6 +99,7 @@ If you need custom versions, please file an issue.""".format(esbuild_version, TO

npm_import(
name = "npm__esbuild_" + esbuild_version,
enable_lifecycle_hooks = False,
integrity = TOOL_VERSIONS[esbuild_version]["npm"],
package = "esbuild",
version = esbuild_version,
Expand Down
2 changes: 1 addition & 1 deletion examples/css/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_rules_js//ts:ts_project.bzl", "ts_project")
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")

# esbuild only knows how to resolve the css file relative to the location of the .js file it sees.
Expand Down
14 changes: 11 additions & 3 deletions internal_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ def rules_esbuild_internal_deps():
maybe(
http_archive,
name = "aspect_bazel_lib",
sha256 = "b5bdbfe570f5463607b7eff24f239c2f7ec9b2edc8db45a225e9575c4366b410",
strip_prefix = "bazel-lib-0.9.5",
url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v0.9.5.tar.gz",
sha256 = "2f6f04a002a9f988ae79107a91a8498892fb03bee978a8bf841eb1bd9fded2ea",
strip_prefix = "bazel-lib-0.9.8",
url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v0.9.8.tar.gz",
)

maybe(
http_archive,
name = "aspect_rules_ts",
sha256 = "07e6623b246d2c1d4c4024edb051fc92a824ac5e6029cb19ba639dc6bcd5973b",
strip_prefix = "rules_ts-0.1.0",
url = "https://github.com/aspect-build/rules_ts/archive/refs/tags/v0.1.0.tar.gz",
)

0 comments on commit 7142a9c

Please sign in to comment.