Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ bazel_dep(name = "rules_shell", version = "0.3.0", dev_dependency = True)

# FormatJS CLI toolchain
formatjs_cli = use_extension("//formatjs_cli:extensions.bzl", "formatjs_cli")
formatjs_cli.toolchain(version = "1.1.5")
formatjs_cli.toolchain(version = "1.1.12")
use_repo(
formatjs_cli,
"formatjs_cli_toolchains",
Expand Down
20 changes: 13 additions & 7 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ my_aspect = aspect(

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

- macOS (Apple Silicon and Intel)
- Linux (x86_64)
- macOS (Apple Silicon)
- Linux (x86_64 and ARM64)
- Windows (x86_64)

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

Expand Down
20 changes: 13 additions & 7 deletions examples/aggregate/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions examples/custom_version/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 13 additions & 7 deletions examples/simple/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions formatjs_cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ config_setting(
],
)

config_setting(
name = "windows_x86_64",
constraint_values = [
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
)

# Alias that resolves to the correct toolchain CLI based on platform
# This is used by verify.bzl which can't use toolchains directly
alias(
Expand All @@ -37,6 +45,7 @@ alias(
":darwin_arm64": "@formatjs_cli_toolchains_darwin_arm64//:cli",
":linux_aarch64": "@formatjs_cli_toolchains_linux_aarch64//:cli",
":linux_x64": "@formatjs_cli_toolchains_linux_x64//:cli",
":windows_x86_64": "@formatjs_cli_toolchains_windows_x86_64//:cli",
},
no_match_error = "No FormatJS CLI binary is available for this target platform.",
),
Expand Down
12 changes: 7 additions & 5 deletions formatjs_cli/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ The current default version is defined by `DEFAULT_VERSION`.
Current binaries are available for:
- macOS Apple Silicon (darwin-arm64)
- Linux x86_64 (linux-x64)
- Linux ARM64 (linux-aarch64)
- Windows x86_64 (windows-x86_64)

Toolchain definitions also exist for future support:
- macOS Intel (darwin-x86_64)
- Linux aarch64 (linux-aarch64)
- Windows x86_64 (windows-x86_64)

## Usage

Expand Down Expand Up @@ -295,7 +295,9 @@ formatjs_cli = module_extension(

## Version History

- **1.1.5**: Latest built-in version with Linux ARM64 support
- **1.1.12**: Latest built-in version
- **1.1.7**: Added Windows x86_64 support
- **1.1.5**: Added Linux ARM64 support
- **0.1.2**: Added native key sorting
- **0.1.1**: Added key sorting support
- **0.1.0**: Initial release
Expand All @@ -307,11 +309,11 @@ formatjs_cli = module_extension(
**Binaries currently available for:**
- **macOS Apple Silicon** (M1/M2/M3): darwin-arm64 binary
- **Linux x86_64**: linux-x64 binary
- **Linux ARM64**: linux-aarch64 binary
- **Windows x86_64**: windows-x86_64 binary

**Toolchain definitions exist for future support:**
- **macOS Intel**: darwin-x86_64
- **Linux aarch64**: linux-aarch64
- **Windows x86_64**: windows-x86_64

If your platform doesn't have a binary available yet, the build will fail with a clear
error message. Contributions for additional platform binaries are welcome!
Expand Down
Loading
Loading