@ms-cloudpack/path-utilities 3.0.13 → 3.1.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/globSourceFiles.js +1 -1
- package/lib/globSourceFiles.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/sourceFilesGlobs.d.ts +6 -0
- package/lib/sourceFilesGlobs.d.ts.map +1 -0
- package/lib/sourceFilesGlobs.js +36 -0
- package/lib/sourceFilesGlobs.js.map +1 -0
- package/package.json +2 -2
package/lib/globSourceFiles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globSourceFiles.js","sourceRoot":"","sources":["../src/globSourceFiles.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"globSourceFiles.js","sourceRoot":"","sources":["../src/globSourceFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,aAAqB,EAAE,YAAoB;IAC/E,MAAM,QAAQ,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,2FAA2F;IAC3F,yDAAyD;IACzD,MAAM,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,GAAG,sBAAsB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAClF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import { glob } from 'tinyglobby';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\n/**\n * Glob some source files with the correct extension for the runtime context (compiled or Jest).\n * @param importMetaUrl `import.meta.url` of the calling file.\n * @param patternNoExt Pattern to match relative to the calling file's directory, without an extension.\n * @returns List of full paths to matching source files.\n */\nexport async function globSourceFiles(importMetaUrl: string, patternNoExt: string): Promise<string[]> {\n const filePath = fileURLToPath(importMetaUrl);\n const dirPath = path.dirname(filePath);\n // Correct file extension (`.js` or `.ts`) depending on the context the code is running in:\n // compiled (`.js`) or Jest test in this package (`.ts`).\n const dynamicImportExtension = path.extname(filePath);\n\n const files = await glob(patternNoExt + dynamicImportExtension, { cwd: dirPath });\n return files.map((file) => path.join(dirPath, file));\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +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
5
|
export { intermediateToSourcePath } from './intermediateToSourcePath.js';
|
|
5
6
|
export { isFile } from './isFile.js';
|
|
6
7
|
export { isFileSync } from './isFileSync.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -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,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MA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B,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACrG,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,6 +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
5
|
export { intermediateToSourcePath } from './intermediateToSourcePath.js';
|
|
5
6
|
export { isFile } from './isFile.js';
|
|
6
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,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,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACrG,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 { 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, 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,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,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACrG,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, 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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceFilesGlobs.d.ts","sourceRoot":"","sources":["../src/sourceFilesGlobs.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,UAAuF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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}`);
|
|
15
|
+
/**
|
|
16
|
+
* Other file extensions to watch.
|
|
17
|
+
* These are not source files, but might affect the bundle output.
|
|
18
|
+
*/
|
|
19
|
+
const otherExtensionsGlob = [
|
|
20
|
+
'**/*.json',
|
|
21
|
+
'**/*.css',
|
|
22
|
+
'**/*.scss',
|
|
23
|
+
'**/*.sass',
|
|
24
|
+
'**/*.graphql',
|
|
25
|
+
'**/*.htm',
|
|
26
|
+
'**/*.html',
|
|
27
|
+
'**/*.txt',
|
|
28
|
+
'**/*.md',
|
|
29
|
+
'**/*.mdx',
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* All valid source file globs.
|
|
33
|
+
* Used for file watching and hashing of internal packages.
|
|
34
|
+
*/
|
|
35
|
+
export const sourceFilesGlobs = ['src/**/*', ...sourceExtensionsGlob, ...otherExtensionsGlob, ...defaultIgnorePaths];
|
|
36
|
+
//# sourceMappingURL=sourceFilesGlobs.js.map
|
|
@@ -0,0 +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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/path-utilities",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Path utilities for Cloudpack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
28
|
-
"fast-glob": "^3.2.12",
|
|
29
28
|
"import-meta-resolve": "^4.0.0",
|
|
30
29
|
"resolve": "^1.22.0",
|
|
30
|
+
"tinyglobby": "^0.2.13",
|
|
31
31
|
"workspace-tools": "^0.38.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|