fix: bun_install adds node_modules to each directory
This commit is contained in:
@@ -77,6 +77,13 @@ sh_test(
|
||||
data = ["//internal:bun_install.bzl"],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "bun_install_environment_shape_test",
|
||||
srcs = ["environment_shape.sh"],
|
||||
args = ["$(location //internal:bun_install.bzl)"],
|
||||
data = ["//internal:bun_install.bzl"],
|
||||
)
|
||||
|
||||
sh_test(
|
||||
name = "bun_install_workspaces_test",
|
||||
srcs = ["workspaces.sh"],
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
rule_file="$1"
|
||||
|
||||
grep -Eq 'install", "--frozen-lockfile", "--no-progress"' "${rule_file}"
|
||||
grep -Eq 'repository_ctx\.symlink\(package_json, "package\.json"\)' "${rule_file}"
|
||||
grep -Eq 'repository_ctx\.file\("package\.json", repository_ctx\.read\(package_json\)\)' "${rule_file}"
|
||||
grep -Eq 'lockfile_name = bun_lockfile\.basename' "${rule_file}"
|
||||
grep -Eq 'if lockfile_name not in \["bun\.lock", "bun\.lockb"\]:' "${rule_file}"
|
||||
grep -Eq 'repository_ctx\.symlink\(bun_lockfile, lockfile_name\)' "${rule_file}"
|
||||
|
||||
7
tests/install_test/environment_shape.sh
Executable file
7
tests/install_test/environment_shape.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
rule_file="$1"
|
||||
|
||||
grep -Eq '\[str\(bun_bin\), "--bun", "install", "--frozen-lockfile", "--no-progress"\]' "${rule_file}"
|
||||
grep -Eq 'environment[[:space:]]*=[[:space:]]*\{"HOME":[[:space:]]*str\(repository_ctx\.path\("\."\)\)\}' "${rule_file}"
|
||||
Reference in New Issue
Block a user