@vitejs/plugin-rsc 0.5.33 → 0.5.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/dist/browser.d.ts +1 -1
- package/dist/{cjs-AWVWfddx.js → cjs-DhDj_zQT.js} +2 -2
- package/dist/client-Dq3oGLRS.d.ts +8 -0
- package/dist/{client-reference-DEZtXTv1.d.ts → client-reference-Bk5pzNGN.d.ts} +1 -1
- package/dist/client.node-BEQT2PT-.d.ts +9 -0
- package/dist/client.shared-D1HxyClg.js +10 -0
- package/dist/client.shared-VT232QCM.d.ts +16 -0
- package/dist/core/browser.js +1 -1
- package/dist/core/plugin.d.ts +2 -3
- package/dist/core/rsc.d.ts +1 -1
- package/dist/core/rsc.js +1 -1
- package/dist/core/ssr.d.ts +1 -7
- package/dist/core/ssr.js +1 -1
- package/dist/{index-C5IY2S-e.d.ts → index-CROaL0MT.d.ts} +34 -8
- package/dist/index.js +1 -1
- package/dist/{picocolors-D28_L_A0.js → picocolors-DCTC64Zv.js} +1 -1
- package/dist/{plugin-DarRieDr.js → plugin-CLvIS10V.js} +38 -32
- package/dist/plugin.js +1 -1
- package/dist/plugins/cjs.d.ts +2 -3
- package/dist/plugins/cjs.js +1 -1
- package/dist/react/browser.d.ts +10 -10
- package/dist/react/rsc/client.d.ts +1 -1
- package/dist/react/rsc/client.js +2 -5
- package/dist/react/rsc/client.node.d.ts +2 -0
- package/dist/react/rsc/client.node.js +16 -0
- package/dist/react/rsc/server.d.ts +2 -2
- package/dist/react/rsc/server.node.d.ts +3 -0
- package/dist/react/rsc/server.node.js +24 -0
- package/dist/react/rsc/static.d.ts +4 -5
- package/dist/react/rsc/static.node.d.ts +6 -0
- package/dist/react/rsc/static.node.js +11 -0
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/ssr.d.ts +9 -9
- package/dist/react/ssr.node.d.ts +12 -0
- package/dist/react/ssr.node.js +21 -0
- package/dist/rsc/client.d.ts +1 -1
- package/dist/rsc/client.node.d.ts +2 -0
- package/dist/rsc/client.node.js +3 -0
- package/dist/rsc/server.d.ts +5 -5
- package/dist/rsc/server.node.d.ts +19 -0
- package/dist/rsc/server.node.js +13 -0
- package/dist/rsc/static.d.ts +4 -5
- package/dist/rsc/static.node.d.ts +16 -0
- package/dist/rsc/static.node.js +12 -0
- package/dist/{rsc-C3UdJLOW.d.ts → rsc-D8UlANI2.d.ts} +1 -1
- package/dist/rsc.d.ts +3 -3
- package/dist/rsc.node.d.ts +6 -0
- package/dist/rsc.node.js +7 -0
- package/dist/{scope-Bdx33sQv.js → scope-Ck0n25my.js} +2 -4
- package/dist/{server-ZBjqNTqU.d.ts → server-YwgjVtsE.d.ts} +2 -2
- package/dist/server.node-DU77AeKU.d.ts +15 -0
- package/dist/shared-BWJvctW6.js +34 -0
- package/dist/shared-CXQb6hk9.js +89 -0
- package/dist/shared-DJBuYpZL.d.ts +20 -0
- package/dist/ssr-C-U7jY5S.d.ts +8 -0
- package/dist/ssr.d.ts +3 -21
- package/dist/ssr.js +1 -87
- package/dist/ssr.node.d.ts +5 -0
- package/dist/ssr.node.js +4 -0
- package/dist/transforms/index.js +91 -62
- package/dist/utils/encryption-runtime.d.ts +3 -4
- package/dist/utils/encryption-runtime.js +4 -2
- package/dist/utils/rpc.d.ts +3 -4
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js +909 -495
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.production.js +399 -265
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.development.js +901 -477
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.production.js +380 -219
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.development.js +925 -484
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.production.js +385 -221
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js +726 -388
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.production.js +566 -397
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js +734 -397
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.production.js +477 -238
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js +1029 -620
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.production.js +481 -261
- package/dist/vendor/react-server-dom/esm/react-server-dom-webpack-node-loader.production.js +2 -2
- package/dist/vendor/react-server-dom/package.json +3 -3
- package/package.json +15 -15
- package/dist/client-Bhch3O41.d.ts +0 -19
- package/dist/dist-uqdtSkzK.js +0 -64
|
@@ -457,7 +457,7 @@ async function transformModuleIfNeeded(source, url, loader) {
|
|
|
457
457
|
let sourceMap = null;
|
|
458
458
|
if (sourceMappingURL) {
|
|
459
459
|
const sourceMapResult = await loader(sourceMappingURL,
|
|
460
|
-
// $FlowFixMe
|
|
460
|
+
// $FlowFixMe[incompatible-type]
|
|
461
461
|
{
|
|
462
462
|
format: 'json',
|
|
463
463
|
conditions: [],
|
|
@@ -469,7 +469,7 @@ async function transformModuleIfNeeded(source, url, loader) {
|
|
|
469
469
|
}
|
|
470
470
|
}, loader);
|
|
471
471
|
const sourceMapString = typeof sourceMapResult.source === 'string' ? sourceMapResult.source :
|
|
472
|
-
// $FlowFixMe
|
|
472
|
+
// $FlowFixMe[extra-arg]
|
|
473
473
|
sourceMapResult.source.toString('utf8');
|
|
474
474
|
sourceMap = JSON.parse(sourceMapString);
|
|
475
475
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-server-dom-webpack",
|
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.3.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"node": ">=0.10.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"react": "^19.
|
|
88
|
-
"react-dom": "^19.
|
|
87
|
+
"react": "^19.3.0",
|
|
88
|
+
"react-dom": "^19.3.0",
|
|
89
89
|
"webpack": "^5.59.0"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-rsc",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.35",
|
|
4
4
|
"description": "React Server Components (RSC) support for Vite.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,31 +40,31 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@rolldown/pluginutils": "^1.0.1",
|
|
43
|
-
"es-module-lexer": "^2.3.
|
|
43
|
+
"es-module-lexer": "^2.3.2",
|
|
44
44
|
"estree-walker": "^3.0.3",
|
|
45
|
-
"magic-string": "^
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
45
|
+
"magic-string": "^1.2.3",
|
|
46
|
+
"obug": "^3.0.0",
|
|
47
|
+
"srvx": "^0.12.7",
|
|
48
|
+
"strip-literal": "^4.0.0",
|
|
49
|
+
"turbo-stream": "^3.2.1",
|
|
49
50
|
"vitefu": "^1.1.3"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@playwright/test": "^1.62.0",
|
|
53
|
+
"@playwright/test": "^1.62.1",
|
|
54
54
|
"@tsconfig/strictest": "^2.0.8",
|
|
55
55
|
"@types/estree": "^1.0.9",
|
|
56
56
|
"@types/node": "^24.13.3",
|
|
57
|
-
"@types/react": "^19.
|
|
58
|
-
"@types/react-dom": "^19.
|
|
57
|
+
"@types/react": "^19.3.0",
|
|
58
|
+
"@types/react-dom": "^19.3.0",
|
|
59
59
|
"@vitejs/plugin-react": "workspace:*",
|
|
60
60
|
"@vitejs/test-dep-cjs-and-esm": "./test-dep/cjs-and-esm",
|
|
61
61
|
"@vitejs/test-dep-cjs-falsy-primitive": "./test-dep/cjs-falsy-primitive",
|
|
62
62
|
"picocolors": "^1.1.1",
|
|
63
|
-
"react": "^19.
|
|
64
|
-
"react-dom": "^19.
|
|
65
|
-
"react-server-dom-webpack": "^19.
|
|
66
|
-
"tinyexec": "^1.
|
|
67
|
-
"tsdown": "^0.
|
|
63
|
+
"react": "^19.3.0",
|
|
64
|
+
"react-dom": "^19.3.0",
|
|
65
|
+
"react-server-dom-webpack": "^19.3.0",
|
|
66
|
+
"tinyexec": "^1.3.0",
|
|
67
|
+
"tsdown": "^0.23.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "*",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { a as CreateFromReadableStreamEdgeOptions, c as EncodeReplyFunction, r as ClientTemporaryReferenceSet } from "./index-C5IY2S-e.js";
|
|
2
|
-
//#region src/react/rsc/client.d.ts
|
|
3
|
-
declare function createFromReadableStream<T>(stream: ReadableStream<Uint8Array>, options?: CreateFromReadableStreamEdgeOptions, extraOptions?: {
|
|
4
|
-
/**
|
|
5
|
-
* Preserve server references for re-serialization without loading their modules.
|
|
6
|
-
* Preserved references cannot be invoked in the current RSC environment.
|
|
7
|
-
*
|
|
8
|
-
* Disabled by default because this API also decodes bound server action
|
|
9
|
-
* arguments, which must revive references as callable implementations.
|
|
10
|
-
*
|
|
11
|
-
* @experimental
|
|
12
|
-
* @default false
|
|
13
|
-
*/
|
|
14
|
-
preserveServerReferences?: boolean;
|
|
15
|
-
}): Promise<T>;
|
|
16
|
-
declare const encodeReply: EncodeReplyFunction;
|
|
17
|
-
declare const createClientTemporaryReferenceSet: () => ClientTemporaryReferenceSet;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { createFromReadableStream as n, encodeReply as r, createClientTemporaryReferenceSet as t };
|
package/dist/dist-uqdtSkzK.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@hiogawa+utils@1.7.0/node_modules/@hiogawa/utils/dist/index.js
|
|
2
|
-
function tinyassert(value, message) {
|
|
3
|
-
if (value) return;
|
|
4
|
-
if (message instanceof Error) throw message;
|
|
5
|
-
throw new TinyAssertionError(message, tinyassert);
|
|
6
|
-
}
|
|
7
|
-
var TinyAssertionError = class extends Error {
|
|
8
|
-
constructor(message, stackStartFunction) {
|
|
9
|
-
super(message ?? "TinyAssertionError");
|
|
10
|
-
if (stackStartFunction && "captureStackTrace" in Error) Error.captureStackTrace(this, stackStartFunction);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
function safeFunctionCast(f) {
|
|
14
|
-
return f;
|
|
15
|
-
}
|
|
16
|
-
function once(f) {
|
|
17
|
-
let result;
|
|
18
|
-
let called = false;
|
|
19
|
-
return safeFunctionCast(function(...args) {
|
|
20
|
-
if (!called) {
|
|
21
|
-
result = f.apply(this, args);
|
|
22
|
-
called = true;
|
|
23
|
-
}
|
|
24
|
-
return result;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function memoize(f, options) {
|
|
28
|
-
const keyFn = options?.keyFn ?? ((...args) => args[0]);
|
|
29
|
-
const cache = options?.cache ?? /* @__PURE__ */ new Map();
|
|
30
|
-
return safeFunctionCast(function(...args) {
|
|
31
|
-
const key = keyFn(...args);
|
|
32
|
-
const value = cache.get(key);
|
|
33
|
-
if (typeof value !== "undefined") return value;
|
|
34
|
-
const newValue = f.apply(this, args);
|
|
35
|
-
cache.set(key, newValue);
|
|
36
|
-
return newValue;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function escapeRegExp(input) {
|
|
40
|
-
return input.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
41
|
-
}
|
|
42
|
-
function createDebug(namespace) {
|
|
43
|
-
const pattern = createDebugPattern(namespace);
|
|
44
|
-
return (...args) => {
|
|
45
|
-
const flag = globalThis.process?.env?.["DEBUG"] ?? globalThis.__DEBUG;
|
|
46
|
-
if (typeof flag === "string" && pattern.test(flag)) {
|
|
47
|
-
let prefix = `\u22B3 ${namespace}`;
|
|
48
|
-
const stderr = globalThis?.process?.stderr;
|
|
49
|
-
if (stderr) {
|
|
50
|
-
if (stderr?.isTTY) prefix = `\x1B[1m${prefix}\x1B[22m`;
|
|
51
|
-
console.error(prefix, ...args);
|
|
52
|
-
} else console.debug(prefix, ...args);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function createDebugPattern(namespace) {
|
|
57
|
-
const parts = namespace.split(":");
|
|
58
|
-
const alts = [namespace];
|
|
59
|
-
for (let i = 1; i < parts.length; i++) alts.push(parts.slice(0, i).join(":") + ":*");
|
|
60
|
-
const pattern = alts.map((pattern2) => escapeRegExp(pattern2)).join("|");
|
|
61
|
-
return new RegExp(`(^|,)(${pattern})($|,)`);
|
|
62
|
-
}
|
|
63
|
-
//#endregion
|
|
64
|
-
export { tinyassert as i, memoize as n, once as r, createDebug as t };
|