Remove path-is-absolute in favor of builtin path.isAbsolute (#5179)

This commit is contained in:
Andres Suarez
2017-01-21 08:33:34 -05:00
committed by Henry Zhu
parent 090f7abda4
commit e9d87ed55c
4 changed files with 2 additions and 6 deletions

View File

@@ -26,7 +26,6 @@
"glob": "^7.0.0",
"lodash": "^4.2.0",
"output-file-sync": "^1.1.0",
"path-is-absolute": "^1.0.0",
"slash": "^1.0.0",
"source-map": "^0.5.0",
"v8flags": "^2.0.10"

View File

@@ -1,4 +1,3 @@
import pathIsAbsolute from "path-is-absolute";
import commander from "commander";
import Module from "module";
import { inspect } from "util";
@@ -123,7 +122,7 @@ if (program.eval || program.print) {
// make the filename absolute
const filename = args[0];
if (!pathIsAbsolute(filename)) args[0] = path.join(process.cwd(), filename);
if (!path.isAbsolute(filename)) args[0] = path.join(process.cwd(), filename);
// add back on node and concat the sliced args
process.argv = ["node"].concat(args);

View File

@@ -41,7 +41,6 @@
"json5": "^0.5.0",
"lodash": "^4.2.0",
"minimatch": "^3.0.2",
"path-is-absolute": "^1.0.0",
"private": "^0.1.6",
"slash": "^1.0.0",
"source-map": "^0.5.0"

View File

@@ -2,7 +2,6 @@
import type Logger from "../logger";
import resolve from "../../../helpers/resolve";
import json5 from "json5";
import isAbsolute from "path-is-absolute";
import path from "path";
import fs from "fs";
@@ -50,7 +49,7 @@ class ConfigChainBuilder {
findConfigs(loc) {
if (!loc) return;
if (!isAbsolute(loc)) {
if (!path.isAbsolute(loc)) {
loc = path.join(process.cwd(), loc);
}