Skip to content

Commit 59640d1

Browse files
deps: Bump globby from 14.1.0 to 16.2.4 (#1539)
Bumps [globby](https://github.com/sindresorhus/globby) from 14.1.0 to 16.2.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/sindresorhus/globby/releases">globby's releases</a>.</em></p> <blockquote> <h2>v16.2.4</h2> <ul> <li>Fix <code>ignore</code> option disabling the <code>gitignore</code> option 19e1fce</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.2.3...v16.2.4">https://github.com/sindresorhus/globby/compare/v16.2.3...v16.2.4</a></p> <h2>v16.2.3</h2> <ul> <li>Fix backslash-escaped <code>.gitignore</code> rules 5775ffb</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.2.2...v16.2.3">https://github.com/sindresorhus/globby/compare/v16.2.2...v16.2.3</a></p> <h2>v16.2.2</h2> <ul> <li>Fix: Do not enumerate ignored directories with <code>gitignore</code> option 8bf8f54</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.2.1...v16.2.2">https://github.com/sindresorhus/globby/compare/v16.2.1...v16.2.2</a></p> <h2>v16.2.1</h2> <ul> <li>Fix <code>gitignore</code> ignoring an entire checkout under an anchored ancestor path (<a href="https://redirect.github.com/sindresorhus/globby/issues/277">#277</a>) e7bd988</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.2.0...v16.2.1">https://github.com/sindresorhus/globby/compare/v16.2.0...v16.2.1</a></p> <h2>v16.2.0</h2> <ul> <li>Add <a href="https://github.com/sindresorhus/globby?tab=readme-ov-file#globalgitignore"><code>globalGitignore</code></a> option 51555b2</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.1.1...v16.2.0">https://github.com/sindresorhus/globby/compare/v16.1.1...v16.2.0</a></p> <h2>v16.1.1</h2> <ul> <li>Fix negation patterns with absolute filesystem paths 72e9916</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.1.0...v16.1.1">https://github.com/sindresorhus/globby/compare/v16.1.0...v16.1.1</a></p> <h2>v16.1.0</h2> <ul> <li>Add <a href="https://github.com/sindresorhus/globby?tab=readme-ov-file#expandnegationonlypatterns"><code>expandNegationOnlyPatterns</code></a> option eb78791</li> <li>Fix: Normalize leading-slash negation patterns before task generation 59e269f</li> </ul> <hr /> <p><a href="https://github.com/sindresorhus/globby/compare/v16.0.0...v16.1.0">https://github.com/sindresorhus/globby/compare/v16.0.0...v16.1.0</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/sindresorhus/globby/commit/46cf13ff8bf5f0e0db96c4985faf83a59d194777"><code>46cf13f</code></a> 16.2.4</li> <li><a href="https://github.com/sindresorhus/globby/commit/19e1fce28f0fd2cf95b973d772009ba9a74786c6"><code>19e1fce</code></a> Fix <code>ignore</code> option disabling the <code>gitignore</code> option</li> <li><a href="https://github.com/sindresorhus/globby/commit/4f95a14d1f85cea7739ee0cb0113cefc4fdd8f9b"><code>4f95a14</code></a> 16.2.3</li> <li><a href="https://github.com/sindresorhus/globby/commit/5775ffb650a48fa4df112878702e2f0d9aeaf86d"><code>5775ffb</code></a> Fix backslash-escaped <code>.gitignore</code> rules</li> <li><a href="https://github.com/sindresorhus/globby/commit/6807768123db9fff0deafeb922c76c8927a44842"><code>6807768</code></a> Meta tweaks</li> <li><a href="https://github.com/sindresorhus/globby/commit/14f4f479869485fe73c4012f11d08517dcb3791d"><code>14f4f47</code></a> 16.2.2</li> <li><a href="https://github.com/sindresorhus/globby/commit/8bf8f54fc3e088cbf5ce833c00671811a92b7b1c"><code>8bf8f54</code></a> Fix: Do not enumerate ignored directories with <code>gitignore</code> option</li> <li><a href="https://github.com/sindresorhus/globby/commit/47e7f658b87c1f48a4e62600a47dc0eca6dae249"><code>47e7f65</code></a> 16.2.1</li> <li><a href="https://github.com/sindresorhus/globby/commit/e7bd988344d47dbd154310983a06431991a05946"><code>e7bd988</code></a> Fix <code>gitignore</code> ignoring an entire checkout under an anchored ancestor path (...</li> <li><a href="https://github.com/sindresorhus/globby/commit/60e816778abd4fc805d8ce2e981567759b035504"><code>60e8167</code></a> 16.2.0</li> <li>Additional commits viewable in <a href="https://github.com/sindresorhus/globby/compare/v14.1.0...v16.2.4">compare view</a></li> </ul> </details> <br /> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: d3xter666 <yavor.ivanov@sap.com>
1 parent 93bdc68 commit 59640d1

6 files changed

Lines changed: 47 additions & 107 deletions

File tree

‎package-lock.json‎

Lines changed: 21 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/fs/lib/adapters/FileSystem.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ class FileSystem extends AbstractAdapter {
6767
onlyFiles: options.nodir,
6868
followSymbolicLinks: false,
6969
gitignore: this._useGitignore,
70+
// globby >=16 expands a negation-only pattern list (e.g. ["!**/foo"]) to
71+
// "everything except", whereas we rely on the pre-16 behavior of matching
72+
// nothing when no positive pattern remains. Keep the old semantics.
73+
expandNegationOnlyPatterns: false,
7074
};
7175
trace.globCall();
7276

@@ -119,6 +123,7 @@ class FileSystem extends AbstractAdapter {
119123
`Failed to resolve virtual path of glob match '${virPath}': Path must start with ` +
120124
`the configured virtual base path of the adapter. Base path: '${this._virBasePath}'`);
121125
resolve(null);
126+
return; // Stop: relPath is null, do not attempt to stat it
122127
}
123128
const fsPath = this._resolveToFileSystem(relPath);
124129

‎packages/fs/lib/readers/Link.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ class Link extends AbstractReader {
105105
path: this._pathMapping.linkPath + resourcePath.substr(this._pathMapping.targetPath.length)
106106
});
107107
}
108-
});
108+
// Drop resources outside the mapped target path instead of leaking an undefined entry
109+
}).filter(Boolean);
109110
}
110111

