From 6750f5f64385a1d918a2ee07deb4f34c801e29d6 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Sun, 3 May 2026 17:18:57 +0800 Subject: [PATCH 1/6] fix: recognize win32 relative paths in getType and isRelativeRequest On Windows, path.relative() returns backslash-separated paths like "..\src". These were classified as Normal (bare specifier) instead of Relative, causing the resolver to look in node_modules instead of resolving relative to the context directory. - getType: treat .\ and ..\ the same as ./ and ../ - normalize: convert backslashes to forward slashes for Relative paths - isRelativeRequest: recognize .\ and ..\ as relative Fixes #401 --- lib/util/path.js | 16 +++++++--- test/path.test.js | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 4 deletions(-) diff --git a/lib/util/path.js b/lib/util/path.js index 707b6144..36334ba6 100644 --- a/lib/util/path.js +++ b/lib/util/path.js @@ -81,6 +81,7 @@ const getType = (maybePath) => { switch (c1) { case CHAR_DOT: case CHAR_SLASH: + case CHAR_BACKSLASH: return PathType.Relative; } return PathType.Normal; @@ -107,10 +108,13 @@ const getType = (maybePath) => { const c1 = maybePath.charCodeAt(1); switch (c1) { case CHAR_SLASH: + case CHAR_BACKSLASH: return PathType.Relative; case CHAR_DOT: { const c2 = maybePath.charCodeAt(2); - if (c2 === CHAR_SLASH) return PathType.Relative; + if (c2 === CHAR_SLASH || c2 === CHAR_BACKSLASH) { + return PathType.Relative; + } return PathType.Normal; } } @@ -153,7 +157,10 @@ const normalize = (maybePath) => { case PathType.AbsoluteWin: return winNormalize(maybePath); case PathType.Relative: { - const r = posixNormalize(maybePath); + const posixPath = maybePath.includes("\\") + ? maybePath.replace(/\\/g, "/") + : maybePath; + const r = posixNormalize(posixPath); return getType(r) === PathType.Relative ? r : `./${r}`; } } @@ -290,10 +297,11 @@ const isRelativeRequest = (request) => { if (len === 0 || request.charCodeAt(0) !== CHAR_DOT) return false; if (len === 1) return true; // "." const c1 = request.charCodeAt(1); - if (c1 === CHAR_SLASH) return true; // "./..." + if (c1 === CHAR_SLASH || c1 === CHAR_BACKSLASH) return true; // "./..." or ".\\..." if (c1 !== CHAR_DOT) return false; // ".x..." if (len === 2) return true; // ".." - return request.charCodeAt(2) === CHAR_SLASH; // "../..." + const c2 = request.charCodeAt(2); + return c2 === CHAR_SLASH || c2 === CHAR_BACKSLASH; // "../..." or "..\\..." }; /** diff --git a/test/path.test.js b/test/path.test.js index 9bcab677..9b419643 100644 --- a/test/path.test.js +++ b/test/path.test.js @@ -1,5 +1,7 @@ "use strict"; +const path = require("path"); + const { PathType, createCachedBasename, @@ -27,6 +29,10 @@ describe("util/path getType", () => { expect(getType("a")).toBe(PathType.Normal); }); + it("classifies win32 relative two-character inputs", () => { + expect(getType(".\\")).toBe(PathType.Relative); + }); + it("classifies two-character inputs", () => { expect(getType("..")).toBe(PathType.Relative); expect(getType("./")).toBe(PathType.Relative); @@ -39,6 +45,12 @@ describe("util/path getType", () => { expect(getType("1:")).toBe(PathType.Normal); }); + it("classifies win32 relative longer inputs", () => { + expect(getType(".\\a")).toBe(PathType.Relative); + expect(getType("..\\a")).toBe(PathType.Relative); + expect(getType("..\\..\\src")).toBe(PathType.Relative); + }); + it("classifies longer inputs", () => { expect(getType("./a")).toBe(PathType.Relative); expect(getType("../a")).toBe(PathType.Relative); @@ -99,6 +111,12 @@ describe("util/path normalize", () => { expect(normalize("./a/../b")).toBe("./b"); }); + it("normalizes win32 relative paths to posix", () => { + expect(normalize(".\\a\\b")).toBe("./a/b"); + expect(normalize("..\\a")).toBe("../a"); + expect(normalize("..\\..\\src\\shared")).toBe("../../src/shared"); + }); + it("normalizes posix absolute paths", () => { expect(normalize("/a/b/../c")).toBe("/a/c"); }); @@ -140,6 +158,11 @@ describe("util/path join", () => { expect(join("C:\\a", "b")).toBe("C:\\a\\b"); }); + it("joins win32 relative requests onto win32 roots", () => { + expect(join("C:\\project\\app", "..\\..\\src")).toBe("C:\\src"); + expect(join("C:\\project", ".\\src")).toBe("C:\\project\\src"); + }); + it("joins DOS device paths with win32 semantics", () => { expect(join("\\\\?\\C:\\a", "b")).toBe("\\\\?\\C:\\a\\b"); expect(join("\\\\.\\C:\\a", "b")).toBe("\\\\.\\C:\\a\\b"); @@ -254,6 +277,14 @@ describe("util/path isRelativeRequest", () => { expect(isRelativeRequest("../foo")).toBe(true); }); + it("returns true for win32 relative requests", () => { + expect(isRelativeRequest(".\\")).toBe(true); + expect(isRelativeRequest(".\\foo")).toBe(true); + expect(isRelativeRequest("..\\")).toBe(true); + expect(isRelativeRequest("..\\foo")).toBe(true); + expect(isRelativeRequest("..\\..\\src")).toBe(true); + }); + it("returns false for bare specifiers and absolute paths", () => { expect(isRelativeRequest("")).toBe(false); expect(isRelativeRequest("foo")).toBe(false); @@ -352,3 +383,46 @@ describe("util/path join fallbacks for special rootPath types", () => { expect(join("#x", "./foo")).toBe("./#x"); }); }); + +describe("util/path win32 relative paths from path.relative()", () => { + const isWin32 = process.platform === "win32"; + + if (isWin32) { + it("should produce backslash paths from path.relative() on win32", () => { + const rel = path.relative("C:\\project\\app", "C:\\project\\src"); + expect(rel).toContain("\\"); + expect(getType(rel)).toBe(PathType.Relative); + expect(isRelativeRequest(rel)).toBe(true); + expect(normalize(rel)).toBe("../src"); + }); + + it("should handle multi-level win32 relative paths", () => { + const rel = path.relative( + "C:\\project\\packages\\app", + "C:\\project\\src\\shared", + ); + expect(rel).toContain("\\"); + expect(getType(rel)).toBe(PathType.Relative); + expect(normalize(rel)).toBe("../../src/shared"); + }); + } else { + it("should handle win32-style paths on any platform", () => { + // Use path.win32.relative() to simulate Windows behavior on non-Windows + const rel = path.win32.relative("C:\\project\\app", "C:\\project\\src"); + expect(rel).toBe("..\\src"); + expect(getType(rel)).toBe(PathType.Relative); + expect(isRelativeRequest(rel)).toBe(true); + expect(normalize(rel)).toBe("../src"); + }); + + it("should handle multi-level win32 relative paths on any platform", () => { + const rel = path.win32.relative( + "C:\\project\\packages\\app", + "C:\\project\\src\\shared", + ); + expect(rel).toBe("..\\..\\src\\shared"); + expect(getType(rel)).toBe(PathType.Relative); + expect(normalize(rel)).toBe("../../src/shared"); + }); + } +}); From 5520c4cc5042a565a9d2ae3779bd3d263f64cb58 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Sun, 3 May 2026 17:19:13 +0800 Subject: [PATCH 2/6] chore: add changeset for win32 relative paths fix --- .changeset/fix-win32-relative-paths.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-win32-relative-paths.md diff --git a/.changeset/fix-win32-relative-paths.md b/.changeset/fix-win32-relative-paths.md new file mode 100644 index 00000000..68a8df77 --- /dev/null +++ b/.changeset/fix-win32-relative-paths.md @@ -0,0 +1,5 @@ +--- +"enhanced-resolve": patch +--- + +Recognize win32 relative paths (e.g. `..\src`) in `getType` and `isRelativeRequest`. On Windows, `path.relative()` returns backslash-separated paths that were previously misclassified as bare specifiers, causing resolution to fail. Backslashes in relative paths are now normalized to forward slashes internally. From b84e5bb2766fc78b0db6bff9066f7e30c6e4755c Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Sun, 3 May 2026 17:42:16 +0800 Subject: [PATCH 3/6] fix: add resolver integration test for win32 relative paths Also fix join() to convert backslashes in request when rootPath is non-AbsoluteWin, so posixNormalize can correctly resolve ".." segments. --- lib/util/path.js | 8 +++-- test/win32-relative.test.js | 60 +++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 test/win32-relative.test.js diff --git a/lib/util/path.js b/lib/util/path.js index 36334ba6..99256ade 100644 --- a/lib/util/path.js +++ b/lib/util/path.js @@ -184,8 +184,12 @@ const join = (rootPath, request) => { switch (getType(rootPath)) { case PathType.Normal: case PathType.Relative: - case PathType.AbsolutePosix: - return posixNormalize(`${rootPath}/${request}`); + case PathType.AbsolutePosix: { + const req = request.includes("\\") + ? request.replace(/\\/g, "/") + : request; + return posixNormalize(`${rootPath}/${req}`); + } case PathType.AbsoluteWin: return winNormalize(`${rootPath}\\${request}`); } diff --git a/test/win32-relative.test.js b/test/win32-relative.test.js new file mode 100644 index 00000000..cd865af2 --- /dev/null +++ b/test/win32-relative.test.js @@ -0,0 +1,60 @@ +"use strict"; + +const path = require("path"); +const resolve = require("../"); + +const fixtures = path.join(__dirname, "fixtures"); + +describe("win32 relative path resolution", () => { + it("should resolve a win32 relative request with backslashes", (done) => { + // Simulate the issue: on Windows, path.relative() returns "..\b.js" + // instead of "../b.js". The resolver should handle both. + const context = path.join(fixtures, "extensions"); + resolve(context, "..\\b.js", (err, result) => { + if (err) return done(err); + expect(result).toBe(path.join(fixtures, "b.js")); + done(); + }); + }); + + it("should resolve a win32 relative request with backslashes (sync)", () => { + const context = path.join(fixtures, "extensions"); + const result = resolve.sync(context, "..\\b.js"); + expect(result).toBe(path.join(fixtures, "b.js")); + }); + + it("should resolve multi-level win32 relative paths", (done) => { + const context = path.join(fixtures, "extensions", "foo"); + resolve(context, "..\\..\\a.js", (err, result) => { + if (err) return done(err); + expect(result).toBe(path.join(fixtures, "a.js")); + done(); + }); + }); + + it("should resolve win32 relative directory requests", (done) => { + const context = path.join(fixtures, "extensions"); + resolve(context, ".\\foo", (err, result) => { + if (err) return done(err); + expect(result).toBe(path.join(fixtures, "extensions", "foo.js")); + done(); + }); + }); + + if (process.platform === "win32") { + it("should resolve real path.relative() output on Windows", (done) => { + const from = path.join(fixtures, "extensions"); + const to = path.join(fixtures, "b.js"); + const rel = path.relative(from, to); + + // On Windows, path.relative() produces backslash paths + expect(rel).toContain("\\"); + + resolve(from, rel, (err, result) => { + if (err) return done(err); + expect(result).toBe(to); + done(); + }); + }); + } +}); From 53bb3c1dc3625df791c9f0b28930ac8c41c87548 Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Sun, 3 May 2026 17:43:30 +0800 Subject: [PATCH 4/6] refactor: extract toPosixSep helper for backslash conversion --- lib/util/path.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/util/path.js b/lib/util/path.js index 99256ade..3cd971a3 100644 --- a/lib/util/path.js +++ b/lib/util/path.js @@ -21,6 +21,15 @@ const CHAR_QUESTION = "?".charCodeAt(0); const posixNormalize = path.posix.normalize; const winNormalize = path.win32.normalize; +const BACKSLASH_RE = /\\/g; + +/** + * @param {string} str path that may contain backslashes + * @returns {string} path with backslashes replaced by forward slashes + */ +const toPosixSep = (str) => + str.includes("\\") ? str.replace(BACKSLASH_RE, "/") : str; + /** * @enum {number} */ @@ -157,10 +166,7 @@ const normalize = (maybePath) => { case PathType.AbsoluteWin: return winNormalize(maybePath); case PathType.Relative: { - const posixPath = maybePath.includes("\\") - ? maybePath.replace(/\\/g, "/") - : maybePath; - const r = posixNormalize(posixPath); + const r = posixNormalize(toPosixSep(maybePath)); return getType(r) === PathType.Relative ? r : `./${r}`; } } @@ -184,12 +190,8 @@ const join = (rootPath, request) => { switch (getType(rootPath)) { case PathType.Normal: case PathType.Relative: - case PathType.AbsolutePosix: { - const req = request.includes("\\") - ? request.replace(/\\/g, "/") - : request; - return posixNormalize(`${rootPath}/${req}`); - } + case PathType.AbsolutePosix: + return posixNormalize(`${rootPath}/${toPosixSep(request)}`); case PathType.AbsoluteWin: return winNormalize(`${rootPath}\\${request}`); } From b8f1b83b638bf2aac394cc2b8e6133866e9aca8c Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Sun, 3 May 2026 18:17:13 +0800 Subject: [PATCH 5/6] fix: update --- .cspell.json | 2 + package-lock.json | 623 ++++++++++++++++++++++++- package.json | 4 +- test/win32-relative-comparison.test.js | 73 +++ 4 files changed, 699 insertions(+), 3 deletions(-) create mode 100644 test/win32-relative-comparison.test.js diff --git a/.cspell.json b/.cspell.json index df562c03..e3bfa0db 100644 --- a/.cspell.json +++ b/.cspell.json @@ -48,6 +48,8 @@ "Sindre", "Sorhus", "readlink", + "rspack", + "Rspack", "extensionless", "ENOENT" ], diff --git a/package-lock.json b/package-lock.json index 71ea2fcd..917a1cb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "enhanced-resolve", - "version": "5.20.1", + "version": "5.21.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "enhanced-resolve", - "version": "5.20.1", + "version": "5.21.0", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -26,8 +26,10 @@ "jest": "^30.3.0", "lint-staged": "^16.2.7", "memfs": "^4.56.11", + "oxc-resolver": "^11.19.1", "prettier": "^3.7.4", "prettier-2": "npm:prettier@^2", + "rspack-resolver": "^1.3.0", "tinybench": "^6.0.0", "tooling": "webpack/tooling#v1.26.1", "typescript": "^6.0.2" @@ -3392,6 +3394,332 @@ "node": ">= 8" } }, + "node_modules/@oxc-resolver/binding-android-arm-eabi": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.19.1.tgz", + "integrity": "sha512-aUs47y+xyXHUKlbhqHUjBABjvycq6YSD7bpxSW7vplUmdzAlJ93yXY6ZR0c1o1x5A/QKbENCvs3+NlY8IpIVzg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@oxc-resolver/binding-android-arm64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.19.1.tgz", + "integrity": "sha512-oolbkRX+m7Pq2LNjr/kKgYeC7bRDMVTWPgxBGMjSpZi/+UskVo4jsMU3MLheZV55jL6c3rNelPl4oD60ggYmqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@oxc-resolver/binding-darwin-arm64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.19.1.tgz", + "integrity": "sha512-nUC6d2i3R5B12sUW4O646qD5cnMXf2oBGPLIIeaRfU9doJRORAbE2SGv4eW6rMqhD+G7nf2Y8TTJTLiiO3Q/dQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxc-resolver/binding-darwin-x64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.19.1.tgz", + "integrity": "sha512-cV50vE5+uAgNcFa3QY1JOeKDSkM/9ReIcc/9wn4TavhW/itkDGrXhw9jaKnkQnGbjJ198Yh5nbX/Gr2mr4Z5jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxc-resolver/binding-freebsd-x64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.19.1.tgz", + "integrity": "sha512-xZOQiYGFxtk48PBKff+Zwoym7ScPAIVp4c14lfLxizO2LTTTJe5sx9vQNGrBymrf/vatSPNMD4FgsaaRigPkqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm-gnueabihf": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.19.1.tgz", + "integrity": "sha512-lXZYWAC6kaGe/ky2su94e9jN9t6M0/6c+GrSlCqL//XO1cxi5lpAhnJYdyrKfm0ZEr/c7RNyAx3P7FSBcBd5+A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm-musleabihf": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.19.1.tgz", + "integrity": "sha512-veG1kKsuK5+t2IsO9q0DErYVSw2azvCVvWHnfTOS73WE0STdLLB7Q1bB9WR+yHPQM76ASkFyRbogWo1GR1+WbQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.19.1.tgz", + "integrity": "sha512-heV2+jmXyYnUrpUXSPugqWDRpnsQcDm2AX4wzTuvgdlZfoNYO0O3W2AVpJYaDn9AG4JdM6Kxom8+foE7/BcSig==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm64-musl": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.19.1.tgz", + "integrity": "sha512-jvo2Pjs1c9KPxMuMPIeQsgu0mOJF9rEb3y3TdpsrqwxRM+AN6/nDDwv45n5ZrUnQMsdBy5gIabioMKnQfWo9ew==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-ppc64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.19.1.tgz", + "integrity": "sha512-vLmdNxWCdN7Uo5suays6A/+ywBby2PWBBPXctWPg5V0+eVuzsJxgAn6MMB4mPlshskYbppjpN2Zg83ArHze9gQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-riscv64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.19.1.tgz", + "integrity": "sha512-/b+WgR+VTSBxzgOhDO7TlMXC1ufPIMR6Vj1zN+/x+MnyXGW7prTLzU9eW85Aj7Th7CCEG9ArCbTeqxCzFWdg2w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-riscv64-musl": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.19.1.tgz", + "integrity": "sha512-YlRdeWb9j42p29ROh+h4eg/OQ3dTJlpHSa+84pUM9+p6i3djtPz1q55yLJhgW9XfDch7FN1pQ/Vd6YP+xfRIuw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-s390x-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.19.1.tgz", + "integrity": "sha512-EDpafVOQWF8/MJynsjOGFThcqhRHy417sRyLfQmeiamJ8qVhSKAn2Dn2VVKUGCjVB9C46VGjhNo7nOPUi1x6uA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-x64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.19.1.tgz", + "integrity": "sha512-NxjZe+rqWhr+RT8/Ik+5ptA3oz7tUw361Wa5RWQXKnfqwSSHdHyrw6IdcTfYuml9dM856AlKWZIUXDmA9kkiBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-x64-musl": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.19.1.tgz", + "integrity": "sha512-cM/hQwsO3ReJg5kR+SpI69DMfvNCp+A/eVR4b4YClE5bVZwz8rh2Nh05InhwI5HR/9cArbEkzMjcKgTHS6UaNw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-openharmony-arm64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-openharmony-arm64/-/binding-openharmony-arm64-11.19.1.tgz", + "integrity": "sha512-QF080IowFB0+9Rh6RcD19bdgh49BpQHUW5TajG1qvWHvmrQznTZZjYlgE2ltLXyKY+qs4F/v5xuX1XS7Is+3qA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@oxc-resolver/binding-wasm32-wasi": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.19.1.tgz", + "integrity": "sha512-w8UCKhX826cP/ZLokXDS6+milN8y4X7zidsAttEdWlVoamTNf6lhBJldaWr3ukTDiye7s4HRcuPEPOXNC432Vg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.1.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@oxc-resolver/binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-resolver/binding-win32-arm64-msvc": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.19.1.tgz", + "integrity": "sha512-nJ4AsUVZrVKwnU/QRdzPCCrO0TrabBqgJ8pJhXITdZGYOV28TIYystV1VFLbQ7DtAcaBHpocT5/ZJnF78YJPtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxc-resolver/binding-win32-ia32-msvc": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-11.19.1.tgz", + "integrity": "sha512-EW+ND5q2Tl+a3pH81l1QbfgbF3HmqgwLfDfVithRFheac8OTcnbXt/JxqD2GbDkb7xYEqy1zNaVFRr3oeG8npA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxc-resolver/binding-win32-x64-msvc": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.19.1.tgz", + "integrity": "sha512-6hIU3RQu45B+VNTY4Ru8ppFwjVS/S5qwYyGhBotmjxfEKk41I2DlGtRfGJndZ5+6lneE2pwloqunlOyZuX/XAw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -4252,6 +4580,237 @@ "win32" ] }, + "node_modules/@unrs/rspack-resolver-binding-darwin-arm64": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-arm64/-/rspack-resolver-binding-darwin-arm64-1.3.0.tgz", + "integrity": "sha512-EcjI0Hh2HiNOM0B9UuYH1PfLWgE6/SBQ4dKoHXWNloERfveha/n6aUZSBThtPGnJenmdfaJYXXZtqyNbWtJAFw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-darwin-x64": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-x64/-/rspack-resolver-binding-darwin-x64-1.3.0.tgz", + "integrity": "sha512-3CgG+mhfudDfnaDqwEl0W1mcGTto5f5mqPyJSXcWDxrnNc7pr/p01khIgWOoOD1eCwVejmgpYvRKGBwJPwgHOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-freebsd-x64": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-freebsd-x64/-/rspack-resolver-binding-freebsd-x64-1.3.0.tgz", + "integrity": "sha512-ww8BwryDrpXlSajwSIEUXEv8oKDkw04L2ke3hxjaxWohuBV8pAQie9XBS4yQTyREuL2ypcqbARfoCXJJzVp7ig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm-gnueabihf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm-gnueabihf/-/rspack-resolver-binding-linux-arm-gnueabihf-1.3.0.tgz", + "integrity": "sha512-WyhonI1mkuAlnG2iaMjk7uy4aWX+FWi2Au8qCCwj57wVHbAEfrN6xN2YhzbrsCC+ciumKhj5c01MqwsnYDNzWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm-musleabihf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm-musleabihf/-/rspack-resolver-binding-linux-arm-musleabihf-1.3.0.tgz", + "integrity": "sha512-+uCP6hIAMVWHKQnLZHESJ1U1TFVGLR3FTeaS2A4zB0k8w+IbZlWwl9FiBUOwOiqhcCCyKiUEifgnYFNGpxi3pw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm64-gnu": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-gnu/-/rspack-resolver-binding-linux-arm64-gnu-1.3.0.tgz", + "integrity": "sha512-p+s/Wp8rf75Qqs2EPw4HC0xVLLW+/60MlVAsB7TYLoeg1e1CU/QCis36FxpziLS0ZY2+wXdTnPUxr+5kkThzwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm64-musl": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-musl/-/rspack-resolver-binding-linux-arm64-musl-1.3.0.tgz", + "integrity": "sha512-cZEL9jmZ2kAN53MEk+fFCRJM8pRwOEboDn7sTLjZW+hL6a0/8JNfHP20n8+MBDrhyD34BSF4A6wPCj/LNhtOIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-ppc64-gnu": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-ppc64-gnu/-/rspack-resolver-binding-linux-ppc64-gnu-1.3.0.tgz", + "integrity": "sha512-IOeRhcMXTNlk2oApsOozYVcOHu4t1EKYKnTz4huzdPyKNPX0Y9C7X8/6rk4aR3Inb5s4oVMT9IVKdgNXLcpGAQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-s390x-gnu": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-s390x-gnu/-/rspack-resolver-binding-linux-s390x-gnu-1.3.0.tgz", + "integrity": "sha512-op54XrlEbhgVRCxzF1pHFcLamdOmHDapwrqJ9xYRB7ZjwP/zQCKzz/uAsSaAlyQmbSi/PXV7lwfca4xkv860/Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-x64-gnu": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-gnu/-/rspack-resolver-binding-linux-x64-gnu-1.3.0.tgz", + "integrity": "sha512-orbQF7sN02N/b9QF8Xp1RBO5YkfI+AYo9VZw0H2Gh4JYWSuiDHjOPEeFPDIRyWmXbQJuiVNSB+e1pZOjPPKIyg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-x64-musl": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-musl/-/rspack-resolver-binding-linux-x64-musl-1.3.0.tgz", + "integrity": "sha512-kpjqjIAC9MfsjmlgmgeC8U9gZi6g/HTuCqpI7SBMjsa7/9MvBaQ6TJ7dtnsV/+DXvfJ2+L5teBBXG+XxfpvIFA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-wasm32-wasi": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-wasm32-wasi/-/rspack-resolver-binding-wasm32-wasi-1.3.0.tgz", + "integrity": "sha512-JAg0hY3kGsCPk7Jgh16yMTBZ6VEnoNR1DFZxiozjKwH+zSCfuDuM5S15gr50ofbwVw9drobIP2TTHdKZ15MJZQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.7" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/rspack-resolver-binding-win32-arm64-msvc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-arm64-msvc/-/rspack-resolver-binding-win32-arm64-msvc-1.3.0.tgz", + "integrity": "sha512-h5N83i407ntS3ndDkhT/3vC3Dj8oP0BIwMtekETNJcxk7IuWccSXifzCEhdxxu/FOX4OICGIHdHrxf5fJuAjfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-win32-ia32-msvc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-ia32-msvc/-/rspack-resolver-binding-win32-ia32-msvc-1.3.0.tgz", + "integrity": "sha512-9QH7Gq3dRL8Q/D6PGS3Dwtjx9yw6kbCEu6iBkAUhFTDAuVUk2L0H/5NekRVA13AQaSc3OsEUKt60EOn/kq5Dug==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-win32-x64-msvc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-x64-msvc/-/rspack-resolver-binding-win32-x64-msvc-1.3.0.tgz", + "integrity": "sha512-IYuXJCuwBOVV0H73l6auaZwtAPHjCPBJkxd4Co0yO6dSjDM5Na5OceaxhUmJLZ3z8kuEGhTYWIHH7PchGztnlg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", @@ -11778,6 +12337,38 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oxc-resolver": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.19.1.tgz", + "integrity": "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-resolver/binding-android-arm-eabi": "11.19.1", + "@oxc-resolver/binding-android-arm64": "11.19.1", + "@oxc-resolver/binding-darwin-arm64": "11.19.1", + "@oxc-resolver/binding-darwin-x64": "11.19.1", + "@oxc-resolver/binding-freebsd-x64": "11.19.1", + "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", + "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", + "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", + "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", + "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", + "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-x64-musl": "11.19.1", + "@oxc-resolver/binding-openharmony-arm64": "11.19.1", + "@oxc-resolver/binding-wasm32-wasi": "11.19.1", + "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", + "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", + "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" + } + }, "node_modules/p-filter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", @@ -12549,6 +13140,34 @@ "dev": true, "license": "MIT" }, + "node_modules/rspack-resolver": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rspack-resolver/-/rspack-resolver-1.3.0.tgz", + "integrity": "sha512-az/PLDwa1xijNv4bAFBS8mtqqJC1Y3lVyFag4cuyIUOHq/ft5kSZlHbqYaLZLpsQtPWv4ZGDo5ycySKJzUvU/A==", + "deprecated": "Please migrate to the brand new `@rspack/resolver` or `unrs-resolver` instead", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/JounQin" + }, + "optionalDependencies": { + "@unrs/rspack-resolver-binding-darwin-arm64": "1.3.0", + "@unrs/rspack-resolver-binding-darwin-x64": "1.3.0", + "@unrs/rspack-resolver-binding-freebsd-x64": "1.3.0", + "@unrs/rspack-resolver-binding-linux-arm-gnueabihf": "1.3.0", + "@unrs/rspack-resolver-binding-linux-arm-musleabihf": "1.3.0", + "@unrs/rspack-resolver-binding-linux-arm64-gnu": "1.3.0", + "@unrs/rspack-resolver-binding-linux-arm64-musl": "1.3.0", + "@unrs/rspack-resolver-binding-linux-ppc64-gnu": "1.3.0", + "@unrs/rspack-resolver-binding-linux-s390x-gnu": "1.3.0", + "@unrs/rspack-resolver-binding-linux-x64-gnu": "1.3.0", + "@unrs/rspack-resolver-binding-linux-x64-musl": "1.3.0", + "@unrs/rspack-resolver-binding-wasm32-wasi": "1.3.0", + "@unrs/rspack-resolver-binding-win32-arm64-msvc": "1.3.0", + "@unrs/rspack-resolver-binding-win32-ia32-msvc": "1.3.0", + "@unrs/rspack-resolver-binding-win32-x64-msvc": "1.3.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", diff --git a/package.json b/package.json index f6c80ee6..57f3942e 100644 --- a/package.json +++ b/package.json @@ -71,10 +71,12 @@ "jest": "^30.3.0", "lint-staged": "^16.2.7", "memfs": "^4.56.11", + "oxc-resolver": "^11.19.1", "prettier": "^3.7.4", "prettier-2": "npm:prettier@^2", - "tooling": "webpack/tooling#v1.26.1", + "rspack-resolver": "^1.3.0", "tinybench": "^6.0.0", + "tooling": "webpack/tooling#v1.26.1", "typescript": "^6.0.2" }, "engines": { diff --git a/test/win32-relative-comparison.test.js b/test/win32-relative-comparison.test.js new file mode 100644 index 00000000..69761c6c --- /dev/null +++ b/test/win32-relative-comparison.test.js @@ -0,0 +1,73 @@ +"use strict"; + +const path = require("path"); +const { ResolverFactory: OxcResolverFactory } = require("oxc-resolver"); +const { ResolverFactory: RspackResolverFactory } = require("rspack-resolver"); +const resolve = require("../"); + +const fixtures = path.join(__dirname, "fixtures"); +const context = path.join(fixtures, "extensions"); + +// Posix relative paths (control group — should always pass) +const posixCases = [ + ["../a.js", path.join(fixtures, "a.js")], + ["./foo", path.join(fixtures, "extensions", "foo.js")], +]; + +// Win32 relative paths (the issue — backslash separators) +const win32Cases = [ + ["..\\a.js", path.join(fixtures, "a.js")], + [".\\foo", path.join(fixtures, "extensions", "foo.js")], +]; + +describe("win32 relative paths — resolver comparison", () => { + describe("enhanced-resolve", () => { + for (const [request, expected] of posixCases) { + it(`should resolve posix "${request}"`, () => { + expect(resolve.sync(context, request)).toBe(expected); + }); + } + + for (const [request, expected] of win32Cases) { + it(`should resolve win32 "${request}"`, () => { + expect(resolve.sync(context, request)).toBe(expected); + }); + } + }); + + describe("oxc-resolver", () => { + const resolver = new OxcResolverFactory({ extensions: [".js"] }); + + for (const [request, expected] of posixCases) { + it(`should resolve posix "${request}"`, () => { + const result = resolver.sync(context, request); + expect(result.path).toBe(expected); + }); + } + + for (const [request] of win32Cases) { + it(`cannot resolve win32 "${request}"`, () => { + const result = resolver.sync(context, request); + expect(result.path).toBeUndefined(); + }); + } + }); + + describe("rspack-resolver", () => { + const resolver = new RspackResolverFactory({ extensions: [".js"] }); + + for (const [request, expected] of posixCases) { + it(`should resolve posix "${request}"`, () => { + const result = resolver.sync(context, request); + expect(result.path).toBe(expected); + }); + } + + for (const [request] of win32Cases) { + it(`cannot resolve win32 "${request}"`, () => { + const result = resolver.sync(context, request); + expect(result.path).toBeUndefined(); + }); + } + }); +}); From 1c72b667b3adedff50d6750403bdcc04d38540ed Mon Sep 17 00:00:00 2001 From: xiaoxiaojx <784487301@qq.com> Date: Mon, 4 May 2026 00:17:57 +0800 Subject: [PATCH 6/6] Revert "fix: update" This reverts commit b8f1b83b638bf2aac394cc2b8e6133866e9aca8c. --- .cspell.json | 2 - package-lock.json | 623 +------------------------ package.json | 4 +- test/win32-relative-comparison.test.js | 73 --- 4 files changed, 3 insertions(+), 699 deletions(-) delete mode 100644 test/win32-relative-comparison.test.js diff --git a/.cspell.json b/.cspell.json index e3bfa0db..df562c03 100644 --- a/.cspell.json +++ b/.cspell.json @@ -48,8 +48,6 @@ "Sindre", "Sorhus", "readlink", - "rspack", - "Rspack", "extensionless", "ENOENT" ], diff --git a/package-lock.json b/package-lock.json index 917a1cb1..71ea2fcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "enhanced-resolve", - "version": "5.21.0", + "version": "5.20.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "enhanced-resolve", - "version": "5.21.0", + "version": "5.20.1", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -26,10 +26,8 @@ "jest": "^30.3.0", "lint-staged": "^16.2.7", "memfs": "^4.56.11", - "oxc-resolver": "^11.19.1", "prettier": "^3.7.4", "prettier-2": "npm:prettier@^2", - "rspack-resolver": "^1.3.0", "tinybench": "^6.0.0", "tooling": "webpack/tooling#v1.26.1", "typescript": "^6.0.2" @@ -3394,332 +3392,6 @@ "node": ">= 8" } }, - "node_modules/@oxc-resolver/binding-android-arm-eabi": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.19.1.tgz", - "integrity": "sha512-aUs47y+xyXHUKlbhqHUjBABjvycq6YSD7bpxSW7vplUmdzAlJ93yXY6ZR0c1o1x5A/QKbENCvs3+NlY8IpIVzg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@oxc-resolver/binding-android-arm64": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.19.1.tgz", - "integrity": "sha512-oolbkRX+m7Pq2LNjr/kKgYeC7bRDMVTWPgxBGMjSpZi/+UskVo4jsMU3MLheZV55jL6c3rNelPl4oD60ggYmqA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@oxc-resolver/binding-darwin-arm64": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.19.1.tgz", - "integrity": "sha512-nUC6d2i3R5B12sUW4O646qD5cnMXf2oBGPLIIeaRfU9doJRORAbE2SGv4eW6rMqhD+G7nf2Y8TTJTLiiO3Q/dQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@oxc-resolver/binding-darwin-x64": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.19.1.tgz", - "integrity": "sha512-cV50vE5+uAgNcFa3QY1JOeKDSkM/9ReIcc/9wn4TavhW/itkDGrXhw9jaKnkQnGbjJ198Yh5nbX/Gr2mr4Z5jQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@oxc-resolver/binding-freebsd-x64": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.19.1.tgz", - "integrity": "sha512-xZOQiYGFxtk48PBKff+Zwoym7ScPAIVp4c14lfLxizO2LTTTJe5sx9vQNGrBymrf/vatSPNMD4FgsaaRigPkqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@oxc-resolver/binding-linux-arm-gnueabihf": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.19.1.tgz", - "integrity": "sha512-lXZYWAC6kaGe/ky2su94e9jN9t6M0/6c+GrSlCqL//XO1cxi5lpAhnJYdyrKfm0ZEr/c7RNyAx3P7FSBcBd5+A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-arm-musleabihf": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.19.1.tgz", - "integrity": "sha512-veG1kKsuK5+t2IsO9q0DErYVSw2azvCVvWHnfTOS73WE0STdLLB7Q1bB9WR+yHPQM76ASkFyRbogWo1GR1+WbQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-arm64-gnu": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.19.1.tgz", - "integrity": "sha512-heV2+jmXyYnUrpUXSPugqWDRpnsQcDm2AX4wzTuvgdlZfoNYO0O3W2AVpJYaDn9AG4JdM6Kxom8+foE7/BcSig==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-arm64-musl": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.19.1.tgz", - "integrity": "sha512-jvo2Pjs1c9KPxMuMPIeQsgu0mOJF9rEb3y3TdpsrqwxRM+AN6/nDDwv45n5ZrUnQMsdBy5gIabioMKnQfWo9ew==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-ppc64-gnu": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.19.1.tgz", - "integrity": "sha512-vLmdNxWCdN7Uo5suays6A/+ywBby2PWBBPXctWPg5V0+eVuzsJxgAn6MMB4mPlshskYbppjpN2Zg83ArHze9gQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-riscv64-gnu": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.19.1.tgz", - "integrity": "sha512-/b+WgR+VTSBxzgOhDO7TlMXC1ufPIMR6Vj1zN+/x+MnyXGW7prTLzU9eW85Aj7Th7CCEG9ArCbTeqxCzFWdg2w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-riscv64-musl": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.19.1.tgz", - "integrity": "sha512-YlRdeWb9j42p29ROh+h4eg/OQ3dTJlpHSa+84pUM9+p6i3djtPz1q55yLJhgW9XfDch7FN1pQ/Vd6YP+xfRIuw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-s390x-gnu": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.19.1.tgz", - "integrity": "sha512-EDpafVOQWF8/MJynsjOGFThcqhRHy417sRyLfQmeiamJ8qVhSKAn2Dn2VVKUGCjVB9C46VGjhNo7nOPUi1x6uA==", - "cpu": [ - "s390x" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-x64-gnu": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.19.1.tgz", - "integrity": "sha512-NxjZe+rqWhr+RT8/Ik+5ptA3oz7tUw361Wa5RWQXKnfqwSSHdHyrw6IdcTfYuml9dM856AlKWZIUXDmA9kkiBQ==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-linux-x64-musl": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.19.1.tgz", - "integrity": "sha512-cM/hQwsO3ReJg5kR+SpI69DMfvNCp+A/eVR4b4YClE5bVZwz8rh2Nh05InhwI5HR/9cArbEkzMjcKgTHS6UaNw==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@oxc-resolver/binding-openharmony-arm64": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-openharmony-arm64/-/binding-openharmony-arm64-11.19.1.tgz", - "integrity": "sha512-QF080IowFB0+9Rh6RcD19bdgh49BpQHUW5TajG1qvWHvmrQznTZZjYlgE2ltLXyKY+qs4F/v5xuX1XS7Is+3qA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@oxc-resolver/binding-wasm32-wasi": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.19.1.tgz", - "integrity": "sha512-w8UCKhX826cP/ZLokXDS6+milN8y4X7zidsAttEdWlVoamTNf6lhBJldaWr3ukTDiye7s4HRcuPEPOXNC432Vg==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@napi-rs/wasm-runtime": "^1.1.1" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@oxc-resolver/binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", - "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" - } - }, - "node_modules/@oxc-resolver/binding-win32-arm64-msvc": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.19.1.tgz", - "integrity": "sha512-nJ4AsUVZrVKwnU/QRdzPCCrO0TrabBqgJ8pJhXITdZGYOV28TIYystV1VFLbQ7DtAcaBHpocT5/ZJnF78YJPtQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@oxc-resolver/binding-win32-ia32-msvc": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-11.19.1.tgz", - "integrity": "sha512-EW+ND5q2Tl+a3pH81l1QbfgbF3HmqgwLfDfVithRFheac8OTcnbXt/JxqD2GbDkb7xYEqy1zNaVFRr3oeG8npA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@oxc-resolver/binding-win32-x64-msvc": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.19.1.tgz", - "integrity": "sha512-6hIU3RQu45B+VNTY4Ru8ppFwjVS/S5qwYyGhBotmjxfEKk41I2DlGtRfGJndZ5+6lneE2pwloqunlOyZuX/XAw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -4580,237 +4252,6 @@ "win32" ] }, - "node_modules/@unrs/rspack-resolver-binding-darwin-arm64": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-arm64/-/rspack-resolver-binding-darwin-arm64-1.3.0.tgz", - "integrity": "sha512-EcjI0Hh2HiNOM0B9UuYH1PfLWgE6/SBQ4dKoHXWNloERfveha/n6aUZSBThtPGnJenmdfaJYXXZtqyNbWtJAFw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-darwin-x64": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-x64/-/rspack-resolver-binding-darwin-x64-1.3.0.tgz", - "integrity": "sha512-3CgG+mhfudDfnaDqwEl0W1mcGTto5f5mqPyJSXcWDxrnNc7pr/p01khIgWOoOD1eCwVejmgpYvRKGBwJPwgHOQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-freebsd-x64": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-freebsd-x64/-/rspack-resolver-binding-freebsd-x64-1.3.0.tgz", - "integrity": "sha512-ww8BwryDrpXlSajwSIEUXEv8oKDkw04L2ke3hxjaxWohuBV8pAQie9XBS4yQTyREuL2ypcqbARfoCXJJzVp7ig==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-arm-gnueabihf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm-gnueabihf/-/rspack-resolver-binding-linux-arm-gnueabihf-1.3.0.tgz", - "integrity": "sha512-WyhonI1mkuAlnG2iaMjk7uy4aWX+FWi2Au8qCCwj57wVHbAEfrN6xN2YhzbrsCC+ciumKhj5c01MqwsnYDNzWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-arm-musleabihf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm-musleabihf/-/rspack-resolver-binding-linux-arm-musleabihf-1.3.0.tgz", - "integrity": "sha512-+uCP6hIAMVWHKQnLZHESJ1U1TFVGLR3FTeaS2A4zB0k8w+IbZlWwl9FiBUOwOiqhcCCyKiUEifgnYFNGpxi3pw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-arm64-gnu": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-gnu/-/rspack-resolver-binding-linux-arm64-gnu-1.3.0.tgz", - "integrity": "sha512-p+s/Wp8rf75Qqs2EPw4HC0xVLLW+/60MlVAsB7TYLoeg1e1CU/QCis36FxpziLS0ZY2+wXdTnPUxr+5kkThzwQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-arm64-musl": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-musl/-/rspack-resolver-binding-linux-arm64-musl-1.3.0.tgz", - "integrity": "sha512-cZEL9jmZ2kAN53MEk+fFCRJM8pRwOEboDn7sTLjZW+hL6a0/8JNfHP20n8+MBDrhyD34BSF4A6wPCj/LNhtOIQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-ppc64-gnu": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-ppc64-gnu/-/rspack-resolver-binding-linux-ppc64-gnu-1.3.0.tgz", - "integrity": "sha512-IOeRhcMXTNlk2oApsOozYVcOHu4t1EKYKnTz4huzdPyKNPX0Y9C7X8/6rk4aR3Inb5s4oVMT9IVKdgNXLcpGAQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-s390x-gnu": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-s390x-gnu/-/rspack-resolver-binding-linux-s390x-gnu-1.3.0.tgz", - "integrity": "sha512-op54XrlEbhgVRCxzF1pHFcLamdOmHDapwrqJ9xYRB7ZjwP/zQCKzz/uAsSaAlyQmbSi/PXV7lwfca4xkv860/Q==", - "cpu": [ - "s390x" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-x64-gnu": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-gnu/-/rspack-resolver-binding-linux-x64-gnu-1.3.0.tgz", - "integrity": "sha512-orbQF7sN02N/b9QF8Xp1RBO5YkfI+AYo9VZw0H2Gh4JYWSuiDHjOPEeFPDIRyWmXbQJuiVNSB+e1pZOjPPKIyg==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-linux-x64-musl": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-musl/-/rspack-resolver-binding-linux-x64-musl-1.3.0.tgz", - "integrity": "sha512-kpjqjIAC9MfsjmlgmgeC8U9gZi6g/HTuCqpI7SBMjsa7/9MvBaQ6TJ7dtnsV/+DXvfJ2+L5teBBXG+XxfpvIFA==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-wasm32-wasi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-wasm32-wasi/-/rspack-resolver-binding-wasm32-wasi-1.3.0.tgz", - "integrity": "sha512-JAg0hY3kGsCPk7Jgh16yMTBZ6VEnoNR1DFZxiozjKwH+zSCfuDuM5S15gr50ofbwVw9drobIP2TTHdKZ15MJZQ==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.7" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@unrs/rspack-resolver-binding-win32-arm64-msvc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-arm64-msvc/-/rspack-resolver-binding-win32-arm64-msvc-1.3.0.tgz", - "integrity": "sha512-h5N83i407ntS3ndDkhT/3vC3Dj8oP0BIwMtekETNJcxk7IuWccSXifzCEhdxxu/FOX4OICGIHdHrxf5fJuAjfw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-win32-ia32-msvc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-ia32-msvc/-/rspack-resolver-binding-win32-ia32-msvc-1.3.0.tgz", - "integrity": "sha512-9QH7Gq3dRL8Q/D6PGS3Dwtjx9yw6kbCEu6iBkAUhFTDAuVUk2L0H/5NekRVA13AQaSc3OsEUKt60EOn/kq5Dug==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/rspack-resolver-binding-win32-x64-msvc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-x64-msvc/-/rspack-resolver-binding-win32-x64-msvc-1.3.0.tgz", - "integrity": "sha512-IYuXJCuwBOVV0H73l6auaZwtAPHjCPBJkxd4Co0yO6dSjDM5Na5OceaxhUmJLZ3z8kuEGhTYWIHH7PchGztnlg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", @@ -12337,38 +11778,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/oxc-resolver": { - "version": "11.19.1", - "resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.19.1.tgz", - "integrity": "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "optionalDependencies": { - "@oxc-resolver/binding-android-arm-eabi": "11.19.1", - "@oxc-resolver/binding-android-arm64": "11.19.1", - "@oxc-resolver/binding-darwin-arm64": "11.19.1", - "@oxc-resolver/binding-darwin-x64": "11.19.1", - "@oxc-resolver/binding-freebsd-x64": "11.19.1", - "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", - "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", - "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", - "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", - "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", - "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", - "@oxc-resolver/binding-linux-x64-musl": "11.19.1", - "@oxc-resolver/binding-openharmony-arm64": "11.19.1", - "@oxc-resolver/binding-wasm32-wasi": "11.19.1", - "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", - "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", - "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" - } - }, "node_modules/p-filter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", @@ -13140,34 +12549,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rspack-resolver": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rspack-resolver/-/rspack-resolver-1.3.0.tgz", - "integrity": "sha512-az/PLDwa1xijNv4bAFBS8mtqqJC1Y3lVyFag4cuyIUOHq/ft5kSZlHbqYaLZLpsQtPWv4ZGDo5ycySKJzUvU/A==", - "deprecated": "Please migrate to the brand new `@rspack/resolver` or `unrs-resolver` instead", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/JounQin" - }, - "optionalDependencies": { - "@unrs/rspack-resolver-binding-darwin-arm64": "1.3.0", - "@unrs/rspack-resolver-binding-darwin-x64": "1.3.0", - "@unrs/rspack-resolver-binding-freebsd-x64": "1.3.0", - "@unrs/rspack-resolver-binding-linux-arm-gnueabihf": "1.3.0", - "@unrs/rspack-resolver-binding-linux-arm-musleabihf": "1.3.0", - "@unrs/rspack-resolver-binding-linux-arm64-gnu": "1.3.0", - "@unrs/rspack-resolver-binding-linux-arm64-musl": "1.3.0", - "@unrs/rspack-resolver-binding-linux-ppc64-gnu": "1.3.0", - "@unrs/rspack-resolver-binding-linux-s390x-gnu": "1.3.0", - "@unrs/rspack-resolver-binding-linux-x64-gnu": "1.3.0", - "@unrs/rspack-resolver-binding-linux-x64-musl": "1.3.0", - "@unrs/rspack-resolver-binding-wasm32-wasi": "1.3.0", - "@unrs/rspack-resolver-binding-win32-arm64-msvc": "1.3.0", - "@unrs/rspack-resolver-binding-win32-ia32-msvc": "1.3.0", - "@unrs/rspack-resolver-binding-win32-x64-msvc": "1.3.0" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", diff --git a/package.json b/package.json index 57f3942e..f6c80ee6 100644 --- a/package.json +++ b/package.json @@ -71,12 +71,10 @@ "jest": "^30.3.0", "lint-staged": "^16.2.7", "memfs": "^4.56.11", - "oxc-resolver": "^11.19.1", "prettier": "^3.7.4", "prettier-2": "npm:prettier@^2", - "rspack-resolver": "^1.3.0", - "tinybench": "^6.0.0", "tooling": "webpack/tooling#v1.26.1", + "tinybench": "^6.0.0", "typescript": "^6.0.2" }, "engines": { diff --git a/test/win32-relative-comparison.test.js b/test/win32-relative-comparison.test.js deleted file mode 100644 index 69761c6c..00000000 --- a/test/win32-relative-comparison.test.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -const path = require("path"); -const { ResolverFactory: OxcResolverFactory } = require("oxc-resolver"); -const { ResolverFactory: RspackResolverFactory } = require("rspack-resolver"); -const resolve = require("../"); - -const fixtures = path.join(__dirname, "fixtures"); -const context = path.join(fixtures, "extensions"); - -// Posix relative paths (control group — should always pass) -const posixCases = [ - ["../a.js", path.join(fixtures, "a.js")], - ["./foo", path.join(fixtures, "extensions", "foo.js")], -]; - -// Win32 relative paths (the issue — backslash separators) -const win32Cases = [ - ["..\\a.js", path.join(fixtures, "a.js")], - [".\\foo", path.join(fixtures, "extensions", "foo.js")], -]; - -describe("win32 relative paths — resolver comparison", () => { - describe("enhanced-resolve", () => { - for (const [request, expected] of posixCases) { - it(`should resolve posix "${request}"`, () => { - expect(resolve.sync(context, request)).toBe(expected); - }); - } - - for (const [request, expected] of win32Cases) { - it(`should resolve win32 "${request}"`, () => { - expect(resolve.sync(context, request)).toBe(expected); - }); - } - }); - - describe("oxc-resolver", () => { - const resolver = new OxcResolverFactory({ extensions: [".js"] }); - - for (const [request, expected] of posixCases) { - it(`should resolve posix "${request}"`, () => { - const result = resolver.sync(context, request); - expect(result.path).toBe(expected); - }); - } - - for (const [request] of win32Cases) { - it(`cannot resolve win32 "${request}"`, () => { - const result = resolver.sync(context, request); - expect(result.path).toBeUndefined(); - }); - } - }); - - describe("rspack-resolver", () => { - const resolver = new RspackResolverFactory({ extensions: [".js"] }); - - for (const [request, expected] of posixCases) { - it(`should resolve posix "${request}"`, () => { - const result = resolver.sync(context, request); - expect(result.path).toBe(expected); - }); - } - - for (const [request] of win32Cases) { - it(`cannot resolve win32 "${request}"`, () => { - const result = resolver.sync(context, request); - expect(result.path).toBeUndefined(); - }); - } - }); -});