Comparing version 5.0.0-next.1704139385.328d593b9ad6dcd418ffae388fe720728b22205b to 5.0.0-next.1704140686.0e3a9f161700fdf495e9a533d82c5b6f715d1671
// builtin | ||
import { basename as getBasename } from 'node:path' | ||
import { basename as getBasename, isAbsolute } from 'node:path' | ||
@@ -156,9 +156,11 @@ // external | ||
) { | ||
if (typeof path === 'string') | ||
path = { | ||
absolutePath: path, | ||
relativePath: path, | ||
basename: getBasename(path), | ||
} | ||
return isIgnoredPath(path, opts) | ||
if (typeof path === 'string') { | ||
const result: Path = {} | ||
if (isAbsolute(path)) result.absolutePath = path | ||
else result.relativePath = path | ||
result.basename = getBasename(path) | ||
return isIgnoredPath(result, opts) | ||
} else { | ||
return isIgnoredPath(path, opts) | ||
} | ||
} |
// builtin | ||
import { basename as getBasename } from 'path'; | ||
import { basename as getBasename, isAbsolute } from 'path'; | ||
// external | ||
@@ -91,9 +91,14 @@ import undesiredBasenamesRegExp from 'ignorepatterns'; | ||
export default function isIgnoredPathCompatibility(path, opts) { | ||
if (typeof path === 'string') | ||
path = { | ||
absolutePath: path, | ||
relativePath: path, | ||
basename: getBasename(path), | ||
}; | ||
return isIgnoredPath(path, opts); | ||
if (typeof path === 'string') { | ||
const result = {}; | ||
if (isAbsolute(path)) | ||
result.absolutePath = path; | ||
else | ||
result.relativePath = path; | ||
result.basename = getBasename(path); | ||
return isIgnoredPath(result, opts); | ||
} | ||
else { | ||
return isIgnoredPath(path, opts); | ||
} | ||
} |
@@ -98,10 +98,15 @@ "use strict"; | ||
function isIgnoredPathCompatibility(path, opts) { | ||
if (typeof path === 'string') | ||
path = { | ||
absolutePath: path, | ||
relativePath: path, | ||
basename: (0, path_1.basename)(path), | ||
}; | ||
return isIgnoredPath(path, opts); | ||
if (typeof path === 'string') { | ||
const result = {}; | ||
if ((0, path_1.isAbsolute)(path)) | ||
result.absolutePath = path; | ||
else | ||
result.relativePath = path; | ||
result.basename = (0, path_1.basename)(path); | ||
return isIgnoredPath(result, opts); | ||
} | ||
else { | ||
return isIgnoredPath(path, opts); | ||
} | ||
} | ||
exports.default = isIgnoredPathCompatibility; |
@@ -142,10 +142,15 @@ "use strict"; | ||
function isIgnoredPathCompatibility(path, opts) { | ||
if (typeof path === 'string') | ||
path = { | ||
absolutePath: path, | ||
relativePath: path, | ||
basename: (0, path_1.basename)(path), | ||
}; | ||
return isIgnoredPath(path, opts); | ||
if (typeof path === 'string') { | ||
var result = {}; | ||
if ((0, path_1.isAbsolute)(path)) | ||
result.absolutePath = path; | ||
else | ||
result.relativePath = path; | ||
result.basename = (0, path_1.basename)(path); | ||
return isIgnoredPath(result, opts); | ||
} | ||
else { | ||
return isIgnoredPath(path, opts); | ||
} | ||
} | ||
exports.default = isIgnoredPathCompatibility; |
{ | ||
"title": "IgnoreFS", | ||
"name": "ignorefs", | ||
"version": "5.0.0-next.1704139385.328d593b9ad6dcd418ffae388fe720728b22205b", | ||
"version": "5.0.0-next.1704140686.0e3a9f161700fdf495e9a533d82c5b6f715d1671", | ||
"license": "Artistic-2.0", | ||
@@ -6,0 +6,0 @@ "description": "Ignore common and custom patterns of the file system", |
// builtin | ||
import { basename as getBasename } from 'path' | ||
import { basename as getBasename, isAbsolute } from 'path' | ||
@@ -156,9 +156,11 @@ // external | ||
) { | ||
if (typeof path === 'string') | ||
path = { | ||
absolutePath: path, | ||
relativePath: path, | ||
basename: getBasename(path), | ||
} | ||
return isIgnoredPath(path, opts) | ||
if (typeof path === 'string') { | ||
const result: Path = {} | ||
if (isAbsolute(path)) result.absolutePath = path | ||
else result.relativePath = path | ||
result.basename = getBasename(path) | ||
return isIgnoredPath(result, opts) | ||
} else { | ||
return isIgnoredPath(path, opts) | ||
} | ||
} |
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
59814
712
0