deps: tinyglobby@0.2.13 · npm/cli@a4c5e74 · GitHub
Skip to content

Commit a4c5e74

Browse files
committed
deps: tinyglobby@0.2.13
1 parent b9156d2 commit a4c5e74

8 files changed

Lines changed: 30 additions & 23 deletions

File tree

node_modules/tinyglobby/dist/index.js

Lines changed: 2 additions & 2 deletions

node_modules/tinyglobby/dist/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
126126
}
127127
props.depthOffset = newCommonPath.length;
128128
props.commonPath = newCommonPath;
129-
props.root = newCommonPath.length > 0 ? `${cwd}/${newCommonPath.join("/")}` : cwd;
129+
props.root = newCommonPath.length > 0 ? path.posix.join(cwd, ...newCommonPath) : cwd;
130130
}
131131
return result;
132132
}
@@ -165,7 +165,7 @@ function getRelativePath(path2, cwd, root) {
165165
return posix.relative(cwd, `${root}/${path2}`) || ".";
166166
}
167167
function processPath(path2, cwd, root, isDirectory, absolute) {
168-
const relativePath = absolute ? path2.slice(root.length + 1) || "." : path2;
168+
const relativePath = absolute ? path2.slice(root === "/" ? 1 : root.length + 1) || "." : path2;
169169
if (root === cwd) {
170170
return isDirectory && relativePath !== "." ? relativePath.slice(0, -1) : relativePath;
171171
}

node_modules/tinyglobby/node_modules/fdir/dist/api/walker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Walker {
5353
this.callbackInvoker = invokeCallback.build(options, this.isSynchronous);
5454
this.root = (0, utils_1.normalizePath)(root, options);
5555
this.state = {
56-
root: this.root.slice(0, -1),
56+
root: (0, utils_1.isRootDirectory)(this.root) ? this.root : this.root.slice(0, -1),
5757
// Perf: we explicitly tell the compiler to optimize for String arrays
5858
paths: [""].slice(0, 0),
5959
groups: [],
@@ -104,7 +104,8 @@ class Walker {
104104
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
105105
if (stat.isDirectory()) {
106106
resolvedPath = (0, utils_1.normalizePath)(resolvedPath, this.state.options);
107-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator))
107+
if (exclude &&
108+
exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator))
108109
return;
109110
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
110111
}

node_modules/tinyglobby/node_modules/fdir/dist/builder/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Builder {
122122
const globFn = (this.globFunction || pm);
123123
/* c8 ignore next 5 */
124124
if (!globFn) {
125-
throw new Error('Please specify a glob function to use glob matching.');
125+
throw new Error("Please specify a glob function to use glob matching.");
126126
}
127127
var isMatch = this.globCache[patterns.join("\0")];
128128
if (!isMatch) {

node_modules/tinyglobby/node_modules/fdir/dist/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.normalizePath = exports.convertSlashes = exports.cleanPath = void 0;
3+
exports.normalizePath = exports.isRootDirectory = exports.convertSlashes = exports.cleanPath = void 0;
44
const path_1 = require("path");
55
function cleanPath(path) {
66
let normalized = (0, path_1.normalize)(path);
@@ -16,6 +16,10 @@ function convertSlashes(path, separator) {
1616
return path.replace(SLASHES_REGEX, separator);
1717
}
1818
exports.convertSlashes = convertSlashes;
19+
function isRootDirectory(path) {
20+
return path === "/" || /^[a-z]:\\$/i.test(path);
21+
}
22+
exports.isRootDirectory = isRootDirectory;
1923
function normalizePath(path, options) {
2024
const { resolvePaths, normalizePath, pathSeparator } = options;
2125
const pathNeedsCleaning = (process.platform === "win32" && path.includes("/")) ||

node_modules/tinyglobby/node_modules/fdir/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "fdir",
3-
"version": "6.4.3",
3+
"version": "6.4.4",
44
"description": "The fastest directory crawler & globbing alternative to glob, fast-glob, & tiny-glob. Crawls 1m files in < 1s",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"prepublishOnly": "npm run test && npm run build",
99
"build": "tsc",
10+
"format": "prettier --write src __tests__ benchmarks",
1011
"test": "vitest run __tests__/",
1112
"test:coverage": "vitest run --coverage __tests__/",
1213
"test:watch": "vitest __tests__/",
@@ -65,6 +66,7 @@
6566
"klaw-sync": "^6.0.0",
6667
"mock-fs": "^5.2.0",
6768
"picomatch": "^4.0.2",
69+
"prettier": "^3.5.3",
6870
"recur-readdir": "0.0.1",
6971
"recursive-files": "^1.0.2",
7072
"recursive-fs": "^2.1.0",

node_modules/tinyglobby/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tinyglobby",
3-
"version": "0.2.12",
3+
"version": "0.2.13",
44
"description": "A fast and minimal alternative to globby and fast-glob",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",
@@ -33,16 +33,16 @@
3333
"url": "https://github.com/sponsors/SuperchupuDev"
3434
},
3535
"dependencies": {
36-
"fdir": "^6.4.3",
36+
"fdir": "^6.4.4",
3737
"picomatch": "^4.0.2"
3838
},
3939
"devDependencies": {
4040
"@biomejs/biome": "^1.9.4",
41-
"@types/node": "^22.13.4",
42-
"@types/picomatch": "^3.0.2",
43-
"fs-fixture": "^2.7.0",
44-
"tsup": "^8.3.6",
45-
"typescript": "^5.7.3"
41+
"@types/node": "^22.14.1",
42+
"@types/picomatch": "^4.0.0",
43+
"fs-fixture": "^2.7.1",
44+
"tsup": "^8.4.0",
45+
"typescript": "^5.8.3"
4646
},
4747
"engines": {
4848
"node": ">=12.0.0"

package-lock.json

Lines changed: 7 additions & 7 deletions

0 commit comments

Comments
 (0)