Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 5b3d44e

Browse files
committed
Merge nodejs/master
Merge 686e092 as of 2017-10-20. This is an automatically created merge. For any problems please contact @kunalspathak.
2 parents 40aeb28 + 686e092 commit 5b3d44e

File tree

8 files changed

+42
-18
lines changed

8 files changed

+42
-18
lines changed

doc/api/assert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ assert.notDeepEqual(obj1, obj3);
441441
// AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
442442

443443
assert.notDeepEqual(obj1, obj4);
444-
// OK, obj1 and obj2 are not deeply equal
444+
// OK, obj1 and obj4 are not deeply equal
445445
```
446446

447447
If the values are deeply equal, an `AssertionError` is thrown with a `message`

doc/api/child_process.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ changes:
135135

136136
* `command` {string} The command to run, with space-separated arguments.
137137
* `options` {Object}
138-
* `timeout` {number} (Default: `0`)
139138
* `cwd` {string} Current working directory of the child process.
140139
* `env` {Object} Environment key-value pairs.
141140
* `encoding` {string} **Default:** `'utf8'`
@@ -646,8 +645,8 @@ spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
646645
parent and child processes, and the child is a Node.js process, the child
647646
is launched with the IPC channel unreferenced (using `unref()`) until the
648647
child registers an event handler for the [`process.on('disconnect')`][] event
649-
or the [`process.on('message')`][] event.This allows the child to exit normally
650-
without the process being held open by the open IPC channel.*
648+
or the [`process.on('message')`][] event. This allows the child to exit
649+
normally without the process being held open by the open IPC channel.*
651650

652651
See also: [`child_process.exec()`][] and [`child_process.fork()`][]
653652

doc/api/deprecations.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,15 @@ Type: Runtime
728728
deprecated. Please use `fs.ftruncate()` or `fs.ftruncateSync()` to work with
729729
file descriptors.
730730
731+
<a id="DEP0082"></a>
732+
### DEP0082: REPLServer.prototype.memory()
733+
734+
Type: Runtime
735+
736+
`REPLServer.prototype.memory()` is a function only necessary for the
737+
internal mechanics of the `REPLServer` itself, and is therefore not
738+
necessary in user space.
739+
731740
732741
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
733742
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array

lib/repl.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ function REPLServer(prompt,
460460
self.line = prefix;
461461
self.cursor = prefix.length;
462462
}
463-
self.memory(cmd);
463+
_memory.call(self, cmd);
464464
return;
465465
}
466466

@@ -493,7 +493,7 @@ function REPLServer(prompt,
493493

494494
function finish(e, ret) {
495495
debug('finish', e, ret);
496-
self.memory(cmd);
496+
_memory.call(self, cmd);
497497

498498
if (e && !self[kBufferedCommandSymbol] && cmd.trim().startsWith('npm ')) {
499499
self.outputStream.write('npm should be run outside of the ' +
@@ -1113,9 +1113,13 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) {
11131113
this.commands[keyword] = cmd;
11141114
};
11151115

1116-
REPLServer.prototype.memory = function memory(cmd) {
1117-
var self = this;
1116+
REPLServer.prototype.memory = util.deprecate(
1117+
_memory,
1118+
'REPLServer.memory() is deprecated',
1119+
'DEP0082');
11181120

1121+
function _memory(cmd) {
1122+
const self = this;
11191123
self.lines = self.lines || [];
11201124
self.lines.level = self.lines.level || [];
11211125

@@ -1185,7 +1189,7 @@ REPLServer.prototype.memory = function memory(cmd) {
11851189
} else {
11861190
self.lines.level = [];
11871191
}
1188-
};
1192+
}
11891193

11901194
function addStandardGlobals(completionGroups, filter) {
11911195
// Global object properties

test/parallel/test-https-client-resume.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ if (!common.hasCrypto)
3030
const assert = require('assert');
3131
const https = require('https');
3232
const tls = require('tls');
33-
const fs = require('fs');
33+
const fixtures = require('../common/fixtures');
3434

3535
const options = {
36-
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
37-
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`)
36+
key: fixtures.readKey('agent2-key.pem'),
37+
cert: fixtures.readKey('agent2-cert.pem')
3838
};
3939

4040
// create server

test/parallel/test-internal-util-decorate-error-stack.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Flags: --expose_internals
22
'use strict';
3-
const common = require('../common');
3+
require('../common');
4+
const fixtures = require('../common/fixtures');
45
const assert = require('assert');
56
const internalUtil = require('internal/util');
67
const binding = process.binding('util');
78
const spawnSync = require('child_process').spawnSync;
8-
const path = require('path');
99

1010
const kArrowMessagePrivateSymbolIndex = binding['arrow_message_private_symbol'];
1111
const kDecoratedPrivateSymbolIndex = binding['decorated_private_symbol'];
@@ -35,8 +35,7 @@ function checkStack(stack) {
3535
}
3636
let err;
3737
const badSyntaxPath =
38-
path.join(common.fixturesDir, 'syntax', 'bad_syntax')
39-
.replace(/\\/g, '\\\\');
38+
fixtures.path('syntax', 'bad_syntax').replace(/\\/g, '\\\\');
4039

4140
try {
4241
require(badSyntaxPath);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
const common = require('../common');
3+
const assert = require('assert');
4+
const repl = require('repl');
5+
6+
testMemory();
7+
8+
function testMemory() {
9+
const server = repl.start({ prompt: '> ' });
10+
const warn = 'REPLServer.memory() is deprecated';
11+
12+
common.expectWarning('DeprecationWarning', warn);
13+
assert.strictEqual(server.memory(), undefined);
14+
server.close();
15+
}

vcbuild.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@echo off
22

3-
setlocal EnableExtensions
4-
53
cd %~dp0
64

75
if /i "%1"=="help" goto help

0 commit comments

Comments
 (0)