Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: turn off preserve_symlinks in e2e/node_loader_no_preserve_symlinks test #3216

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/Built-ins.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ nodejs_binary(<a href="#nodejs_binary-name">name</a>, <a href="#nodejs_binary-ch
</pre>

Runs some JavaScript code in NodeJS. You can also change the default args that are sent to nodejs. This can be done through a flag. The default is --preserve-symlinks while anything
can be passed. The flag is --@build_bazel_rules_nodejs//nodejs:default_args="" ex: bazel build --@build_bazel_rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" main
can be passed. The flag is --@rules_nodejs//nodejs:default_args="" ex: bazel build --@rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" //:target.
This will pass --preserve-symlinks and --no-warnings flags to nodejs. Available node flags can be found here: https://nodejs.org/api/cli.html.

**ATTRIBUTES**
Expand Down Expand Up @@ -280,7 +280,7 @@ The runtime will pause before executing the program, allowing you to connect a
remote debugger.

You can also change the default args that are sent to nodejs. This can be done through a flag. The default is --preserve-symlinks while anything
can be passed. The flag is --@build_bazel_rules_nodejs//nodejs:default_args="" ex: bazel test --@build_bazel_rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" main
can be passed. The flag is --@rules_nodejs//nodejs:default_args="" ex: bazel test --@rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" //:target.
This will pass --preserve-symlinks and --no-warnings flags to nodejs. Available node flags can be found here: https://nodejs.org/api/cli.html.


Expand Down
2 changes: 1 addition & 1 deletion docs/Cypress.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The runtime will pause before executing the program, allowing you to connect a
remote debugger.

You can also change the default args that are sent to nodejs. This can be done through a flag. The default is --preserve-symlinks while anything
can be passed. The flag is --@build_bazel_rules_nodejs//nodejs:default_args="" ex: bazel test --@build_bazel_rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" main
can be passed. The flag is --@rules_nodejs//nodejs:default_args="" ex: bazel test --@rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" //:target.
This will pass --preserve-symlinks and --no-warnings flags to nodejs. Available node flags can be found here: https://nodejs.org/api/cli.html.


Expand Down
2 changes: 2 additions & 0 deletions e2e/node_loader_no_preserve_symlinks/.bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import %workspace%/../../common.bazelrc

build --@rules_nodejs//nodejs:default_args=""
4 changes: 2 additions & 2 deletions internal/node/node.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ _NODEJS_EXECUTABLE_OUTPUTS = {
nodejs_binary_kwargs = {
"attrs": _NODEJS_EXECUTABLE_ATTRS,
"doc": """Runs some JavaScript code in NodeJS. You can also change the default args that are sent to nodejs. This can be done through a flag. The default is --preserve-symlinks while anything
can be passed. The flag is --@build_bazel_rules_nodejs//nodejs:default_args="" ex: bazel build --@build_bazel_rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" main
can be passed. The flag is --@rules_nodejs//nodejs:default_args="" ex: bazel build --@rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" //:target.
This will pass --preserve-symlinks and --no-warnings flags to nodejs. Available node flags can be found here: https://nodejs.org/api/cli.html.""",
"executable": True,
"implementation": _nodejs_binary_impl,
Expand Down Expand Up @@ -696,7 +696,7 @@ The runtime will pause before executing the program, allowing you to connect a
remote debugger.

You can also change the default args that are sent to nodejs. This can be done through a flag. The default is --preserve-symlinks while anything
can be passed. The flag is --@build_bazel_rules_nodejs//nodejs:default_args="" ex: bazel test --@build_bazel_rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" main
can be passed. The flag is --@rules_nodejs//nodejs:default_args="" ex: bazel test --@rules_nodejs//nodejs:default_args="--preserve-symlinks --no-warnings" //:target.
This will pass --preserve-symlinks and --no-warnings flags to nodejs. Available node flags can be found here: https://nodejs.org/api/cli.html.
""",
test = True,
Expand Down
9 changes: 3 additions & 6 deletions nodejs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ toolchain_type(
for key, values in PLATFORMS.items()
]

# User set flags that are passed to the build
# you need to make sure that you pass the correct repo name infront for this flag to work
# if you are using rules from build_bazel_rules_nodejs that should be the @ in the flag
# ex: bazel build --@build_bazel_rules_nodejs//nodejs:default_args="test" main
# use rules_nodejs when you use things from that repo
# bazel test --//nodejs:default_args="" //...
# Default arguments/flags that are passed to nodejs in all nodejs_binary and
# nodejs_test targets. Can be overwritten by settings
# --@rules_nodejs//nodejs:default_args="--flag1 --flag2"
user_args(
name = "default_args",
build_setting_default = "--preserve-symlinks",
Expand Down