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
Binary file not shown.
62 changes: 62 additions & 0 deletions .yarn/patches/unplugin-npm-2.3.5-623e7efbfa.patch
Original file line number Diff line number Diff line change
@@ -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<StringOrRegExp>;
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<StringOrRegExp>;
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);
2 changes: 1 addition & 1 deletion LICENSES-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/factory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/published/esbuild-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/rollup-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/rspack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/vite-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/published/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 18 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
Loading