Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/DirectoryExistsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = class DirectoryExistsPlugin {
const fs = resolver.fileSystem;
const directory = request.path;
if (!directory) return callback();
fs.stat(directory, (err, stat) => {
fs.stat(directory, { throwIfNoEntry: false }, (err, stat) => {
if (err || !stat) {
if (resolveContext.missingDependencies)
resolveContext.missingDependencies.add(directory);
Expand Down
2 changes: 1 addition & 1 deletion lib/FileExistsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = class FileExistsPlugin {
.tapAsync("FileExistsPlugin", (request, resolveContext, callback) => {
const file = request.path;
if (!file) return callback();
fs.stat(file, (err, stat) => {
fs.stat(file, { throwIfNoEntry: false }, (err, stat) => {
if (err || !stat) {
if (resolveContext.missingDependencies)
resolveContext.missingDependencies.add(file);
Expand Down
2 changes: 1 addition & 1 deletion lib/ModulesInHierarchicalDirectoriesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = class ModulesInHierarchicalDirectoriesPlugin {
* @returns {void}
*/
(addr, callback) => {
fs.stat(addr, (err, stat) => {
fs.stat(addr, { throwIfNoEntry: false }, (err, stat) => {
if (!err && stat && stat.isDirectory()) {
/** @type {ResolveRequest} */
const obj = {
Expand Down
4 changes: 2 additions & 2 deletions lib/Resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ const {
* @property {function(string, (ReaddirOptions | BufferEncoding | null | undefined | 'buffer' | DirentArrayCallback)=, DirentArrayCallback=): void} readdir
* @property {((function(string, FileSystemCallback<object>): void) & function(string, object, FileSystemCallback<object>): void)=} readJson
* @property {(function(string, FileSystemCallback<Buffer | string>): void) & function(string, object, FileSystemCallback<Buffer | string>): void} readlink
* @property {(function(string, FileSystemCallback<FileSystemStats>): void) & function(string, object, FileSystemCallback<Buffer | string>): void=} lstat
* @property {(function(string, FileSystemCallback<FileSystemStats>): void) & function(string, object, FileSystemCallback<Buffer | string>): void} stat
* @property {(function(string, FileSystemCallback<FileSystemStats>): void) & function(string, object, FileSystemCallback<FileSystemStats>): void=} lstat
* @property {(function(string, FileSystemCallback<FileSystemStats>): void) & function(string, object, FileSystemCallback<FileSystemStats>): void} stat
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"process": "./lib/util/process-browser.js"
},
"dependencies": {
"graceful-fs": "^4.2.4",
"graceful-fs": "^4.2.9",
"tapable": "^2.2.0"
},
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ declare class CachedInputFileSystem {
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
arg2: FileSystemCallback<FileSystemStats>
): void;
};
lstatSync?: (arg0: string, arg1?: object) => FileSystemStats;
Expand All @@ -47,7 +47,7 @@ declare class CachedInputFileSystem {
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
arg2: FileSystemCallback<FileSystemStats>
): void;
};
statSync: (arg0: string, arg1?: object) => FileSystemStats;
Expand Down Expand Up @@ -195,15 +195,15 @@ declare interface FileSystem {
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
arg2: FileSystemCallback<FileSystemStats>
): void;
};
stat: {
(arg0: string, arg1: FileSystemCallback<FileSystemStats>): void;
(
arg0: string,
arg1: object,
arg2: FileSystemCallback<string | Buffer>
arg2: FileSystemCallback<FileSystemStats>
): void;
};
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2052,10 +2052,10 @@ globals@^13.6.0, globals@^13.9.0:
dependencies:
type-fest "^0.20.2"

graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9:
version "4.2.10"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==

has-flag@^3.0.0:
version "3.0.0"
Expand Down