@ms-cloudpack/package-utilities
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -5,3 +5,24 @@ { | ||
{ | ||
"date": "Thu, 01 Dec 2022 08:10:30 GMT", | ||
"date": "Sat, 03 Dec 2022 08:10:22 GMT", | ||
"tag": "@ms-cloudpack/package-utilities_v2.1.2", | ||
"version": "2.1.2", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "dake.3601@gmail.com", | ||
"package": "@ms-cloudpack/package-utilities", | ||
"commit": "9fae6cbdb788baac8236abc9eb44eb1d3296b7e0", | ||
"comment": "Used async isFile to improve performance" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@ms-cloudpack/package-utilities", | ||
"comment": "Bump @ms-cloudpack/path-utilities to v2.0.0", | ||
"commit": "adb6e5b06d2100f33ff9975c2999b81f81b65616" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 01 Dec 2022 08:10:47 GMT", | ||
"tag": "@ms-cloudpack/package-utilities_v2.1.1", | ||
@@ -8,0 +29,0 @@ "version": "2.1.1", |
# Change Log - @ms-cloudpack/package-utilities | ||
This log was last generated on Thu, 01 Dec 2022 08:10:30 GMT and should not be manually modified. | ||
This log was last generated on Sat, 03 Dec 2022 08:10:22 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 2.1.2 | ||
Sat, 03 Dec 2022 08:10:22 GMT | ||
### Patches | ||
- Used async isFile to improve performance (dake.3601@gmail.com) | ||
- Bump @ms-cloudpack/path-utilities to v2.0.0 | ||
## 2.1.1 | ||
Thu, 01 Dec 2022 08:10:30 GMT | ||
Thu, 01 Dec 2022 08:10:47 GMT | ||
@@ -11,0 +20,0 @@ ### Patches |
import path from 'path'; | ||
import { intermediateToSourcePath, isFile, sourceToIntermediatePath } from '@ms-cloudpack/path-utilities'; | ||
import { intermediateToSourcePath, sourceToIntermediatePath, isFile } from '@ms-cloudpack/path-utilities'; | ||
import { isExternalPackage } from './isExternalPackage.js'; | ||
@@ -29,7 +29,18 @@ import { safeRelativePath } from '@ms-cloudpack/path-string-parsing'; | ||
]; | ||
// Try and find the intermediate file. | ||
filePath = candidates.find((candidate) => isFile(path.join(packagePath, candidate))); | ||
filePath = undefined; | ||
for (const candidate of candidates) { | ||
if (await isFile(path.join(packagePath, candidate))) { | ||
filePath = candidate; | ||
break; | ||
} | ||
} | ||
// For internal packages, try and find source/typings and convert to intermediate (which may be missing.) | ||
if (isInternal) { | ||
sourcePath = [...candidates.map((candidate) => intermediateToSourcePath(candidate, packagePath))].find((candidate) => candidate && isFile(path.join(packagePath, candidate))); | ||
for (const candidate of candidates) { | ||
const intermediateCandidate = intermediateToSourcePath(candidate, packagePath); | ||
if (intermediateCandidate && (await isFile(path.join(packagePath, intermediateCandidate)))) { | ||
sourcePath = intermediateCandidate; | ||
break; | ||
} | ||
} | ||
// If we couldn't find a unique source file, stick with the resolved intermediate file as the only known truth. | ||
@@ -36,0 +47,0 @@ if (filePath && sourcePath === filePath) { |
{ | ||
"name": "@ms-cloudpack/package-utilities", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Utilities for resolving/parsing packages and their imports.", | ||
@@ -20,3 +20,3 @@ "license": "MIT", | ||
"@ms-cloudpack/package-overrides": "^0.2.0", | ||
"@ms-cloudpack/path-utilities": "^1.1.1", | ||
"@ms-cloudpack/path-utilities": "^2.0.0", | ||
"@ms-cloudpack/path-string-parsing": "^1.0.0", | ||
@@ -23,0 +23,0 @@ "merge": "^2.1.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
196391
3332
+ Added@ms-cloudpack/path-utilities@2.7.46(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removed@ms-cloudpack/path-utilities@1.1.1(transitive)