GeezerVison is showing github.com — lib: move `Symbol[Async]Dispose` polyfills to `internal/util` · nodejs/node@00a2fc7
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/_http_server.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,7 +29,6 @@ const { | 29 | 29 | ObjectSetPrototypeOf, | 30 | 30 | ReflectApply, | 31 | 31 | Symbol, | 32 | | - SymbolAsyncDispose, | 33 | 32 | SymbolFor, | 34 | 33 | } = primordials; | 35 | 34 |
| @@ -82,6 +81,7 @@ const { | 82 | 81 | const { | 83 | 82 | kEmptyObject, | 84 | 83 | promisify, | | 84 | + SymbolAsyncDispose, | 85 | 85 | } = require('internal/util'); | 86 | 86 | const { | 87 | 87 | validateInteger, | |
Collapse file Copy file name to clipboardExpand all lines: lib/child_process.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -42,7 +42,6 @@ const { | 42 | 42 | StringPrototypeIncludes, | 43 | 43 | StringPrototypeSlice, | 44 | 44 | StringPrototypeToUpperCase, | 45 | | - SymbolDispose, | 46 | 45 | } = primordials; | 47 | 46 |
| 48 | 47 | const { | @@ -51,6 +50,7 @@ const { | 51 | 50 | getSystemErrorName, | 52 | 51 | kEmptyObject, | 53 | 52 | promisify, | | 53 | + SymbolDispose, | 54 | 54 | } = require('internal/util'); | 55 | 55 | const { isArrayBufferView } = require('internal/util/types'); | 56 | 56 | let debug = require('internal/util/debuglog').debuglog( | |
Collapse file Copy file name to clipboardExpand all lines: lib/dgram.js +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,8 +30,6 @@ const { | 30 | 30 | ObjectDefineProperty, | 31 | 31 | ObjectSetPrototypeOf, | 32 | 32 | ReflectApply, | 33 | | - SymbolAsyncDispose, | 34 | | - SymbolDispose, | 35 | 33 | } = primordials; | 36 | 34 |
| 37 | 35 | const errors = require('internal/errors'); | @@ -60,7 +58,7 @@ const { | 60 | 58 | validatePort, | 61 | 59 | } = require('internal/validators'); | 62 | 60 | const { Buffer } = require('buffer'); | 63 | | -const { deprecate, guessHandleType, promisify } = require('internal/util'); | | 61 | +const { deprecate, guessHandleType, promisify, SymbolAsyncDispose, SymbolDispose } = require('internal/util'); | 64 | 62 | const { isArrayBufferView } = require('internal/util/types'); | 65 | 63 | const EventEmitter = require('events'); | 66 | 64 | const { addAbortListener } = require('internal/events/abort_listener'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/events.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -48,11 +48,10 @@ const { | 48 | 48 | Symbol, | 49 | 49 | SymbolFor, | 50 | 50 | SymbolAsyncIterator, | 51 | | - SymbolDispose, | 52 | 51 | } = primordials; | 53 | 52 | const kRejection = SymbolFor('nodejs.rejection'); | 54 | 53 |
| 55 | | -const { kEmptyObject } = require('internal/util'); | | 54 | +const { SymbolDispose, kEmptyObject } = require('internal/util'); | 56 | 55 |
| 57 | 56 | const { | 58 | 57 | inspect, | |
Collapse file Copy file name to clipboardExpand all lines: lib/https.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -33,13 +33,13 @@ const { | 33 | 33 | ObjectSetPrototypeOf, | 34 | 34 | ReflectApply, | 35 | 35 | ReflectConstruct, | 36 | | - SymbolAsyncDispose, | 37 | 36 | } = primordials; | 38 | 37 |
| 39 | 38 | const { | 40 | 39 | assertCrypto, | 41 | 40 | kEmptyObject, | 42 | 41 | promisify, | | 42 | + SymbolAsyncDispose, | 43 | 43 | } = require('internal/util'); | 44 | 44 | assertCrypto(); | 45 | 45 |
| |
Collapse file Copy file name to clipboardExpand all lines: lib/inspector.js +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | JSONParse, | 5 | 5 | JSONStringify, | 6 | 6 | SafeMap, | 7 | | - SymbolDispose, | 8 | 7 | } = primordials; | 9 | 8 |
| | 9 | +const { | | 10 | + SymbolDispose, | | 11 | +} = require('internal/util'); | | 12 | + | 10 | 13 | const { | 11 | 14 | ERR_INSPECTOR_ALREADY_ACTIVATED, | 12 | 15 | ERR_INSPECTOR_ALREADY_CONNECTED, | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/child_process.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,6 @@ const { | 12 | 12 | ReflectApply, | 13 | 13 | StringPrototypeSlice, | 14 | 14 | Symbol, | 15 | | - SymbolDispose, | 16 | 15 | Uint8Array, | 17 | 16 | } = primordials; | 18 | 17 |
| @@ -56,7 +55,7 @@ const { TTY } = internalBinding('tty_wrap'); | 56 | 55 | const { UDP } = internalBinding('udp_wrap'); | 57 | 56 | const SocketList = require('internal/socket_list'); | 58 | 57 | const { owner_symbol } = require('internal/async_hooks').symbols; | 59 | | -const { convertToValidSignal, deprecate } = require('internal/util'); | | 58 | +const { convertToValidSignal, deprecate, SymbolDispose } = require('internal/util'); | 60 | 59 | const { isArrayBufferView } = require('internal/util/types'); | 61 | 60 | const spawn_sync = internalBinding('spawn_sync'); | 62 | 61 | const { kStateSymbol } = require('internal/dgram'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/events/abort_listener.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 |
| 3 | 3 | const { | 4 | 4 | SymbolDispose, | 5 | | -} = primordials; | | 5 | +} = require('internal/util'); | 6 | 6 | const { | 7 | 7 | validateAbortSignal, | 8 | 8 | validateFunction, | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,6 @@ const { | 15 | 15 | SafeArrayIterator, | 16 | 16 | SafePromisePrototypeFinally, | 17 | 17 | Symbol, | 18 | | - SymbolAsyncDispose, | 19 | 18 | Uint8Array, | 20 | 19 | FunctionPrototypeBind, | 21 | 20 | uncurryThis, | @@ -96,6 +95,7 @@ const { | 96 | 95 | lazyDOMException, | 97 | 96 | promisify, | 98 | 97 | getLazy, | | 98 | + SymbolAsyncDispose, | 99 | 99 | } = require('internal/util'); | 100 | 100 | const { EventEmitterMixin } = require('internal/event_target'); | 101 | 101 | const { StringDecoder } = require('string_decoder'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/http2/core.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,8 +19,6 @@ const { | 19 | 19 | SafeMap, | 20 | 20 | SafeSet, | 21 | 21 | Symbol, | 22 | | - SymbolAsyncDispose, | 23 | | - SymbolDispose, | 24 | 22 | Uint32Array, | 25 | 23 | Uint8Array, | 26 | 24 | } = primordials; | @@ -30,6 +28,8 @@ const { | 30 | 28 | customInspectSymbol: kInspect, | 31 | 29 | kEmptyObject, | 32 | 30 | promisify, | | 31 | + SymbolAsyncDispose, | | 32 | + SymbolDispose, | 33 | 33 | } = require('internal/util'); | 34 | 34 |
| 35 | 35 | assertCrypto(); | |
|