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.3.37 to 0.3.38

2

dist/cjs/server/renderToStream/createBuffer.d.ts

@@ -22,5 +22,5 @@ export { createBuffer };

injectToStream: InjectToStream;
onReactWrite: (chunk: unknown) => Promise<void>;
onReactWrite: (chunk: unknown) => void;
onBeforeEnd: () => Promise<void>;
hasStreamEnded: () => boolean;
};

@@ -64,8 +64,3 @@ "use strict";

writePermission = true;
await new Promise((resolve) => {
// We delay flushing because of Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
setTimeout(() => {
resolve(flushBuffer());
}, 0);
});
await flushBuffer();
}

@@ -72,0 +67,0 @@ async function onBeforeEnd() {

@@ -23,6 +23,7 @@ "use strict";

const writableForReact = new stream_1.Writable({
async write(chunk, encoding, callback) {
write(chunk, _encoding, callback) {
debug('write');
if (!writableFromUser.destroyed) {
await onReactWrite(chunk);
// We cannot await inside write() as we cannot make write() async because of Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
onReactWrite(chunk);
}

@@ -29,0 +30,0 @@ else {

@@ -46,3 +46,4 @@ "use strict";

}
await onReactWrite(value);
// We cannot await inside this while-loop because of Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
onReactWrite(value);
}

@@ -49,0 +50,0 @@ clearTimeouts();

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

const getGlobalObject_1 = require("./getGlobalObject");
const PROJECT_VERSION = '0.3.37';
const PROJECT_VERSION = '0.3.38';
const projectInfo = {

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

@@ -22,5 +22,5 @@ export { createBuffer };

injectToStream: InjectToStream;
onReactWrite: (chunk: unknown) => Promise<void>;
onReactWrite: (chunk: unknown) => void;
onBeforeEnd: () => Promise<void>;
hasStreamEnded: () => boolean;
};

@@ -62,8 +62,3 @@ export { createBuffer };

writePermission = true;
await new Promise((resolve) => {
// We delay flushing because of Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
setTimeout(() => {
resolve(flushBuffer());
}, 0);
});
await flushBuffer();
}

@@ -70,0 +65,0 @@ async function onBeforeEnd() {

@@ -21,6 +21,7 @@ export { createPipeWrapper };

const writableForReact = new Writable({
async write(chunk, encoding, callback) {
write(chunk, _encoding, callback) {
debug('write');
if (!writableFromUser.destroyed) {
await onReactWrite(chunk);
// We cannot await inside write() as we cannot make write() async because of Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
onReactWrite(chunk);
}

@@ -27,0 +28,0 @@ else {

@@ -44,3 +44,4 @@ export { createReadableWrapper };

}
await onReactWrite(value);
// We cannot await inside this while-loop because of Rule 1: https://github.com/brillout/react-streaming/tree/main/src#rule-1
onReactWrite(value);
}

@@ -47,0 +48,0 @@ clearTimeouts();

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

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

{
"name": "react-streaming",
"description": "React 18 Streaming. Full-fledged & Easy.",
"version": "0.3.37",
"version": "0.3.38",
"peerDependencies": {

@@ -6,0 +6,0 @@ "react": ">=18",

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