regressify 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +8 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -14,13 +14,20 @@ function getLibraryPath() {
|
|
|
14
14
|
if (fs.existsSync(packageJsonPath)) {
|
|
15
15
|
// We have found the package.json file
|
|
16
16
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
17
|
-
|
|
17
|
+
if (
|
|
18
|
+
(packageJson.dependencies && packageJson.dependencies['regressify']) ||
|
|
19
|
+
(packageJson.devDependencies && packageJson.devDependencies['regressify'])
|
|
20
|
+
) {
|
|
21
|
+
return `node_modules/${packageJson.name}`;
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
const parentDir = path.dirname(currentDir);
|
|
21
26
|
if (parentDir === currentDir) {
|
|
22
27
|
// We have reached the root directory
|
|
23
28
|
console.log(chalk.red('Could not find package.json file in the current directory or any of its parents. Current directory:'), import.meta.url);
|
|
29
|
+
console.log(chalk.red('___filename:'), __filename);
|
|
30
|
+
console.log(chalk.red('__dirname:'), __dirname);
|
|
24
31
|
return null;
|
|
25
32
|
}
|
|
26
33
|
|