@ms-cloudpack/path-utilities 3.1.34 → 3.2.1

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/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { findPackageRoot } from './findPackageRoot.js';
2
2
  export { formatLocation } from './formatLocation.js';
3
3
  export { globSourceFiles } from './globSourceFiles.js';
4
- export { sourceFilesGlobs } from './sourceFilesGlobs.js';
4
+ export { sourceFilesGlobs, alwaysExcludeGlobs } from './sourceFilesGlobs.js';
5
5
  export { intermediateToSourcePath } from './intermediateToSourcePath.js';
6
6
  export { isFile } from './isFile.js';
7
7
  export { isFileSync } from './isFileSync.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { findPackageRoot } from './findPackageRoot.js';
2
2
  export { formatLocation } from './formatLocation.js';
3
3
  export { globSourceFiles } from './globSourceFiles.js';
4
- export { sourceFilesGlobs } from './sourceFilesGlobs.js';
4
+ export { sourceFilesGlobs, alwaysExcludeGlobs } from './sourceFilesGlobs.js';
5
5
  export { intermediateToSourcePath } from './intermediateToSourcePath.js';
6
6
  export { isFile } from './isFile.js';
7
7
  export { isFileSync } from './isFileSync.js';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { findPackageRoot } from './findPackageRoot.js';\nexport { formatLocation } from './formatLocation.js';\nexport { globSourceFiles } from './globSourceFiles.js';\nexport { sourceFilesGlobs } from './sourceFilesGlobs.js';\nexport { intermediateToSourcePath } from './intermediateToSourcePath.js';\nexport { isFile } from './isFile.js';\nexport { isFileSync } from './isFileSync.js';\nexport { isFolder } from './isFolder.js';\nexport { isFolderSync } from './isFolderSync.js';\nexport { normalizedPathRelativeTo } from './normalizedPathRelativeTo.js';\nexport { pathSymbolReplacement } from './pathSymbolReplacement.js';\nexport { javascriptExtensions, jsxExtensions, sourceExtensions, typescriptExtensions } from './sourceExtensions.js';\nexport { sourceToIntermediatePath } from './sourceToIntermediatePath.js';\nexport { findProjectRoot } from './findProjectRoot.js';\nexport { isExternalPackage } from './isExternalPackage.js';\nexport { resolve } from './resolve.js';\nexport { resolveModule } from './resolveModule.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { findPackageRoot } from './findPackageRoot.js';\nexport { formatLocation } from './formatLocation.js';\nexport { globSourceFiles } from './globSourceFiles.js';\nexport { sourceFilesGlobs, alwaysExcludeGlobs } from './sourceFilesGlobs.js';\nexport { intermediateToSourcePath } from './intermediateToSourcePath.js';\nexport { isFile } from './isFile.js';\nexport { isFileSync } from './isFileSync.js';\nexport { isFolder } from './isFolder.js';\nexport { isFolderSync } from './isFolderSync.js';\nexport { normalizedPathRelativeTo } from './normalizedPathRelativeTo.js';\nexport { pathSymbolReplacement } from './pathSymbolReplacement.js';\nexport { javascriptExtensions, jsxExtensions, sourceExtensions, typescriptExtensions } from './sourceExtensions.js';\nexport { sourceToIntermediatePath } from './sourceToIntermediatePath.js';\nexport { findProjectRoot } from './findProjectRoot.js';\nexport { isExternalPackage } from './isExternalPackage.js';\nexport { resolve } from './resolve.js';\nexport { resolveModule } from './resolveModule.js';\n"]}
package/lib/isFile.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export declare function isFile(filePath: string): Promise<boolean>;
1
+ /**
2
+ * Returns true if `itemPath` is a file or a symlink to a file.
3
+ */
4
+ export declare function isFile(itemPath: string): Promise<boolean>;
2
5
  //# sourceMappingURL=isFile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFile.d.ts","sourceRoot":"","sources":["../src/isFile.ts"],"names":[],"mappings":"AAEA,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAS/D"}
