Releases: aspect-build/rules_swc
v2.3.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "2.3.0")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "d9ed410eb6a5c605345d872f0c4c50138bda3c572db2aed1796cf397fa361986",
strip_prefix = "rules_swc-2.3.0",
url = "https://github.com/aspect-build/rules_swc/releases/download/v2.3.0/rules_swc-v2.3.0.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 SWC cli 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_SWC_VERSION", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = LATEST_SWC_VERSION,
)
# To use rules_swc with bazel-lib 2.x, you must additionally register the coreutils toolchain.
load("@aspect_bazel_lib//lib:repositories.bzl", "register_coreutils_toolchains")
register_coreutils_toolchains()
What's Changed
- feat: support json sources by @jbedard in #287
- chore: update bcr maintainer info by @kormide in #290
Full Changelog: v2.2.0...v2.3.0
v2.0.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "2.0.0")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "d63d7b283249fa942f78d2716ecff3edbdc10104ee1b9a6b9464ece471ef95ea",
strip_prefix = "rules_swc-2.0.0",
url = "https://github.com/aspect-build/rules_swc/releases/download/v2.0.0/rules_swc-v2.0.0.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 SWC cli 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_SWC_VERSION", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = LATEST_SWC_VERSION,
)
What's Changed
- feat: upgrade to rules_js 2.0 by @gregmagolan in #253
- chore: bump to GHA actions/cache@v4 by @gregmagolan in #261
- chore: bump miminum dep to aspect_bazel_lib 2.7.6 by @gregmagolan in #262
- chore: bump to rules_js 2.0.0-rc1 and minimum aspect_bazel_lib 2.7.7 by @gregmagolan in #263
- chore: add --check_direct_dependencies to .bazelrc by @gregmagolan in #264
- chore: bump minimum rules_nodejs to 6.2.0 by @gregmagolan in #265
- fix: use latest rules_js gather_transitive_sources signature by @jbedard in #266
- Changes by create-pull-request action by @github-actions in #251
- chore: remove unneeded registration by @alexeagle in #268
- chore: bump rules_js dependency to 2.0 final by @alexeagle in #269
Full Changelog: v1.2.3...v2.0.0
v2.0.0-rc0
Important
This release requires requires rules_js 2.x. It is not compatible with rules_js 1.x. rules_js 2 is currently in RC: https://github.com/aspect-build/rules_js/releases/tag/v2.0.0-rc0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "2.0.0-rc0")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "c085647585c3d01bee3966eb9ba433a1efbb0ee79bb1b8c67882a81d82a9b37f",
strip_prefix = "rules_swc-2.0.0-rc0",
url = "https://github.com/aspect-build/rules_swc/releases/download/v2.0.0-rc0/rules_swc-v2.0.0-rc0.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 SWC cli 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_SWC_VERSION", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = LATEST_SWC_VERSION,
)
What's Changed
- feat: upgrade to rules_js 2.0 by @gregmagolan in #253
Full Changelog: v1.2.3...v2.0.0-rc0
v1.1.0
Note: this release updates the default SWC version from 1.3.42
to 1.3.75
. You may be forced to update the version of any swc plugins you use, as they are not binary-compatible and can cause a Rust backtrace/crash.
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "1.1.0")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "8eb9e42ed166f20cacedfdb22d8d5b31156352eac190fc3347db55603745a2d8",
strip_prefix = "rules_swc-1.1.0",
url = "https://github.com/aspect-build/rules_swc/releases/download/v1.1.0/rules_swc-v1.1.0.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 SWC cli 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_SWC_VERSION", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = LATEST_SWC_VERSION,
)
What's Changed
- refactor: adopt tsconfig-to-swcconfig CLI by @alexeagle in #206
- chore: mirror latest swc release by @alexeagle in #207
Full Changelog: v1.0.2...v1.1.0
v1.0.0
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "1.0.0")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "6ee206f7aa7f6aa75e7c3dbfc9b66c2e759851e49690b26154c86465d4e7f859",
strip_prefix = "rules_swc-1.0.0",
url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0/rules_swc-v1.0.0.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 SWC cli 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,
)
What's Changed
- docs: tell users how to run swc using their tsconfig settings by @alexeagle in #152
- refactor: combine e2e to a single smoke test by @alexeagle in #153
- docs: Rename Bazel target swc_compile by @realtimetodie in #155
- chore: update to rules_js 1.17.0 and aspect_bazel_lib 1.24.2 by @gregmagolan in #156
- fix: Sourcemap links are not generated by @realtimetodie in #154
- refactor: move resolved_toolchain to the main workspace by @alexeagle in #157
- docs: fix reference to non-existent target by @alexeagle in #158
- Add support for plugins by @titanous in #149
- chore: docs updates before 1.0 by @alexeagle in #160
- refactor: force users to explicitly provide srcs by @alexeagle in #161
- refactor: only use underlying rule where required by @alexeagle in #162
- chore: --config is working now by @alexeagle in #163
- docs: explain out_dir with output_dir by @alexeagle in #164
- release: publish release artifact by @alexeagle in #165
- chore: mirror latest version by @alexeagle in #167
- chore: update to rules_js 1.19.0 by @gregmagolan in #168
- chore: update to swc v1.3.36 by @titanous in #169
- chore: update to aspect_bazel_lib 1.27.2 by @gregmagolan in #170
- chore: mirror latest swc release by @alexeagle in #171
- Fix sourcemaps by @alexeagle in #174
- chore: simplify WORKSPACE by @alexeagle in #172
- feat: add a new source_root attribute by @realtimetodie in #177
- test: use write_source_files where possible by @jbedard in #178
- refactor: no default value for source_root by @alexeagle in #179
- chore: update to Aspect CLI 5.2.0-rc0 by @gregmagolan in #180
- fix: set sourcemap root to the workspace relative root_dir by @jbedard in #176
- fix: do not specify empty --source-root arg by @jbedard in #182
- test: change sourcemap tests to json assertions by @jbedard in #181
- refactor: prevent adding unused source maps options by @realtimetodie in #183
- chore: update to Aspect CLI 5.2.1 by @gregmagolan in #184
- ci: add the windows runner to the matrix strategy by @realtimetodie in #186
- chore: mirror new swc version by @alexeagle in #190
- chore: update swc v1.3.41 by @realtimetodie in #188
- fix: windows CI by @alexeagle in #187
- chore: update dependencies by @gregmagolan in #191
New Contributors
Full Changelog: v0.21.3...v1.0.0
v1.0.0-rc3
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc3")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "28915ffc08776e19d6d81ac84593ddaad8d11480898058704bf59c25740fd66d",
strip_prefix = "rules_swc-1.0.0-rc3",
url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0-rc3/rules_swc-v1.0.0-rc3.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 SWC cli 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,
)
What's Changed
- fix: do not specify empty --source-root arg by @jbedard in #182
- test: change sourcemap tests to json assertions by @jbedard in #181
- refactor: prevent adding unused source maps options by @realtimetodie in #183
- chore: update to Aspect CLI 5.2.1 by @gregmagolan in #184
- ci: add the windows runner to the matrix strategy by @realtimetodie in #186
- chore: mirror new swc version by @alexeagle in #190
- chore: update swc v1.3.41 by @realtimetodie in #188
- fix: windows CI by @alexeagle in #187
Full Changelog: v1.0.0-rc2...v1.0.0-rc3
v1.0.0-rc1
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc1")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "d8b59d2addcddfaff8736f56fb663638129ccaec92481266e2e6c7fb4a5b68a4",
strip_prefix = "rules_swc-1.0.0-rc1",
url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0-rc1/rules_swc-v1.0.0-rc1.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 SWC cli 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,
)
What's Changed
- release: publish release artifact by @alexeagle in #165
- chore: mirror latest version by @alexeagle in #167
- chore: update to rules_js 1.19.0 by @gregmagolan in #168
- chore: update to swc v1.3.36 by @titanous in #169
- chore: update to aspect_bazel_lib 1.27.2 by @gregmagolan in #170
- chore: mirror latest swc release by @alexeagle in #171
- Fix sourcemaps by @alexeagle in #174
- chore: simplify WORKSPACE by @alexeagle in #172
Full Changelog: v1.0.0-rc0...v1.0.0-rc1
v1.0.0-rc0
BREAKING CHANGES
The srcs
attribute on the swc
macro is now required.
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc0")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "5d13b0123d91d4297f60d8da0ab5771615f6ad6829bdfe69e7dcda9e5c01bc54",
strip_prefix = "rules_swc-1.0.0-rc0",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v1.0.0-rc0.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 SWC cli 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,
)
What's Changed
- docs: tell users how to run swc using their tsconfig settings by @alexeagle in #152
- refactor: combine e2e to a single smoke test by @alexeagle in #153
- docs: Rename Bazel target swc_compile by @realtimetodie in #155
- chore: update to rules_js 1.17.0 and aspect_bazel_lib 1.24.2 by @gregmagolan in #156
- fix: Sourcemap links are not generated by @realtimetodie in #154
- refactor: move resolved_toolchain to the main workspace by @alexeagle in #157
- docs: fix reference to non-existent target by @alexeagle in #158
- Add support for plugins by @titanous in #149
- chore: docs updates before 1.0 by @alexeagle in #160
- refactor: force users to explicitly provide srcs by @alexeagle in #161
- refactor: only use underlying rule where required by @alexeagle in #162
- chore: --config is working now by @alexeagle in #163
- docs: explain out_dir with output_dir by @alexeagle in #164
New Contributors
Full Changelog: v0.21.3...v1.0.0-rc0
v0.21.3
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "0.21.3")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "c35e633c2c90a4cd6796e66d66bcf37d31a81737afc76030201a9ef8599abc58",
strip_prefix = "rules_swc-0.21.3",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.21.3.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 SWC cli 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,
)
What's Changed
- chore: update bcr homepage by @alexeagle in #142
- chore: update to newest aspect_bazel_lib by @alexeagle in #148
- Fix package-relative paths for external sources by @bduffany in #128
- chore: update to Aspect CLI 5.1.2 by @gregmagolan in #150
- chore: update to rules_js 1.15.1 and aspect_bazel_lib 1.23.3 by @gregmagolan in #151
New Contributors
Full Changelog: v0.21.2...v0.21.3
v0.21.0
This release uses the "swcx" CLI: https://github.com/swc-project/swc/discussions/3859
Thanks to help from @realtimetodie, the latest release of swc (v1.3.25) has fixes needed for us to run the "pure-rust" CLI, and avoid any node.js process running. This makes it much faster to launch many small processes. Note, our TS benchmarks in https://blog.aspect.dev/rules-ts-benchmarks already used this patch, now that it's released you should get similar performance.
BREAKING CHANGES:
We are getting close to 1.0, so this is the chance to make disruptive changes before entering a semver guarantee.
- Minimum version of swc is now v1.3.25
- An explicit version now has to be given to swc_register_toolchains; we don't silently default to latest
- the term "transpile" is not typically used in swc, so the underlying rule
swc_transpile
has been renamedswc_compile
matching the "compile" command
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "71bff4030067e3898a98a60918745a168b166256393d1ea566f72b118460d4ef",
strip_prefix = "rules_swc-0.21.0",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.21.0.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 SWC cli 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,
)
What's Changed
- run bare rust CLI binary, no node by @alexeagle in #57
- feat: read swc version from package.json by @alexeagle in #135
- chore: cleanup paths example by @alexeagle in #132
- fix: map alternative ts file extensions by @alexeagle in #133
- docs: enable_runfiles is no longer required since we don't use rules_js by @alexeagle in #137
- chore: add MODULE.bazel file by @alexeagle in #138
Full Changelog: v0.20.2...v0.21.0