| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b8b6f25 commit aaedc06
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,10 +29,10 @@ const proc = cp.spawnSync( | |||
| 29 | 29 | ['-e', enable + code ], | |
| 30 | 30 | { | |
| 31 | 31 | cwd: tmpdir.path, | |
| 32 | - env: Object.assign({}, process.env, { | ||
| 33 | - 'NODE_DEBUG_NATIVE': 'tracing', | ||
| 34 | - 'NODE_DEBUG': 'tracing' | ||
| 35 | - }) | ||
| 32 | + env: { ...process.env, | ||
| 33 | + 'NODE_DEBUG_NATIVE': 'tracing', | ||
| 34 | + 'NODE_DEBUG': 'tracing' | ||
| 35 | + } | ||
| 36 | 36 | }); | |
| 37 | 37 | ||
| 38 | 38 | console.log('process exit with signal:', proc.signal); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,10 +36,10 @@ const proc = cp.spawnSync( | |||
| 36 | 36 | [ '--trace-event-categories', 'node.async_hooks', '-e', worker ], | |
| 37 | 37 | { | |
| 38 | 38 | cwd: tmpdir.path, | |
| 39 | - env: Object.assign({}, process.env, { | ||
| 40 | - 'NODE_DEBUG_NATIVE': 'tracing', | ||
| 41 | - 'NODE_DEBUG': 'tracing' | ||
| 42 | - }) | ||
| 39 | + env: { ...process.env, | ||
| 40 | + 'NODE_DEBUG_NATIVE': 'tracing', | ||
| 41 | + 'NODE_DEBUG': 'tracing' | ||
| 42 | + } | ||
| 43 | 43 | }); | |
| 44 | 44 | ||
| 45 | 45 | console.log('process exit with signal:', proc.signal); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1363,7 +1363,7 @@ if (typeof Symbol !== 'undefined') { | |||
| 1363 | 1363 | const arr = new Array(101).fill(); | |
| 1364 | 1364 | const obj = { a: { a: { a: { a: 1 } } } }; | |
| 1365 | 1365 | ||
| 1366 | - const oldOptions = Object.assign({}, util.inspect.defaultOptions); | ||
| 1366 | + const oldOptions = { ...util.inspect.defaultOptions }; | ||
| 1367 | 1367 | ||
| 1368 | 1368 | // Set single option through property assignment. | |
| 1369 | 1369 | util.inspect.defaultOptions.maxArrayLength = null; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -152,7 +152,7 @@ assert.strictEqual(url.searchParams, oldParams); | |||
| 152 | 152 | // contains the Symbols that Node uses for brand checking, but not the data | |
| 153 | 153 | // properties, which are getters. Verify that urlToOptions() can handle such | |
| 154 | 154 | // a case. | |
| 155 | - const copiedUrlObj = Object.assign({}, urlObj); | ||
| 155 | + const copiedUrlObj = { ...urlObj }; | ||
| 156 | 156 | const copiedOpts = urlToOptions(copiedUrlObj); | |
| 157 | 157 | assert.strictEqual(copiedOpts instanceof URL, false); | |
| 158 | 158 | assert.strictEqual(copiedOpts.protocol, undefined); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ const fs = require('fs'); | |||
| 8 | 8 | const v8 = require('v8'); | |
| 9 | 9 | const fsPromises = fs.promises; | |
| 10 | 10 | const net = require('net'); | |
| 11 | - const providers = Object.assign({}, internalBinding('async_wrap').Providers); | ||
| 11 | + const providers = { ...internalBinding('async_wrap').Providers }; | ||
| 12 | 12 | const fixtures = require('../common/fixtures'); | |
| 13 | 13 | const tmpdir = require('../common/tmpdir'); | |
| 14 | 14 | const { getSystemErrorName } = require('util'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ if (process.env.BE_CHILD) | |||
| 14 | 14 | return beChild(); | |
| 15 | 15 | ||
| 16 | 16 | const child = fork(__filename, | |
| 17 | - { env: Object.assign({}, process.env, { BE_CHILD: 1 }) }); | ||
| 17 | + { env: { ...process.env, BE_CHILD: 1 } }); | ||
| 18 | 18 | ||
| 19 | 19 | child.once('message', common.mustCall((msg) => { | |
| 20 | 20 | assert.strictEqual(msg.cmd, 'started'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -328,11 +328,11 @@ function workerProcessMain() { | |||
| 328 | 328 | function spawnMaster({ execArgv, workers, clusterSettings = {} }) { | |
| 329 | 329 | return new Promise((resolve) => { | |
| 330 | 330 | childProcess.fork(__filename, { | |
| 331 | - env: Object.assign({}, process.env, { | ||
| 332 | - workers: JSON.stringify(workers), | ||
| 333 | - clusterSettings: JSON.stringify(clusterSettings), | ||
| 334 | - testProcess: true | ||
| 335 | - }), | ||
| 331 | + env: { ...process.env, | ||
| 332 | + workers: JSON.stringify(workers), | ||
| 333 | + clusterSettings: JSON.stringify(clusterSettings), | ||
| 334 | + testProcess: true | ||
| 335 | + }, | ||
| 336 | 336 | execArgv: execArgv.concat(['--expose-internals']) | |
| 337 | 337 | }).on('exit', common.mustCall((code, signal) => { | |
| 338 | 338 | checkExitCode(code, signal); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments