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: fix regression in require ../ #145

Closed
wants to merge 1 commit into from

Conversation

evanlucas
Copy link
Contributor

Fixes regression in require system that prevented loading relative
packages via main property in package.json where the file is not
index.{ext}. The regression was introduced via cfc1272

An example of a package affected by this is node-gyp.

@bnoordhuis
Copy link
Member

If this is a regression, what was the commit that introduced it? Can you update the commit log to mention it? Thanks.

Fixes regression in require system that prevented loading relative
packages via main property in package.json where the file is not
index.{ext}. The regression was introduced in
cfc1272.
@evanlucas
Copy link
Contributor Author

Ok, I have amended the commit log as well as the PR description.

@rmg
Copy link
Contributor

rmg commented Dec 11, 2014

I was just about to dig into this after seeing it myself.

From a quick look at the code, it looks like .. works, but ../ is not handled without this PR because the tryPackage path is only done if there is no trailing /.

bnoordhuis pushed a commit that referenced this pull request Dec 11, 2014
Fixes regression in require system that prevented loading relative
packages via main property in package.json where the file is not
index.{ext}. The regression was introduced in commit cfc1272.

PR-URL: #145
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@bnoordhuis
Copy link
Member

Thanks Evan, landed in 87357b9 and good catch!

@bnoordhuis bnoordhuis closed this Dec 11, 2014
@rmg
Copy link
Contributor

rmg commented Dec 11, 2014

For posterity, the commit that landed the original regression was 36777d2.

bnoordhuis pushed a commit that referenced this pull request Dec 11, 2014
Fixes regression in require system that prevented loading relative
packages via main property in package.json where the file is not
index.{ext}. The regression was introduced in commit 36777d2.

PR-URL: #145
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@bnoordhuis
Copy link
Member

Oh, so it is. Amended in 78a7dc2.

@evanlucas
Copy link
Contributor Author

ah sorry about that

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.

3 participants