Comparing version 2.16.1 to 2.17.0
39
index.js
@@ -10,4 +10,4 @@ const { EventEmitter } = require('events') | ||
// 28 bits used total (4 from shared, 14 from read, and 10 from write) | ||
const MAX = ((1 << 28) - 1) | ||
// 29 bits used total (4 from shared, 14 from read, and 11 from write) | ||
const MAX = ((1 << 29) - 1) | ||
@@ -59,13 +59,14 @@ // Shared state | ||
// Write state (18 bit offset, 4 bit offset from shared state and 13 from read state) | ||
const WRITE_ACTIVE = 0b0000000001 << 18 | ||
const WRITE_UPDATING = 0b0000000010 << 18 | ||
const WRITE_PRIMARY = 0b0000000100 << 18 | ||
const WRITE_QUEUED = 0b0000001000 << 18 | ||
const WRITE_UNDRAINED = 0b0000010000 << 18 | ||
const WRITE_DONE = 0b0000100000 << 18 | ||
const WRITE_EMIT_DRAIN = 0b0001000000 << 18 | ||
const WRITE_NEXT_TICK = 0b0010000000 << 18 | ||
const WRITE_WRITING = 0b0100000000 << 18 | ||
const WRITE_FINISHING = 0b1000000000 << 18 | ||
// Write state (18 bit offset, 4 bit offset from shared state and 14 from read state) | ||
const WRITE_ACTIVE = 0b00000000001 << 18 | ||
const WRITE_UPDATING = 0b00000000010 << 18 | ||
const WRITE_PRIMARY = 0b00000000100 << 18 | ||
const WRITE_QUEUED = 0b00000001000 << 18 | ||
const WRITE_UNDRAINED = 0b00000010000 << 18 | ||
const WRITE_DONE = 0b00000100000 << 18 | ||
const WRITE_EMIT_DRAIN = 0b00001000000 << 18 | ||
const WRITE_NEXT_TICK = 0b00010000000 << 18 | ||
const WRITE_WRITING = 0b00100000000 << 18 | ||
const WRITE_FINISHING = 0b01000000000 << 18 | ||
const WRITE_CORKED = 0b10000000000 << 18 | ||
@@ -79,2 +80,3 @@ const WRITE_NOT_ACTIVE = MAX ^ (WRITE_ACTIVE | WRITE_WRITING) | ||
const WRITE_NOT_UPDATING = MAX ^ WRITE_UPDATING | ||
const WRITE_NOT_CORKED = MAX ^ WRITE_CORKED | ||
@@ -107,3 +109,3 @@ // Combined shared state | ||
const WRITE_DRAIN_STATUS = WRITE_QUEUED | WRITE_UNDRAINED | OPEN_STATUS | WRITE_ACTIVE | ||
const WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | ||
const WRITE_STATUS = OPEN_STATUS | WRITE_ACTIVE | WRITE_QUEUED | WRITE_CORKED | ||
const WRITE_PRIMARY_AND_ACTIVE = WRITE_PRIMARY | WRITE_ACTIVE | ||
@@ -854,2 +856,11 @@ const WRITE_ACTIVE_AND_WRITING = WRITE_ACTIVE | WRITE_WRITING | ||
cork () { | ||
this._duplexState |= WRITE_CORKED | ||
} | ||
uncork () { | ||
this._duplexState &= WRITE_NOT_CORKED | ||
this._writableState.updateNextTick() | ||
} | ||
_writev (batch, cb) { | ||
@@ -856,0 +867,0 @@ cb(null) |
{ | ||
"name": "streamx", | ||
"version": "2.16.1", | ||
"version": "2.17.0", | ||
"description": "An iteration of the Node.js core streams with a series of improvements", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49524
912