react-server-dom-webpack 18.3.0-next-55542bc73-20230210 → 18.3.0-next-fccf3a9fb-20230213
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.
@@ -12,10 +12,10 @@
|
|
12
12
|
|
13
13
|
'use strict';const m=require("acorn"),n=require("url"),q=require("module");
|
14
14
|
module.exports=function(){const h=Symbol.for("react.client.reference"),k=Symbol.for("react.server.reference"),r=Promise.prototype,t=Function.prototype.bind;Function.prototype.bind=function(a){const b=t.apply(this,arguments);if(this.$$typeof===k){const a=Array.prototype.slice.call(arguments,1);b.$$typeof=k;b.$$filepath=this.$$filepath;b.$$name=this.$$name;b.$$bound=this.$$bound.concat(a)}return b};const u={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;
|
15
|
-
case "name":return a.name;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");}switch(a.name){case "":a=String(b);break;case "*":a=String(b);break;default:a=String(a.name)+"."+String(b)}throw Error("Cannot access "+
|
16
|
-
},set:function(){throw Error("Cannot assign to a client module from a server module.");}},p={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;case "name":return a.name;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "__esModule":const d=
|
17
|
-
},{name:{value:""},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}});return!0;case "then":if(a.then)return a.then;if(a.async)return;{var c=Object.defineProperties({},{name:{value:"*"}
|
18
|
-
(c=Object.defineProperties(function(){throw Error("Attempted to call "+String(b)+"() from the server but "+String(b)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
19
|
-
}},l=q.prototype._compile;q.prototype._compile=function(a,b){if(-1===a.indexOf("use client")&&-1===a.indexOf("use server"))return l.apply(this,arguments);var c=m.parse(a,{ecmaVersion:"2019",sourceType:"source"}).body,d=!1,f=!1;for(var e=0;e<c.length;e++){var g=c[e];if("ExpressionStatement"!==
|
20
|
-
d&&(c=n.pathToFileURL(b).href,c=Object.defineProperties({},{name:{value:"*"},$$typeof:{value:h},filepath:{value:c},async:{value:!1}}),this.exports=new Proxy(c,p));if(f)if(l.apply(this,arguments),f=n.pathToFileURL(b).href,c=this.exports,"function"===typeof c)Object.defineProperties(c,
|
21
|
-
$$filepath:{value:f},$$name:{value:g},$$bound:{value:[]}})}}};
|
15
|
+
case "name":return a.name;case "displayName":return;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");}switch(a.name){case "":a=String(b);break;case "*":a=String(b);break;default:a=String(a.name)+"."+String(b)}throw Error("Cannot access "+
|
16
|
+
a+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");},set:function(){throw Error("Cannot assign to a client module from a server module.");}},p={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "filepath":return a.filepath;case "name":return a.name;case "async":return a.async;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "__esModule":const d=
|
17
|
+
a.filepath;a.default=Object.defineProperties(function(){throw Error("Attempted to call the default export of "+d+" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");},{name:{value:""},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}});return!0;case "then":if(a.then)return a.then;if(a.async)return;{var c=Object.defineProperties({},{name:{value:"*"},
|
18
|
+
$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!0}});const b=new Proxy(c,p);a.status="fulfilled";a.value=b;return a.then=Object.defineProperties(function(a){return Promise.resolve(a(b))},{name:{value:"then"},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:!1}})}}c=a[b];c||(c=Object.defineProperties(function(){throw Error("Attempted to call "+String(b)+"() from the server but "+String(b)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
|
19
|
+
},{name:{value:b},$$typeof:{value:h},filepath:{value:a.filepath},async:{value:a.async}}),c=a[b]=new Proxy(c,u));return c},getPrototypeOf(){return r},set:function(){throw Error("Cannot assign to a client module from a server module.");}},l=q.prototype._compile;q.prototype._compile=function(a,b){if(-1===a.indexOf("use client")&&-1===a.indexOf("use server"))return l.apply(this,arguments);var c=m.parse(a,{ecmaVersion:"2019",sourceType:"source"}).body,d=!1,f=!1;for(var e=0;e<c.length;e++){var g=c[e];if("ExpressionStatement"!==
|
20
|
+
g.type||!g.directive)break;"use client"===g.directive&&(d=!0);"use server"===g.directive&&(f=!0)}if(!d&&!f)return l.apply(this,arguments);if(d&&f)throw Error('Cannot have both "use client" and "use server" directives in the same file.');d&&(c=n.pathToFileURL(b).href,c=Object.defineProperties({},{name:{value:"*"},$$typeof:{value:h},filepath:{value:c},async:{value:!1}}),this.exports=new Proxy(c,p));if(f)if(l.apply(this,arguments),f=n.pathToFileURL(b).href,c=this.exports,"function"===typeof c)Object.defineProperties(c,
|
21
|
+
{$$typeof:{value:k},$$filepath:{value:f},$$name:{value:"*"},$$bound:{value:[]}});else for(d=Object.keys(c),e=0;e<d.length;e++){g=d[e];const a=c[d[e]];"function"===typeof a&&Object.defineProperties(a,{$$typeof:{value:k},$$filepath:{value:f},$$name:{value:g},$$bound:{value:[]}})}}};
|
package/package.json
CHANGED
@@ -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": "18.3.0-next-
|
4
|
+
"version": "18.3.0-next-fccf3a9fb-20230213",
|
5
5
|
"keywords": [
|
6
6
|
"react"
|
7
7
|
],
|
@@ -54,8 +54,8 @@
|
|
54
54
|
"node": ">=0.10.0"
|
55
55
|
},
|
56
56
|
"peerDependencies": {
|
57
|
-
"react": "18.3.0-next-
|
58
|
-
"react-dom": "18.3.0-next-
|
57
|
+
"react": "18.3.0-next-fccf3a9fb-20230213",
|
58
|
+
"react-dom": "18.3.0-next-fccf3a9fb-20230213",
|
59
59
|
"webpack": "^5.59.0"
|
60
60
|
},
|
61
61
|
"dependencies": {
|