@ms-cloudpack/path-utilities 3.1.0 → 3.1.2

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.
@@ -1,4 +1,4 @@
1
- import glob from 'fast-glob';
1
+ import { glob } from 'tinyglobby';
2
2
  import path from 'path';
3
3
  import { fileURLToPath } from 'url';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"globSourceFiles.js","sourceRoot":"","sources":["../src/globSourceFiles.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,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 'fast-glob';\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"]}
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/path-utilities",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Path utilities for Cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,13 +25,13 @@
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": {
34
- "@ms-cloudpack/common-types": "^0.24.16",
34
+ "@ms-cloudpack/common-types": "^0.24.17",
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"