-
-
Notifications
You must be signed in to change notification settings - Fork 51
fix(index): this
of stat
method is undefined
#47
Conversation
Codecov Report
@@ Coverage Diff @@
## master #47 +/- ##
=======================================
Coverage 17.14% 17.14%
=======================================
Files 2 2
Lines 105 105
Branches 15 15
=======================================
Hits 18 18
Misses 73 73
Partials 14 14
Continue to review full report at Codecov.
|
@whxaxes Please accept CLA |
@evilebottnawi done |
this
of stat
method is undefined
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.
@whxaxes Thx
src/index.js
Outdated
// e.g when using the thread-loader | ||
// fallback to the fs module | ||
const stat = this.fs ? this.fs.stat : fs.stat; | ||
const tempFs = this.fs || fs; |
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.
const tempFs = this.fs || fs; | |
const FS = this.fs || fs; |
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.
@michael-ciniawsky FS
? Why in uppercase? Why not usingFs
or something related?
src/index.js
Outdated
const tempFs = this.fs || fs; | ||
const toDepDetails = (dep, mapCallback) => { | ||
stat(dep, (err, stats) => { | ||
tempFs.stat(dep, (err, stats) => { |
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.
tempFs.stat(dep, (err, stats) => { | |
FS.stat(dep, (err, stats) => { |
src/index.js
Outdated
return; | ||
} | ||
const stat = this.fs ? this.fs.stat : fs.stat; | ||
const tempFs = this.fs || fs; |
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.
const tempFs = this.fs || fs; | |
const FS = this.fs || fs; |
src/index.js
Outdated
const tempFs = this.fs || fs; | ||
async.each(cacheData.dependencies.concat(cacheData.contextDependencies), (dep, eachCallback) => { | ||
stat(dep.path, (statErr, stats) => { | ||
tempFs.stat(dep.path, (statErr, stats) => { |
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.
tempFs.stat(dep.path, (statErr, stats) => { | |
FS.stat(dep.path, (statErr, stats) => { |
@michael-ciniawsky done |
Released in |
fixed this issue: #46