Skip to content

Commit

Permalink
remove: test against bazel-lib 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kormide committed Nov 16, 2023
1 parent defe84b commit 4be05f9
Show file tree
Hide file tree
Showing 32 changed files with 254 additions and 3 deletions.
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "rules_nodejs", version = "5.8.2")
bazel_dep(name = "platforms", version = "0.0.5")

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
patches = ["//:version.patch"],
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
use_repo(node, "nodejs_linux_amd64")
use_repo(node, "nodejs_darwin_arm64")
Expand Down
8 changes: 8 additions & 0 deletions e2e/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
patches = ["//:version.patch"],
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension(
"@aspect_rules_js//npm:extensions.bzl",
"npm",
Expand Down
12 changes: 12 additions & 0 deletions e2e/bzlmod/version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git tools/version.bzl tools/version.bzl
index 6967419..08cc97e 100644
--- tools/version.bzl
+++ tools/version.bzl
@@ -2,6 +2,6 @@

# This is automagically replace by git during git archive using `git export-subst`
# See https://git-scm.com/docs/git-archive/2.29.0#Documentation/git-archive.txt-export-subst
-_VERSION_PRIVATE = "$Format:%(describe:tags=true)$"
+_VERSION_PRIVATE = "v1.37.0"

VERSION = "0.0.0" if _VERSION_PRIVATE.startswith("$Format") else _VERSION_PRIVATE.replace("v", "", 1)
9 changes: 9 additions & 0 deletions e2e/gyp_no_install_script/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# TODO: remove before landing
bazel_dep(name = "aspect_bazel_lib", version = "0.0.0")
archive_override(
module_name = "aspect_bazel_lib",
patches = ["//:version.patch"],
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

bazel_dep(name = "aspect_rules_js", version = "0.0.0")
local_path_override(
module_name = "aspect_rules_js",
Expand Down
12 changes: 12 additions & 0 deletions e2e/gyp_no_install_script/version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git tools/version.bzl tools/version.bzl
index 6967419..08cc97e 100644
--- tools/version.bzl
+++ tools/version.bzl
@@ -2,6 +2,6 @@

# This is automagically replace by git during git archive using `git export-subst`
# See https://git-scm.com/docs/git-archive/2.29.0#Documentation/git-archive.txt-export-subst
-_VERSION_PRIVATE = "$Format:%(describe:tags=true)$"
+_VERSION_PRIVATE = "v1.37.0"

VERSION = "0.0.0" if _VERSION_PRIVATE.startswith("$Format") else _VERSION_PRIVATE.replace("v", "", 1)
1 change: 1 addition & 0 deletions e2e/js_image_oci/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
###
# Setup rules_js
###

local_repository(
name = "aspect_rules_js",
path = "../..",
Expand Down
7 changes: 7 additions & 0 deletions e2e/js_run_devserver/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
use_repo(pnpm, "pnpm")

Expand Down
12 changes: 12 additions & 0 deletions e2e/js_run_devserver/version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git tools/version.bzl tools/version.bzl
index 6967419..08cc97e 100644
--- tools/version.bzl
+++ tools/version.bzl
@@ -2,6 +2,6 @@

# This is automagically replace by git during git archive using `git export-subst`
# See https://git-scm.com/docs/git-archive/2.29.0#Documentation/git-archive.txt-export-subst
-_VERSION_PRIVATE = "$Format:%(describe:tags=true)$"
+_VERSION_PRIVATE = "v1.37.0"

VERSION = "0.0.0" if _VERSION_PRIVATE.startswith("$Format") else _VERSION_PRIVATE.replace("v", "", 1)
8 changes: 8 additions & 0 deletions e2e/npm_translate_lock/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
patches = ["//:version.patch"],
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
12 changes: 12 additions & 0 deletions e2e/npm_translate_lock/version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git tools/version.bzl tools/version.bzl
index 6967419..08cc97e 100644
--- tools/version.bzl
+++ tools/version.bzl
@@ -2,6 +2,6 @@

# This is automagically replace by git during git archive using `git export-subst`
# See https://git-scm.com/docs/git-archive/2.29.0#Documentation/git-archive.txt-export-subst
-_VERSION_PRIVATE = "$Format:%(describe:tags=true)$"
+_VERSION_PRIVATE = "v1.37.0"

VERSION = "0.0.0" if _VERSION_PRIVATE.startswith("$Format") else _VERSION_PRIVATE.replace("v", "", 1)
7 changes: 7 additions & 0 deletions e2e/npm_translate_lock_empty/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/npm_translate_lock_multi/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "app1_npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/npm_translate_lock_partial_clone/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/npm_translate_lock_subdir_patch/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/npm_translate_package_lock/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/npm_translate_yarn_lock/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/package_json_module/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/patch_from_repo/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

local_path_override(
module_name = "local_repo",
path = "./local_repo",
Expand Down
7 changes: 7 additions & 0 deletions e2e/pnpm_repo_install/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
use_repo(node, "nodejs_toolchains")
use_repo(node, "nodejs_linux_amd64")
Expand Down
7 changes: 7 additions & 0 deletions e2e/pnpm_workspace/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
use_repo(node, "nodejs_toolchains")
use_repo(node, "nodejs_linux_amd64")
Expand Down
7 changes: 7 additions & 0 deletions e2e/pnpm_workspace_deps/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/pnpm_workspace_rerooted/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(
name = "nodejs",
Expand Down
7 changes: 7 additions & 0 deletions e2e/update_pnpm_lock/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/update_pnpm_lock_with_import/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")

# Validate that we can use a yarn.lock file in place of pnpm-lock.yaml
Expand Down
7 changes: 7 additions & 0 deletions e2e/vendored_node/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

register_toolchains("//toolchains:all")
7 changes: 7 additions & 0 deletions e2e/vendored_tarfile/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/verify_patches/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/webpack_devserver/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
7 changes: 7 additions & 0 deletions e2e/webpack_devserver_esm/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ local_path_override(
path = "../..",
)

# TODO: remove before landing
archive_override(
module_name = "aspect_bazel_lib",
strip_prefix = "bazel-lib-a72c63ea8296c9f8377866440f52083aeb31022f",
urls = ["https://github.com/kormide/bazel-lib/archive/a72c63ea8296c9f8377866440f52083aeb31022f.zip"],
)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
name = "npm",
Expand Down
Loading

0 comments on commit 4be05f9

Please sign in to comment.