Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
4796c7c
stream: make sure 'readable' is emitted before ending the stream
mcollina Feb 11, 2019
0c4e019
src: remove unused variable in node_http2.cc
gengjiawen Mar 2, 2019
93ef1e3
http: check for existance in resetHeadersTimeoutOnReqEnd
mcollina Mar 2, 2019
44ef6b0
src: fix build when NODE_USE_V8_PLATFORM is not defined
nitsakh Mar 1, 2019
f74d5c8
doc: fix the example implementation of MemoryRetainer
joyeecheung Feb 22, 2019
fc6023a
doc: edit deprecation section of Collaborator Guide
Trott Mar 4, 2019
3570c77
test: relax timer check in test-report-uv-handles.js
richardlau Mar 4, 2019
ff1958d
lib: migrate process.binding to internalBinding
BeniCheni Dec 11, 2018
09c83d8
crypto: add KeyObject.asymmetricKeySize
paroga Mar 2, 2019
3e6b95e
src: use the config binding to carry --no-browser-globals
joyeecheung Feb 21, 2019
b435913
src: fix wrong enum reference in node.cc
gengjiawen Mar 4, 2019
21ca939
src: remove unused function in cares_wrap.cc
gengjiawen Mar 4, 2019
4ff5cfa
src: remove redundant cast in string_search.h
gengjiawen Mar 4, 2019
b3ecaaa
tools: replace var to let/const
Mar 2, 2019
a8331fa
tools: add no-var lint rule for tools directory
Mar 6, 2019
3dd7084
build,win: simplify new `msbuild_arg` option
refack Mar 4, 2019
1351f6e
build: indicate that configure has done something
richardlau Mar 4, 2019
7d8edec
buffer: do not affect memory after target for utf16 write
addaleax Mar 4, 2019
4b1c1dc
doc: add missing https Agent maxCachedSessions
nicolas-moteau Mar 4, 2019
bd7e243
doc: standardize on End-of-Life capitalization
Trott Mar 4, 2019
aa80137
tools: update remark-preset-lint-node to 1.5.0
Trott Mar 4, 2019
2d7b629
src: remove redundant call in inspector_io.cc
gengjiawen Mar 4, 2019
539a9c0
src: make parameter name const reference in method TriggerNodeReport
gengjiawen Mar 2, 2019
5d2c522
http: remove unused variable in _http_server.js
gengjiawen Mar 3, 2019
24b9ae1
test: fix tests so they work in worker threads
richardlau Mar 5, 2019
8e94cb2
child_process: fire close event from stdio
koh110 Sep 17, 2018
8c087d2
test: remove usage of `process.binding()`
addaleax Feb 25, 2019
ab1327f
crypto: simplify GetPublicOrPrivateKeyFromJs
tniessen Mar 5, 2019
d1c225f
test: refactor test/report/test-report-signal.js
cjihrig Mar 5, 2019
8c90fe1
Revert "build: silence cpp lint by default"
refack Feb 28, 2019
f37e7bf
tools: fix test.py --shell
hashseed Mar 5, 2019
8439e07
src: remove redundant cast in util-inl.h
gengjiawen Mar 3, 2019
20fdf89
repl: add replDefaults to customize the writer
BridgeAR Jan 19, 2019
cafb332
tools: update dmn to 2.2.1 in update scripts
Trott Mar 6, 2019
dc04dc0
tools: use dmn@2.2.1 to remove unneeded files
Trott Mar 6, 2019
3b06d29
src: remove templating from StreamBase
maclover7 Dec 18, 2018
f0a144e
src: cleanup in all return paths in node::Start
gireeshpunathil Mar 6, 2019
bab6c63
doc: add caveat and tradeoff example to readline
vsemozhetbyt Mar 6, 2019
5de8ed8
doc: add guidance on console output in tests
sam-github Mar 5, 2019
4a913a2
test: bump test-bootstrap-modules.js limit
joyeecheung Mar 8, 2019
cae30d9
doc: edit "Involving the TSC"
Trott Mar 6, 2019
f7ecc94
http: improve for-loop readability in _http_outgoing.js
gengjiawen Mar 3, 2019
14e247e
n-api: improve performance creating strings
anthony-tuininga Mar 4, 2019
28b500f
src: merge debug-only `SealHandleScope`s
addaleax Mar 5, 2019
6a4bb9e
src: delete unused variable in env.h
gengjiawen Mar 5, 2019
cdf0e09
src: delete unused method SetTemplateMethodNoSideEffect
gengjiawen Mar 5, 2019
926649e
src: delete unused method SetTemplateMethod
gengjiawen Mar 5, 2019
8f0a924
tools: update `node-lint-md-cli-rollup` version 2
refack Mar 4, 2019
bda41d8
tools: update generated lint-md.js
refack Mar 4, 2019
feb3a84
src: guard against calling `Init()` multiple times
addaleax Mar 5, 2019
a2511f8
doc: fix nits in writing-tests.md
vsemozhetbyt Mar 9, 2019
ce260c2
test: de-flake test-dns-idna2008.js
refack Mar 6, 2019
7c8bb94
doc: update partner communities link in releases.md
BethGriggs Mar 6, 2019
2b57c65
benchmark,doc,lib,test: capitalize comments
BridgeAR Mar 7, 2019
06c5b84
tools: update capitalized-comments rule
BridgeAR Mar 7, 2019
96d3705
test: rewrite ocsp test to run in parallel
sam-github Mar 5, 2019
f33163a
src: apply clang-tidy various improvement
gengjiawen Mar 6, 2019
0c49ffb
doc: remove tsc-review
Trott Mar 8, 2019
cc32461
test: mark `test-worker-prof` as Flaky on ARM
refack Mar 10, 2019
7dd213f
tools: update to mdast-util-to-hast v3.0.2
rubys Aug 5, 2018
0ba661e
doc: add decode() & encode() methods into querystring.md
ZYSzys Feb 14, 2019
f91dab6
doc: document fake ENOTFOUND as a system error
cjihrig Mar 7, 2019
2eb6a40
report: fix stdout/stderr output formatting
cjihrig Mar 8, 2019
b048a38
test: cover stdout/stderr usage in triggerReport()
cjihrig Mar 8, 2019
70343d0
test: cover triggerReport() failure case
cjihrig Mar 8, 2019
9d77d47
report: rename triggerReport() to writeReport()
cjihrig Mar 8, 2019
2c0c42d
tools: update ESLint to 5.15.1
cjihrig Mar 10, 2019
119adf2
doc: edit Landing Pull Requests
Trott Mar 8, 2019
4a72eb3
doc: add inspector API example for heapdump
sam-github Mar 7, 2019
ca9bb1f
lib,src: remove usage of _externalStream
addaleax Mar 8, 2019
8d9c3fa
worker: remove `ERR_CLOSED_MESSAGE_PORT`
addaleax Mar 7, 2019
8f6b4a9
doc: document diverging MessagePort.onmessage handling
addaleax Mar 10, 2019
9af6631
process: add --pending-deprecation to `process.binding()`
addaleax Feb 25, 2019
d599ada
doc: add version for http.createServer() options addition
benswinburne Dec 12, 2018
1a0602a
crypto: check for invalid chacha20-poly1305 IVs
sam-github Mar 7, 2019
98eb711
doc: edit "Using git-node" section of Guide
Trott Mar 11, 2019
6d90c49
src: rename Init and Start overloads to something more distinctive
joyeecheung Mar 7, 2019
300ad04
test: mark test-worker-prof as flake on all platforms
refack Mar 11, 2019
066fe5a
build: enable v8's siphash for hash seed creation
rvagg Mar 1, 2019
1dd956a
deps,tools: include SipHash in LICENSE
rvagg Mar 1, 2019
b592c2f
test: fix compiler warning in test_string.c
danbev Mar 9, 2019
0ed2a01
src: remove unused variables
cjihrig Mar 11, 2019
8cb7d4b
worker: release native Worker object earlier
addaleax Mar 9, 2019
f2ebf36
url: require encodeStr from internal/querystring
ZYSzys Mar 9, 2019
c43e5b3
lib: import TextEncoder and TextDecoder from `internal/encoding`
joyeecheung Mar 9, 2019
71d0a8a
crypto: fix EdDSA support for KeyObject
mscdex Feb 26, 2019
f03498c
test: fix syntax error in test-dns-idna2008.js when failing
refack Mar 10, 2019
c6536b4
process: make Symbol.toStringTag writable
BridgeAR Mar 7, 2019
348d9a6
http2: `Http2ServerResponse.end()` should always return self
ronag Nov 13, 2018
b581bb0
test: fix test by removing node-inspect/lib/_inspect
BridgeAR Mar 12, 2019
cd77811
http: reduce usage of public util
ZYSzys Mar 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tools: replace var to let/const
PR-URL: #26398
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Masashi Hirano authored and BridgeAR committed Mar 12, 2019
commit b3ecaaa6822c3d7a032fdc0203d477f5487a2133
4 changes: 2 additions & 2 deletions tools/eslint-rules/crypto-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const bindingModules = cryptoModules.concat(['tls_wrap']);
module.exports = function(context) {
const missingCheckNodes = [];
const requireNodes = [];
var commonModuleNode = null;
var hasSkipCall = false;
let commonModuleNode = null;
let hasSkipCall = false;

function testCryptoUsage(node) {
if (utils.isRequired(node, requireModules) ||
Expand Down
4 changes: 2 additions & 2 deletions tools/eslint-rules/eslint-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const msg = 'Please add a skipIfEslintMissing() call to allow this test to ' +

module.exports = function(context) {
const missingCheckNodes = [];
var commonModuleNode = null;
var hasEslintCheck = false;
let commonModuleNode = null;
let hasEslintCheck = false;

function testEslintUsage(context, node) {
if (utils.isRequired(node, ['../../tools/node_modules/eslint'])) {
Expand Down
4 changes: 2 additions & 2 deletions tools/eslint-rules/inspector-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const msg = 'Please add a skipIfInspectorDisabled() call to allow this ' +

module.exports = function(context) {
const missingCheckNodes = [];
var commonModuleNode = null;
var hasInspectorCheck = false;
let commonModuleNode = null;
let hasInspectorCheck = false;

function testInspectorUsage(context, node) {
if (utils.isRequired(node, ['inspector'])) {
Expand Down
16 changes: 8 additions & 8 deletions tools/eslint-rules/no-unescaped-regexp-dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
module.exports = function(context) {
const sourceCode = context.getSourceCode();
const regexpStack = [];
var regexpBuffer = [];
var inRegExp = false;
let regexpBuffer = [];
let inRegExp = false;

function report(node, startOffset) {
const indexOfDot = sourceCode.getIndexFromLoc(node.loc.start) + startOffset;
Expand All @@ -25,13 +25,13 @@ module.exports = function(context) {

const allowedModifiers = ['+', '*', '?', '{'];
function checkRegExp(nodes) {
var escaping = false;
var inCharClass = false;
for (var n = 0; n < nodes.length; ++n) {
let escaping = false;
let inCharClass = false;
for (let n = 0; n < nodes.length; ++n) {
const pair = nodes[n];
const node = pair[0];
const str = pair[1];
for (var i = 0; i < str.length; ++i) {
for (let i = 0; i < str.length; ++i) {
switch (str[i]) {
case '[':
if (!escaping)
Expand Down Expand Up @@ -96,7 +96,7 @@ module.exports = function(context) {
node.quasis.length);
if (inRegExp &&
(isTemplate || (typeof node.value === 'string' && node.value.length))) {
var p = node.parent;
let p = node.parent;
while (p && p.type === 'BinaryExpression') {
p = p.parent;
}
Expand All @@ -105,7 +105,7 @@ module.exports = function(context) {
p.callee.name === 'RegExp') {
if (isTemplate) {
const quasis = node.quasis;
for (var i = 0; i < quasis.length; ++i) {
for (let i = 0; i < quasis.length; ++i) {
const el = quasis[i];
if (el.type === 'TemplateElement' && el.value && el.value.cooked)
regexpBuffer.push([el, el.value.cooked]);
Expand Down
2 changes: 1 addition & 1 deletion tools/eslint-rules/prefer-assert-iferror.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const utils = require('./rules-utils.js');
module.exports = {
create(context) {
const sourceCode = context.getSourceCode();
var assertImported = false;
let assertImported = false;

function hasSameTokens(nodeA, nodeB) {
const aTokens = sourceCode.getTokens(nodeA);
Expand Down
10 changes: 5 additions & 5 deletions tools/eslint-rules/required-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const path = require('path');

module.exports = function(context) {
// trim required module names
var requiredModules = context.options;
const requiredModules = context.options;
const isESM = context.parserOptions.sourceType === 'module';

const foundModules = [];
Expand Down Expand Up @@ -46,7 +46,7 @@ module.exports = function(context) {
* @returns {undefined|String} required module name or undefined
*/
function getRequiredModuleName(str) {
var value = path.basename(str);
const value = path.basename(str);

// Check if value is in required modules array
return requiredModules.indexOf(value) !== -1 ? value : undefined;
Expand All @@ -70,7 +70,7 @@ module.exports = function(context) {
const rules = {
'Program:exit'(node) {
if (foundModules.length < requiredModules.length) {
var missingModules = requiredModules.filter(
const missingModules = requiredModules.filter(
(module) => foundModules.indexOf(module) === -1
);
missingModules.forEach((moduleName) => {
Expand All @@ -86,15 +86,15 @@ module.exports = function(context) {

if (isESM) {
rules.ImportDeclaration = (node) => {
var requiredModuleName = getRequiredModuleName(node.source.value);
const requiredModuleName = getRequiredModuleName(node.source.value);
if (requiredModuleName) {
foundModules.push(requiredModuleName);
}
};
} else {
rules.CallExpression = (node) => {
if (isRequireCall(node)) {
var requiredModuleName = getRequiredModuleNameFromCall(node);
const requiredModuleName = getRequiredModuleNameFromCall(node);

if (requiredModuleName) {
foundModules.push(requiredModuleName);
Expand Down
4 changes: 2 additions & 2 deletions tools/eslint-rules/rules-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports.isRequired = function(node, modules) {
* Return true if common module is required
* in AST Node under inspection
*/
var commonModuleRegExp = new RegExp(/^(\.\.\/)*common(\.js)?$/);
const commonModuleRegExp = new RegExp(/^(\.\.\/)*common(\.js)?$/);
module.exports.isCommonModule = function(node) {
return node.callee.name === 'require' &&
node.arguments.length !== 0 &&
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports.usesCommonProperty = function(node, properties) {
* and the block also has a call to skip.
*/
module.exports.inSkipBlock = function(node) {
var hasSkipBlock = false;
let hasSkipBlock = false;
if (node.test &&
node.test.type === 'UnaryExpression' &&
node.test.operator === '!') {
Expand Down
40 changes: 20 additions & 20 deletions tools/lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ if (process.argv.indexOf('-F') !== -1)
const cli = new CLIEngine(cliOptions);

if (cluster.isMaster) {
var numCPUs = 1;
let numCPUs = 1;
const paths = [];
var files = null;
var totalPaths = 0;
var failures = 0;
var successes = 0;
var lastLineLen = 0;
var curPath = 'Starting ...';
var showProgress = true;
let files = null;
let totalPaths = 0;
let failures = 0;
let successes = 0;
let lastLineLen = 0;
let curPath = 'Starting ...';
let showProgress = true;
const globOptions = {
nodir: true
};
const workerConfig = {};
var startTime;
var formatter;
var outFn;
var fd;
var i;
let startTime;
let formatter;
let outFn;
let fd;
let i;

// Check if spreading work among all cores/cpus
if (process.argv.indexOf('-J') !== -1)
Expand Down Expand Up @@ -169,7 +169,7 @@ if (cluster.isMaster) {
// We either just started or we have no more files to lint for the current
// path. Find the next path that has some files to be linted.
while (paths.length) {
var dir = paths.shift();
let dir = paths.shift();
curPath = dir;
const patterns = cli.resolveFileGlobPatterns([dir]);
dir = path.resolve(patterns[0]);
Expand All @@ -188,7 +188,7 @@ if (cluster.isMaster) {
// workers busy most of the time instead of only a minority doing most of
// the work.
const sliceLen = Math.min(maxWorkload, Math.ceil(files.length / numCPUs));
var slice;
let slice;
if (sliceLen === files.length) {
// Micro-optimization to avoid splicing to an empty array
slice = files;
Expand All @@ -212,10 +212,10 @@ if (cluster.isMaster) {
const secs = `${elapsed % 60}`.padStart(2, '0');
const passed = `${successes}`.padStart(6);
const failed = `${failures}`.padStart(6);
var pct = Math.ceil(((totalPaths - paths.length) / totalPaths) * 100);
pct = `${pct}`.padStart(3);
let pct = `${Math.ceil(((totalPaths - paths.length) / totalPaths) * 100)}`;
pct = pct.padStart(3);

var line = `[${mins}:${secs}|%${pct}|+${passed}|-${failed}]: ${curPath}`;
let line = `[${mins}:${secs}|%${pct}|+${passed}|-${failed}]: ${curPath}`;

// Truncate line like cpplint does in case it gets too long
if (line.length > 75)
Expand All @@ -229,7 +229,7 @@ if (cluster.isMaster) {
} else {
// Worker

var config = {};
let config = {};
process.on('message', (files) => {
if (files instanceof Array) {
// Lint some files
Expand All @@ -246,7 +246,7 @@ if (cluster.isMaster) {
// Silence warnings for files with no errors while keeping the "ok"
// status
if (report.warningCount > 0) {
for (var i = 0; i < results.length; ++i) {
for (let i = 0; i < results.length; ++i) {
const result = results[i];
if (result.errorCount === 0 && result.warningCount > 0) {
result.warningCount = 0;
Expand Down