Releases: aspect-build/rules_swc
Releases · aspect-build/rules_swc
v0.5.2
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "8d991cc5f9373eccb172a3be388215519a460008b49d5034259ee9d10de3e632",
strip_prefix = "rules_swc-0.5.2",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.5.2.tar.gz",
)
###################
# rules_swc setup #
###################
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = LATEST_VERSION,
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = DEFAULT_NODE_VERSION,
)
# yq is needed for converting pnpm-lock.yaml into json
# so that it can be parsed in starlark.
load("@aspect_bazel_lib//lib:repositories.bzl", "DEFAULT_YQ_VERSION", "register_yq_toolchains")
register_yq_toolchains(
version = DEFAULT_YQ_VERSION,
)
What's Changed
- ci: add e2e asserting that setup works for users by @alexeagle in #30
Full Changelog: v0.5.1...v0.5.2
v0.5.1
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "422126a732de2a858eb29ee24df6da29964bdd93c8b141e2f83a5119adf36686",
strip_prefix = "rules_swc-0.5.1",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.5.1.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.168",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "DEFAULT_YQ_VERSION", "register_yq_toolchains")
register_yq_toolchains(
version = DEFAULT_YQ_VERSION,
)
What's Changed
- fix: @swc_cli repository is referenced at runtime, so users have to c… by @alexeagle in #29
Full Changelog: v0.5.0...v0.5.1
v0.5.0
BREAKING CHANGES:
- The
.swcrc
file is now read from the bazel-out tree. If yours is not in the same Bazel package with the callsite toswc
orswc_transpile
then you'll need acopy_file
rule to make a copy in the right spot.
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "0f944b06d2cadde68b2b0487bbb06a2716e81e3c00ececf0f850c3c912ea9eaf",
strip_prefix = "rules_swc-0.5.0",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.5.0.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.168",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
What's Changed
- fix(core): use new args action for each iteration by @mattem in #22
- Assert that vendored repositories.bzl is up-to-date by @alexeagle in #24
- Point swc_transpiler to the ts_project use case by @alexeagle in #23
- Rename main.js to main.cjs by @Nick-Mazuk in #26
- Propagate runfiles by @alexeagle in #27
- Adopt new pnpm-based rules_js by @alexeagle in #28
New Contributors
- @Nick-Mazuk made their first contribution in #26
Full Changelog: v0.4.0...v0.5.0
v0.4.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "206a89aae3a04831123b43962a3864e8ab1652b703c4af58d84b04174360137d",
strip_prefix = "rules_swc-0.4.0",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.4.0.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.141",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
What's Changed
- rename swc_rule to swc_transpiler by @alexeagle in #16
- build: fix ci build caching by @kormide in #17
- Update github archive URLs to have stable SHAs by @alexeagle in #18
- feat: support srcs with DefaultInfo producing .ts by @alexeagle in #19
New Contributors
Full Changelog: v0.3.1...v0.4.0
v0.3.1
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "b58c8f3681215af30842bc3eeec30c9d2047cdf63302bba7d2e86c55a5c77edf",
strip_prefix = "rules_swc-0.3.1",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.3.1.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.118",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
What's Changed
- fix: don't relativize paths to the swcrc location by @alexeagle in #12
- expose the raw swc rule as public API by @alexeagle in #13
- fix: allow user to choose non-.js extensions for outputs by @alexeagle in #14
- fix: output directory should be declared as directory by @alexeagle in #15
Full Changelog: v0.3.0...v0.3.1
v0.3.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "69465080d769fcaf5088bb74c67739a08ead89c8cde7911053843c4c44f895be",
strip_prefix = "rules_swc-0.3.0",
url = "https://github.com/aspect-build/rules_swc/archive/v0.3.0.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.118",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
What's Changed
- Support bzlmod by @alexeagle in #10
Full Changelog: v0.2.1...v0.3.0
v0.2.1
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "a1662c953c06e4440d253428f3a7e7ed3c4ca6bc108661ec851323c7fcde2212",
strip_prefix = "rules_swc-0.2.1",
url = "https://github.com/aspect-build/rules_swc/archive/v0.2.1.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.118",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
# Fetches the npm packages needed to run @swc/cli
load("@swc_cli//:repositories.bzl", _swc_cli_deps = "npm_repositories")
_swc_cli_deps()
What's Changed
- fix: don't try to declare swc toolchain for target platform by @alexeagle in #9
Full Changelog: v0.2.0...v0.2.1
v0.2.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "2437cd6ca29748816dd50fac05e0f8fdeb44ede77df282fd4e65383da81a0ce0",
strip_prefix = "rules_swc-0.2.0",
url = "https://github.com/aspect-build/rules_swc/archive/v0.2.0.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.118",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
# Fetches the npm packages needed to run @swc/cli
load("@swc_cli//:repositories.bzl", _swc_cli_deps = "npm_repositories")
_swc_cli_deps()
What's Changed
- feat: custom rule rather than a genrule by @alexeagle in #1
- Change to match upstream swc change by @alexeagle in #2
- fix(swc): suppress swc output by default by @mattem in #4
- simplify publish and release by @alexeagle in #5
- chore: mirror latest swc release by @alexeagle in #6
- fix: flag to pass swcrc is --config-file by @gregmagolan in #3
- Support --output-dir flag by @alexeagle in #7
New Contributors
- @alexeagle made their first contribution in #1
- @mattem made their first contribution in #4
- @gregmagolan made their first contribution in #3
Full Changelog: https://github.com/aspect-build/rules_swc/commits/v0.2.0
v0.1.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "67d6020374627f60c6c1e5d5e1690fcdc4fa39952de8a727d3aabe265ca843be",
strip_prefix = "rules_swc-0.1.0",
url = "https://github.com/aspect-build/rules_swc/archive/v0.1.0.tar.gz",
)
# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = "v1.2.118",
)
# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "node16",
node_version = "16.9.0",
)
# Fetches the npm packages needed to run @swc/cli
load("@swc_cli//:repositories.bzl", _swc_cli_deps = "npm_repositories")
_swc_cli_deps()
What's Changed
- feat: custom rule rather than a genrule by @alexeagle in #1
- Change to match upstream swc change by @alexeagle in #2
- fix(swc): suppress swc output by default by @mattem in #4
New Contributors
Full Changelog: https://github.com/aspect-build/rules_swc/commits/v0.1.0