diff --git a/.yarn/cache/unplugin-patch-0074b0c3e7-ae75027986.zip b/.yarn/cache/unplugin-patch-0074b0c3e7-ae75027986.zip new file mode 100644 index 00000000..11e06c53 Binary files /dev/null and b/.yarn/cache/unplugin-patch-0074b0c3e7-ae75027986.zip differ diff --git a/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch b/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch new file mode 100644 index 00000000..316101ee --- /dev/null +++ b/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch @@ -0,0 +1,62 @@ +diff --git a/dist/index.d.cts b/dist/index.d.cts +index 046ed6c7dd8999269ee3228c139737c0aabf3cfd..07a62c9492250d948f009c971fb624f4cd0ada31 100644 +--- a/dist/index.d.cts ++++ b/dist/index.d.cts +@@ -61,6 +61,7 @@ interface UnpluginBuildContext { + getWatchFiles: () => string[]; + parse: (input: string, options?: any) => AstNode; + getNativeBuildContext?: () => NativeBuildContext; ++ getInputSourceMap?: () => SourceMapInput | SourceMapCompact | null; + } + type StringOrRegExp = string | RegExp; + type FilterPattern = Arrayable; +diff --git a/dist/index.d.ts b/dist/index.d.ts +index 53fa70d6c8270d12170bb842135db7b4b6907b5a..85dc8819b05e37a2b0e6779ed0391650443c876b 100644 +--- a/dist/index.d.ts ++++ b/dist/index.d.ts +@@ -61,6 +61,7 @@ interface UnpluginBuildContext { + getWatchFiles: () => string[]; + parse: (input: string, options?: any) => AstNode; + getNativeBuildContext?: () => NativeBuildContext; ++ getInputSourceMap?: () => SourceMapInput | SourceMapCompact | null; + } + type StringOrRegExp = string | RegExp; + type FilterPattern = Arrayable; +diff --git a/dist/rspack/loaders/transform.cjs b/dist/rspack/loaders/transform.cjs +index 14c9c88b94ef1dacf3121c9c1a3dbb57426857c8..a3c2c765cfcf3f4350b25be4b303202fefcda12c 100644 +--- a/dist/rspack/loaders/transform.cjs ++++ b/dist/rspack/loaders/transform.cjs +@@ -11,7 +11,13 @@ async function transform(source, map) { + const { handler, filter } = require_context.normalizeObjectHook("transform", plugin.transform); + if (!filter(this.resource, source)) return callback(null, source, map); + try { +- const res = await handler.call(Object.assign({}, this._compilation && require_context$1.createBuildContext(this._compiler, this._compilation, this), context), source, id); ++ const handlerContext = Object.assign( ++ {}, ++ this._compilation && require_context$1.createBuildContext(this._compiler, this._compilation, this), ++ context, ++ { getInputSourceMap: () => map } ++ ); ++ const res = await handler.call(handlerContext, source, id); + if (res == null) callback(null, source, map); + else if (typeof res !== "string") callback(null, res.code, map == null ? map : res.map || map); + else callback(null, res, map); +diff --git a/dist/rspack/loaders/transform.js b/dist/rspack/loaders/transform.js +index 80f8d4358c82758aa8ffa1cc71b6fa6b5cfbe071..f72252f0ca933997d0b41e1d8c9b2b1f0b37efd1 100644 +--- a/dist/rspack/loaders/transform.js ++++ b/dist/rspack/loaders/transform.js +@@ -11,7 +11,13 @@ async function transform(source, map) { + const { handler, filter } = normalizeObjectHook("transform", plugin.transform); + if (!filter(this.resource, source)) return callback(null, source, map); + try { +- const res = await handler.call(Object.assign({}, this._compilation && createBuildContext(this._compiler, this._compilation, this), context), source, id); ++ const handlerContext = Object.assign( ++ {}, ++ this._compilation && createBuildContext(this._compiler, this._compilation, this), ++ context, ++ { getInputSourceMap: () => map } ++ ); ++ const res = await handler.call(handlerContext, source, id); + if (res == null) callback(null, source, map); + else if (typeof res !== "string") callback(null, res.code, map == null ? map : res.map || map); + else callback(null, res, map); diff --git a/LICENSES-3rdparty.csv b/LICENSES-3rdparty.csv index fd474925..36bd687d 100644 --- a/LICENSES-3rdparty.csv +++ b/LICENSES-3rdparty.csv @@ -768,7 +768,7 @@ unicode-canonical-property-names-ecmascript,npm,MIT,Mathias Bynens (https://gith unicode-match-property-ecmascript,npm,MIT,Mathias Bynens (https://github.com/mathiasbynens/unicode-match-property-ecmascript) unicode-match-property-value-ecmascript,npm,MIT,Mathias Bynens (https://github.com/mathiasbynens/unicode-match-property-value-ecmascript) unicode-property-aliases-ecmascript,npm,MIT,Mathias Bynens (https://github.com/mathiasbynens/unicode-property-aliases-ecmascript) -unplugin,npm,MIT,(https://unplugin.unjs.io) +unplugin,patch,MIT,(https://unplugin.unjs.io) unrs-resolver,npm,MIT,JounQin (https://github.com/unrs/unrs-resolver#readme) update-browserslist-db,virtual,MIT,Andrey Sitnik (https://www.npmjs.com/package/update-browserslist-db) uri-js,npm,BSD-2-Clause,Gary Court (https://github.com/garycourt/uri-js) diff --git a/packages/core/package.json b/packages/core/package.json index 11051498..c08173b8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -34,6 +34,6 @@ "@types/node": "^20", "esbuild": "0.25.8", "typescript": "5.4.3", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" } } diff --git a/packages/factory/package.json b/packages/factory/package.json index 5f309630..86cd0481 100644 --- a/packages/factory/package.json +++ b/packages/factory/package.json @@ -33,7 +33,7 @@ "@dd/output-plugin": "workspace:*", "@dd/rum-plugin": "workspace:*", "chalk": "2.3.1", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" }, "devDependencies": { "typescript": "5.4.3" diff --git a/packages/published/esbuild-plugin/package.json b/packages/published/esbuild-plugin/package.json index e3f091cc..c444269b 100644 --- a/packages/published/esbuild-plugin/package.json +++ b/packages/published/esbuild-plugin/package.json @@ -59,7 +59,7 @@ "p-queue": "6.6.2", "pretty-bytes": "5.6.0", "simple-git": "3.25.0", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" }, "devDependencies": { "@babel/core": "7.24.5", diff --git a/packages/published/rollup-plugin/package.json b/packages/published/rollup-plugin/package.json index 55253d7e..85d9e3bf 100644 --- a/packages/published/rollup-plugin/package.json +++ b/packages/published/rollup-plugin/package.json @@ -62,7 +62,7 @@ "p-queue": "6.6.2", "pretty-bytes": "5.6.0", "simple-git": "3.25.0", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" }, "devDependencies": { "@babel/core": "7.24.5", diff --git a/packages/published/rspack-plugin/package.json b/packages/published/rspack-plugin/package.json index 6c3f0c5f..f0aa3863 100644 --- a/packages/published/rspack-plugin/package.json +++ b/packages/published/rspack-plugin/package.json @@ -59,7 +59,7 @@ "p-queue": "6.6.2", "pretty-bytes": "5.6.0", "simple-git": "3.25.0", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" }, "devDependencies": { "@babel/core": "7.24.5", diff --git a/packages/published/vite-plugin/package.json b/packages/published/vite-plugin/package.json index 64916f5a..52e994e3 100644 --- a/packages/published/vite-plugin/package.json +++ b/packages/published/vite-plugin/package.json @@ -59,7 +59,7 @@ "p-queue": "6.6.2", "pretty-bytes": "5.6.0", "simple-git": "3.25.0", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" }, "devDependencies": { "@babel/core": "7.24.5", diff --git a/packages/published/webpack-plugin/package.json b/packages/published/webpack-plugin/package.json index b0f9eb73..3fcebed8 100644 --- a/packages/published/webpack-plugin/package.json +++ b/packages/published/webpack-plugin/package.json @@ -59,7 +59,7 @@ "p-queue": "6.6.2", "pretty-bytes": "5.6.0", "simple-git": "3.25.0", - "unplugin": "2.3.5" + "unplugin": "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" }, "devDependencies": { "@babel/core": "7.24.5", diff --git a/yarn.lock b/yarn.lock index 981baf8e..dd9ce2e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1709,7 +1709,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" simple-git: "npm:3.25.0" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" peerDependencies: esbuild: ">=0.x" languageName: unknown @@ -1753,7 +1753,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" simple-git: "npm:3.25.0" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" peerDependencies: rollup: ">= 3.x < 5.x" languageName: unknown @@ -1790,7 +1790,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" simple-git: "npm:3.25.0" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" peerDependencies: "@rspack/core": 1.x languageName: unknown @@ -1827,7 +1827,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" simple-git: "npm:3.25.0" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" peerDependencies: vite: ">= 5.x <= 7.x" languageName: unknown @@ -1864,7 +1864,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" simple-git: "npm:3.25.0" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" peerDependencies: webpack: ">= 5.x < 6.x" languageName: unknown @@ -1889,7 +1889,7 @@ __metadata: glob: "npm:11.0.0" json-stream-stringify: "npm:3.1.6" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" languageName: unknown linkType: soft @@ -1924,7 +1924,7 @@ __metadata: "@dd/rum-plugin": "workspace:*" chalk: "npm:2.3.1" typescript: "npm:5.4.3" - unplugin: "npm:2.3.5" + unplugin: "patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch" languageName: unknown linkType: soft @@ -10763,6 +10763,17 @@ __metadata: languageName: node linkType: hard +"unplugin@patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch": + version: 2.3.5 + resolution: "unplugin@patch:unplugin@npm%3A2.3.5#~/.yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch::version=2.3.5&hash=6c3970" + dependencies: + acorn: "npm:^8.14.1" + picomatch: "npm:^4.0.2" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10/ae750279868a80c63b174541dbb53e43aa333bf8ed31001aed009bf42484cd785e3d0a171ec2822173958266bcd45065b747dadf2b2b82ab68060b1550f1f66e + languageName: node + linkType: hard + "unrs-resolver@npm:^1.7.11": version: 1.9.0 resolution: "unrs-resolver@npm:1.9.0"