| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 320a8ad commit d669f22
13 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -278,6 +278,7 @@ overrides: | |||
| 278 | 278 | - ./internal/readme.md | |
| 279 | 279 | - ./internal/repl/history.js | |
| 280 | 280 | - ./internal/source_map/prepare_stack_trace.js | |
| 281 | + - ./internal/streams/*.js | ||
| 281 | 282 | - ./internal/structured_clone.js | |
| 282 | 283 | - ./internal/test/*.js | |
| 283 | 284 | - ./internal/test_runner/**/*.js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -175,7 +175,7 @@ module.exports = class BufferList { | |||
| 175 | 175 | // Only inspect one level. | |
| 176 | 176 | depth: 0, | |
| 177 | 177 | // It should not recurse. | |
| 178 | - customInspect: false | ||
| 178 | + customInspect: false, | ||
| 179 | 179 | }); | |
| 180 | 180 | } | |
| 181 | 181 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ const { | |||
| 14 | 14 | kDestroyed, | |
| 15 | 15 | isDestroyed, | |
| 16 | 16 | isFinished, | |
| 17 | - isServerRequest | ||
| 17 | + isServerRequest, | ||
| 18 | 18 | } = require('internal/streams/utils'); | |
| 19 | 19 | ||
| 20 | 20 | const kDestroy = Symbol('kDestroy'); | |
@@ -334,5 +334,5 @@ module.exports = { | |||
| 334 | 334 | destroyer, | |
| 335 | 335 | destroy, | |
| 336 | 336 | undestroy, | |
| 337 | - errorOrDestroy | ||
| 337 | + errorOrDestroy, | ||
| 338 | 338 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,8 +114,8 @@ ObjectDefineProperties(Duplex.prototype, { | |||
| 114 | 114 | this._readableState.destroyed = value; | |
| 115 | 115 | this._writableState.destroyed = value; | |
| 116 | 116 | } | |
| 117 | - } | ||
| 118 | - } | ||
| 117 | + }, | ||
| 118 | + }, | ||
| 119 | 119 | }); | |
| 120 | 120 | ||
| 121 | 121 | let webStreamsAdapters; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ const { | |||
| 29 | 29 | const { AbortController } = require('internal/abort_controller'); | |
| 30 | 30 | ||
| 31 | 31 | const { | |
| 32 | - FunctionPrototypeCall | ||
| 32 | + FunctionPrototypeCall, | ||
| 33 | 33 | } = primordials; | |
| 34 | 34 | ||
| 35 | 35 | // This is needed for pre node 17. | |
@@ -90,7 +90,7 @@ module.exports = function duplexify(body, name) { | |||
| 90 | 90 | objectMode: true, | |
| 91 | 91 | write, | |
| 92 | 92 | final, | |
| 93 | - destroy | ||
| 93 | + destroy, | ||
| 94 | 94 | }); | |
| 95 | 95 | } | |
| 96 | 96 | ||
@@ -126,7 +126,7 @@ module.exports = function duplexify(body, name) { | |||
| 126 | 126 | } | |
| 127 | 127 | }); | |
| 128 | 128 | }, | |
| 129 | - destroy | ||
| 129 | + destroy, | ||
| 130 | 130 | }); | |
| 131 | 131 | } | |
| 132 | 132 | ||
@@ -142,7 +142,7 @@ module.exports = function duplexify(body, name) { | |||
| 142 | 142 | return from(Duplexify, body, { | |
| 143 | 143 | // TODO (ronag): highWaterMark? | |
| 144 | 144 | objectMode: true, | |
| 145 | - writable: false | ||
| 145 | + writable: false, | ||
| 146 | 146 | }); | |
| 147 | 147 | } | |
| 148 | 148 | ||
@@ -192,7 +192,7 @@ module.exports = function duplexify(body, name) { | |||
| 192 | 192 | return d = new Duplexify({ | |
| 193 | 193 | objectMode: true, | |
| 194 | 194 | writable: false, | |
| 195 | - read() {} | ||
| 195 | + read() {}, | ||
| 196 | 196 | }); | |
| 197 | 197 | } | |
| 198 | 198 | ||
@@ -236,7 +236,7 @@ function fromAsyncGen(fn) { | |||
| 236 | 236 | destroy(err, cb) { | |
| 237 | 237 | ac.abort(); | |
| 238 | 238 | cb(err); | |
| 239 | - } | ||
| 239 | + }, | ||
| 240 | 240 | }; | |
| 241 | 241 | } | |
| 242 | 242 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ const { | |||
| 9 | 9 | } = require('internal/errors'); | |
| 10 | 10 | const { | |
| 11 | 11 | ERR_INVALID_ARG_TYPE, | |
| 12 | - ERR_STREAM_PREMATURE_CLOSE | ||
| 12 | + ERR_STREAM_PREMATURE_CLOSE, | ||
| 13 | 13 | } = codes; | |
| 14 | 14 | const { | |
| 15 | 15 | kEmptyObject, | |
@@ -19,7 +19,7 @@ const { | |||
| 19 | 19 | validateAbortSignal, | |
| 20 | 20 | validateFunction, | |
| 21 | 21 | validateObject, | |
| 22 | - validateBoolean | ||
| 22 | + validateBoolean, | ||
| 23 | 23 | } = require('internal/validators'); | |
| 24 | 24 | ||
| 25 | 25 | const { Promise, PromisePrototypeThen } = primordials; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ const { Buffer } = require('buffer'); | |||
| 9 | 9 | ||
| 10 | 10 | const { | |
| 11 | 11 | ERR_INVALID_ARG_TYPE, | |
| 12 | - ERR_STREAM_NULL_VALUES | ||
| 12 | + ERR_STREAM_NULL_VALUES, | ||
| 13 | 13 | } = require('internal/errors').codes; | |
| 14 | 14 | ||
| 15 | 15 | function from(Readable, iterable, opts) { | |
@@ -21,7 +21,7 @@ function from(Readable, iterable, opts) { | |||
| 21 | 21 | read() { | |
| 22 | 22 | this.push(iterable); | |
| 23 | 23 | this.push(null); | |
| 24 | - } | ||
| 24 | + }, | ||
| 25 | 25 | }); | |
| 26 | 26 | } | |
| 27 | 27 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ const { | |||
| 12 | 12 | const stream = require('stream'); | |
| 13 | 13 | ||
| 14 | 14 | const { | |
| 15 | - getDefaultEncoding | ||
| 15 | + getDefaultEncoding, | ||
| 16 | 16 | } = require('internal/crypto/util'); | |
| 17 | 17 | ||
| 18 | 18 | module.exports = LazyTransform; | |
@@ -43,7 +43,7 @@ function makeSetter(name) { | |||
| 43 | 43 | value: val, | |
| 44 | 44 | enumerable: true, | |
| 45 | 45 | configurable: true, | |
| 46 | - writable: true | ||
| 46 | + writable: true, | ||
| 47 | 47 | }); | |
| 48 | 48 | }; | |
| 49 | 49 | } | |
@@ -54,13 +54,13 @@ ObjectDefineProperties(LazyTransform.prototype, { | |||
| 54 | 54 | get: makeGetter('_readableState'), | |
| 55 | 55 | set: makeSetter('_readableState'), | |
| 56 | 56 | configurable: true, | |
| 57 | - enumerable: true | ||
| 57 | + enumerable: true, | ||
| 58 | 58 | }, | |
| 59 | 59 | _writableState: { | |
| 60 | 60 | __proto__: null, | |
| 61 | 61 | get: makeGetter('_writableState'), | |
| 62 | 62 | set: makeSetter('_writableState'), | |
| 63 | 63 | configurable: true, | |
| 64 | - enumerable: true | ||
| 65 | - } | ||
| 64 | + enumerable: true, | ||
| 65 | + }, | ||
| 66 | 66 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ const { | |||
| 27 | 27 | ||
| 28 | 28 | const { | |
| 29 | 29 | validateFunction, | |
| 30 | - validateAbortSignal | ||
| 30 | + validateAbortSignal, | ||
| 31 | 31 | } = require('internal/validators'); | |
| 32 | 32 | ||
| 33 | 33 | const { | |
@@ -60,7 +60,7 @@ function destroyer(stream, reading, writing) { | |||
| 60 | 60 | finished = true; | |
| 61 | 61 | destroyImpl.destroyer(stream, err || new ERR_STREAM_DESTROYED('pipe')); | |
| 62 | 62 | }, | |
| 63 | - cleanup | ||
| 63 | + cleanup, | ||
| 64 | 64 | }; | |
| 65 | 65 | } | |
| 66 | 66 | ||
@@ -314,7 +314,7 @@ function pipelineImpl(streams, callback, opts) { | |||
| 314 | 314 | // composed through `.pipe(stream)`. | |
| 315 | 315 | ||
| 316 | 316 | const pt = new PassThrough({ | |
| 317 | - objectMode: true | ||
| 317 | + objectMode: true, | ||
| 318 | 318 | }); | |
| 319 | 319 | ||
| 320 | 320 | // Handle Promises/A+ spec, `then` could be a getter that throws on | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ const { | |||
| 32 | 32 | Promise, | |
| 33 | 33 | SafeSet, | |
| 34 | 34 | SymbolAsyncIterator, | |
| 35 | - Symbol | ||
| 35 | + Symbol, | ||
| 36 | 36 | } = primordials; | |
| 37 | 37 | ||
| 38 | 38 | module.exports = Readable; | |
@@ -54,7 +54,7 @@ const BufferList = require('internal/streams/buffer_list'); | |||
| 54 | 54 | const destroyImpl = require('internal/streams/destroy'); | |
| 55 | 55 | const { | |
| 56 | 56 | getHighWaterMark, | |
| 57 | - getDefaultHighWaterMark | ||
| 57 | + getDefaultHighWaterMark, | ||
| 58 | 58 | } = require('internal/streams/state'); | |
| 59 | 59 | ||
| 60 | 60 | const { | |
@@ -65,7 +65,7 @@ const { | |||
| 65 | 65 | ERR_OUT_OF_RANGE, | |
| 66 | 66 | ERR_STREAM_PUSH_AFTER_EOF, | |
| 67 | 67 | ERR_STREAM_UNSHIFT_AFTER_END_EVENT, | |
| 68 | - } | ||
| 68 | + }, | ||
| 69 | 69 | } = require('internal/errors'); | |
| 70 | 70 | const { validateObject } = require('internal/validators'); | |
| 71 | 71 | ||
@@ -1166,15 +1166,15 @@ ObjectDefineProperties(Readable.prototype, { | |||
| 1166 | 1166 | if (this._readableState) { | |
| 1167 | 1167 | this._readableState.readable = !!val; | |
| 1168 | 1168 | } | |
| 1169 | - } | ||
| 1169 | + }, | ||
| 1170 | 1170 | }, | |
| 1171 | 1171 | ||
| 1172 | 1172 | readableDidRead: { | |
| 1173 | 1173 | __proto__: null, | |
| 1174 | 1174 | enumerable: false, | |
| 1175 | 1175 | get: function() { | |
| 1176 | 1176 | return this._readableState.dataEmitted; | |
| 1177 | - } | ||
| 1177 | + }, | ||
| 1178 | 1178 | }, | |
| 1179 | 1179 | ||
| 1180 | 1180 | readableAborted: { | |
@@ -1186,23 +1186,23 @@ ObjectDefineProperties(Readable.prototype, { | |||
| 1186 | 1186 | (this._readableState.destroyed || this._readableState.errored) && | |
| 1187 | 1187 | !this._readableState.endEmitted | |
| 1188 | 1188 | ); | |
| 1189 | - } | ||
| 1189 | + }, | ||
| 1190 | 1190 | }, | |
| 1191 | 1191 | ||
| 1192 | 1192 | readableHighWaterMark: { | |
| 1193 | 1193 | __proto__: null, | |
| 1194 | 1194 | enumerable: false, | |
| 1195 | 1195 | get: function() { | |
| 1196 | 1196 | return this._readableState.highWaterMark; | |
| 1197 | - } | ||
| 1197 | + }, | ||
| 1198 | 1198 | }, | |
| 1199 | 1199 | ||
| 1200 | 1200 | readableBuffer: { | |
| 1201 | 1201 | __proto__: null, | |
| 1202 | 1202 | enumerable: false, | |
| 1203 | 1203 | get: function() { | |
| 1204 | 1204 | return this._readableState && this._readableState.buffer; | |
| 1205 | - } | ||
| 1205 | + }, | ||
| 1206 | 1206 | }, | |
| 1207 | 1207 | ||
| 1208 | 1208 | readableFlowing: { | |
@@ -1215,46 +1215,46 @@ ObjectDefineProperties(Readable.prototype, { | |||
| 1215 | 1215 | if (this._readableState) { | |
| 1216 | 1216 | this._readableState.flowing = state; | |
| 1217 | 1217 | } | |
| 1218 | - } | ||
| 1218 | + }, | ||
| 1219 | 1219 | }, | |
| 1220 | 1220 | ||
| 1221 | 1221 | readableLength: { | |
| 1222 | 1222 | __proto__: null, | |
| 1223 | 1223 | enumerable: false, | |
| 1224 | 1224 | get() { | |
| 1225 | 1225 | return this._readableState.length; | |
| 1226 | - } | ||
| 1226 | + }, | ||
| 1227 | 1227 | }, | |
| 1228 | 1228 | ||
| 1229 | 1229 | readableObjectMode: { | |
| 1230 | 1230 | __proto__: null, | |
| 1231 | 1231 | enumerable: false, | |
| 1232 | 1232 | get() { | |
| 1233 | 1233 | return this._readableState ? this._readableState.objectMode : false; | |
| 1234 | - } | ||
| 1234 | + }, | ||
| 1235 | 1235 | }, | |
| 1236 | 1236 | ||
| 1237 | 1237 | readableEncoding: { | |
| 1238 | 1238 | __proto__: null, | |
| 1239 | 1239 | enumerable: false, | |
| 1240 | 1240 | get() { | |
| 1241 | 1241 | return this._readableState ? this._readableState.encoding : null; | |
| 1242 | - } | ||
| 1242 | + }, | ||
| 1243 | 1243 | }, | |
| 1244 | 1244 | ||
| 1245 | 1245 | errored: { | |
| 1246 | 1246 | __proto__: null, | |
| 1247 | 1247 | enumerable: false, | |
| 1248 | 1248 | get() { | |
| 1249 | 1249 | return this._readableState ? this._readableState.errored : null; | |
| 1250 | - } | ||
| 1250 | + }, | ||
| 1251 | 1251 | }, | |
| 1252 | 1252 | ||
| 1253 | 1253 | closed: { | |
| 1254 | 1254 | __proto__: null, | |
| 1255 | 1255 | get() { | |
| 1256 | 1256 | return this._readableState ? this._readableState.closed : false; | |
| 1257 | - } | ||
| 1257 | + }, | ||
| 1258 | 1258 | }, | |
| 1259 | 1259 | ||
| 1260 | 1260 | destroyed: { | |
@@ -1273,15 +1273,15 @@ ObjectDefineProperties(Readable.prototype, { | |||
| 1273 | 1273 | // Backward compatibility, the user is explicitly | |
| 1274 | 1274 | // managing destroyed. | |
| 1275 | 1275 | this._readableState.destroyed = value; | |
| 1276 | - } | ||
| 1276 | + }, | ||
| 1277 | 1277 | }, | |
| 1278 | 1278 | ||
| 1279 | 1279 | readableEnded: { | |
| 1280 | 1280 | __proto__: null, | |
| 1281 | 1281 | enumerable: false, | |
| 1282 | 1282 | get() { | |
| 1283 | 1283 | return this._readableState ? this._readableState.endEmitted : false; | |
| 1284 | - } | ||
| 1284 | + }, | ||
| 1285 | 1285 | }, | |
| 1286 | 1286 | ||
| 1287 | 1287 | }); | |
@@ -1292,7 +1292,7 @@ ObjectDefineProperties(ReadableState.prototype, { | |||
| 1292 | 1292 | __proto__: null, | |
| 1293 | 1293 | get() { | |
| 1294 | 1294 | return this.pipes.length; | |
| 1295 | - } | ||
| 1295 | + }, | ||
| 1296 | 1296 | }, | |
| 1297 | 1297 | ||
| 1298 | 1298 | // Legacy property for `paused`. | |
@@ -1303,8 +1303,8 @@ ObjectDefineProperties(ReadableState.prototype, { | |||
| 1303 | 1303 | }, | |
| 1304 | 1304 | set(value) { | |
| 1305 | 1305 | this[kPaused] = !!value; | |
| 1306 | - } | ||
| 1307 | - } | ||
| 1306 | + }, | ||
| 1307 | + }, | ||
| 1308 | 1308 | }); | |
| 1309 | 1309 | ||
| 1310 | 1310 | // Exposed for testing purposes only. | |
@@ -1418,6 +1418,6 @@ Readable.wrap = function(src, options) { | |||
| 1418 | 1418 | destroy(err, callback) { | |
| 1419 | 1419 | destroyImpl.destroyer(src, err); | |
| 1420 | 1420 | callback(err); | |
| 1421 | - } | ||
| 1421 | + }, | ||
| 1422 | 1422 | }).wrap(src); | |
| 1423 | 1423 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments