From 5f20f14a887375c4ce49f0043206375010012ce8 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 8 May 2024 18:33:57 -0700 Subject: [PATCH] chore: bump to buildifier 6.4.0 --- .pre-commit-config.yaml | 6 +++--- BUILD.bazel | 16 ++++++++++++---- MODULE.bazel | 4 ++++ e2e/smoke/BUILD.bazel | 2 +- examples/minify/BUILD.bazel | 2 +- internal_deps.bzl | 8 +++----- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 014f49a..cb16842 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/BUILD.bazel b/BUILD.bazel index c44d8bb..f40b2c7 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -3,12 +3,20 @@ load("@npm//:defs.bzl", "npm_link_all_packages") npm_link_all_packages(name = "node_modules") -# gazelle:exclude internal_deps.bzl +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 ) + +# gazelle:exclude internal_deps.bzl diff --git a/MODULE.bazel b/MODULE.bazel index 0c449c3..f163a82 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -6,7 +6,11 @@ module( compatibility_level = 1, ) +# Lower-bounds (minimum) versions for direct runtime dependencies bazel_dep(name = "aspect_bazel_lib", version = "1.30.2") bazel_dep(name = "aspect_rules_js", version = "1.29.2") bazel_dep(name = "bazel_skylib", version = "1.4.1") + +####### Dev dependencies ######## + bazel_dep(name = "buildifier_prebuilt", version = "6.0.0.1", dev_dependency = True) diff --git a/e2e/smoke/BUILD.bazel b/e2e/smoke/BUILD.bazel index 78ece3e..05c4855 100644 --- a/e2e/smoke/BUILD.bazel +++ b/e2e/smoke/BUILD.bazel @@ -1,5 +1,5 @@ -load("@aspect_rules_terser//terser:defs.bzl", "terser") load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") +load("@aspect_rules_terser//terser:defs.bzl", "terser") load("@npm//:defs.bzl", "npm_link_all_packages") npm_link_all_packages(name = "node_modules") diff --git a/examples/minify/BUILD.bazel b/examples/minify/BUILD.bazel index 559610e..e4a3a1f 100644 --- a/examples/minify/BUILD.bazel +++ b/examples/minify/BUILD.bazel @@ -1,5 +1,5 @@ -load("@aspect_rules_terser//terser:defs.bzl", "terser") load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") +load("@aspect_rules_terser//terser:defs.bzl", "terser") terser( name = "minified", diff --git a/internal_deps.bzl b/internal_deps.bzl index f77a918..8123394 100644 --- a/internal_deps.bzl +++ b/internal_deps.bzl @@ -17,9 +17,7 @@ def rules_terser_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"], )