Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
refactor: use semver like a normal human being
Browse files Browse the repository at this point in the history
  • Loading branch information
imurchie committed Dec 18, 2019
1 parent 04d1043 commit 43fbc74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import fs from './fs';
import semver from 'semver';
import { quote as shellQuote } from 'shell-quote';

const W3C_WEB_ELEMENT_IDENTIFIER = 'element-6066-11e4-a52e-4f735466cecf';

const NODE_VERSION = semver.coerce(process.version);
const W3C_WEB_ELEMENT_IDENTIFIER = 'element-6066-11e4-a52e-4f735466cecf';

export function hasContent (val) {
return _.isString(val) && val !== '';
Expand Down Expand Up @@ -266,7 +265,7 @@ async function isSameDestination (path1, path2, ...pathN) {
let mapCb = async (x) => await fs.stat(x, {
bigint: true,
}).ino;
if (NODE_VERSION.major <= 10 && NODE_VERSION.minor < 5) {
if (semver.lt(process.version, '10.5.0')) {
mapCb = async (x) => await fs.stat(x).ino;
}
return areAllItemsEqual(await B.map(allPaths, mapCb));
Expand Down

0 comments on commit 43fbc74

Please sign in to comment.