@ms-cloudpack/path-utilities
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Fri, 20 May 2022 04:25:53 GMT", | ||
"date": "Wed, 25 May 2022 21:40:21 GMT", | ||
"tag": "@ms-cloudpack/path-utilities_v0.3.0", | ||
"version": "0.3.0", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "dzearing@microsoft.com", | ||
"package": "@ms-cloudpack/path-utilities", | ||
"commit": "c81fea1af8bedcd81366fbddb199dd2c0e6cbaa7", | ||
"comment": "Ensuring intermediatToSourcePath returns paths that are existing files, not existing folders." | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Fri, 20 May 2022 04:26:15 GMT", | ||
"tag": "@ms-cloudpack/path-utilities_v0.2.0", | ||
@@ -8,0 +23,0 @@ "version": "0.2.0", |
# Change Log - @ms-cloudpack/path-utilities | ||
This log was last generated on Fri, 20 May 2022 04:25:53 GMT and should not be manually modified. | ||
This log was last generated on Wed, 25 May 2022 21:40:21 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 0.3.0 | ||
Wed, 25 May 2022 21:40:21 GMT | ||
### Minor changes | ||
- Ensuring intermediatToSourcePath returns paths that are existing files, not existing folders. (dzearing@microsoft.com) | ||
## 0.2.0 | ||
Fri, 20 May 2022 04:25:53 GMT | ||
Fri, 20 May 2022 04:26:15 GMT | ||
@@ -11,0 +19,0 @@ ### Minor changes |
@@ -1,3 +0,3 @@ | ||
import { existsSync } from 'fs'; | ||
import path from 'path'; | ||
import { isFile } from './isFile.js'; | ||
import { slash } from './slash.js'; | ||
@@ -31,7 +31,12 @@ /** | ||
} | ||
return candidates.find((candidate) => { | ||
let match = candidates.find((candidate) => { | ||
const resolvedPath = path.resolve(rootPath, candidate); | ||
return existsSync(resolvedPath); | ||
return isFile(resolvedPath); | ||
}); | ||
// Re-add the leading period. | ||
if (match && parts[0] === '.' && !match.startsWith('./')) { | ||
match = './' + match; | ||
} | ||
return match; | ||
} | ||
//# sourceMappingURL=intermediateToSourcePath.js.map |
@@ -18,2 +18,5 @@ import { fileURLToPath } from 'url'; | ||
}); | ||
it('can preserve a leading period when translating to a .ts from the src path', () => { | ||
expect(intermediateToSourcePath('./lib/ts.js', testPath)).toEqual('./src/ts.ts'); | ||
}); | ||
it('can resolve a .tsx', () => { | ||
@@ -20,0 +23,0 @@ expect(intermediateToSourcePath('lib/tsx.js', testPath)).toEqual('src/tsx.tsx'); |
{ | ||
"name": "@ms-cloudpack/path-utilities", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Utilities for resolving paths between source/intermediate/output locations in Cloudpack.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25339
333
4
0