From 8bc34bc5dd94a73cb60270254e67a31a708e0e43 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Wed, 19 Apr 2023 15:07:23 +0000 Subject: [PATCH 1/3] feat(deps): Update enhanced-resolve to latest for * wildcard pattern in exports --- package.json | 2 +- yarn.lock | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 95aaddc1a0e..c4c9110dabf 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", + "enhanced-resolve": "^5.13.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 216a037345e..ed31c34c5a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2502,7 +2502,7 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: +enhanced-resolve@^5.0.0: version "5.12.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== @@ -2510,6 +2510,14 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enhanced-resolve@^5.13.0: + version "5.13.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz#26d1ecc448c02de997133217b5c1053f34a0a275" + integrity sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" From 58396f52f7cd6ea901a3e65b991d78057eb79b33 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Wed, 19 Apr 2023 15:17:35 +0000 Subject: [PATCH 2/3] introduce the new types from enhanced-resolve --- types.d.ts | 59 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/types.d.ts b/types.d.ts index 3a1f1becba1..7e6a78dcdf9 100644 --- a/types.d.ts +++ b/types.d.ts @@ -4191,17 +4191,31 @@ declare interface FileSystem { arg2: FileSystemCallback ): void; }; - readdir: { - ( - arg0: string, - arg1: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]> - ): void; - ( - arg0: string, - arg1: object, - arg2: FileSystemCallback<(string | Buffer)[] | FileSystemDirent[]> - ): void; - }; + readdir: ( + arg0: string, + arg1?: + | null + | "ascii" + | "utf8" + | "utf16le" + | "ucs2" + | "latin1" + | "binary" + | (( + arg0?: null | NodeJS.ErrnoException, + arg1?: any[] | (string | Buffer)[] + ) => void) + | ReaddirOptions + | "utf-8" + | "ucs-2" + | "base64" + | "hex" + | "buffer", + arg2?: ( + arg0?: null | NodeJS.ErrnoException, + arg1?: any[] | (string | Buffer)[] + ) => void + ) => void; readJson?: { (arg0: string, arg1: FileSystemCallback): void; (arg0: string, arg1: object, arg2: FileSystemCallback): void; @@ -4234,11 +4248,6 @@ declare interface FileSystem { declare interface FileSystemCallback { (err?: null | (PossibleFileSystemError & Error), result?: T): any; } -declare interface FileSystemDirent { - name: string | Buffer; - isDirectory: () => boolean; - isFile: () => boolean; -} declare abstract class FileSystemInfo { fs: InputFileSystem; logger?: WebpackLogger; @@ -4590,7 +4599,7 @@ declare interface HashedModuleIdsPluginOptions { /** * The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported. */ - hashDigest?: "latin1" | "hex" | "base64"; + hashDigest?: "latin1" | "base64" | "hex"; /** * The prefix length of the hash digest to use, defaults to 4. @@ -9411,6 +9420,22 @@ declare class ReadFileCompileWasmPlugin { */ apply(compiler: Compiler): void; } +declare interface ReaddirOptions { + encoding?: + | null + | "ascii" + | "utf8" + | "utf16le" + | "ucs2" + | "latin1" + | "binary" + | "utf-8" + | "ucs-2" + | "base64" + | "hex" + | "buffer"; + withFileTypes?: boolean; +} declare class RealContentHashPlugin { constructor(__0: { hashFunction: any; hashDigest: any }); From d58760a82924a709a4b1df26b970a6f4a9f91c8c Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Wed, 19 Apr 2023 15:25:15 +0000 Subject: [PATCH 3/3] yarn-lint --- yarn.lock | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index ed31c34c5a1..0489e329ba7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2502,15 +2502,7 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -enhanced-resolve@^5.0.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enhanced-resolve@^5.13.0: +enhanced-resolve@^5.0.0, enhanced-resolve@^5.13.0: version "5.13.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz#26d1ecc448c02de997133217b5c1053f34a0a275" integrity sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==