| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -274,6 +274,7 @@ overrides: | |||
| 274 | 274 | - ./internal/per_context/messageport.js | |
| 275 | 275 | - ./internal/policy/*.js | |
| 276 | 276 | - ./internal/priority_queue.js | |
| 277 | + - ./internal/process/*.js | ||
| 277 | 278 | - ./internal/readline/*.js | |
| 278 | 279 | - ./internal/readme.md | |
| 279 | 280 | - ./internal/repl/history.js | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,7 +83,7 @@ function evalScript(name, body, breakFirstLine, print) { | |||
| 83 | 83 | importModuleDynamically(specifier, _, importAssertions) { | |
| 84 | 84 | const loader = asyncESM.esmLoader; | |
| 85 | 85 | return loader.import(specifier, baseUrl, importAssertions); | |
| 86 | - } | ||
| 86 | + }, | ||
| 87 | 87 | })); | |
| 88 | 88 | if (print) { | |
| 89 | 89 | const { log } = require('internal/console/global'); | |
@@ -96,7 +96,7 @@ function evalScript(name, body, breakFirstLine, print) { | |||
| 96 | 96 | ||
| 97 | 97 | const exceptionHandlerState = { | |
| 98 | 98 | captureFn: null, | |
| 99 | - reportFlag: false | ||
| 99 | + reportFlag: false, | ||
| 100 | 100 | }; | |
| 101 | 101 | ||
| 102 | 102 | function setUncaughtExceptionCaptureCallback(fn) { | |
@@ -203,5 +203,5 @@ module.exports = { | |||
| 203 | 203 | evalScript, | |
| 204 | 204 | onGlobalUncaughtException: createOnGlobalUncaughtException(), | |
| 205 | 205 | setUncaughtExceptionCaptureCallback, | |
| 206 | - hasUncaughtExceptionCaptureCallback | ||
| 206 | + hasUncaughtExceptionCaptureCallback, | ||
| 207 | 207 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,8 +38,8 @@ const { | |||
| 38 | 38 | ERR_INVALID_ARG_TYPE, | |
| 39 | 39 | ERR_INVALID_ARG_VALUE, | |
| 40 | 40 | ERR_OUT_OF_RANGE, | |
| 41 | - ERR_UNKNOWN_SIGNAL | ||
| 42 | - } | ||
| 41 | + ERR_UNKNOWN_SIGNAL, | ||
| 42 | + }, | ||
| 43 | 43 | } = require('internal/errors'); | |
| 44 | 44 | const format = require('internal/util/inspect').format; | |
| 45 | 45 | const { | |
@@ -111,7 +111,7 @@ function wrapProcessMethods(binding) { | |||
| 111 | 111 | cpuUsage: _cpuUsage, | |
| 112 | 112 | memoryUsage: _memoryUsage, | |
| 113 | 113 | rss, | |
| 114 | - resourceUsage: _resourceUsage | ||
| 114 | + resourceUsage: _resourceUsage, | ||
| 115 | 115 | } = binding; | |
| 116 | 116 | ||
| 117 | 117 | function _rawDebug(...args) { | |
@@ -148,14 +148,14 @@ function wrapProcessMethods(binding) { | |||
| 148 | 148 | if (prevValue) { | |
| 149 | 149 | return { | |
| 150 | 150 | user: cpuValues[0] - prevValue.user, | |
| 151 | - system: cpuValues[1] - prevValue.system | ||
| 151 | + system: cpuValues[1] - prevValue.system, | ||
| 152 | 152 | }; | |
| 153 | 153 | } | |
| 154 | 154 | ||
| 155 | 155 | // If no previous value passed in, return current value. | |
| 156 | 156 | return { | |
| 157 | 157 | user: cpuValues[0], | |
| 158 | - system: cpuValues[1] | ||
| 158 | + system: cpuValues[1], | ||
| 159 | 159 | }; | |
| 160 | 160 | } | |
| 161 | 161 | ||
@@ -175,7 +175,7 @@ function wrapProcessMethods(binding) { | |||
| 175 | 175 | heapTotal: memValues[1], | |
| 176 | 176 | heapUsed: memValues[2], | |
| 177 | 177 | external: memValues[3], | |
| 178 | - arrayBuffers: memValues[4] | ||
| 178 | + arrayBuffers: memValues[4], | ||
| 179 | 179 | }; | |
| 180 | 180 | } | |
| 181 | 181 | ||
@@ -254,7 +254,7 @@ function wrapProcessMethods(binding) { | |||
| 254 | 254 | ipcReceived: resourceValues[12], | |
| 255 | 255 | signalsCount: resourceValues[13], | |
| 256 | 256 | voluntaryContextSwitches: resourceValues[14], | |
| 257 | - involuntaryContextSwitches: resourceValues[15] | ||
| 257 | + involuntaryContextSwitches: resourceValues[15], | ||
| 258 | 258 | }; | |
| 259 | 259 | } | |
| 260 | 260 | ||
@@ -265,7 +265,7 @@ function wrapProcessMethods(binding) { | |||
| 265 | 265 | resourceUsage, | |
| 266 | 266 | memoryUsage, | |
| 267 | 267 | kill, | |
| 268 | - exit | ||
| 268 | + exit, | ||
| 269 | 269 | }; | |
| 270 | 270 | } | |
| 271 | 271 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,5 +57,5 @@ module.exports = ObjectFreeze({ | |||
| 57 | 57 | ||
| 58 | 58 | assertIntegrity(moduleURL, content) { | |
| 59 | 59 | this.manifest.assertIntegrity(moduleURL, content); | |
| 60 | - } | ||
| 60 | + }, | ||
| 61 | 61 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,15 +37,15 @@ function prepareMainThreadExecution(expandArgv1 = false, initializeModules = tru | |||
| 37 | 37 | prepareExecution({ | |
| 38 | 38 | expandArgv1, | |
| 39 | 39 | initializeModules, | |
| 40 | - isMainThread: true | ||
| 40 | + isMainThread: true, | ||
| 41 | 41 | }); | |
| 42 | 42 | } | |
| 43 | 43 | ||
| 44 | 44 | function prepareWorkerThreadExecution() { | |
| 45 | 45 | prepareExecution({ | |
| 46 | 46 | expandArgv1: false, | |
| 47 | 47 | initializeModules: false, // Will need to initialize it after policy setup | |
| 48 | - isMainThread: false | ||
| 48 | + isMainThread: false, | ||
| 49 | 49 | }); | |
| 50 | 50 | } | |
| 51 | 51 | ||
@@ -135,7 +135,7 @@ function patchProcessObject(expandArgv1) { | |||
| 135 | 135 | enumerable: true, | |
| 136 | 136 | // Only set it to true during snapshot building. | |
| 137 | 137 | configurable: getOptionValue('--build-snapshot'), | |
| 138 | - value: process.argv[0] | ||
| 138 | + value: process.argv[0], | ||
| 139 | 139 | }); | |
| 140 | 140 | ||
| 141 | 141 | process.exitCode = undefined; | |
@@ -184,15 +184,15 @@ function addReadOnlyProcessAlias(name, option, enumerable = true) { | |||
| 184 | 184 | writable: false, | |
| 185 | 185 | configurable: true, | |
| 186 | 186 | enumerable, | |
| 187 | - value | ||
| 187 | + value, | ||
| 188 | 188 | }); | |
| 189 | 189 | } | |
| 190 | 190 | } | |
| 191 | 191 | ||
| 192 | 192 | function setupWarningHandler() { | |
| 193 | 193 | const { | |
| 194 | 194 | onWarning, | |
| 195 | - resetForSerialization | ||
| 195 | + resetForSerialization, | ||
| 196 | 196 | } = require('internal/process/warning'); | |
| 197 | 197 | if (getOptionValue('--warnings') && | |
| 198 | 198 | process.env.NODE_NO_WARNINGS !== '1') { | |
@@ -241,7 +241,7 @@ function setupFetch() { | |||
| 241 | 241 | }, | |
| 242 | 242 | set(value) { | |
| 243 | 243 | exposeInterface(globalThis, name, value); | |
| 244 | - } | ||
| 244 | + }, | ||
| 245 | 245 | }; | |
| 246 | 246 | } | |
| 247 | 247 | ||
@@ -271,7 +271,7 @@ function setupWebCrypto() { | |||
| 271 | 271 | get crypto() { | |
| 272 | 272 | webcrypto ??= require('internal/crypto/webcrypto'); | |
| 273 | 273 | return webcrypto.crypto; | |
| 274 | - } | ||
| 274 | + }, | ||
| 275 | 275 | }, 'crypto') }); | |
| 276 | 276 | if (internalBinding('config').hasOpenSSL) { | |
| 277 | 277 | webcrypto ??= require('internal/crypto/webcrypto'); | |
@@ -323,7 +323,7 @@ function initializeReport() { | |||
| 323 | 323 | configurable: true, | |
| 324 | 324 | get() { | |
| 325 | 325 | return report; | |
| 326 | - } | ||
| 326 | + }, | ||
| 327 | 327 | }); | |
| 328 | 328 | } | |
| 329 | 329 | ||
@@ -384,7 +384,7 @@ function setupInspectorHooks() { | |||
| 384 | 384 | if (internalBinding('config').hasInspector) { | |
| 385 | 385 | const { | |
| 386 | 386 | enable, | |
| 387 | - disable | ||
| 387 | + disable, | ||
| 388 | 388 | } = require('internal/inspector_async_hook'); | |
| 389 | 389 | internalBinding('inspector').registerAsyncHook(enable, disable); | |
| 390 | 390 | } | |
@@ -439,7 +439,7 @@ function initializeDeprecations() { | |||
| 439 | 439 | writable: false, | |
| 440 | 440 | enumerable: true, | |
| 441 | 441 | configurable: true, | |
| 442 | - value: noBrowserGlobals | ||
| 442 | + value: noBrowserGlobals, | ||
| 443 | 443 | }); | |
| 444 | 444 | } | |
| 445 | 445 | ||
@@ -510,7 +510,7 @@ function readPolicyFromDisk() { | |||
| 510 | 510 | for (let i = 0; i < integrityEntries.length; i++) { | |
| 511 | 511 | const { | |
| 512 | 512 | algorithm, | |
| 513 | - value: expected | ||
| 513 | + value: expected, | ||
| 514 | 514 | } = integrityEntries[i]; | |
| 515 | 515 | const hash = createHash(algorithm); | |
| 516 | 516 | hash.update(src); | |
@@ -527,7 +527,7 @@ function readPolicyFromDisk() { | |||
| 527 | 527 | } | |
| 528 | 528 | } | |
| 529 | 529 | return { | |
| 530 | - manifestSrc: src, manifestURL: manifestURL.href | ||
| 530 | + manifestSrc: src, manifestURL: manifestURL.href, | ||
| 531 | 531 | }; | |
| 532 | 532 | } | |
| 533 | 533 | } | |
@@ -557,7 +557,7 @@ function initializeESMLoader() { | |||
| 557 | 557 | ||
| 558 | 558 | const { | |
| 559 | 559 | setImportModuleDynamicallyCallback, | |
| 560 | - setInitializeImportMetaObjectCallback | ||
| 560 | + setInitializeImportMetaObjectCallback, | ||
| 561 | 561 | } = internalBinding('module_wrap'); | |
| 562 | 562 | const esm = require('internal/process/esm_loader'); | |
| 563 | 563 | // Setup per-isolate callbacks that locate data or callbacks that we keep | |
@@ -600,7 +600,7 @@ function loadPreloadModules() { | |||
| 600 | 600 | if (preloadModules && preloadModules.length > 0) { | |
| 601 | 601 | const { | |
| 602 | 602 | Module: { | |
| 603 | - _preloadModules | ||
| 603 | + _preloadModules, | ||
| 604 | 604 | }, | |
| 605 | 605 | } = require('internal/modules/cjs/loader'); | |
| 606 | 606 | _preloadModules(preloadModules); | |
@@ -615,5 +615,5 @@ module.exports = { | |||
| 615 | 615 | setupUserModules, | |
| 616 | 616 | prepareMainThreadExecution, | |
| 617 | 617 | prepareWorkerThreadExecution, | |
| 618 | - markBootstrapComplete | ||
| 618 | + markBootstrapComplete, | ||
| 619 | 619 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,25 +15,25 @@ const { | |||
| 15 | 15 | kPromiseRejectWithNoHandler, | |
| 16 | 16 | kPromiseHandlerAddedAfterReject, | |
| 17 | 17 | kPromiseResolveAfterResolved, | |
| 18 | - kPromiseRejectAfterResolved | ||
| 18 | + kPromiseRejectAfterResolved, | ||
| 19 | 19 | }, | |
| 20 | - setPromiseRejectCallback | ||
| 20 | + setPromiseRejectCallback, | ||
| 21 | 21 | } = internalBinding('task_queue'); | |
| 22 | 22 | ||
| 23 | 23 | const { deprecate } = require('internal/util'); | |
| 24 | 24 | ||
| 25 | 25 | const { | |
| 26 | 26 | noSideEffectsToString, | |
| 27 | - triggerUncaughtException | ||
| 27 | + triggerUncaughtException, | ||
| 28 | 28 | } = internalBinding('errors'); | |
| 29 | 29 | ||
| 30 | 30 | const { | |
| 31 | 31 | pushAsyncContext, | |
| 32 | 32 | popAsyncContext, | |
| 33 | 33 | symbols: { | |
| 34 | 34 | async_id_symbol: kAsyncIdSymbol, | |
| 35 | - trigger_async_id_symbol: kTriggerAsyncIdSymbol | ||
| 36 | - } | ||
| 35 | + trigger_async_id_symbol: kTriggerAsyncIdSymbol, | ||
| 36 | + }, | ||
| 37 | 37 | } = require('internal/async_hooks'); | |
| 38 | 38 | const { isErrorStackTraceLimitWritable } = require('internal/errors'); | |
| 39 | 39 | ||
@@ -154,7 +154,7 @@ function unhandledRejection(promise, reason) { | |||
| 154 | 154 | uid: ++lastPromiseId, | |
| 155 | 155 | warned: false, | |
| 156 | 156 | domain: process.domain, | |
| 157 | - emit | ||
| 157 | + emit, | ||
| 158 | 158 | }); | |
| 159 | 159 | // This causes the promise to be referenced at least for one tick. | |
| 160 | 160 | ArrayPrototypePush(pendingUnhandledRejections, promise); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | const { | |
| 3 | - ERR_SYNTHETIC | ||
| 3 | + ERR_SYNTHETIC, | ||
| 4 | 4 | } = require('internal/errors').codes; | |
| 5 | 5 | const { | |
| 6 | 6 | validateBoolean, | |
@@ -92,7 +92,7 @@ const report = { | |||
| 92 | 92 | validateBoolean(trigger, 'trigger'); | |
| 93 | 93 | ||
| 94 | 94 | nr.setReportOnUncaughtException(trigger); | |
| 95 | - } | ||
| 95 | + }, | ||
| 96 | 96 | }; | |
| 97 | 97 | ||
| 98 | 98 | function addSignalHandler(sig) { | |
@@ -117,5 +117,5 @@ function signalHandler(sig) { | |||
| 117 | 117 | ||
| 118 | 118 | module.exports = { | |
| 119 | 119 | addSignalHandler, | |
| 120 | - report | ||
| 120 | + report, | ||
| 121 | 121 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,5 +50,5 @@ function stopListeningIfSignal(type) { | |||
| 50 | 50 | ||
| 51 | 51 | module.exports = { | |
| 52 | 52 | startListeningIfSignal, | |
| 53 | - stopListeningIfSignal | ||
| 53 | + stopListeningIfSignal, | ||
| 54 | 54 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,14 +12,14 @@ const { | |||
| 12 | 12 | // Used to run V8's micro task queue. | |
| 13 | 13 | runMicrotasks, | |
| 14 | 14 | setTickCallback, | |
| 15 | - enqueueMicrotask | ||
| 15 | + enqueueMicrotask, | ||
| 16 | 16 | } = internalBinding('task_queue'); | |
| 17 | 17 | ||
| 18 | 18 | const { | |
| 19 | 19 | setHasRejectionToWarn, | |
| 20 | 20 | hasRejectionToWarn, | |
| 21 | 21 | listenForRejections, | |
| 22 | - processPromiseRejections | ||
| 22 | + processPromiseRejections, | ||
| 23 | 23 | } = require('internal/process/promises'); | |
| 24 | 24 | ||
| 25 | 25 | const { | |
@@ -31,7 +31,7 @@ const { | |||
| 31 | 31 | emitBefore, | |
| 32 | 32 | emitAfter, | |
| 33 | 33 | emitDestroy, | |
| 34 | - symbols: { async_id_symbol, trigger_async_id_symbol } | ||
| 34 | + symbols: { async_id_symbol, trigger_async_id_symbol }, | ||
| 35 | 35 | } = require('internal/async_hooks'); | |
| 36 | 36 | const FixedQueue = require('internal/fixed_queue'); | |
| 37 | 37 | ||
@@ -126,7 +126,7 @@ function nextTick(callback) { | |||
| 126 | 126 | [async_id_symbol]: asyncId, | |
| 127 | 127 | [trigger_async_id_symbol]: triggerAsyncId, | |
| 128 | 128 | callback, | |
| 129 | - args | ||
| 129 | + args, | ||
| 130 | 130 | }; | |
| 131 | 131 | if (initHooksExist()) | |
| 132 | 132 | emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject); | |
@@ -166,8 +166,8 @@ module.exports = { | |||
| 166 | 166 | setTickCallback(processTicksAndRejections); | |
| 167 | 167 | return { | |
| 168 | 168 | nextTick, | |
| 169 | - runNextTicks | ||
| 169 | + runNextTicks, | ||
| 170 | 170 | }; | |
| 171 | 171 | }, | |
| 172 | - queueMicrotask | ||
| 172 | + queueMicrotask, | ||
| 173 | 173 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | // run in the worker thread. | |
| 5 | 5 | ||
| 6 | 6 | const { | |
| 7 | - codes: { ERR_WORKER_UNSUPPORTED_OPERATION } | ||
| 7 | + codes: { ERR_WORKER_UNSUPPORTED_OPERATION }, | ||
| 8 | 8 | } = require('internal/errors'); | |
| 9 | 9 | ||
| 10 | 10 | function unavailable(name) { | |
@@ -17,5 +17,5 @@ function unavailable(name) { | |||
| 17 | 17 | } | |
| 18 | 18 | ||
| 19 | 19 | module.exports = { | |
| 20 | - unavailable | ||
| 20 | + unavailable, | ||
| 21 | 21 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments