Skip to content

Commit

Permalink
feat(deps): cosmiconfig@^7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Nov 17, 2020
1 parent 5f31d3b commit 2958fe6
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 190 deletions.
6 changes: 3 additions & 3 deletions core/project/index.js
@@ -1,6 +1,6 @@
"use strict";

const cosmiconfig = require("cosmiconfig");
const { cosmiconfigSync } = require("cosmiconfig");
const dedent = require("dedent");
const globby = require("globby");
const globParent = require("glob-parent");
Expand All @@ -18,7 +18,7 @@ const { makeFileFinder, makeSyncFileFinder } = require("./lib/make-file-finder")

class Project {
constructor(cwd) {
const explorer = cosmiconfig("lerna", {
const explorer = cosmiconfigSync("lerna", {
searchPlaces: ["lerna.json", "package.json"],
transform(obj) {
// cosmiconfig returns null when nothing is found
Expand All @@ -44,7 +44,7 @@ class Project {
let loaded;

try {
loaded = explorer.searchSync(cwd);
loaded = explorer.search(cwd);
} catch (err) {
// redecorate JSON syntax errors, avoid debug dump
if (err.name === "JSONError") {
Expand Down
2 changes: 1 addition & 1 deletion core/project/package.json
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@lerna/package": "file:../package",
"@lerna/validation-error": "file:../validation-error",
"cosmiconfig": "^5.1.0",
"cosmiconfig": "^7.0.0",
"dedent": "^0.7.0",
"dot-prop": "^6.0.0",
"glob-parent": "^5.0.0",
Expand Down

0 comments on commit 2958fe6

Please sign in to comment.