Skip to content

Commit 9cc0f75

Browse files
committed
feat: switch to native formatjs cli
1 parent 7ecf366 commit 9cc0f75

21 files changed

Lines changed: 393 additions & 292 deletions

.bazelignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Examples and e2e tests have their own MODULE.bazel files and are tested separately in CI
1+
# Examples have their own MODULE.bazel files and are tested separately in CI
22
# The REPO.bazel files mark them as separate repos, but we also need .bazelignore
33
# to prevent //... from traversing into them
44
examples
5-
e2e

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
os: [ubuntu-latest, macos-latest]
1717
folder:
1818
- "."
19-
- "e2e/smoke"
2019
- "examples/simple"
2120
- "examples/aggregate"
2221
runs-on: ${{ matrix.os }}

BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
21
load("@package_metadata//licenses/rules:license.bzl", "license")
32
load("@package_metadata//purl:purl.bzl", "purl")
43
load("@package_metadata//rules:package_metadata.bzl", "package_metadata")
@@ -17,14 +16,3 @@ license(
1716
kind = "@package_metadata//licenses/spdx:Apache-2.0",
1817
text = "LICENSE",
1918
)
20-
21-
# gazelle:map_kind bzl_library bzl_library @bazel_lib//:bzl_library.bzl
22-
gazelle_binary(
23-
name = "gazelle_bin",
24-
languages = ["@bazel_skylib_gazelle_plugin//bzl"],
25-
)
26-
27-
gazelle(
28-
name = "gazelle",
29-
gazelle = "gazelle_bin",
30-
)

BUILD.dev.bazel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Development-only build targets (gazelle, etc)"""
2+
3+
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
4+
5+
# gazelle:map_kind bzl_library bzl_library @bazel_lib//:bzl_library.bzl
6+
gazelle_binary(
7+
name = "gazelle_bin",
8+
languages = ["@bazel_skylib_gazelle_plugin//bzl"],
9+
)
10+
11+
gazelle(
12+
name = "gazelle",
13+
gazelle = "gazelle_bin",
14+
)

MODULE.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,16 @@ bazel_dep(name = "bazel_lib", version = "3.0.0", dev_dependency = True)
4343
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1", dev_dependency = True)
4444

4545
bazel_dep(name = "bazelrc-preset.bzl", version = "1.6.0")
46+
47+
# FormatJS CLI toolchain
48+
formatjs_cli = use_extension("//formatjs_cli:extensions.bzl", "formatjs_cli")
49+
formatjs_cli.toolchain(version = "0.1.0")
50+
use_repo(
51+
formatjs_cli,
52+
"formatjs_cli_toolchains_darwin_arm64",
53+
"formatjs_cli_toolchains_linux_x64",
54+
)
55+
56+
register_toolchains("@formatjs_cli_toolchains_darwin_arm64//:toolchain")
57+
58+
register_toolchains("@formatjs_cli_toolchains_linux_x64//:toolchain")

MODULE.bazel.lock

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

e2e/REPO.bazel

Lines changed: 0 additions & 2 deletions
This file was deleted.

e2e/smoke/.bazelrc

Whitespace-only changes.

e2e/smoke/BUILD

Lines changed: 0 additions & 17 deletions
This file was deleted.

e2e/smoke/MODULE.bazel

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)