111112
/**

‎packages/fs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@ui5/logger": "^5.0.0-alpha.12",
6060
"async-mutex": "^0.5.0",
6161
"escape-string-regexp": "^5.0.0",
62-
"globby": "^15.0.0",
62+
"globby": "^16.2.4",
6363
"graceful-fs": "^4.2.11",
6464
"micromatch": "^4.0.8",
6565
"minimatch": "^10.2.6",

‎packages/fs/test/lib/adapters/FileSystem_read.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,23 @@ test("static excludes: glob library src and test with double negation", async (t
296296
], "Found expected test resources");
297297
});
298298

299+
// Regression: with globby >=16 a negation-only pattern list (positive pattern normalized
300+
// away, only the negated exclude left) must match nothing, not "everything except".
301+
// Guarded via expandNegationOnlyPatterns: false in FileSystem._runGlob.
302+
test("static excludes: query yielding a negation-only pattern list matches nothing", async (t) => {
303+
const testReader = createAdapter({
304+
fsBasePath: "./test/fixtures/library.l/test",
305+
virBasePath: "/test-resources/",
306+
excludes: ["/test-resources/**/.library"]
307+
});
308+
309+
// ".library" exists only under /resources, so for this test adapter the positive
310+
// pattern drops out and only the negated exclude remains.
311+
const testResources = await testReader.byGlob("/resources/**/.library", {nodir: true});
312+
313+
t.is(testResources.length, 0, "Negation-only pattern list must not expand to all files");
314+
});
315+
299316
test("static excludes: glob library test with double negation", async (t) => {
300317
const excludes = [
301318
"/test-resources/**",

‎packages/project/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"ajv-errors": "^3.0.0",
7070
"chalk": "^6.0.0",
7171
"escape-string-regexp": "^5.0.0",
72-
"globby": "^14.1.0",
72+
"globby": "^16.2.4",
7373
"graceful-fs": "^4.2.11",
7474
"js-yaml": "^4.3.1",
7575
"lockfile": "^1.0.4",

0 commit comments

Comments
 (0)