Skip to content

Commit c928717

Browse files
authored
feat: add formatjs_cli versions through 1.1.12 (#69)
## Summary - add built-in formatjs_cli release metadata for 1.1.7 through 1.1.12 - update the default toolchain to 1.1.12 and refresh module lockfiles - document current Linux ARM64 and Windows x86_64 binary support ## Verification - CI=true pnpm install --frozen-lockfile - pnpm exec lefthook run pre-commit - bazel test //... - cd examples/simple && bazel test //... - cd examples/aggregate && bazel test //... - cd examples/custom_version && bazel test //... Note: formatjs_cli_v1.1.6 has a tag but no GitHub release/assets. The published 1.1.12 Darwin asset checksum matches the release asset, but the binary still reports formatjs 1.1.9 via --version; this PR consumes the published release tags and checksums as-is.
1 parent bf0ce9a commit c928717

9 files changed

Lines changed: 182 additions & 38 deletions

File tree

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ bazel_dep(name = "rules_shell", version = "0.3.0", dev_dependency = True)
4545

4646
# FormatJS CLI toolchain
4747
formatjs_cli = use_extension("//formatjs_cli:extensions.bzl", "formatjs_cli")
48-
formatjs_cli.toolchain(version = "1.1.5")
48+
formatjs_cli.toolchain(version = "1.1.12")
4949
use_repo(
5050
formatjs_cli,
5151
"formatjs_cli_toolchains",

MODULE.bazel.lock

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,9 @@ my_aspect = aspect(
321321

322322
rules_formatjs uses a native Rust CLI toolchain that is automatically downloaded for your platform. The toolchain supports:
323323

324-
- macOS (Apple Silicon and Intel)
325-
- Linux (x86_64)
324+
- macOS (Apple Silicon)
325+
- Linux (x86_64 and ARM64)
326+
- Windows (x86_64)
326327

327328
The toolchain is registered automatically when you add the MODULE.bazel dependency. Binaries are fetched from GitHub releases and cached by Bazel.
328329

examples/aggregate/MODULE.bazel.lock

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/custom_version/MODULE.bazel.lock

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/simple/MODULE.bazel.lock

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

formatjs_cli/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ config_setting(
2828
],
2929
)
3030

31+
config_setting(
32+
name = "windows_x86_64",
33+
constraint_values = [
34+
"@platforms//os:windows",
35+
"@platforms//cpu:x86_64",
36+
],
37+
)
38+
3139
# Alias that resolves to the correct toolchain CLI based on platform
3240
# This is used by verify.bzl which can't use toolchains directly
3341
alias(
@@ -37,6 +45,7 @@ alias(
3745
":darwin_arm64": "@formatjs_cli_toolchains_darwin_arm64//:cli",
3846
":linux_aarch64": "@formatjs_cli_toolchains_linux_aarch64//:cli",
3947
":linux_x64": "@formatjs_cli_toolchains_linux_x64//:cli",
48+
":windows_x86_64": "@formatjs_cli_toolchains_windows_x86_64//:cli",
4049
},
4150
no_match_error = "No FormatJS CLI binary is available for this target platform.",
4251
),

formatjs_cli/extensions.bzl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ The current default version is defined by `DEFAULT_VERSION`.
1414
Current binaries are available for:
1515
- macOS Apple Silicon (darwin-arm64)
1616
- Linux x86_64 (linux-x64)
17+
- Linux ARM64 (linux-aarch64)
18+
- Windows x86_64 (windows-x86_64)
1719
1820
Toolchain definitions also exist for future support:
1921
- macOS Intel (darwin-x86_64)
20-
- Linux aarch64 (linux-aarch64)
21-
- Windows x86_64 (windows-x86_64)
2222
2323
## Usage
2424
@@ -295,7 +295,9 @@ formatjs_cli = module_extension(
295295
296296
## Version History
297297
298-
- **1.1.5**: Latest built-in version with Linux ARM64 support
298+
- **1.1.12**: Latest built-in version
299+
- **1.1.7**: Added Windows x86_64 support
300+
- **1.1.5**: Added Linux ARM64 support
299301
- **0.1.2**: Added native key sorting
300302
- **0.1.1**: Added key sorting support
301303
- **0.1.0**: Initial release
@@ -307,11 +309,11 @@ formatjs_cli = module_extension(
307309
**Binaries currently available for:**
308310
- **macOS Apple Silicon** (M1/M2/M3): darwin-arm64 binary
309311
- **Linux x86_64**: linux-x64 binary
312+
- **Linux ARM64**: linux-aarch64 binary
313+
- **Windows x86_64**: windows-x86_64 binary
310314
311315
**Toolchain definitions exist for future support:**
312316
- **macOS Intel**: darwin-x86_64
313-
- **Linux aarch64**: linux-aarch64
314-
- **Windows x86_64**: windows-x86_64
315317
316318
If your platform doesn't have a binary available yet, the build will fail with a clear
317319
error message. Contributions for additional platform binaries are welcome!

0 commit comments

Comments
 (0)