| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 413493c commit c463f13
68 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,13 +2,6 @@ env: | |||
| 2 | 2 | es6: true | |
| 3 | 3 | ||
| 4 | 4 | rules: | |
| 5 | - comma-dangle: [error, { | ||
| 6 | - arrays: always-multiline, | ||
| 7 | - exports: always-multiline, | ||
| 8 | - functions: always-multiline, | ||
| 9 | - imports: always-multiline, | ||
| 10 | - objects: only-multiline, | ||
| 11 | - }] | ||
| 12 | 5 | prefer-object-spread: error | |
| 13 | 6 | no-buffer-constructor: error | |
| 14 | 7 | no-mixed-operators: | |
@@ -249,30 +242,3 @@ globals: | |||
| 249 | 242 | module: false | |
| 250 | 243 | internalBinding: false | |
| 251 | 244 | primordials: false | |
| 252 | - overrides: | ||
| 253 | - - files: | ||
| 254 | - - ./*/*.js | ||
| 255 | - - ./*.js | ||
| 256 | - - ./internal/child_process/*.js | ||
| 257 | - - ./internal/cluster/*.js | ||
| 258 | - - ./internal/debugger/*.js | ||
| 259 | - - ./internal/events/*.js | ||
| 260 | - - ./internal/fs/*.js | ||
| 261 | - - ./internal/modules/*.js | ||
| 262 | - - ./internal/per_context/*.js | ||
| 263 | - - ./internal/perf/*.js | ||
| 264 | - - ./internal/policy/*.js | ||
| 265 | - - ./internal/process/*.js | ||
| 266 | - - ./internal/readline/*.js | ||
| 267 | - - ./internal/readme.md | ||
| 268 | - - ./internal/repl/*.js | ||
| 269 | - - ./internal/source_map/*.js | ||
| 270 | - - ./internal/streams/*.js | ||
| 271 | - - ./internal/test/*.js | ||
| 272 | - - ./internal/test_runner/**/*.js | ||
| 273 | - - ./internal/tls/*.js | ||
| 274 | - - ./internal/util/parse_args/*.js | ||
| 275 | - - ./internal/watch_mode/*.js | ||
| 276 | - - ./internal/webstreams/*.js | ||
| 277 | - rules: | ||
| 278 | - comma-dangle: [error, always-multiline] | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,7 @@ const kReadableOperator = { | |||
| 39 | 39 | 'Expected "actual" not to be reference-equal to "expected":', | |
| 40 | 40 | notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', | |
| 41 | 41 | notIdentical: 'Values have same structure but are not reference-equal:', | |
| 42 | - notDeepEqualUnequal: 'Expected values not to be loosely deep-equal:' | ||
| 42 | + notDeepEqualUnequal: 'Expected values not to be loosely deep-equal:', | ||
| 43 | 43 | }; | |
| 44 | 44 | ||
| 45 | 45 | // Comparing short primitives should just show === / !== instead of using the | |
@@ -331,11 +331,11 @@ class AssertionError extends Error { | |||
| 331 | 331 | stackStartFn, | |
| 332 | 332 | details, | |
| 333 | 333 | // Compatibility with older versions. | |
| 334 | - stackStartFunction | ||
| 334 | + stackStartFunction, | ||
| 335 | 335 | } = options; | |
| 336 | 336 | let { | |
| 337 | 337 | actual, | |
| 338 | - expected | ||
| 338 | + expected, | ||
| 339 | 339 | } = options; | |
| 340 | 340 | ||
| 341 | 341 | const limit = Error.stackTraceLimit; | |
@@ -430,7 +430,7 @@ class AssertionError extends Error { | |||
| 430 | 430 | value: 'AssertionError [ERR_ASSERTION]', | |
| 431 | 431 | enumerable: false, | |
| 432 | 432 | writable: true, | |
| 433 | - configurable: true | ||
| 433 | + configurable: true, | ||
| 434 | 434 | }); | |
| 435 | 435 | this.code = 'ERR_ASSERTION'; | |
| 436 | 436 | if (details) { | |
@@ -479,7 +479,7 @@ class AssertionError extends Error { | |||
| 479 | 479 | const result = inspect(this, { | |
| 480 | 480 | ...ctx, | |
| 481 | 481 | customInspect: false, | |
| 482 | - depth: 0 | ||
| 482 | + depth: 0, | ||
| 483 | 483 | }); | |
| 484 | 484 | ||
| 485 | 485 | // Reset the properties after inspection. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,7 +63,7 @@ class CallTrackerContext { | |||
| 63 | 63 | actual: this.#calls.length, | |
| 64 | 64 | expected: this.#expected, | |
| 65 | 65 | operator: this.#name, | |
| 66 | - stack: this.#stackTrace | ||
| 66 | + stack: this.#stackTrace, | ||
| 67 | 67 | }; | |
| 68 | 68 | } | |
| 69 | 69 | } | |
@@ -110,7 +110,7 @@ class CallTracker { | |||
| 110 | 110 | expected, | |
| 111 | 111 | // eslint-disable-next-line no-restricted-syntax | |
| 112 | 112 | stackTrace: new Error(), | |
| 113 | - name: fn.name || 'calls' | ||
| 113 | + name: fn.name || 'calls', | ||
| 114 | 114 | }); | |
| 115 | 115 | const tracked = new Proxy(fn, { | |
| 116 | 116 | __proto__: null, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,8 @@ exposeGetterAndSetter(globalThis, | |||
| 29 | 29 | }); | |
| 30 | 30 | ||
| 31 | 31 | const { | |
| 32 | - TextEncoder, TextDecoder | ||
| 32 | + TextEncoder, | ||
| 33 | + TextDecoder, | ||
| 33 | 34 | } = require('internal/encoding'); | |
| 34 | 35 | // https://encoding.spec.whatwg.org/#textencoder | |
| 35 | 36 | exposeInterface(globalThis, 'TextEncoder', TextEncoder); | |
@@ -100,7 +101,7 @@ function exposeNamespace(target, name, namespaceObject) { | |||
| 100 | 101 | writable: true, | |
| 101 | 102 | enumerable: false, | |
| 102 | 103 | configurable: true, | |
| 103 | - value: namespaceObject | ||
| 104 | + value: namespaceObject, | ||
| 104 | 105 | }); | |
| 105 | 106 | } | |
| 106 | 107 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,7 +69,7 @@ ObjectDefineProperty(process, 'moduleLoadList', { | |||
| 69 | 69 | value: moduleLoadList, | |
| 70 | 70 | configurable: true, | |
| 71 | 71 | enumerable: true, | |
| 72 | - writable: false | ||
| 72 | + writable: false, | ||
| 73 | 73 | }); | |
| 74 | 74 | ||
| 75 | 75 | ||
@@ -182,7 +182,7 @@ let internalBinding; | |||
| 182 | 182 | const loaderId = 'internal/bootstrap/loaders'; | |
| 183 | 183 | const { | |
| 184 | 184 | builtinIds, | |
| 185 | - compileFunction | ||
| 185 | + compileFunction, | ||
| 186 | 186 | } = internalBinding('builtins'); | |
| 187 | 187 | ||
| 188 | 188 | const getOwn = (target, property, receiver) => { | |
@@ -350,7 +350,7 @@ class BuiltinModule { | |||
| 350 | 350 | const loaderExports = { | |
| 351 | 351 | internalBinding, | |
| 352 | 352 | BuiltinModule, | |
| 353 | - require: requireBuiltin | ||
| 353 | + require: requireBuiltin, | ||
| 354 | 354 | }; | |
| 355 | 355 | ||
| 356 | 356 | function requireBuiltin(id) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -153,7 +153,7 @@ const deprecationHandler = { | |||
| 153 | 153 | setPrototypeOf(target, proto) { | |
| 154 | 154 | this.maybeWarn(); | |
| 155 | 155 | return ObjectSetPrototypeOf(target, proto); | |
| 156 | - } | ||
| 156 | + }, | ||
| 157 | 157 | }; | |
| 158 | 158 | ||
| 159 | 159 | // process.config is serialized config.gypi | |
@@ -172,7 +172,7 @@ ObjectDefineProperty(process, 'config', { | |||
| 172 | 172 | set(value) { | |
| 173 | 173 | deprecationHandler.maybeWarn(); | |
| 174 | 174 | processConfig = value; | |
| 175 | - } | ||
| 175 | + }, | ||
| 176 | 176 | }); | |
| 177 | 177 | ||
| 178 | 178 | require('internal/worker/js_transferable').setup(); | |
@@ -231,7 +231,7 @@ internalBinding('async_wrap').setupHooks(nativeHooks); | |||
| 231 | 231 | ||
| 232 | 232 | const { | |
| 233 | 233 | setupTaskQueue, | |
| 234 | - queueMicrotask | ||
| 234 | + queueMicrotask, | ||
| 235 | 235 | } = require('internal/process/task_queues'); | |
| 236 | 236 | ||
| 237 | 237 | // Non-standard extensions: | |
@@ -272,11 +272,11 @@ ObjectDefineProperty(process, 'allowedNodeEnvironmentFlags', { | |||
| 272 | 272 | value, | |
| 273 | 273 | configurable: true, | |
| 274 | 274 | enumerable: true, | |
| 275 | - writable: true | ||
| 275 | + writable: true, | ||
| 276 | 276 | }); | |
| 277 | 277 | }, | |
| 278 | 278 | enumerable: true, | |
| 279 | - configurable: true | ||
| 279 | + configurable: true, | ||
| 280 | 280 | }); | |
| 281 | 281 | ||
| 282 | 282 | // process.assert | |
@@ -301,22 +301,22 @@ const features = { | |||
| 301 | 301 | // code cache even if the binary is built with embedded code cache. | |
| 302 | 302 | get cached_builtins() { | |
| 303 | 303 | return binding.hasCachedBuiltins(); | |
| 304 | - } | ||
| 304 | + }, | ||
| 305 | 305 | }; | |
| 306 | 306 | ||
| 307 | 307 | ObjectDefineProperty(process, 'features', { | |
| 308 | 308 | __proto__: null, | |
| 309 | 309 | enumerable: true, | |
| 310 | 310 | writable: false, | |
| 311 | 311 | configurable: false, | |
| 312 | - value: features | ||
| 312 | + value: features, | ||
| 313 | 313 | }); | |
| 314 | 314 | ||
| 315 | 315 | { | |
| 316 | 316 | const { | |
| 317 | 317 | onGlobalUncaughtException, | |
| 318 | 318 | setUncaughtExceptionCaptureCallback, | |
| 319 | - hasUncaughtExceptionCaptureCallback | ||
| 319 | + hasUncaughtExceptionCaptureCallback, | ||
| 320 | 320 | } = require('internal/process/execution'); | |
| 321 | 321 | ||
| 322 | 322 | // For legacy reasons this is still called `_fatalException`, even | |
@@ -373,14 +373,14 @@ if (config.hasOpenSSL) { | |||
| 373 | 373 | function setupPrepareStackTrace() { | |
| 374 | 374 | const { | |
| 375 | 375 | setEnhanceStackForFatalException, | |
| 376 | - setPrepareStackTraceCallback | ||
| 376 | + setPrepareStackTraceCallback, | ||
| 377 | 377 | } = internalBinding('errors'); | |
| 378 | 378 | const { | |
| 379 | 379 | prepareStackTrace, | |
| 380 | 380 | fatalExceptionStackEnhancers: { | |
| 381 | 381 | beforeInspector, | |
| 382 | - afterInspector | ||
| 383 | - } | ||
| 382 | + afterInspector, | ||
| 383 | + }, | ||
| 384 | 384 | } = require('internal/errors'); | |
| 385 | 385 | // Tell our PrepareStackTraceCallback passed to the V8 API | |
| 386 | 386 | // to call prepareStackTrace(). | |
@@ -399,7 +399,7 @@ function setupProcessObject() { | |||
| 399 | 399 | enumerable: false, | |
| 400 | 400 | writable: true, | |
| 401 | 401 | configurable: false, | |
| 402 | - value: 'process' | ||
| 402 | + value: 'process', | ||
| 403 | 403 | }); | |
| 404 | 404 | ||
| 405 | 405 | // Create global.process as getters so that we have a | |
@@ -425,7 +425,7 @@ function setupGlobalProxy() { | |||
| 425 | 425 | value: 'global', | |
| 426 | 426 | writable: false, | |
| 427 | 427 | enumerable: false, | |
| 428 | - configurable: true | ||
| 428 | + configurable: true, | ||
| 429 | 429 | }); | |
| 430 | 430 | globalThis.global = globalThis; | |
| 431 | 431 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ if (credentials.implementsPosixCredentials) { | |||
| 23 | 23 | // ---- compare the setups side-by-side ----- | |
| 24 | 24 | ||
| 25 | 25 | const { | |
| 26 | - codes: { ERR_WORKER_UNSUPPORTED_OPERATION } | ||
| 26 | + codes: { ERR_WORKER_UNSUPPORTED_OPERATION }, | ||
| 27 | 27 | } = require('internal/errors'); | |
| 28 | 28 | ||
| 29 | 29 | function wrappedUmask(mask) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,18 +25,18 @@ if (credentials.implementsPosixCredentials) { | |||
| 25 | 25 | const { | |
| 26 | 26 | parseFileMode, | |
| 27 | 27 | validateArray, | |
| 28 | - validateString | ||
| 28 | + validateString, | ||
| 29 | 29 | } = require('internal/validators'); | |
| 30 | 30 | ||
| 31 | 31 | function wrapPosixCredentialSetters(credentials) { | |
| 32 | 32 | const { | |
| 33 | 33 | codes: { | |
| 34 | 34 | ERR_INVALID_ARG_TYPE, | |
| 35 | - ERR_UNKNOWN_CREDENTIAL | ||
| 36 | - } | ||
| 35 | + ERR_UNKNOWN_CREDENTIAL, | ||
| 36 | + }, | ||
| 37 | 37 | } = require('internal/errors'); | |
| 38 | 38 | const { | |
| 39 | - validateUint32 | ||
| 39 | + validateUint32, | ||
| 40 | 40 | } = require('internal/validators'); | |
| 41 | 41 | ||
| 42 | 42 | const { | |
@@ -45,7 +45,7 @@ function wrapPosixCredentialSetters(credentials) { | |||
| 45 | 45 | setegid: _setegid, | |
| 46 | 46 | seteuid: _seteuid, | |
| 47 | 47 | setgid: _setgid, | |
| 48 | - setuid: _setuid | ||
| 48 | + setuid: _setuid, | ||
| 49 | 49 | } = credentials; | |
| 50 | 50 | ||
| 51 | 51 | function initgroups(user, extraGroup) { | |
@@ -99,7 +99,7 @@ function wrapPosixCredentialSetters(credentials) { | |||
| 99 | 99 | setegid: wrapIdSetter('Group', _setegid), | |
| 100 | 100 | seteuid: wrapIdSetter('User', _seteuid), | |
| 101 | 101 | setgid: wrapIdSetter('Group', _setgid), | |
| 102 | - setuid: wrapIdSetter('User', _setuid) | ||
| 102 | + setuid: wrapIdSetter('User', _setuid), | ||
| 103 | 103 | }; | |
| 104 | 104 | } | |
| 105 | 105 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ const { ObjectDefineProperty } = primordials; | |||
| 4 | 4 | const rawMethods = internalBinding('process_methods'); | |
| 5 | 5 | const { | |
| 6 | 6 | addSerializeCallback, | |
| 7 | - isBuildingSnapshot | ||
| 7 | + isBuildingSnapshot, | ||
| 8 | 8 | } = require('v8').startupSnapshot; | |
| 9 | 9 | // TODO(joyeecheung): deprecate and remove these underscore methods | |
| 10 | 10 | process._debugProcess = rawMethods._debugProcess; | |
@@ -21,7 +21,7 @@ function defineStream(name, getter) { | |||
| 21 | 21 | __proto__: null, | |
| 22 | 22 | configurable: true, | |
| 23 | 23 | enumerable: true, | |
| 24 | - get: getter | ||
| 24 | + get: getter, | ||
| 25 | 25 | }); | |
| 26 | 26 | } | |
| 27 | 27 | ||
@@ -32,7 +32,7 @@ defineStream('stderr', getStderr); | |||
| 32 | 32 | // Worker threads don't receive signals. | |
| 33 | 33 | const { | |
| 34 | 34 | startListeningIfSignal, | |
| 35 | - stopListeningIfSignal | ||
| 35 | + stopListeningIfSignal, | ||
| 36 | 36 | } = require('internal/process/signal'); | |
| 37 | 37 | process.on('newListener', startListeningIfSignal); | |
| 38 | 38 | process.on('removeListener', stopListeningIfSignal); | |
@@ -72,13 +72,13 @@ function createWritableStdioStream(fd) { | |||
| 72 | 72 | stream = new net.Socket({ | |
| 73 | 73 | handle: process[kChannelHandle], | |
| 74 | 74 | readable: false, | |
| 75 | - writable: true | ||
| 75 | + writable: true, | ||
| 76 | 76 | }); | |
| 77 | 77 | } else { | |
| 78 | 78 | stream = new net.Socket({ | |
| 79 | 79 | fd, | |
| 80 | 80 | readable: false, | |
| 81 | - writable: true | ||
| 81 | + writable: true, | ||
| 82 | 82 | }); | |
| 83 | 83 | } | |
| 84 | 84 | ||
@@ -93,7 +93,7 @@ function createWritableStdioStream(fd) { | |||
| 93 | 93 | stream = new Writable({ | |
| 94 | 94 | write(buf, enc, cb) { | |
| 95 | 95 | cb(); | |
| 96 | - } | ||
| 96 | + }, | ||
| 97 | 97 | }); | |
| 98 | 98 | } | |
| 99 | 99 | } | |
@@ -216,14 +216,14 @@ function getStdin() { | |||
| 216 | 216 | handle: process.channel, | |
| 217 | 217 | readable: true, | |
| 218 | 218 | writable: false, | |
| 219 | - manualStart: true | ||
| 219 | + manualStart: true, | ||
| 220 | 220 | }); | |
| 221 | 221 | } else { | |
| 222 | 222 | stdin = new net.Socket({ | |
| 223 | 223 | fd: fd, | |
| 224 | 224 | readable: true, | |
| 225 | 225 | writable: false, | |
| 226 | - manualStart: true | ||
| 226 | + manualStart: true, | ||
| 227 | 227 | }); | |
| 228 | 228 | } | |
| 229 | 229 | // Make sure the stdin can't be `.end()`-ed | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ function defineStream(name, getter) { | |||
| 10 | 10 | __proto__: null, | |
| 11 | 11 | configurable: true, | |
| 12 | 12 | enumerable: true, | |
| 13 | - get: getter | ||
| 13 | + get: getter, | ||
| 14 | 14 | }); | |
| 15 | 15 | } | |
| 16 | 16 | ||
@@ -21,7 +21,7 @@ defineStream('stderr', getStderr); | |||
| 21 | 21 | // Worker threads don't receive signals. | |
| 22 | 22 | const { | |
| 23 | 23 | startListeningIfSignal, | |
| 24 | - stopListeningIfSignal | ||
| 24 | + stopListeningIfSignal, | ||
| 25 | 25 | } = require('internal/process/signal'); | |
| 26 | 26 | process.removeListener('newListener', startListeningIfSignal); | |
| 27 | 27 | process.removeListener('removeListener', stopListeningIfSignal); | |
@@ -30,7 +30,7 @@ process.removeListener('removeListener', stopListeningIfSignal); | |||
| 30 | 30 | // ---- compare the setups side-by-side ----- | |
| 31 | 31 | ||
| 32 | 32 | const { | |
| 33 | - createWorkerStdio | ||
| 33 | + createWorkerStdio, | ||
| 34 | 34 | } = require('internal/worker/io'); | |
| 35 | 35 | ||
| 36 | 36 | let workerStdio; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments