File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
packages/@vue/cli/lib/util Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -7,21 +7,21 @@ function resolveFallback (request, options) {
7
7
8
8
const paths = [ ]
9
9
10
- for ( var i = 0 ; i < options . paths . length ; i ++ ) {
10
+ for ( let i = 0 ; i < options . paths . length ; i ++ ) {
11
11
const path = options . paths [ i ]
12
12
fakeParent . paths = Module . _nodeModulePaths ( path )
13
13
const lookupPaths = Module . _resolveLookupPaths ( request , fakeParent , true )
14
14
15
15
if ( ! paths . includes ( path ) ) paths . push ( path )
16
16
17
- for ( var j = 0 ; j < lookupPaths . length ; j ++ ) {
17
+ for ( let j = 0 ; j < lookupPaths . length ; j ++ ) {
18
18
if ( ! paths . includes ( lookupPaths [ j ] ) ) paths . push ( lookupPaths [ j ] )
19
19
}
20
20
}
21
21
22
- var filename = Module . _findPath ( request , paths , isMain )
22
+ const filename = Module . _findPath ( request , paths , isMain )
23
23
if ( ! filename ) {
24
- var err = new Error ( `Cannot find module '${ request } '` )
24
+ const err = new Error ( `Cannot find module '${ request } '` )
25
25
err . code = 'MODULE_NOT_FOUND'
26
26
throw err
27
27
}
Original file line number Diff line number Diff line change 1
1
exports . minNode = function ( major , minor = 0 , patch = 0 ) {
2
- const parts = process . versions . node . split ( '.' ) . map ( v => parseInt ( v ) )
3
- if ( parts [ 0 ] >= major && parts [ 1 ] >= minor && parts [ 2 ] >= patch ) return true
4
- return false
2
+ const [ M , m , p ] = process . versions . node . split ( '.' ) . map ( v => parseInt ( v ) )
3
+ return ( M >= major && m >= minor && p >= patch )
5
4
}
You can’t perform that action at this time.
0 commit comments