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

react-streaming

Package Overview
Dependencies
Maintainers
2
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.3.41 to 0.3.42-commit-bdfa15c

dist/cjs/utils/PROJECT_VERSION.d.ts

16

dist/cjs/server/renderToStream/orchestrateChunks.js

@@ -59,11 +59,15 @@ "use strict";

debug('onReactWrite()', getChunkAsString(chunk));
(0, utils_1.assert)(!hasEnded);
(0, utils_1.assert)(!hasEnded); // all onReactWrite() calls happen before onBeforeEnd()
const flush = true;
if (isFirstReactWrite) {
isFirstReactWrite = false;
debug('>>> START');
// The first React chunk is always the very first written chunk, see Rule 2:
// https://github.com/brillout/react-streaming/tree/main/src#rule-2
// The first React chunk should always be the very first written chunk.
// See Rule 2: https://github.com/brillout/react-streaming/tree/main/src#rule-2
writeChunkNow(chunk, flush);
firstReactWritePromise_resolve();
// Because of Rule 1, all subsequent synchronous React write after the first one also need to be injected first.
// See Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
setTimeout(() => {
isFirstReactWrite = false;
firstReactWritePromise_resolve();
}, 0);
}

@@ -80,4 +84,4 @@ else {

await doNotClosePromise.promise;
await lastWritePromise;
hasEnded = true;
await lastWritePromise;
debug('>>> END');

@@ -84,0 +88,0 @@ }

@@ -5,6 +5,6 @@ "use strict";

const getGlobalObject_1 = require("./getGlobalObject");
const PROJECT_VERSION = '0.3.41';
const PROJECT_VERSION_1 = require("./PROJECT_VERSION");
const projectInfo = {
projectName: 'react-streaming',
projectVersion: PROJECT_VERSION,
projectVersion: PROJECT_VERSION_1.PROJECT_VERSION,
npmPackageName: 'react-streaming',

@@ -11,0 +11,0 @@ githubRepository: 'https://github.com/brillout/react-streaming',

@@ -57,11 +57,15 @@ export { orchestrateChunks };

debug('onReactWrite()', getChunkAsString(chunk));
assert(!hasEnded);
assert(!hasEnded); // all onReactWrite() calls happen before onBeforeEnd()
const flush = true;
if (isFirstReactWrite) {
isFirstReactWrite = false;
debug('>>> START');
// The first React chunk is always the very first written chunk, see Rule 2:
// https://github.com/brillout/react-streaming/tree/main/src#rule-2
// The first React chunk should always be the very first written chunk.
// See Rule 2: https://github.com/brillout/react-streaming/tree/main/src#rule-2
writeChunkNow(chunk, flush);
firstReactWritePromise_resolve();
// Because of Rule 1, all subsequent synchronous React write after the first one also need to be injected first.
// See Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
setTimeout(() => {
isFirstReactWrite = false;
firstReactWritePromise_resolve();
}, 0);
}

@@ -78,4 +82,4 @@ else {

await doNotClosePromise.promise;
await lastWritePromise;
hasEnded = true;
await lastWritePromise;
debug('>>> END');

@@ -82,0 +86,0 @@ }

export { projectInfo };
import { getGlobalObject } from './getGlobalObject';
const PROJECT_VERSION = '0.3.41';
import { PROJECT_VERSION } from './PROJECT_VERSION';
const projectInfo = {

@@ -5,0 +5,0 @@ projectName: 'react-streaming',

{
"name": "react-streaming",
"description": "React 18 Streaming. Full-fledged & Easy.",
"version": "0.3.41",
"version": "0.3.42-commit-bdfa15c",
"peerDependencies": {

@@ -71,3 +71,3 @@ "react": ">=18",

"@brillout/part-regex": "^0.1.2",
"@brillout/release-me": "^0.3.8",
"@brillout/release-me": "^0.4.0",
"@types/node": "^15.12.2",

@@ -74,0 +74,0 @@ "@types/react": "^18.0.9",

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