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

module: handle relative paths in resolve paths #27598

Merged
merged 1 commit into from
May 9, 2019
Merged

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented May 7, 2019

This commit adds support for relative paths in require.resolve()'s paths option.

Fixes: #27583

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented May 8, 2019

Now that there's the Windows-specific conditions, can we add a run-only-on-Windows test case or two for the \\ stuff just to make sure it works as expected?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented May 8, 2019

CI: https://ci.nodejs.org/job/node-test-pull-request/23008/

EDIT(cjihrig): CI was yellow.

This commit adds support for relative paths in
require.resolve()'s paths option.

PR-URL: nodejs#27598
Fixes: nodejs#27583
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@cjihrig cjihrig merged commit dac1143 into nodejs:master May 9, 2019
@cjihrig cjihrig deleted the 27583 branch May 9, 2019 18:18
targos pushed a commit that referenced this pull request May 10, 2019
This commit adds support for relative paths in
require.resolve()'s paths option.

PR-URL: #27598
Fixes: #27583
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@BridgeAR BridgeAR mentioned this pull request May 21, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node 12: require.resolve(relativePath, { paths: [ '.' ] }) throws without ./
5 participants