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

refactor: default to nobazel_patch_module_resolver #2324

Closed
wants to merge 19 commits into from

Conversation

alexeagle
Copy link
Collaborator

This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test.
Note it was previously disabled for npm_package_bin and generated index.bzl binaries in #1440

BREAKING CHANGE:
we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location
if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"]

Fixes #2125

Alex Eagle added 10 commits December 9, 2020 11:34
This turns off our monkey-patches for require() for nodejs_binary, nodejs_test, and macros like jasmine_node_test.
Note it was previously disabled for npm_package_bin and generated index.bzl binaries in bazel-contrib#1440

BREAKING CHANGE:
we no longer patch the require() function, instead you should rely on the linker to make node modules resolvable at the standard location
if this breaks you, try opting-in to the require patches with templated_args = ["--bazel_patch_module_resolver"]

Fixes bazel-contrib#2125
Alex Eagle added 2 commits December 10, 2020 22:12
If you turn off the linker, you're reverting to earlier rules_nodejs behavior where third-party node modules can
only be resolved using the patched require() function that knows where to find them
@alexeagle alexeagle marked this pull request as draft December 11, 2020 07:03
@alexeagle
Copy link
Collaborator Author

landed in #2347

@alexeagle alexeagle closed this Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant