| """rules_formatjs - Bazel rules for FormatJS internationalization""" |
| |
| module( |
| name = "rules_formatjs", |
| |
| # NOTE: |
| version = "0.6.0", |
| # |
| # Always leave version unset or set to "" (the default). The default value |
| # can prevent issues when the module is used via non-registry overrides |
| # (e.g. https://github.com/bazel-contrib/rules_go/issues/4380). |
| # |
| # The publish.yaml GitHub Action sets the version in the registry to the |
| # release version by patching this MODULE.bazel file in the pull request to |
| # the BCR. |
| # |
| # For more info, see this Slack thread: |
| # https://bazelbuild.slack.com/archives/CA31HN1T3/p1750406404452179 |
| |
| # NOTE: |
| compatibility_level = 0, |
| # |
| # Bumping compatibility_level too frequently is discouraged because it's |
| # very disruptive: as soon as a module is requested at two different |
| # compatibility levels in the dependency tree, users will see an error. |
| # |
| # As such, the compatibility_level (1) should be bumped *only* when the |
| # breaking change affects most use cases and isn't easy to migrate and/or |
| # work-around, and (2) *in the same commit* that introduces an incompatible |
| # (breaking) change. |
| ) |
| |
| # Core dependencies required by rules_formatjs |
| bazel_dep(name = "jq.bzl", version = "0.4.0") # JSON manipulation in aggregation aspect |
| bazel_dep(name = "package_metadata", version = "0.0.6") # Package metadata for BCR |
| bazel_dep(name = "platforms", version = "1.0.0") |
| |
| # Development dependencies |
| bazel_dep(name = "bazel_lib", version = "3.0.0", dev_dependency = True) |
| bazel_dep(name = "bazelrc-preset.bzl", version = "1.8.0", dev_dependency = True) |
| bazel_dep(name = "buildifier_prebuilt", version = "8.2.1", dev_dependency = True) |
| bazel_dep(name = "gazelle", version = "0.47.0", dev_dependency = True, repo_name = "bazel_gazelle") |
| 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") |
| use_repo( |
| formatjs_cli, |
| "formatjs_cli_toolchains", |
| "formatjs_cli_toolchains_darwin_arm64", |
| "formatjs_cli_toolchains_darwin_x86_64", |
| "formatjs_cli_toolchains_linux_aarch64", |
| "formatjs_cli_toolchains_linux_x64", |
| "formatjs_cli_toolchains_windows_x86_64", |
| ) |
| |
| # Register all toolchains - Bazel will automatically select the appropriate one |
| # based on exec_compatible_with constraints |
| register_toolchains("@formatjs_cli_toolchains//:all") |