Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-server-dom-webpack

Package Overview
Dependencies
Maintainers
5
Versions
1415
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-server-dom-webpack - npm Package Compare versions

Comparing version 0.0.0-experimental-79c582981-20221021 to 0.0.0-experimental-79ddf5b5-20241210

cjs/react-server-dom-webpack-client.browser.development.js

184

cjs/react-server-dom-webpack-node-register.js

@@ -11,134 +11,60 @@ /**

'use strict';
'use strict';
var url = require('url');
var Module = require('module');
module.exports = function register() {
var MODULE_REFERENCE = Symbol.for('react.module.reference');
var PROMISE_PROTOTYPE = Promise.prototype;
var proxyHandlers = {
get: function (target, name, receiver) {
switch (name) {
// These names are read by the Flight runtime if you end up using the exports object.
case '$$typeof':
// These names are a little too common. We should probably have a way to
// have the Flight runtime extract the inner target instead.
return target.$$typeof;
case 'filepath':
return target.filepath;
case 'name':
return target.name;
case 'async':
return target.async;
// We need to special case this because createElement reads it if we pass this
// reference.
case 'defaultProps':
return undefined;
case '__esModule':
// Something is conditionally checking which export to use. We'll pretend to be
// an ESM compat module but then we'll check again on the client.
target.default = {
$$typeof: MODULE_REFERENCE,
filepath: target.filepath,
// This a placeholder value that tells the client to conditionally use the
// whole object or just the default export.
name: '',
async: target.async
};
return true;
case 'then':
if (!target.async) {
// If this module is expected to return a Promise (such as an AsyncModule) then
// we should resolve that with a client reference that unwraps the Promise on
// the client.
var then = function then(resolve, reject) {
var moduleReference = {
$$typeof: MODULE_REFERENCE,
filepath: target.filepath,
name: '*',
// Represents the whole object instead of a particular import.
async: true
};
return Promise.resolve( // $FlowFixMe[incompatible-call] found when upgrading Flow
resolve(new Proxy(moduleReference, proxyHandlers)));
}; // If this is not used as a Promise but is treated as a reference to a `.then`
// export then we should treat it as a reference to that name.
then.$$typeof = MODULE_REFERENCE;
then.filepath = target.filepath; // then.name is conveniently already "then" which is the export name we need.
// This will break if it's minified though.
return then;
}
}
var cachedReference = target[name];
if (!cachedReference) {
cachedReference = target[name] = {
$$typeof: MODULE_REFERENCE,
filepath: target.filepath,
name: name,
async: target.async
};
}
return cachedReference;
},
getPrototypeOf: function (target) {
// Pretend to be a Promise in case anyone asks.
return PROMISE_PROTOTYPE;
},
set: function () {
throw new Error('Cannot assign to a client module from a server module.');
"use strict";
const acorn = require("acorn-loose"),
url = require("url"),
Module = require("module");
module.exports = function () {
const Server = require("react-server-dom-webpack/server"),
registerServerReference = Server.registerServerReference,
createClientModuleProxy = Server.createClientModuleProxy,
originalCompile = Module.prototype._compile;
Module.prototype._compile = function (content, filename) {
if (
-1 === content.indexOf("use client") &&
-1 === content.indexOf("use server")
)
return originalCompile.apply(this, arguments);
try {
var body = acorn.parse(content, {
ecmaVersion: "2024",
sourceType: "source"
}).body;
} catch (x) {
return (
console.error("Error parsing %s %s", url, x.message),
originalCompile.apply(this, arguments)
);
}
}; // $FlowFixMe[prop-missing] found when upgrading Flow
Module._extensions['.client.js'] = function (module, path) {
var moduleId = url.pathToFileURL(path).href;
var moduleReference = {
$$typeof: MODULE_REFERENCE,
filepath: moduleId,
name: '*',
// Represents the whole object instead of a particular import.
async: false
}; // $FlowFixMe[incompatible-call] found when upgrading Flow
module.exports = new Proxy(moduleReference, proxyHandlers);
}; // $FlowFixMe[prop-missing] found when upgrading Flow
var originalResolveFilename = Module._resolveFilename; // $FlowFixMe[prop-missing] found when upgrading Flow
Module._resolveFilename = function (request, parent, isMain, options) {
var resolved = originalResolveFilename.apply(this, arguments);
if (resolved.endsWith('.server.js')) {
if (parent && parent.filename && !parent.filename.endsWith('.server.js')) {
var reason;
if (request.endsWith('.server.js')) {
reason = "\"" + request + "\"";
} else {
reason = "\"" + request + "\" (which expands to \"" + resolved + "\")";
var useClient = !1,
useServer = !1;
for (var i = 0; i < body.length; i++) {
var node = body[i];
if ("ExpressionStatement" !== node.type || !node.directive) break;
"use client" === node.directive && (useClient = !0);
"use server" === node.directive && (useServer = !0);
}
if (!useClient && !useServer) return originalCompile.apply(this, arguments);
if (useClient && useServer)
throw Error(
'Cannot have both "use client" and "use server" directives in the same file.'
);
useClient &&
((body = url.pathToFileURL(filename).href),
(this.exports = createClientModuleProxy(body)));
if (useServer)
if (
(originalCompile.apply(this, arguments),
(useServer = url.pathToFileURL(filename).href),
(body = this.exports),
"function" === typeof body)
)
registerServerReference(body, useServer, null);
else
for (useClient = Object.keys(body), i = 0; i < useClient.length; i++) {
node = useClient[i];
const value = body[useClient[i]];
"function" === typeof value &&
registerServerReference(value, useServer, node);
}
throw new Error("Cannot import " + reason + " from \"" + parent.filename + "\". " + 'By react-server convention, .server.js files can only be imported from other .server.js files. ' + 'That way nobody accidentally sends these to the client by indirectly importing it.');
}
}
return resolved;
};
};

@@ -11,20 +11,78 @@ /**

'use strict';
'use strict';
var path = require('path');
var url = require('url');
var asyncLib = require('neo-async');
var ModuleDependency = require('webpack/lib/dependencies/ModuleDependency');
var NullDependency = require('webpack/lib/dependencies/NullDependency');
var Template = require('webpack/lib/Template');
var webpack = require('webpack');
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
function isArray(a) {
return isArrayImpl(a);
"use strict";
var path = require("path"),
url = require("url"),
asyncLib = require("neo-async"),
acorn = require("acorn-loose"),
ModuleDependency = require("webpack/lib/dependencies/ModuleDependency"),
NullDependency = require("webpack/lib/dependencies/NullDependency"),
Template = require("webpack/lib/Template"),
webpack = require("webpack");
function _unsupportedIterableToArray(o, minLen) {
if (o) {
if ("string" === typeof o) return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
"Object" === n && o.constructor && (n = o.constructor.name);
if ("Map" === n || "Set" === n) return Array.from(o);
if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return _arrayLikeToArray(o, minLen);
}
}
function _arrayLikeToArray(arr, len) {
if (null == len || len > arr.length) len = arr.length;
for (var i = 0, arr2 = Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _createForOfIteratorHelper(o, allowArrayLike) {
var it;
if ("undefined" === typeof Symbol || null == o[Symbol.iterator]) {
if (
Array.isArray(o) ||
(it = _unsupportedIterableToArray(o)) ||
(allowArrayLike && o && "number" === typeof o.length)
) {
it && (o = it);
var i = 0;
allowArrayLike = function () {};
return {
s: allowArrayLike,
n: function () {
return i >= o.length ? { done: !0 } : { done: !1, value: o[i++] };
},
e: function (e) {
throw e;
},
f: allowArrayLike
};
}
throw new TypeError(
"Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
);
}
var normalCompletion = !0,
didErr = !1,
err;
return {
s: function () {
it = o[Symbol.iterator]();
},
n: function () {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function (e) {
didErr = !0;
err = e;
},
f: function () {
try {
normalCompletion || null == it.return || it.return();
} finally {
if (didErr) throw err;
}
}
};
}
const isArrayImpl = Array.isArray;
class ClientReferenceDependency extends ModuleDependency {

@@ -34,224 +92,310 @@ constructor(request) {

}
get type() {
return 'client-reference';
return "client-reference";
}
} // This is the module that will be used to anchor all client references to.
// I.e. it will have all the client files as async deps from this point on.
// We use the Flight client implementation because you can't get to these
// without the client runtime so it's the first time in the loading sequence
// you might want them.
var clientImportName = 'react-server-dom-webpack/client';
var clientFileName = require.resolve('../');
var PLUGIN_NAME = 'React Server Plugin';
}
const clientFileName = require.resolve("../client.browser.js");
class ReactFlightWebpackPlugin {
constructor(options) {
if (!options || typeof options.isServer !== 'boolean') {
throw new Error(PLUGIN_NAME + ': You must specify the isServer option as a boolean.');
}
if (options.isServer) {
throw new Error('TODO: Implement the server compiler.');
}
if (!options.clientReferences) {
this.clientReferences = [{
directory: '.',
recursive: true,
include: /\.client\.(js|ts|jsx|tsx)$/
}];
} else if (typeof options.clientReferences === 'string' || !isArray(options.clientReferences)) {
this.clientReferences = [options.clientReferences];
} else {
// $FlowFixMe[incompatible-type] found when upgrading Flow
this.clientReferences = options.clientReferences;
}
if (typeof options.chunkName === 'string') {
this.chunkName = options.chunkName;
if (!/\[(index|request)\]/.test(this.chunkName)) {
this.chunkName += '[index]';
}
} else {
this.chunkName = 'client[index]';
}
this.manifestFilename = options.manifestFilename || 'react-client-manifest.json';
this.serverConsumerManifestFilename =
this.clientManifestFilename =
this.chunkName =
this.clientReferences =
void 0;
if (!options || "boolean" !== typeof options.isServer)
throw Error(
"React Server Plugin: You must specify the isServer option as a boolean."
);
if (options.isServer) throw Error("TODO: Implement the server compiler.");
options.clientReferences
? "string" !== typeof options.clientReferences &&
isArrayImpl(options.clientReferences)
? (this.clientReferences = options.clientReferences)
: (this.clientReferences = [options.clientReferences])
: (this.clientReferences = [
{ directory: ".", recursive: !0, include: /\.(js|ts|jsx|tsx)$/ }
]);
"string" === typeof options.chunkName
? ((this.chunkName = options.chunkName),
/\[(index|request)\]/.test(this.chunkName) ||
(this.chunkName += "[index]"))
: (this.chunkName = "client[index]");
this.clientManifestFilename =
options.clientManifestFilename || "react-client-manifest.json";
this.serverConsumerManifestFilename =
options.serverConsumerManifestFilename || "react-ssr-manifest.json";
}
apply(compiler) {
var _this = this;
var resolvedClientReferences;
var clientFileNameFound = false; // Find all client files on the file system
compiler.hooks.beforeCompile.tapAsync(PLUGIN_NAME, function (_ref, callback) {
var contextModuleFactory = _ref.contextModuleFactory;
var contextResolver = compiler.resolverFactory.get('context', {});
_this.resolveAllClientFiles(compiler.context, contextResolver, compiler.inputFileSystem, contextModuleFactory, function (err, resolvedClientRefs) {
if (err) {
callback(err);
return;
}
resolvedClientReferences = resolvedClientRefs;
callback();
});
});
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, function (compilation, _ref2) {
var normalModuleFactory = _ref2.normalModuleFactory;
compilation.dependencyFactories.set(ClientReferenceDependency, normalModuleFactory);
compilation.dependencyTemplates.set(ClientReferenceDependency, new NullDependency.Template());
var handler = function (parser) {
// We need to add all client references as dependency of something in the graph so
// Webpack knows which entries need to know about the relevant chunks and include the
// map in their runtime. The things that actually resolves the dependency is the Flight
// client runtime. So we add them as a dependency of the Flight client runtime.
// Anything that imports the runtime will be made aware of these chunks.
parser.hooks.program.tap(PLUGIN_NAME, function () {
var module = parser.state.module;
if (module.resource !== clientFileName) {
return;
const _this = this;
let resolvedClientReferences,
clientFileNameFound = !1;
compiler.hooks.beforeCompile.tapAsync(
"React Server Plugin",
(_ref, callback) => {
_ref = _ref.contextModuleFactory;
const contextResolver = compiler.resolverFactory.get("context", {}),
normalResolver = compiler.resolverFactory.get("normal");
_this.resolveAllClientFiles(
compiler.context,
contextResolver,
normalResolver,
compiler.inputFileSystem,
_ref,
function (err, resolvedClientRefs) {
err
? callback(err)
: ((resolvedClientReferences = resolvedClientRefs), callback());
}
clientFileNameFound = true;
if (resolvedClientReferences) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
for (var i = 0; i < resolvedClientReferences.length; i++) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
var dep = resolvedClientReferences[i];
var chunkName = _this.chunkName.replace(/\[index\]/g, '' + i).replace(/\[request\]/g, Template.toPath(dep.userRequest));
var block = new webpack.AsyncDependenciesBlock({
name: chunkName
}, null, dep.request);
block.addDependency(dep);
module.addBlock(block);
}
}
});
};
normalModuleFactory.hooks.parser.for('javascript/auto').tap('HarmonyModulesPlugin', handler);
normalModuleFactory.hooks.parser.for('javascript/esm').tap('HarmonyModulesPlugin', handler);
normalModuleFactory.hooks.parser.for('javascript/dynamic').tap('HarmonyModulesPlugin', handler);
});
compiler.hooks.make.tap(PLUGIN_NAME, function (compilation) {
compilation.hooks.processAssets.tap({
name: PLUGIN_NAME,
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT
}, function () {
if (clientFileNameFound === false) {
compilation.warnings.push(new webpack.WebpackError("Client runtime at " + clientImportName + " was not found. React Server Components module map file " + _this.manifestFilename + " was not created."));
return;
}
var json = {};
compilation.chunkGroups.forEach(function (chunkGroup) {
var chunkIds = chunkGroup.chunks.map(function (c) {
return c.id;
);
}
);
compiler.hooks.thisCompilation.tap(
"React Server Plugin",
(compilation, _ref2) => {
_ref2 = _ref2.normalModuleFactory;
compilation.dependencyFactories.set(ClientReferenceDependency, _ref2);
compilation.dependencyTemplates.set(
ClientReferenceDependency,
new NullDependency.Template()
);
compilation = (parser) => {
parser.hooks.program.tap("React Server Plugin", () => {
const module = parser.state.module;
if (
module.resource === clientFileName &&
((clientFileNameFound = !0), resolvedClientReferences)
)
for (let i = 0; i < resolvedClientReferences.length; i++) {
const dep = resolvedClientReferences[i];
var chunkName = _this.chunkName
.replace(/\[index\]/g, "" + i)
.replace(/\[request\]/g, Template.toPath(dep.userRequest));
chunkName = new webpack.AsyncDependenciesBlock(
{ name: chunkName },
null,
dep.request
);
chunkName.addDependency(dep);
module.addBlock(chunkName);
}
});
function recordModule(id, module) {
// TODO: Hook into deps instead of the target module.
// That way we know by the type of dep whether to include.
// It also resolves conflicts when the same module is in multiple chunks.
if (!/\.client\.(js|ts)x?$/.test(module.resource)) {
return;
}
var moduleProvidedExports = compilation.moduleGraph.getExportsInfo(module).getProvidedExports();
var moduleExports = {};
['', '*'].concat(Array.isArray(moduleProvidedExports) ? moduleProvidedExports : []).forEach(function (name) {
moduleExports[name] = {
id: id,
chunks: chunkIds,
name: name
};
};
_ref2.hooks.parser
.for("javascript/auto")
.tap("HarmonyModulesPlugin", compilation);
_ref2.hooks.parser
.for("javascript/esm")
.tap("HarmonyModulesPlugin", compilation);
_ref2.hooks.parser
.for("javascript/dynamic")
.tap("HarmonyModulesPlugin", compilation);
}
);
compiler.hooks.make.tap("React Server Plugin", (compilation) => {
compilation.hooks.processAssets.tap(
{
name: "React Server Plugin",
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT
},
function () {
if (!1 === clientFileNameFound)
compilation.warnings.push(
new webpack.WebpackError(
"Client runtime at react-server-dom-webpack/client was not found. React Server Components module map file " +
_this.clientManifestFilename +
" was not created."
)
);
else {
var configuredCrossOriginLoading =
compilation.outputOptions.crossOriginLoading;
configuredCrossOriginLoading =
"string" === typeof configuredCrossOriginLoading
? "use-credentials" === configuredCrossOriginLoading
? configuredCrossOriginLoading
: "anonymous"
: null;
var resolvedClientFiles = new Set(
(resolvedClientReferences || []).map((ref) => ref.request)
),
clientManifest = {},
moduleMap = {};
configuredCrossOriginLoading = {
moduleLoading: {
prefix: compilation.outputOptions.publicPath || "",
crossOrigin: configuredCrossOriginLoading
},
moduleMap
};
var runtimeChunkFiles = new Set();
compilation.entrypoints.forEach((entrypoint) => {
(entrypoint = entrypoint.getRuntimeChunk()) &&
entrypoint.files.forEach((runtimeFile) => {
runtimeChunkFiles.add(runtimeFile);
});
});
var href = url.pathToFileURL(module.resource).href;
if (href !== undefined) {
json[href] = moduleExports;
}
}
chunkGroup.chunks.forEach(function (chunk) {
var chunkModules = compilation.chunkGraph.getChunkModulesIterable(chunk);
Array.from(chunkModules).forEach(function (module) {
var moduleId = compilation.chunkGraph.getModuleId(module);
recordModule(moduleId, module); // If this is a concatenation, register each child to the parent ID.
if (module.modules) {
module.modules.forEach(function (concatenatedMod) {
recordModule(moduleId, concatenatedMod);
compilation.chunkGroups.forEach(function (chunkGroup) {
function recordModule(id, module) {
if (
resolvedClientFiles.has(module.resource) &&
((module = url.pathToFileURL(module.resource).href),
void 0 !== module)
) {
const ssrExports = {};
clientManifest[module] = { id, chunks, name: "*" };
ssrExports["*"] = { specifier: module, name: "*" };
moduleMap[id] = ssrExports;
}
}
const chunks = [];
chunkGroup.chunks.forEach(function (c) {
var _iterator = _createForOfIteratorHelper(c.files),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
const file = _step.value;
if (!file.endsWith(".js")) break;
if (file.endsWith(".hot-update.js")) break;
chunks.push(c.id, file);
break;
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
});
chunkGroup.chunks.forEach(function (chunk) {
chunk = compilation.chunkGraph.getChunkModulesIterable(chunk);
Array.from(chunk).forEach(function (module) {
const moduleId = compilation.chunkGraph.getModuleId(module);
recordModule(moduleId, module);
module.modules &&
module.modules.forEach((concatenatedMod) => {
recordModule(moduleId, concatenatedMod);
});
});
}
});
});
});
});
var output = JSON.stringify(json, null, 2);
compilation.emitAsset(_this.manifestFilename, new webpack.sources.RawSource(output, false));
});
var clientOutput = JSON.stringify(clientManifest, null, 2);
compilation.emitAsset(
_this.clientManifestFilename,
new webpack.sources.RawSource(clientOutput, !1)
);
configuredCrossOriginLoading = JSON.stringify(
configuredCrossOriginLoading,
null,
2
);
compilation.emitAsset(
_this.serverConsumerManifestFilename,
new webpack.sources.RawSource(configuredCrossOriginLoading, !1)
);
}
}
);
});
} // This attempts to replicate the dynamic file path resolution used for other wildcard
// resolution in Webpack is using.
resolveAllClientFiles(context, contextResolver, fs, contextModuleFactory, callback) {
asyncLib.map(this.clientReferences, function (clientReferencePath, cb) {
if (typeof clientReferencePath === 'string') {
cb(null, [new ClientReferenceDependency(clientReferencePath)]);
return;
}
resolveAllClientFiles(
context,
contextResolver,
normalResolver,
fs,
contextModuleFactory,
callback
) {
function hasUseClientDirective(source) {
if (-1 === source.indexOf("use client")) return !1;
let body;
try {
body = acorn.parse(source, {
ecmaVersion: "2024",
sourceType: "module"
}).body;
} catch (x) {
return !1;
}
var clientReferenceSearch = clientReferencePath;
contextResolver.resolve({}, context, clientReferencePath.directory, {}, function (err, resolvedDirectory) {
if (err) return cb(err);
var options = {
resource: resolvedDirectory,
resourceQuery: '',
recursive: clientReferenceSearch.recursive === undefined ? true : clientReferenceSearch.recursive,
regExp: clientReferenceSearch.include,
include: undefined,
exclude: clientReferenceSearch.exclude
};
contextModuleFactory.resolveDependencies(fs, options, function (err2, deps) {
if (err2) return cb(err2);
var clientRefDeps = deps.map(function (dep) {
// use userRequest instead of request. request always end with undefined which is wrong
var request = path.join(resolvedDirectory, dep.userRequest);
var clientRefDep = new ClientReferenceDependency(request);
clientRefDep.userRequest = dep.userRequest;
return clientRefDep;
});
cb(null, clientRefDeps);
});
});
}, function (err, result) {
if (err) return callback(err);
var flat = [];
for (var i = 0; i < result.length; i++) {
// $FlowFixMe[method-unbinding]
flat.push.apply(flat, result[i]);
for (source = 0; source < body.length; source++) {
const node = body[source];
if ("ExpressionStatement" !== node.type || !node.directive) break;
if ("use client" === node.directive) return !0;
}
callback(null, flat);
});
return !1;
}
asyncLib.map(
this.clientReferences,
(clientReferencePath, cb) => {
"string" === typeof clientReferencePath
? cb(null, [new ClientReferenceDependency(clientReferencePath)])
: contextResolver.resolve(
{},
context,
clientReferencePath.directory,
{},
(err, resolvedDirectory) => {
if (err) return cb(err);
contextModuleFactory.resolveDependencies(
fs,
{
resource: resolvedDirectory,
resourceQuery: "",
recursive:
void 0 === clientReferencePath.recursive
? !0
: clientReferencePath.recursive,
regExp: clientReferencePath.include,
include: void 0,
exclude: clientReferencePath.exclude
},
(err2, deps) => {
if (err2) return cb(err2);
err2 = deps.map((dep) => {
var request = path.join(
resolvedDirectory,
dep.userRequest
);
request = new ClientReferenceDependency(request);
request.userRequest = dep.userRequest;
return request;
});
asyncLib.filter(
err2,
(clientRefDep, filterCb) => {
normalResolver.resolve(
{},
context,
clientRefDep.request,
{},
(err3, resolvedPath) => {
if (err3 || "string" !== typeof resolvedPath)
return filterCb(null, !1);
fs.readFile(
resolvedPath,
"utf-8",
(err4, content) => {
if (err4 || "string" !== typeof content)
return filterCb(null, !1);
err4 = hasUseClientDirective(content);
filterCb(null, err4);
}
);
}
);
},
cb
);
}
);
}
);
},
(err, result) => {
if (err) return callback(err);
err = [];
for (let i = 0; i < result.length; i++) err.push.apply(err, result[i]);
callback(null, err);
}
);
}
}
module.exports = ReactFlightWebpackPlugin;
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-webpack-client.production.min.js');
} else {
module.exports = require('./cjs/react-server-dom-webpack-client.development.js');
}
module.exports = require('./client.browser');
{
"name": "react-server-dom-webpack",
"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.",
"version": "0.0.0-experimental-79c582981-20221021",
"version": "0.0.0-experimental-79ddf5b5-20241210",
"keywords": [
"react"
],
"homepage": "https://reactjs.org/",
"homepage": "https://react.dev/",
"bugs": "https://github.com/facebook/react/issues",

@@ -17,8 +17,18 @@ "license": "MIT",

"client.js",
"client.browser.js",
"client.edge.js",
"client.node.js",
"client.node.unbundled.js",
"server.js",
"server.browser.js",
"server.edge.js",
"server.node.js",
"server.node.unbundled.js",
"static.js",
"static.browser.js",
"static.edge.js",
"static.node.js",
"static.node.unbundled.js",
"node-register.js",
"cjs/",
"umd/",
"esm/"

@@ -29,6 +39,27 @@ ],

"./plugin": "./plugin.js",
"./client": "./client.js",
"./client": {
"workerd": "./client.edge.js",
"deno": "./client.edge.js",
"worker": "./client.edge.js",
"node": {
"webpack": "./client.node.js",
"default": "./client.node.unbundled.js"
},
"edge-light": "./client.edge.js",
"browser": "./client.browser.js",
"default": "./client.browser.js"
},
"./client.browser": "./client.browser.js",
"./client.edge": "./client.edge.js",
"./client.node": "./client.node.js",
"./client.node.unbundled": "./client.node.unbundled.js",
"./server": {
"react-server": {
"node": "./server.node.js",
"workerd": "./server.edge.js",
"deno": "./server.browser.js",
"node": {
"webpack": "./server.node.js",
"default": "./server.node.unbundled.js"
},
"edge-light": "./server.edge.js",
"browser": "./server.browser.js"

@@ -38,5 +69,24 @@ },

},
"./server.browser": "./server.browser.js",
"./server.edge": "./server.edge.js",
"./server.node": "./server.node.js",
"./server.browser": "./server.browser.js",
"./node-loader": "./esm/react-server-dom-webpack-node-loader.js",
"./server.node.unbundled": "./server.node.unbundled.js",
"./static": {
"react-server": {
"workerd": "./static.edge.js",
"deno": "./static.browser.js",
"node": {
"webpack": "./static.node.js",
"default": "./static.node.unbundled.js"
},
"edge-light": "./static.edge.js",
"browser": "./static.browser.js"
},
"default": "./static.js"
},
"./static.browser": "./static.browser.js",
"./static.edge": "./static.edge.js",
"./static.node": "./static.node.js",
"./static.node.unbundled": "./static.node.unbundled.js",
"./node-loader": "./esm/react-server-dom-webpack-node-loader.production.js",
"./node-register": "./node-register.js",

@@ -55,16 +105,11 @@ "./package.json": "./package.json"

"peerDependencies": {
"react": "0.0.0-experimental-79c582981-20221021",
"react-dom": "0.0.0-experimental-79c582981-20221021",
"react": "0.0.0-experimental-79ddf5b5-20241210",
"react-dom": "0.0.0-experimental-79ddf5b5-20241210",
"webpack": "^5.59.0"
},
"dependencies": {
"acorn": "^6.2.1",
"acorn-loose": "^8.3.0",
"neo-async": "^2.6.1",
"loose-envify": "^1.1.0"
},
"browserify": {
"transform": [
"loose-envify"
]
"webpack-sources": "^3.2.0"
}
}
'use strict';
var s;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-webpack-server.browser.production.min.js');
s = require('./cjs/react-server-dom-webpack-server.browser.production.js');
} else {
module.exports = require('./cjs/react-server-dom-webpack-server.browser.development.js');
s = require('./cjs/react-server-dom-webpack-server.browser.development.js');
}
exports.renderToReadableStream = s.renderToReadableStream;
exports.decodeReply = s.decodeReply;
exports.decodeAction = s.decodeAction;
exports.decodeFormState = s.decodeFormState;
exports.registerServerReference = s.registerServerReference;
exports.registerClientReference = s.registerClientReference;
exports.createClientModuleProxy = s.createClientModuleProxy;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;
'use strict';
var s;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-webpack-server.node.production.min.js');
s = require('./cjs/react-server-dom-webpack-server.node.production.js');
} else {
module.exports = require('./cjs/react-server-dom-webpack-server.node.development.js');
s = require('./cjs/react-server-dom-webpack-server.node.development.js');
}
exports.renderToPipeableStream = s.renderToPipeableStream;
exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy;
exports.decodeReply = s.decodeReply;
exports.decodeAction = s.decodeAction;
exports.decodeFormState = s.decodeFormState;
exports.registerServerReference = s.registerServerReference;
exports.registerClientReference = s.registerClientReference;
exports.createClientModuleProxy = s.createClientModuleProxy;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc