-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat(resolver): Add NODE_PATH support #14089
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nitpick but this looks incredibly reasonable
can you add a test that checks that more than one NODE_PATH entries work?
src/resolver/resolver.zig
Outdated
// resolve `NODE_PATH` | ||
var node_path: []const u8 = ""; | ||
if (r.env_loader) |env_loader| { | ||
node_path = env_loader.get("NODE_PATH") orelse ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't this just be const node_path =
and then moving the second if check inside of this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All done
26d5571
to
8e1f109
Compare
@paperdave Looks some github action configure was broken. Runner image is Ubuntu, but script try to call a
|
@paperdave Hi, is this pr ready to be merged? |
What does this PR do?
Add resolve check for
NODE_PATH
.How did you verify your code works?
I wrote automated tests
I included a test for the new code, or existing tests cover it
I ran my tests locally and they pass (
bun-debug test test-file-name.test
)I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
I included a test for the new code, or an existing test covers it
JSValue used outside outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed
I wrote TypeScript/JavaScript tests and they pass locally (
bun-debug test test-file-name.test
)