Skip to content

Commit

Permalink
chore: bump to buildifier 6.4.0 (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed Apr 27, 2024
1 parent 39d79bf commit c4d4048
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ default_stages: [commit]
repos:
# Check formatting and lint for starlark code
- repo: https://github.com/keith/pre-commit-buildifier
rev: 4.0.1.1
rev: 6.4.0
hooks:
- id: buildifier
- id: buildifier-lint
# Enforce that commit messages allow for later changelog generation
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.18.0
rev: v3.24.0
hooks:
# Requires that commitizen is already installed
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.4.0"
rev: v3.1.0
hooks:
- id: prettier
12 changes: 9 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")

buildifier(
name = "buildifier",
exclude_patterns = ["./.git/*"],
lint_mode = "fix",
mode = "fix",
tags = ["manual"], # tag as manual so windows ci does not build it by default
)

buildifier(
name = "buildifier.check",
exclude_patterns = [
"./.git/*",
],
exclude_patterns = ["./.git/*"],
lint_mode = "warn",
mode = "diff",
tags = ["manual"], # tag as manual so windows ci does not build it by default
Expand Down
2 changes: 1 addition & 1 deletion e2e/smoke/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@aspect_rules_swc//swc:defs.bzl", "swc")
load("@bazel_skylib//rules:build_test.bzl", "build_test")

swc(
name = "compile",
Expand Down
2 changes: 1 addition & 1 deletion examples/opaque_src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Note that this example also depends on the setup in /WORKSPACE at the root of this repository.
"""

load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_bazel_lib//lib:output_files.bzl", "output_files")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_rules_swc//swc:defs.bzl", "swc")

filegroup(
Expand Down
4 changes: 2 additions & 2 deletions examples/out_dir/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@aspect_rules_swc//swc:defs.bzl", "swc")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_bazel_lib//lib:testing.bzl", "assert_json_matches")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_rules_swc//swc:defs.bzl", "swc")

swc(
name = "compile",
Expand Down
4 changes: 2 additions & 2 deletions examples/plugins/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
See https://github.com/swc-project/plugins
"""

load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_bazel_lib//lib:directory_path.bzl", "directory_path")
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
load("@aspect_bazel_lib//lib:directory_path.bzl", "directory_path")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_rules_swc//swc:defs.bzl", "swc", "swc_plugin")
load("@npm//:defs.bzl", "npm_link_all_packages")

Expand Down
2 changes: 1 addition & 1 deletion examples/root_dir/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@aspect_rules_swc//swc:defs.bzl", "swc")
load("@aspect_bazel_lib//lib:testing.bzl", "assert_json_matches")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_rules_swc//swc:defs.bzl", "swc")

swc(
name = "compile",
Expand Down
2 changes: 1 addition & 1 deletion examples/source_map_support/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

exports_files([
"defs.bzl",
Expand Down
2 changes: 1 addition & 1 deletion examples/source_root/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_bazel_lib//lib:testing.bzl", "assert_json_matches")
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@aspect_rules_swc//swc:defs.bzl", "swc")

# Specifies a custom location where a debugger should locate source files instead of relative source
Expand Down
2 changes: 1 addition & 1 deletion examples/transitive/app/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@aspect_rules_swc//swc:defs.bzl", "swc")
load("@aspect_rules_js//js:defs.bzl", "js_binary")
load("@aspect_rules_swc//swc:defs.bzl", "swc")

package(default_visibility = ["//:__subpackages__"])

Expand Down
8 changes: 3 additions & 5 deletions internal_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ def rules_swc_internal_deps():

http_archive(
name = "buildifier_prebuilt",
sha256 = "e46c16180bc49487bfd0f1ffa7345364718c57334fa0b5b67cb5f27eba10f309",
strip_prefix = "buildifier-prebuilt-6.1.0",
urls = [
"https://github.com/keith/buildifier-prebuilt/archive/6.1.0.tar.gz",
],
sha256 = "8ada9d88e51ebf5a1fdff37d75ed41d51f5e677cdbeafb0a22dda54747d6e07e",
strip_prefix = "buildifier-prebuilt-6.4.0",
urls = ["http://github.com/keith/buildifier-prebuilt/archive/6.4.0.tar.gz"],
)
4 changes: 2 additions & 2 deletions swc/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ swc(
```
"""

load("//swc/private:swc.bzl", _swc_lib = "swc")
load("//swc/private:swc_plugin.bzl", _swc_plugin_lib = "swc_plugin")
load("@aspect_bazel_lib//lib:utils.bzl", "file_exists", "to_label")
load("@bazel_skylib//lib:types.bzl", "types")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("//swc/private:swc.bzl", _swc_lib = "swc")
load("//swc/private:swc_plugin.bzl", _swc_plugin_lib = "swc_plugin")

swc_compile = rule(
doc = """Underlying rule for the `swc` macro.
Expand Down

0 comments on commit c4d4048

Please sign in to comment.