Comparing version 14.0.0 to 14.0.1
@@ -11,9 +11,9 @@ import process from 'node:process'; | ||
const defaultIgnoredDirectories = [ | ||
'**/node_modules', | ||
'**/flow-typed', | ||
'**/coverage', | ||
'**/.git', | ||
]; | ||
const ignoreFilesGlobOptions = { | ||
ignore: [ | ||
'**/node_modules', | ||
'**/flow-typed', | ||
'**/coverage', | ||
'**/.git', | ||
], | ||
absolute: true, | ||
@@ -66,8 +66,15 @@ dot: true, | ||
deep: typeof options.deep === 'number' ? options.deep : Number.POSITIVE_INFINITY, | ||
ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories], | ||
}); | ||
export const isIgnoredByIgnoreFiles = async (patterns, options) => { | ||
const {cwd, suppressErrors, deep} = normalizeOptions(options); | ||
const {cwd, suppressErrors, deep, ignore} = normalizeOptions(options); | ||
const paths = await fastGlob(patterns, {cwd, suppressErrors, deep, ...ignoreFilesGlobOptions}); | ||
const paths = await fastGlob(patterns, { | ||
cwd, | ||
suppressErrors, | ||
deep, | ||
ignore, | ||
...ignoreFilesGlobOptions, | ||
}); | ||
@@ -85,5 +92,11 @@ const files = await Promise.all( | ||
export const isIgnoredByIgnoreFilesSync = (patterns, options) => { | ||
const {cwd, suppressErrors, deep} = normalizeOptions(options); | ||
const {cwd, suppressErrors, deep, ignore} = normalizeOptions(options); | ||
const paths = fastGlob.sync(patterns, {cwd, suppressErrors, deep, ...ignoreFilesGlobOptions}); | ||
const paths = fastGlob.sync(patterns, { | ||
cwd, | ||
suppressErrors, | ||
deep, | ||
ignore, | ||
...ignoreFilesGlobOptions, | ||
}); | ||
@@ -90,0 +103,0 @@ const files = paths.map(filePath => ({ |
@@ -1,3 +0,3 @@ | ||
import type FastGlob from 'fast-glob'; | ||
import {type Options as FastGlobOptions, type Entry} from 'fast-glob'; | ||
import type FastGlob from 'fast-glob'; // eslint-disable-line import/no-duplicates | ||
import {type Options as FastGlobOptions, type Entry} from 'fast-glob'; // eslint-disable-line import/no-duplicates | ||
@@ -4,0 +4,0 @@ export type GlobEntry = Entry; |
@@ -30,3 +30,3 @@ import process from 'node:process'; | ||
? files.map(file => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) | ||
: [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/${extensionGlob}` : ''}`)]; | ||
: [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ''}`)]; | ||
}; | ||
@@ -33,0 +33,0 @@ |
{ | ||
"name": "globby", | ||
"version": "14.0.0", | ||
"version": "14.0.1", | ||
"description": "User-friendly glob matching", | ||
@@ -66,3 +66,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@sindresorhus/merge-streams": "^1.0.0", | ||
"@sindresorhus/merge-streams": "^2.1.0", | ||
"fast-glob": "^3.3.2", | ||
@@ -81,4 +81,4 @@ "ignore": "^5.2.4", | ||
"tempy": "^3.1.0", | ||
"tsd": "^0.29.0", | ||
"xo": "^0.56.0" | ||
"tsd": "^0.30.4", | ||
"xo": "^0.57.0" | ||
}, | ||
@@ -85,0 +85,0 @@ "xo": { |
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
25811
458
+ Added@sindresorhus/merge-streams@2.3.0(transitive)
- Removed@sindresorhus/merge-streams@1.0.0(transitive)