Skip to content

Commit

Permalink
Use at-least-node for version sniffing
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanZim committed Feb 14, 2020
1 parent 53fbddf commit 29b55cb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/mkdirs/make-dir.js
Expand Up @@ -6,12 +6,9 @@
'use strict'
const fs = require('../fs')
const path = require('path')
const atLeastNode = require('at-least-node')

// Check for Node v10.12.0+
const nodeVersion = process.version.split('.')
const nodeVersionMajor = Number.parseInt(nodeVersion[0], 10)
const nodeVersionMinor = Number.parseInt(nodeVersion[1], 10)
const useNativeRecursiveOption = nodeVersionMajor >= 10 && nodeVersionMinor >= 12
const useNativeRecursiveOption = atLeastNode('10.12.0')

// https://github.com/nodejs/node/issues/8987
// https://github.com/libuv/libuv/pull/1088
Expand Down

0 comments on commit 29b55cb

Please sign in to comment.