File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -49,25 +49,25 @@ export const findFileInPath = async (
49
49
/**
50
50
* Finds the closest node_module folder in the parent directories.
51
51
*
52
- * @param {string } [curentDirectory ] Current directory.
52
+ * @param {string } [currentDirectory ] Current directory.
53
53
* @param {number } [maxDepth] Optional max depth.
54
54
* @return {Promise<string | null> } Path to node_modules directory.
55
55
* @public
56
56
*/
57
57
58
58
export const findParentNodeModules = async (
59
- curentDirectory : string ,
59
+ currentDirectory : string ,
60
60
maxDepth : number = 5
61
61
) : Promise < string | null > => {
62
62
if ( maxDepth > 0 ) {
63
63
try {
64
- const nodeModulesPath = resolve ( curentDirectory , './node_modules' ) ;
64
+ const nodeModulesPath = resolve ( currentDirectory , './node_modules' ) ;
65
65
66
66
if ( await fs . stat ( nodeModulesPath ) ) {
67
67
return nodeModulesPath ;
68
68
}
69
69
} catch ( _ ) {
70
- const parentDirectory = resolve ( curentDirectory , '../' ) ;
70
+ const parentDirectory = resolve ( currentDirectory , '../' ) ;
71
71
72
72
return await findParentNodeModules ( parentDirectory , -- maxDepth ) ;
73
73
}
You can’t perform that action at this time.
0 commit comments