1
+ {"version":3,"file":"isFile.d.ts","sourceRoot":"","sources":["../src/isFile.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D"}
package/lib/isFile.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import fsPromises from 'fs/promises';
2
- export async function isFile(filePath) {
2
+ /**
3
+ * Returns true if `itemPath` is a file or a symlink to a file.
4
+ */
5
+ export async function isFile(itemPath) {
3
6
  try {
4
- const stat = await fsPromises.stat(filePath);
7
+ const stat = await fsPromises.stat(itemPath);
5
8
  return stat.isFile();
6
9
  }
7
10
  catch {
8
- /* */
11
+ return false;
9
12
  }
10
- return false;
11
13
  }
12
14
  //# sourceMappingURL=isFile.js.map
package/lib/isFile.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"isFile.js","sourceRoot":"","sources":["../src/isFile.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,QAAgB;IAC3C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,KAAK;IACP,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import fsPromises from 'fs/promises';\n\nexport async function isFile(filePath: string): Promise<boolean> {\n try {\n const stat = await fsPromises.stat(filePath);\n return stat.isFile();\n } catch {\n /* */\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"isFile.js","sourceRoot":"","sources":["../src/isFile.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,QAAgB;IAC3C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["import fsPromises from 'fs/promises';\n\n/**\n * Returns true if `itemPath` is a file or a symlink to a file.\n */\nexport async function isFile(itemPath: string): Promise<boolean> {\n try {\n const stat = await fsPromises.stat(itemPath);\n return stat.isFile();\n } catch {\n return false;\n }\n}\n"]}
@@ -1,2 +1,5 @@
1
- export declare function isFileSync(filePath: string): boolean;
1
+ /**
2
+ * Returns true if `itemPath` is a file or a symlink to a file.
3
+ */
4
+ export declare function isFileSync(itemPath: string): boolean;
2
5
  //# sourceMappingURL=isFileSync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFileSync.d.ts","sourceRoot":"","sources":["../src/isFileSync.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CASpD"}
1
+ {"version":3,"file":"isFileSync.d.ts","sourceRoot":"","sources":["../src/isFileSync.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOpD"}
package/lib/isFileSync.js CHANGED
@@ -1,12 +1,14 @@
1
- import { lstatSync } from 'fs';
2
- export function isFileSync(filePath) {
1
+ import { statSync } from 'fs';
2
+ /**
3
+ * Returns true if `itemPath` is a file or a symlink to a file.
4
+ */
5
+ export function isFileSync(itemPath) {
3
6
  try {
4
- const stat = lstatSync(filePath);
7
+ const stat = statSync(itemPath);
5
8
  return stat.isFile();
6
9
  }
7
10
  catch {
8
- /* */
11
+ return false;
9
12
  }
10
- return false;
11
13
  }
12
14
  //# sourceMappingURL=isFileSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFileSync.js","sourceRoot":"","sources":["../src/isFileSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,KAAK;IACP,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { lstatSync } from 'fs';\n\nexport function isFileSync(filePath: string): boolean {\n try {\n const stat = lstatSync(filePath);\n return stat.isFile();\n } catch {\n /* */\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"isFileSync.js","sourceRoot":"","sources":["../src/isFileSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["import { statSync } from 'fs';\n\n/**\n * Returns true if `itemPath` is a file or a symlink to a file.\n */\nexport function isFileSync(itemPath: string): boolean {\n try {\n const stat = statSync(itemPath);\n return stat.isFile();\n } catch {\n return false;\n }\n}\n"]}
package/lib/isFolder.d.ts CHANGED
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Returns true if `itemPath` is a folder or a symlink to a folder.
3
+ */
1
4
  export declare function isFolder(itemPath: string): Promise<boolean>;
2
5
  //# sourceMappingURL=isFolder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFolder.d.ts","sourceRoot":"","sources":["../src/isFolder.ts"],"names":[],"mappings":"AAEA,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASjE"}
1
+ {"version":3,"file":"isFolder.d.ts","sourceRoot":"","sources":["../src/isFolder.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOjE"}
package/lib/isFolder.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import fsPromises from 'fs/promises';
2
+ /**
3
+ * Returns true if `itemPath` is a folder or a symlink to a folder.
4
+ */
2
5
  export async function isFolder(itemPath) {
3
6
  try {
4
7
  const stat = await fsPromises.stat(itemPath);
5
8
  return stat.isDirectory();
6
9
  }
7
10
  catch {
8
- /* no-op */
11
+ return false;
9
12
  }
10
- return false;
11
13
  }
12
14
  //# sourceMappingURL=isFolder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFolder.js","sourceRoot":"","sources":["../src/isFolder.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,WAAW;IACb,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import fsPromises from 'fs/promises';\n\nexport async function isFolder(itemPath: string): Promise<boolean> {\n try {\n const stat = await fsPromises.stat(itemPath);\n return stat.isDirectory();\n } catch {\n /* no-op */\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"isFolder.js","sourceRoot":"","sources":["../src/isFolder.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["import fsPromises from 'fs/promises';\n\n/**\n * Returns true if `itemPath` is a folder or a symlink to a folder.\n */\nexport async function isFolder(itemPath: string): Promise<boolean> {\n try {\n const stat = await fsPromises.stat(itemPath);\n return stat.isDirectory();\n } catch {\n return false;\n }\n}\n"]}
@@ -1,2 +1,5 @@
1
+ /**
2
+ * Returns true if `itemPath` is a folder or a symlink to a folder.
3
+ */
1
4
  export declare function isFolderSync(itemPath: string): boolean;
2
5
  //# sourceMappingURL=isFolderSync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFolderSync.d.ts","sourceRoot":"","sources":["../src/isFolderSync.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQtD"}
1
+ {"version":3,"file":"isFolderSync.d.ts","sourceRoot":"","sources":["../src/isFolderSync.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMtD"}
@@ -1,11 +1,14 @@
1
1
  import fs from 'fs';
2
+ /**
3
+ * Returns true if `itemPath` is a folder or a symlink to a folder.
4
+ */
5
+ // This is tested in isFolder.test.ts
2
6
  export function isFolderSync(itemPath) {
3
7
  try {
4
- return fs.lstatSync(itemPath)?.isDirectory();
8
+ return fs.statSync(itemPath)?.isDirectory();
5
9
  }
6
10
  catch {
7
- /* no-op */
11
+ return false;
8
12
  }
9
- return false;
10
13
  }
11
14
  //# sourceMappingURL=isFolderSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFolderSync.js","sourceRoot":"","sources":["../src/isFolderSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,WAAW;IACb,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import fs from 'fs';\n\nexport function isFolderSync(itemPath: string): boolean {\n try {\n return fs.lstatSync(itemPath)?.isDirectory();\n } catch {\n /* no-op */\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"isFolderSync.js","sourceRoot":"","sources":["../src/isFolderSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB;;GAEG;AACH,qCAAqC;AACrC,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC","sourcesContent":["import fs from 'fs';\n\n/**\n * Returns true if `itemPath` is a folder or a symlink to a folder.\n */\n// This is tested in isFolder.test.ts\nexport function isFolderSync(itemPath: string): boolean {\n try {\n return fs.statSync(itemPath)?.isDirectory();\n } catch {\n return false;\n }\n}\n"]}
@@ -3,4 +3,9 @@
3
3
  * Used for file watching and hashing of internal packages.
4
4
  */
5
5
  export declare const sourceFilesGlobs: string[];
6
+ /**
7
+ * Negated globs for paths (such as `node_modules`) that should always be excluded from source
8
+ * files regardless of user settings.
9
+ */
10
+ export declare const alwaysExcludeGlobs: string[];
6
11
  //# sourceMappingURL=sourceFilesGlobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sourceFilesGlobs.d.ts","sourceRoot":"","sources":["../src/sourceFilesGlobs.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,UAAuF,CAAC"}
1
+ {"version":3,"file":"sourceFilesGlobs.d.ts","sourceRoot":"","sources":["../src/sourceFilesGlobs.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,UAAiF,CAAC;AAE/G;;;GAGG;AACH,eAAO,MAAM,kBAAkB,UAA0B,CAAC"}
@@ -1,36 +1,20 @@
1
1
  import { sourceExtensions } from './sourceExtensions.js';
2
- const defaultIgnorePaths = [
3
- '!**/node_modules/**',
4
- '!**/__test*/**',
5
- '!**/test/**',
6
- '!**/tests/**',
7
- '!**/*.test.*',
8
- '!**/dist/**',
9
- '!**/build/**',
10
- '!**/out/**',
11
- '!**/*.d.ts',
12
- '!**/*.map',
13
- ];
14
- const sourceExtensionsGlob = sourceExtensions.map((ext) => `**/*${ext}`);
2
+ const ignoreDirs = ['node_modules', 'dist', 'build', 'out', 'test', 'tests', '__test*'];
3
+ const defaultIgnorePaths = [`!**/{${ignoreDirs.join(',')}}/**`, '!**/*.{test.*,d.ts,map}'];
4
+ const sourceExtensionsGlob = `**/*.{${sourceExtensions.map((ext) => ext.slice(1)).join(',')}}`;
15
5
  /**
16
6
  * Other file extensions to watch.
17
7
  * These are not source files, but might affect the bundle output.
18
8
  */
19
- const otherExtensionsGlob = [
20
- '**/*.json',
21
- '**/*.css',
22
- '**/*.scss',
23
- '**/*.sass',
24
- '**/*.graphql',
25
- '**/*.htm',
26
- '**/*.html',
27
- '**/*.txt',
28
- '**/*.md',
29
- '**/*.mdx',
30
- ];
9
+ const otherExtensionsGlob = `**/*.{json,css,scss,sass,graphql,htm,html,txt,md,mdx}`;
31
10
  /**
32
11
  * All valid source file globs.
33
12
  * Used for file watching and hashing of internal packages.
34
13
  */
35
- export const sourceFilesGlobs = ['src/**/*', ...sourceExtensionsGlob, ...otherExtensionsGlob, ...defaultIgnorePaths];
14
+ export const sourceFilesGlobs = ['src/**/*', sourceExtensionsGlob, otherExtensionsGlob, ...defaultIgnorePaths];
15
+ /**
16
+ * Negated globs for paths (such as `node_modules`) that should always be excluded from source
17
+ * files regardless of user settings.
18
+ */
19
+ export const alwaysExcludeGlobs = ['!**/node_modules/**'];
36
20
  //# sourceMappingURL=sourceFilesGlobs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sourceFilesGlobs.js","sourceRoot":"","sources":["../src/sourceFilesGlobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,kBAAkB,GAAG;IACzB,qBAAqB;IACrB,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,cAAc;IACd,aAAa;IACb,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,WAAW;CACZ,CAAC;AAEF,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;AAEzE;;;GAGG;AACH,MAAM,mBAAmB,GAAG;IAC1B,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,cAAc;IACd,UAAU;IACV,WAAW;IACX,UAAU;IACV,SAAS;IACT,UAAU;CACX,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,GAAG,oBAAoB,EAAE,GAAG,mBAAmB,EAAE,GAAG,kBAAkB,CAAC,CAAC","sourcesContent":["import { sourceExtensions } from './sourceExtensions.js';\n\nconst defaultIgnorePaths = [\n '!**/node_modules/**',\n '!**/__test*/**',\n '!**/test/**',\n '!**/tests/**',\n '!**/*.test.*',\n '!**/dist/**',\n '!**/build/**',\n '!**/out/**',\n '!**/*.d.ts',\n '!**/*.map',\n];\n\nconst sourceExtensionsGlob = sourceExtensions.map((ext) => `**/*${ext}`);\n\n/**\n * Other file extensions to watch.\n * These are not source files, but might affect the bundle output.\n */\nconst otherExtensionsGlob = [\n '**/*.json',\n '**/*.css',\n '**/*.scss',\n '**/*.sass',\n '**/*.graphql',\n '**/*.htm',\n '**/*.html',\n '**/*.txt',\n '**/*.md',\n '**/*.mdx',\n];\n\n/**\n * All valid source file globs.\n * Used for file watching and hashing of internal packages.\n */\nexport const sourceFilesGlobs = ['src/**/*', ...sourceExtensionsGlob, ...otherExtensionsGlob, ...defaultIgnorePaths];\n"]}
1
+ {"version":3,"file":"sourceFilesGlobs.js","sourceRoot":"","sources":["../src/sourceFilesGlobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,UAAU,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;AAExF,MAAM,kBAAkB,GAAG,CAAC,QAAQ,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAE3F,MAAM,oBAAoB,GAAG,SAAS,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAE/F;;;GAGG;AACH,MAAM,mBAAmB,GAAG,uDAAuD,CAAC;AAEpF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,GAAG,kBAAkB,CAAC,CAAC;AAE/G;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["import { sourceExtensions } from './sourceExtensions.js';\n\nconst ignoreDirs = ['node_modules', 'dist', 'build', 'out', 'test', 'tests', '__test*'];\n\nconst defaultIgnorePaths = [`!**/{${ignoreDirs.join(',')}}/**`, '!**/*.{test.*,d.ts,map}'];\n\nconst sourceExtensionsGlob = `**/*.{${sourceExtensions.map((ext) => ext.slice(1)).join(',')}}`;\n\n/**\n * Other file extensions to watch.\n * These are not source files, but might affect the bundle output.\n */\nconst otherExtensionsGlob = `**/*.{json,css,scss,sass,graphql,htm,html,txt,md,mdx}`;\n\n/**\n * All valid source file globs.\n * Used for file watching and hashing of internal packages.\n */\nexport const sourceFilesGlobs = ['src/**/*', sourceExtensionsGlob, otherExtensionsGlob, ...defaultIgnorePaths];\n\n/**\n * Negated globs for paths (such as `node_modules`) that should always be excluded from source\n * files regardless of user settings.\n */\nexport const alwaysExcludeGlobs = ['!**/node_modules/**'];\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/path-utilities",
3
- "version": "3.1.34",
3
+ "version": "3.2.1",
4
4
  "description": "Path utilities for Cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "workspace-tools": "^0.38.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@ms-cloudpack/common-types": "^0.32.2",
34
+ "@ms-cloudpack/common-types": "^0.33.0",
35
35
  "@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
36
36
  "@ms-cloudpack/scripts": "^0.0.1",
37
37
  "@ms-cloudpack/test-utilities": "^0.5.0"