path-parents
Advanced tools
Comparing version 1.0.20 to 1.0.21
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.0.21](https://github.com/bluelovers/ws-iconv/compare/path-parents@1.0.20...path-parents@1.0.21) (2022-07-26) | ||
### ✨ Features | ||
* tweak options ([3d858bb](https://github.com/bluelovers/ws-iconv/commit/3d858bbe184a0ef976e065da0127335371a9d4d6)) | ||
## [1.0.20](https://github.com/bluelovers/ws-iconv/compare/path-parents@1.0.19...path-parents@1.0.20) (2022-05-11) | ||
@@ -8,0 +19,0 @@ |
import { IPathNode, IPathPlatform } from 'upath2/lib/type'; | ||
export interface IOptions { | ||
cwd?: string; | ||
platform?: IPathPlatform; | ||
@@ -4,0 +5,0 @@ } |
@@ -7,4 +7,5 @@ "use strict"; | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const path_is_same_1 = tslib_1.__importDefault(require("path-is-same")); | ||
const path_is_same_1 = require("path-is-same"); | ||
function handleOptions(cwd, opts) { | ||
var _a; | ||
if (typeof opts === 'undefined') { | ||
@@ -15,4 +16,4 @@ if (typeof cwd !== 'string') { | ||
} | ||
cwd = cwd !== null && cwd !== void 0 ? cwd : process.cwd(); | ||
opts = opts !== null && opts !== void 0 ? opts : {}; | ||
cwd = (_a = cwd !== null && cwd !== void 0 ? cwd : opts.cwd) !== null && _a !== void 0 ? _a : process.cwd(); | ||
let path = core_1.default; | ||
@@ -46,3 +47,3 @@ if (typeof opts.platform === 'string') { | ||
let path = runtime.path.dirname(cwd); | ||
if (!(0, path_is_same_1.default)(cwd, path)) { | ||
if (!(0, path_is_same_1.pathIsSame)(cwd, path)) { | ||
return path; | ||
@@ -49,0 +50,0 @@ } |
{ | ||
"name": "path-parents", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "return all the parent directories for a directory", | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "6552242829a533ddf68c35d459d28224c3bc7c07" | ||
"gitHead": "d06eae46cfd790acec656643f2e48a9c8584fa56" | ||
} |
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
17648
102