Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport to v1.x #1736

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
fa105ab
buffer: little improve for Buffer.concat method
JacksonTian Apr 16, 2015
1ab65e4
src: fix NODE_DEPRECATED macro
bnoordhuis Apr 29, 2015
3c9f63f
src: fix deprecation warnings
bnoordhuis Apr 29, 2015
a76b6ba
gitignore: ignore xcode workspaces and projects
r-52 Apr 29, 2015
91da332
build: Use option groups in configure output
jbergstroem Apr 27, 2015
f6d7de1
build: move --with-intl to intl optgroup
jbergstroem May 12, 2015
c5d7c7e
stream_base: dispatch reqs in the stream impl
indutny Apr 29, 2015
592230a
tls: use `SSL_set_cert_cb` for async SNI/OCSP
indutny Apr 18, 2015
908643d
node: improve nextTick performance
mscdex May 1, 2015
26760a9
net: ensure Write/ShutdownWrap references handle
indutny May 2, 2015
dedddb7
tls_wrap: Unlink TLSWrap and SecureContext objects
ChALkeR May 1, 2015
6568dc9
src: fix -Wmissing-field-initializers warning
bnoordhuis May 4, 2015
a2b6650
async-wrap: don't call init callback unnecessarily
trevnorris May 4, 2015
c8b05e4
async-wrap: pass PROVIDER as first arg to init
trevnorris May 4, 2015
a703e07
async-wrap: set flags using functions
trevnorris May 4, 2015
54ae094
async-wrap: remove before/after calls in init
trevnorris May 4, 2015
d90eadc
src: fix NODE_DEPRECATED macro with old compilers
bnoordhuis May 5, 2015
df389c6
src: fix pedantic cpplint whitespace warnings
bnoordhuis May 6, 2015
46561fc
js_stream: fix buffer index in DoWrite
May 6, 2015
8651ecc
deps: update libuv to 1.5.0
saghul May 6, 2015
98b1109
src: export the ParseEncoding function on Windows
ivan May 3, 2015
e628b19
install: fix NameError
thefourtheye May 5, 2015
e42dcc2
src: add type check to v8.setFlagsFromString()
r-52 May 7, 2015
ebc671b
cluster: disconnect event not emitted correctly
Olegas Apr 2, 2015
367e221
tools: replace closure-linter with eslint
yosuke-furukawa Apr 28, 2015
edb4cb6
lib: fix eslint styles
yosuke-furukawa Apr 28, 2015
82a5dab
tools: remove closure_linter to eslint on windows
May 12, 2015
ecb2436
tools: set eslint comma-spacing to 'warn'
silverwind May 11, 2015
91a9c6d
tools: make eslint work on subdirectories
silverwind May 12, 2015
c212f8e
readline: turn emitKeys into a streaming parser
rlidwka May 3, 2015
e05afd7
dgram: call send callback asynchronously
yosuke-furukawa Apr 1, 2015
e7427ae
test: fix infinite loop detection
May 12, 2015
da99a94
tls: update default ciphers to use gcm and aes128
May 8, 2015
05e61c7
build: re-enable V8 snapshots
trevnorris May 8, 2015
8ebdb29
deps: sync with upstream bagder/c-ares@bba4dc5
bnoordhuis May 11, 2015
570f2a3
deps: provide TXT chunk info in c-ares
indutny Mar 27, 2014
887db51
src,deps: replace LoadLibrary by LoadLibraryW
zcbenz Dec 31, 2014
69bc061
events: provide better error message for unhandled error
evanlucas May 7, 2015
3416e93
tools: refactor `make test-npm` into test-npm.sh
Fishrock123 May 7, 2015
c7eab79
build: use backslashes for paths on windows
jbergstroem May 13, 2015
df9aac8
src: fix preload when used with prior flags
yosuke-furukawa May 13, 2015
0e9be82
tls: fix tls handshake check in ssl error
May 8, 2015
4ba3d68
tls_wrap: fix error cb when fatal TLS Alert recvd
May 8, 2015
575738b
core: set PROVIDER type as Persistent class id
trevnorris May 18, 2015
9f8a3a4
test: enable linting for tests
silverwind May 19, 2015
f8e5eaa
tls: make server not use DHE in less than 1024bits
May 20, 2015
0c6a548
util: speed up common case of formatting string
ChALkeR May 20, 2015
cb3326f
build: refactor pkg-config for shared libraries
jbergstroem May 4, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lib/punycode.js
test/fixtures
test/**/node_modules
test/parallel/test-fs-non-number-arguments-throw.js
96 changes: 96 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
env:
node: true

# enable ECMAScript features
ecmaFeatures:
blockBindings: true
templateStrings: true
octalLiterals: true
binaryLiterals: true
generators: true
forOf: true

rules:
# Possible Errors
# list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
## check debugger sentence
no-debugger: 2
## check duplicate arguments
no-dupe-args: 2
## check duplicate object keys
no-dupe-keys: 2
## check duplicate switch-case
no-duplicate-case: 2
## disallow assignment of exceptional params
no-ex-assign: 2
## disallow use of reserved words as keys like enum, class
no-reserved-keys: 2
## disallow unreachable code
no-unreachable: 2
## require valid typeof compared string like typeof foo === 'strnig'
valid-typeof: 2

# Best Practices
# list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
## require falls through comment on switch-case
no-fallthrough: 2

