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

react-streaming

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-streaming - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

37

dist/cjs/renderToStream/loadNodeStreamModule.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -23,13 +46,5 @@ exports.nodeStreamModuleIsAvailable = exports.loadNodeStreamModule = void 0;

}
async function loadModule(moduleId) {
// bypass static analysis of bundlers, especially webpack's tenacious analysis
const req = new Date().getTime() < 123 ? 456 : require;
// The following doesn't work with Vitest nor Jest.
// ```js
// const load = new Function('moduleId', 'return import(moduleId)')
// const moduleExports = await load(moduleId)
// ```
// https://github.com/facebook/jest/issues/9580
const moduleExports = req(moduleId);
return moduleExports;
function loadModule(moduleId) {
// #6
return Promise.resolve().then(() => __importStar(require(/*webpackIgnore: true*/ moduleId)));
}

@@ -20,13 +20,5 @@ export { loadNodeStreamModule };

}
async function loadModule(moduleId) {
// bypass static analysis of bundlers, especially webpack's tenacious analysis
const req = new Date().getTime() < 123 ? 456 : require;
// The following doesn't work with Vitest nor Jest.
// ```js
// const load = new Function('moduleId', 'return import(moduleId)')
// const moduleExports = await load(moduleId)
// ```
// https://github.com/facebook/jest/issues/9580
const moduleExports = req(moduleId);
return moduleExports;
function loadModule(moduleId) {
// #6
return import(/*webpackIgnore: true*/ moduleId);
}
{
"name": "react-streaming",
"description": "React 18 Streaming. Full-fledged & Easy.",
"version": "0.2.8",
"version": "0.2.9",
"main": "./dist/cjs/index.js",

@@ -6,0 +6,0 @@ "peerDependencies": {

@@ -34,3 +34,3 @@ <p align="center">

- Unlocks React libraries of tomorrow. (Such as using [Telefunc](https://telefunc.com/) for SSR data fetching.)
- Seamless support for Node.js (serverless) platforms (Vercel, AWS EC2, ...) and Edge platforms (Cloudflare Workers, Netlify Edge, Vercel Edge, ...).
- Seamless support for Node.js (serverless) platforms (Vercel, AWS EC2, ...) and Edge platforms (Cloudflare Workers, Deno Deploy, Netlify Edge, Vercel Edge, ...).
- Two SEO strategies: `conservative` or `google-speed`.

@@ -51,3 +51,3 @@ - Easy error handling.

pipe, // Node.js (Vercel, AWS EC2, ...)
readable // Edge (Coudflare Workers, Netlify Edge, Vercel Edge, ...)
readable // Edge (Coudflare Workers, Deno Deploy, Netlify Edge, Vercel Edge, ...)
} = await renderToStream(<Page />)

@@ -54,0 +54,0 @@ ```

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