Comparing version 5.0.0 to 5.0.1-next.1704140835.d956d93b31149001dd4a8d777196b75461899779
// 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", | ||
"version": "5.0.1-next.1704140835.d956d93b31149001dd4a8d777196b75461899779", | ||
"license": "Artistic-2.0", | ||
@@ -6,0 +6,0 @@ "description": "Ignore common and custom patterns of the file system", |
@@ -51,3 +51,3 @@ <!-- TITLE/ --> | ||
``` typescript | ||
import * as pkg from 'https://unpkg.com/ignorefs@^5.0.0/edition-deno/index.ts' | ||
import * as pkg from 'https://unpkg.com/ignorefs@^5.0.1/edition-deno/index.ts' | ||
``` | ||
@@ -54,0 +54,0 @@ ### [Editions](https://editions.bevry.me "Editions are the best way to produce and consume packages you care about.") |
// 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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
20851
712
0
1