search for package.json in parent directories too

This commit is contained in:
silverwind 2018-08-23 22:35:37 +02:00
parent 0ee01c5adf
commit 48f2db613e
Signed by: silverwind
GPG Key ID: 2E62B41C93869443
2 changed files with 2 additions and 1 deletions

@ -30,6 +30,7 @@
"chalk": "2.4.1",
"columnify": "1.5.4",
"escape-string-regexp": "1.0.5",
"find-up": "^3.0.0",
"make-fetch-happen": "4.0.1",
"minimist": "1.2.0",
"npm-package-arg": "6.1.0",

@ -72,7 +72,7 @@ if (args["no-color"]) process.env.FORCE_COLOR = "0";
const fs = require("fs");
const registry = args.registry.endsWith("/") ? args.registry : args.registry + "/";
const packageFile = path.join(process.cwd(), "package.json");
const packageFile = require("find-up").sync("package.json");
const dependencyTypes = [
"dependencies",