Releases: aspect-build/rules_swc
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-rc2
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc2")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "84567d61fca690884c08adc44c9f72d0cc4b65dd6d705baf3e447a4d0a020856",
strip_prefix = "rules_swc-1.0.0-rc2",
url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0-rc2/rules_swc-v1.0.0-rc2.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
- 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
Full Changelog: v1.0.0-rc1...v1.0.0-rc2
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.2
Using Bzlmod with Bazel 6:
Add to your MODULE.bazel
file:
bazel_dep(name = "aspect_rules_swc", version = "0.21.2")
Using WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "decabe9351859bc36f0b8952bab977ecbf976b59a6bc4c28f5b8624c1fd1e3a8",
strip_prefix = "rules_swc-0.21.2",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.21.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 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(windows): remove exe extension in platforms lookup by @alexeagle in #140
- chore: use upstream json match test by @alexeagle in #144
- fix(windows): mimic an empty stdin input by @realtimetodie in #145
New Contributors
- @realtimetodie made their first contribution in #145
Full Changelog: v0.21.1...v0.21.2
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
v0.20.2
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "814bc08efbbe4d5e238579c9b0cded519b199486fbc26709fcf6d4d47de08f50",
strip_prefix = "rules_swc-0.20.2",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.20.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,
)
What's Changed
- chore: update to Bazel 6.0.0 and Aspect CLI 5.1.1 by @gregmagolan in #129
- chore: update to aspect_rules_js 1.13.0 by @gregmagolan in #130
Full Changelog: v0.20.1...v0.20.2
v0.20.1
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_swc",
sha256 = "9a68901c258b8a91ce721df1f9b1dc62c9dd6b2822143e31a0280396b98db543",
strip_prefix = "rules_swc-0.20.1",
url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.20.1.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,
)
What's Changed
- chore: add swc versions v1.3.4 through v1.3.21 by @alexeagle in #124
- root_dir support by @kzadorozhny in #123
- chore: update to rules_js 1.12.0 by @gregmagolan in #126
- chore: add v1.3.22 and v1.3.23 by @gregmagolan in #125
New Contributors
- @kzadorozhny made their first contribution in #123
Full Changelog: v0.20.0...v0.20.1