Skip to content

Commit a4c5e74

Browse files
committed
1 parent b9156d2 commit a4c5e74

File tree

8 files changed

+30
-23
lines changed

8 files changed

+30
-23
lines changed

node_modules/tinyglobby/dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
164164
}
165165
props.depthOffset = newCommonPath.length;
166166
props.commonPath = newCommonPath;
167-
props.root = newCommonPath.length > 0 ? `${cwd}/${newCommonPath.join("/")}` : cwd;
167+
props.root = newCommonPath.length > 0 ? import_node_path.default.posix.join(cwd, ...newCommonPath) : cwd;
168168
}
169169
return result;
170170
}
@@ -203,7 +203,7 @@ function getRelativePath(path2, cwd, root) {
203203
return import_node_path.posix.relative(cwd, `${root}/${path2}`) || ".";
204204
}
205205
function processPath(path2, cwd, root, isDirectory, absolute) {
206-
const relativePath = absolute ? path2.slice(root.length + 1) || "." : path2;
206+
const relativePath = absolute ? path2.slice(root === "/" ? 1 : root.length + 1) || "." : path2;
207207
if (root === cwd) {
208208
return isDirectory && relativePath !== "." ? relativePath.slice(0, -1) : relativePath;
209209
}

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
Original file line numberDiff line numberDiff line change
@@ -17607,13 +17607,13 @@
1760717607
"license": "MIT"
1760817608
},
1760917609
"node_modules/tinyglobby": {
17610-
"version": "0.2.12",
17611-
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz",
17612-
"integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==",
17610+
"version": "0.2.13",
17611+
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz",
17612+
"integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==",
1761317613
"inBundle": true,
1761417614
"license": "MIT",
1761517615
"dependencies": {
17616-
"fdir": "^6.4.3",
17616+
"fdir": "^6.4.4",
1761717617
"picomatch": "^4.0.2"
1761817618
},
1761917619
"engines": {
@@ -17624,9 +17624,9 @@
1762417624
}
1762517625
},
1762617626
"node_modules/tinyglobby/node_modules/fdir": {
17627-
"version": "6.4.3",
17628-
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz",
17629-
"integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==",
17627+
"version": "6.4.4",
17628+
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz",
17629+
"integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==",
1763017630
"inBundle": true,
1763117631
"license": "MIT",
1763217632
"peerDependencies": {

0 commit comments

Comments
 (0)