-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: resolve _-prefixed dependencies to real path #6460
Changes from 1 commit
6564aae
37b7b5e
0ef4591
ca804f5
994f7ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,15 +190,15 @@ Module._findPath = function(request, paths, isMain) { | |
// For each path | ||
for (var i = 0; i < paths.length; i++) { | ||
// Don't search further if path doesn't exist | ||
const curPath = paths[i]; | ||
var curPath = paths[i]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I test again on const in loop, it will be node v6.0.0
function testFn(a, b) {
const foo = [1, 2, 3];
let total = 0;
for (const a of foo) {
const c = a;
total += c;
}
return total;
}
[disabled optimization for 0x3a6acdbf0661 <SharedFunctionInfo formatValue>, reason: TryCatchStatement]
6
[didn't find optimized code in optimized code map for 0x4dca4458ee9 <SharedFunctionInfo testFn>]
[compiling method 0x3b482c0c0669 <JS Function testFn (SharedFunctionInfo 0x4dca4458ee9)> using TurboFan]
[optimizing 0x3b482c0c0669 <JS Function testFn (SharedFunctionInfo 0x4dca4458ee9)> - took 1.139, 0.000, 0.000 ms]
Function is TurboFan compiler There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fengmk2 I was tracing this particular function ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switched back to |
||
if (curPath && stat(curPath) < 1) continue; | ||
|
||
// If _basePath is a symlink, use the real path rather than the path of the | ||
// symlink as cache key. | ||
const _basePath = path.resolve(curPath, '_' + request); | ||
const basePath = path.resolve(curPath, request); | ||
var _basePath = path.resolve(curPath, '_' + request); | ||
var basePath = path.resolve(curPath, request); | ||
|
||
const filename = tryFindPath(basePath, exts, isMain, isAbsolute) || | ||
var filename = tryFindPath(basePath, exts, isMain, isAbsolute) || | ||
tryFindPath(_basePath, exts, true, isAbsolute); | ||
|
||
if (filename) { | ||
|
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.
Actually, this line was fine. It was just the other 3 that were causing problems.