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.1.7 to 0.1.8

3

dist/cjs/renderToStream.d.ts
export { renderToStream };
import React from 'react';
import { renderToReadableStream } from 'react-dom/server';
import { renderToPipeableStream, renderToReadableStream } from 'react-dom/server';
import { Pipe } from './renderToStream/createPipeWrapper';

@@ -13,2 +13,3 @@ import { SeoStrategy } from './renderToStream/resolveSeoStrategy';

renderToReadableStream?: typeof renderToReadableStream;
renderToPipeableStream?: typeof renderToPipeableStream;
};

@@ -15,0 +16,0 @@ declare type Result = {

@@ -37,2 +37,3 @@ "use strict";

async function renderToNodeStream(element, disabled, options) {
var _a;
let resolve;

@@ -49,3 +50,5 @@ const promise = new Promise((r) => {

};
const { pipe: pipeOriginal } = (0, server_1.renderToPipeableStream)(element, {
const renderToPipeableStream_ = (_a = options.renderToPipeableStream) !== null && _a !== void 0 ? _a : server_1.renderToPipeableStream;
assertReactImport(renderToPipeableStream_, 'renderToPipeableStream');
const { pipe: pipeOriginal } = renderToPipeableStream_(element, {
onAllReady() {

@@ -84,3 +87,5 @@ resolve();

};
const readableOriginal = await ((_a = options.renderToReadableStream) !== null && _a !== void 0 ? _a : server_1.renderToReadableStream)(element, { onError });
const renderToReadableStream_ = (_a = options.renderToReadableStream) !== null && _a !== void 0 ? _a : server_1.renderToReadableStream;
assertReactImport(renderToReadableStream_, 'renderToReadableStream');
const readableOriginal = await renderToReadableStream_(element, { onError });
if (didError) {

@@ -107,1 +112,9 @@ throw firstErr;

}
function assertReactImport(fn, fnName) {
(0, utils_1.assertUsage)(fn, [
'Your environment seems broken.',
`(Could not import \`${fnName}\` from \`react-dom/server\`).`,
'Create a new GitHub issue at https://github.com/brillout/react-streaming to discuss a solution.'
].join(' '));
(0, utils_1.assert)(typeof fn === 'function');
}
export { renderToStream };
import React from 'react';
import { renderToReadableStream } from 'react-dom/server';
import { renderToPipeableStream, renderToReadableStream } from 'react-dom/server';
import { Pipe } from './renderToStream/createPipeWrapper';

@@ -13,2 +13,3 @@ import { SeoStrategy } from './renderToStream/resolveSeoStrategy';

renderToReadableStream?: typeof renderToReadableStream;
renderToPipeableStream?: typeof renderToPipeableStream;
};

@@ -15,0 +16,0 @@ declare type Result = {

@@ -31,2 +31,3 @@ export { renderToStream };

async function renderToNodeStream(element, disabled, options) {
var _a;
let resolve;

@@ -43,3 +44,5 @@ const promise = new Promise((r) => {

};
const { pipe: pipeOriginal } = renderToPipeableStream(element, {
const renderToPipeableStream_ = (_a = options.renderToPipeableStream) !== null && _a !== void 0 ? _a : renderToPipeableStream;
assertReactImport(renderToPipeableStream_, 'renderToPipeableStream');
const { pipe: pipeOriginal } = renderToPipeableStream_(element, {
onAllReady() {

@@ -78,3 +81,5 @@ resolve();

};
const readableOriginal = await ((_a = options.renderToReadableStream) !== null && _a !== void 0 ? _a : renderToReadableStream)(element, { onError });
const renderToReadableStream_ = (_a = options.renderToReadableStream) !== null && _a !== void 0 ? _a : renderToReadableStream;
assertReactImport(renderToReadableStream_, 'renderToReadableStream');
const readableOriginal = await renderToReadableStream_(element, { onError });
if (didError) {

@@ -101,1 +106,9 @@ throw firstErr;

}
function assertReactImport(fn, fnName) {
assertUsage(fn, [
'Your environment seems broken.',
`(Could not import \`${fnName}\` from \`react-dom/server\`).`,
'Create a new GitHub issue at https://github.com/brillout/react-streaming to discuss a solution.'
].join(' '));
assert(typeof fn === 'function');
}
{
"name": "react-streaming",
"description": "React 18 Streaming. Full-fledged & Easy.",
"version": "0.1.7",
"version": "0.1.8",
"main": "./dist/cjs/index.js",

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

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