yargs-file-commands 0.0.5 → 0.0.6

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.
@@ -15,8 +15,9 @@ import path, { join } from 'path';
15
15
  */
16
16
  export const scanDirectory = async (dirPath, options = {}) => {
17
17
  const { ignorePatterns = [], extensions = [], logLevel = 'info' } = options;
18
+ const rootedDirPath = path.resolve(dirPath);
18
19
  if (logLevel === 'debug') {
19
- console.debug(`Inspecting directory for possible commands: ${dirPath}`);
20
+ console.debug(`Inspecting directory for possible commands: ${rootedDirPath}`);
20
21
  }
21
22
  // Check if path should be ignored
22
23
  const shouldIgnore = ignorePatterns.some((pattern) => pattern.test(dirPath));
@@ -31,7 +32,7 @@ export const scanDirectory = async (dirPath, options = {}) => {
31
32
  const shouldIgnore = ignorePatterns.some((pattern) => pattern.test(entry));
32
33
  if (shouldIgnore) {
33
34
  if (logLevel === 'debug') {
34
- console.debug(`Ignoring file because of ignorePatterns match: ${fullPath}`);
35
+ console.debug(`Ignoring file because of ignorePatterns match: ${path.resolve(fullPath)}`);
35
36
  }
36
37
  return [];
37
38
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yargs-file-commands",
3
3
  "description": "A yargs helper function that lets you define your commands structure via directory and file naming conventions.",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",