# Stylistic Issues
# list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
## use single quote, we can use double quote when escape chars
quotes:
- 2
- "single"
- "avoid-escape"
## 2 space indentation
indent:
- 2
- 2
## add space after comma
## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
comma-spacing: 1
## put semi-colon
semi: 2
## require spaces operator like var sum = 1 + 1;
space-infix-ops: 2
## require spaces return, throw, case
space-return-throw-case: 2
## no space before function, eg. 'function()'
space-before-function-paren: [2, "never"]
## require space before blocks, eg 'function() {'
space-before-blocks: [2, "always"]
## require parens for Constructor
new-parens: 2
## max 80 length
max-len:
- 2
- 80
- 2

# Strict Mode
# list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
## 'use strict' on top
strict:
- 2
- "global"

# Global scoped method and vars
globals:
DTRACE_HTTP_CLIENT_REQUEST: true
LTTNG_HTTP_CLIENT_REQUEST: true
COUNTER_HTTP_CLIENT_REQUEST: true
DTRACE_HTTP_CLIENT_RESPONSE: true
LTTNG_HTTP_CLIENT_RESPONSE: true
COUNTER_HTTP_CLIENT_RESPONSE: true
DTRACE_HTTP_SERVER_REQUEST: true
LTTNG_HTTP_SERVER_REQUEST: true
COUNTER_HTTP_SERVER_REQUEST: true
DTRACE_HTTP_SERVER_RESPONSE: true
LTTNG_HTTP_SERVER_RESPONSE: true
COUNTER_HTTP_SERVER_RESPONSE: true
DTRACE_NET_STREAM_END: true
LTTNG_NET_STREAM_END: true
COUNTER_NET_SERVER_CONNECTION_CLOSE: true
DTRACE_NET_SERVER_CONNECTION: true
LTTNG_NET_SERVER_CONNECTION: true
COUNTER_NET_SERVER_CONNECTION: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ deps/zlib/zlib.target.mk
tools/faketime
icu_config.gypi
test.tap

# Xcode workspaces and project folders
*.xcodeproj
*.xcworkspace
19 changes: 2 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,7 @@ test-debugger: all
$(PYTHON) tools/test.py debugger

test-npm: $(NODE_EXE)
rm -rf npm-cache npm-tmp npm-prefix
mkdir npm-cache npm-tmp npm-prefix
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
npm_config_prefix="$(shell pwd)/npm-prefix" \
npm_config_tmp="$(shell pwd)/npm-tmp" \
../../$(NODE_EXE) cli.js install --ignore-scripts
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
npm_config_prefix="$(shell pwd)/npm-prefix" \
npm_config_tmp="$(shell pwd)/npm-tmp" \
../../$(NODE_EXE) cli.js run-script test-all && \
../../$(NODE_EXE) cli.js prune --prod && \
cd ../.. && \
rm -rf npm-cache npm-tmp npm-prefix
NODE_EXE=$(NODE_EXE) tools/test-npm.sh

test-npm-publish: $(NODE_EXE)
npm_package_config_publishtest=true ./$(NODE_EXE) deps/npm/test/run.js
Expand Down Expand Up @@ -386,11 +374,8 @@ bench-idle:
sleep 1
./$(NODE_EXE) benchmark/idle_clients.js &

jslintfix:
PYTHONPATH=tools/closure_linter/:tools/gflags/ $(PYTHON) tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js

jslint:
PYTHONPATH=tools/closure_linter/:tools/gflags/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
./$(NODE_EXE) tools/eslint/bin/eslint.js src lib test --reset --quiet

CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_lttng.cc
Expand Down
37 changes: 37 additions & 0 deletions benchmark/misc/next-tick-breadth-args.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict';

var common = require('../common.js');
var bench = common.createBenchmark(main, {
millions: [2]
});

function main(conf) {
var N = +conf.millions * 1e6;
var n = 0;

function cb1(arg1) {
n++;
if (n === N)
bench.end(n / 1e6);
}
function cb2(arg1, arg2) {
n++;
if (n === N)
bench.end(n / 1e6);
}
function cb3(arg1, arg2, arg3) {
n++;
if (n === N)
bench.end(n / 1e6);
}

bench.start();
for (var i = 0; i < N; i++) {
if (i % 3 === 0)
process.nextTick(cb3, 512, true, null);
else if (i % 2 === 0)
process.nextTick(cb2, false, 5.1);
else
process.nextTick(cb1, 0);
}
}
48 changes: 48 additions & 0 deletions benchmark/misc/next-tick-depth-args.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use strict';

var common = require('../common.js');
var bench = common.createBenchmark(main, {
millions: [2]
});

process.maxTickDepth = Infinity;

function main(conf) {
var n = +conf.millions * 1e6;

function cb3(arg1, arg2, arg3) {
if (--n) {
if (n % 3 === 0)
process.nextTick(cb3, 512, true, null);
else if (n % 2 === 0)
process.nextTick(cb2, false, 5.1);
else
process.nextTick(cb1, 0);
} else
bench.end(+conf.millions);
}
function cb2(arg1, arg2) {
if (--n) {
if (n % 3 === 0)
process.nextTick(cb3, 512, true, null);
else if (n % 2 === 0)
process.nextTick(cb2, false, 5.1);
else
process.nextTick(cb1, 0);
} else
bench.end(+conf.millions);
}
function cb1(arg1) {
if (--n) {
if (n % 3 === 0)
process.nextTick(cb3, 512, true, null);
else if (n % 2 === 0)
process.nextTick(cb2, false, 5.1);
else
process.nextTick(cb1, 0);
} else
bench.end(+conf.millions);
}
bench.start();
process.nextTick(cb1, true);
}
Loading