Skip to content

Conversation

Akryum
Copy link
Member

@Akryum Akryum commented May 30, 2018

Fix #1396

@Akryum Akryum self-assigned this May 30, 2018
@Akryum Akryum requested a review from yyx990803 May 30, 2018 08:09
Copy link
Contributor

@zigomir zigomir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😉

@@ -0,0 +1,5 @@
exports.minNode = function (major, minor = 0, patch = 0) {
const parts = process.versions.node.split('.').map(v => parseInt(v))
if (parts[0] >= major && parts[1] >= minor && parts[2] >= patch) return true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could return whole expression

@@ -0,0 +1,5 @@
exports.minNode = function (major, minor = 0, patch = 0) {
const parts = process.versions.node.split('.').map(v => parseInt(v))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use destructuring and give part names like const [major,minor,patch] = ...

i’m aware these are already taken, just suggesting.

}
}

var filename = Module._findPath(request, paths, isMain)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this var while others are const?


var filename = Module._findPath(request, paths, isMain)
if (!filename) {
var err = new Error(`Cannot find module '${request}'`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Akryum
Copy link
Member Author

Akryum commented May 30, 2018

@zigomir Thanks! ^.^

@yyx990803 yyx990803 merged commit ef2ecf5 into dev May 30, 2018
@LinusBorg LinusBorg deleted the resolve-fallback branch October 14, 2018 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants