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

Commit 8e6bd77

Browse files
committed
Merge from io/js master
Conflicts: README.md
2 parents 511f27e + 4e2f999 commit 8e6bd77

File tree

3,181 files changed

+142304
-36155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,181 files changed

+142304
-36155
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/punycode.js

.eslintrc

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
env:
2+
node: true
3+
4+
# enable ECMAScript features
5+
ecmaFeatures:
6+
blockBindings: true
7+
templateStrings: true
8+
octalLiterals: true
9+
binaryLiterals: true
10+
generators: true
11+
12+
rules:
13+
# Possible Errors
14+
# list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
15+
## check debugger sentence
16+
no-debugger: 2
17+
## check duplicate arguments
18+
no-dupe-args: 2
19+
## check duplicate object keys
20+
no-dupe-keys: 2
21+
## check duplicate switch-case
22+
no-duplicate-case: 2
23+
## disallow assignment of exceptional params
24+
no-ex-assign: 2
25+
## disallow use of reserved words as keys like enum, class
26+
no-reserved-keys: 2
27+
## disallow unreachable code
28+
no-unreachable: 2
29+
## require valid typeof compared string like typeof foo === 'strnig'
30+
valid-typeof: 2
31+
32+
# Best Practices
33+
# list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
34+
## require falls through comment on switch-case
35+
no-fallthrough: 2
36+
37+
# Stylistic Issues
38+
# list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
39+
## use single quote, we can use double quote when escape chars
40+
quotes:
41+
- 2
42+
- "single"
43+
- "avoid-escape"
44+
## 2 space indentation
45+
indent:
46+
- 2
47+
- 2
48+
## add space after comma
49+
## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
50+
comma-spacing: 1
51+
## put semi-colon
52+
semi: 2
53+
## require spaces operator like var sum = 1 + 1;
54+
space-infix-ops: 2
55+
## require spaces return, throw, case
56+
space-return-throw-case: 2
57+
## require parens for Constructor
58+
new-parens: 2
59+
## max 80 length
60+
max-len:
61+
- 2
62+
- 80
63+
- 2
64+
65+
# Strict Mode
66+
# list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
67+
## 'use strict' on top
68+
strict:
69+
- 2
70+
- "global"
71+
72+
# Global scoped method and vars
73+
globals:
74+
DTRACE_HTTP_CLIENT_REQUEST: true
75+
LTTNG_HTTP_CLIENT_REQUEST: true
76+
COUNTER_HTTP_CLIENT_REQUEST: true
77+
DTRACE_HTTP_CLIENT_RESPONSE: true
78+
LTTNG_HTTP_CLIENT_RESPONSE: true
79+
COUNTER_HTTP_CLIENT_RESPONSE: true
80+
DTRACE_HTTP_SERVER_REQUEST: true
81+
LTTNG_HTTP_SERVER_REQUEST: true
82+
COUNTER_HTTP_SERVER_REQUEST: true
83+
DTRACE_HTTP_SERVER_RESPONSE: true
84+
LTTNG_HTTP_SERVER_RESPONSE: true
85+
COUNTER_HTTP_SERVER_RESPONSE: true
86+
DTRACE_NET_STREAM_END: true
87+
LTTNG_NET_STREAM_END: true
88+
COUNTER_NET_SERVER_CONNECTION_CLOSE: true
89+
DTRACE_NET_SERVER_CONNECTION: true
90+
LTTNG_NET_SERVER_CONNECTION: true
91+
COUNTER_NET_SERVER_CONNECTION: true

CHANGELOG.md

+48-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# io.js ChangeLog
22

3+
## 2015-05-07, Version 2.0.1, @rvagg
4+
5+
### Notable changes
6+
7+
* **async_wrap**: (Trevor Norris) [#1614](https://github.com/iojs/io.js/pull/1614)
8+
- it is now possible to filter by providers
9+
- bit flags have been removed and replaced with method calls on the binding object
10+
- _note that this is an unstable API so feature additions and breaking changes won't change io.js semver_
11+
* **libuv**: resolves numerous io.js issues:
12+
- [#862](https://github.com/iojs/io.js/issues/862) prevent spawning child processes with invalid stdio file descriptors
13+
- [#1397](https://github.com/iojs/io.js/issues/1397) fix EPERM error with fs.access(W_OK) on Windows
14+
- [#1621](https://github.com/iojs/io.js/issues/1621) build errors associated with the bundled libuv
15+
- [#1512](https://github.com/iojs/io.js/issues/1512) should properly fix Windows termination errors
16+
* **addons**: the `NODE_DEPRECATED` macro was causing problems when compiling addons with older compilers, this should now be resolved (Ben Noordhuis) [#1626](https://github.com/iojs/io.js/pull/1626)
17+
* **V8**: upgrade V8 from 4.2.77.18 to 4.2.77.20 with minor fixes, including a bug preventing builds on FreeBSD
18+
19+
### Known issues
20+
21+
See https://github.com/iojs/io.js/labels/confirmed-bug for complete and current list of known issues.
22+
23+
* Some problems with unreferenced timers running during `beforeExit` are still to be resolved. See [#1264](https://github.com/iojs/io.js/issues/1264).
24+
* Surrogate pair in REPL can freeze terminal [#690](https://github.com/iojs/io.js/issues/690)
25+
* `process.send()` is not synchronous as the docs suggest, a regression introduced in 1.0.2, see [#760](https://github.com/iojs/io.js/issues/760) and fix in [#774](https://github.com/iojs/io.js/issues/774)
26+
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion [#894](https://github.com/iojs/io.js/issues/894)
27+
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/iojs/io.js/issues/1435).
28+
* readline: split escapes are processed incorrectly, see [#1403](https://github.com/iojs/io.js/issues/1403)
29+
30+
### Commits
31+
32+
* [[`7dde95a8bd`](https://github.com/iojs/io.js/commit/7dde95a8bd)] - **async-wrap**: remove before/after calls in init (Trevor Norris) [#1614](https://github.com/iojs/io.js/pull/1614)
33+
* [[`bd42ba056a`](https://github.com/iojs/io.js/commit/bd42ba056a)] - **async-wrap**: set flags using functions (Trevor Norris) [#1614](https://github.com/iojs/io.js/pull/1614)
34+
* [[`4b2c786449`](https://github.com/iojs/io.js/commit/4b2c786449)] - **async-wrap**: pass PROVIDER as first arg to init (Trevor Norris) [#1614](https://github.com/iojs/io.js/pull/1614)
35+
* [[`84bf609fd2`](https://github.com/iojs/io.js/commit/84bf609fd2)] - **async-wrap**: don't call init callback unnecessarily (Trevor Norris) [#1614](https://github.com/iojs/io.js/pull/1614)
36+
* [[`04cc03b029`](https://github.com/iojs/io.js/commit/04cc03b029)] - **deps**: update libuv to 1.5.0 (Saúl Ibarra Corretgé) [#1646](https://github.com/iojs/io.js/pull/1646)
37+
* [[`b16d9c28e8`](https://github.com/iojs/io.js/commit/b16d9c28e8)] - **deps**: upgrade v8 to 4.2.77.20 (Ben Noordhuis) [#1639](https://github.com/iojs/io.js/pull/1639)
38+
* [[`9ec3109272`](https://github.com/iojs/io.js/commit/9ec3109272)] - **doc**: add TC meeting 2015-04-29 minutes (Rod Vagg) [#1585](https://github.com/iojs/io.js/pull/1585)
39+
* [[`2c7206254c`](https://github.com/iojs/io.js/commit/2c7206254c)] - **doc**: fix typo in readme.md (AQNOUCH Mohammed) [#1643](https://github.com/iojs/io.js/pull/1643)
40+
* [[`71dc7152ee`](https://github.com/iojs/io.js/commit/71dc7152ee)] - **doc**: fix PR link in CHANGELOG (Brian White) [#1624](https://github.com/iojs/io.js/pull/1624)
41+
* [[`b97b96d05a`](https://github.com/iojs/io.js/commit/b97b96d05a)] - **install**: fix NameError (thefourtheye) [#1628](https://github.com/iojs/io.js/pull/1628)
42+
* [[`6ccbe75384`](https://github.com/iojs/io.js/commit/6ccbe75384)] - **js_stream**: fix buffer index in DoWrite (Shigeki Ohtsu) [#1635](https://github.com/iojs/io.js/pull/1635)
43+
* [[`c43855c49c`](https://github.com/iojs/io.js/commit/c43855c49c)] - **src**: export the ParseEncoding function on Windows (Ivan Kozik) [#1596](https://github.com/iojs/io.js/pull/1596)
44+
* [[`8315b22390`](https://github.com/iojs/io.js/commit/8315b22390)] - **src**: fix pedantic cpplint whitespace warnings (Ben Noordhuis) [#1640](https://github.com/iojs/io.js/pull/1640)
45+
* [[`b712af79a7`](https://github.com/iojs/io.js/commit/b712af79a7)] - **src**: fix NODE_DEPRECATED macro with old compilers (Ben Noordhuis) [#1626](https://github.com/iojs/io.js/pull/1626)
46+
* [[`2ed10f1349`](https://github.com/iojs/io.js/commit/2ed10f1349)] - **src**: fix minor inefficiency in Buffer::New() call (Ben Noordhuis) [#1577](https://github.com/iojs/io.js/pull/1577)
47+
* [[`f696c9efab`](https://github.com/iojs/io.js/commit/f696c9efab)] - **src**: fix deprecated use of Buffer::New() (Ben Noordhuis) [#1577](https://github.com/iojs/io.js/pull/1577)
48+
* [[`0c8f13df8f`](https://github.com/iojs/io.js/commit/0c8f13df8f)] - **tools**: remove unused GuessWordSize function (thefourtheye) [#1638](https://github.com/iojs/io.js/pull/1638)
49+
350
## 2015-05-04, Version 2.0.0, @rvagg
451

552
### Breaking changes
@@ -22,7 +69,7 @@ _Note: a new version of the 'url' module was reverted prior to release as it was
2269
- The prefix used before the version number on `npm version` is now configurable via `tag-version-prefix` (@kkragenbrink) [npm/npm#8014](https://github.com/npm/npm/issues/8014)
2370
* **os**: `os.tmpdir()` is now cross-platform consistent and will no longer returns a path with a trailling slash on any platform (Christian Tellnes) [#747](https://github.com/iojs/io.js/pull/747)
2471
* **process**:
25-
- `process.nextTick()` performance has been improved by between 2-42% across the benchmark suite, notable because this is heavily used across core (Brian White) [#1548](https://github.com/iojs/io.js/pull/1548)
72+
- `process.nextTick()` performance has been improved by between 2-42% across the benchmark suite, notable because this is heavily used across core (Brian White) [#1571](https://github.com/iojs/io.js/pull/1571)
2673
- New `process.geteuid()`, `process.seteuid(id)`, `process.getegid()` and `process.setegid(id)` methods allow you to get and set effective UID and GID of the process (Evan Lucas) [#1536](https://github.com/iojs/io.js/pull/1536)
2774
* **repl**:
2875
- REPL history can be persisted across sessions if the `NODE_REPL_HISTORY_FILE` environment variable is set to a user accessible file, `NODE_REPL_HISTORY_SIZE` can set the maximum history size and defaults to `1000` (Chris Dickinson) [#1513](https://github.com/iojs/io.js/pull/1513)

Makefile

+2-17
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,7 @@ test-debugger: all
138138
$(PYTHON) tools/test.py debugger
139139

140140
test-npm: $(NODE_EXE)
141-
rm -rf npm-cache npm-tmp npm-prefix
142-
mkdir npm-cache npm-tmp npm-prefix
143-
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
144-
npm_config_prefix="$(shell pwd)/npm-prefix" \
145-
npm_config_tmp="$(shell pwd)/npm-tmp" \
146-
../../$(NODE_EXE) cli.js install --ignore-scripts
147-
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
148-
npm_config_prefix="$(shell pwd)/npm-prefix" \
149-
npm_config_tmp="$(shell pwd)/npm-tmp" \
150-
../../$(NODE_EXE) cli.js run-script test-all && \
151-
../../$(NODE_EXE) cli.js prune --prod && \
152-
cd ../.. && \
153-
rm -rf npm-cache npm-tmp npm-prefix
141+
NODE_EXE=$(NODE_EXE) tools/test-npm.sh
154142

155143
test-npm-publish: $(NODE_EXE)
156144
npm_package_config_publishtest=true ./$(NODE_EXE) deps/npm/test/run.js
@@ -386,11 +374,8 @@ bench-idle:
386374
sleep 1
387375
./$(NODE_EXE) benchmark/idle_clients.js &
388376

389-
jslintfix:
390-
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
391-
392377
jslint:
393-
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
378+
./$(NODE_EXE) tools/eslint/bin/eslint.js src lib --reset --quiet
394379

395380
CPPLINT_EXCLUDE ?=
396381
CPPLINT_EXCLUDE += src/node_lttng.cc

configure

+9-13
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ parser.add_option('--with-etw',
237237
dest='with_etw',
238238
help='build with ETW (default is true on Windows)')
239239

240-
parser.add_option('--with-intl',
240+
intl_optgroup.add_option('--with-intl',
241241
action='store',
242242
dest='with_intl',
243243
default='none',
@@ -294,15 +294,15 @@ parser.add_option('--without-perfctr',
294294
dest='without_perfctr',
295295
help='build without performance counters')
296296

297+
# Dummy option for backwards compatibility
297298
parser.add_option('--with-snapshot',
298299
action='store_true',
299-
dest='with_snapshot',
300+
dest='unused_with_snapshot',
300301
help=optparse.SUPPRESS_HELP)
301302

302-
# Dummy option for backwards compatibility.
303303
parser.add_option('--without-snapshot',
304304
action='store_true',
305-
dest='unused_without_snapshot',
305+
dest='without_snapshot',
306306
help=optparse.SUPPRESS_HELP)
307307

308308
parser.add_option('--without-ssl',
@@ -579,10 +579,6 @@ def configure_arm(o):
579579
o['variables']['arm_fpu'] = 'vfpv3'
580580
o['variables']['arm_version'] = '7'
581581

582-
# Print warning when snapshot is enabled and building on armv6
583-
if is_arch_armv6() and options.with_snapshot:
584-
warn('when building on ARMv6, don\'t use --with-snapshot')
585-
586582

587583
def configure_mips(o):
588584
can_use_fpu_instructions = (options.mips_float_abi != 'soft')
@@ -604,10 +600,10 @@ def configure_node(o):
604600
o['variables']['host_arch'] = host_arch
605601
o['variables']['target_arch'] = target_arch
606602

607-
if target_arch != host_arch and options.with_snapshot:
608-
o['variables']['want_separate_host_toolset'] = 1
609-
else:
610-
o['variables']['want_separate_host_toolset'] = 0
603+
cross_compiling = target_arch != host_arch
604+
want_snapshots = not options.without_snapshot
605+
o['variables']['want_separate_host_toolset'] = int(
606+
cross_compiling and want_snapshots)
611607

612608
if target_arch == 'arm':
613609
configure_arm(o)
@@ -713,7 +709,7 @@ def configure_v8(o):
713709
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
714710
o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds.
715711
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
716-
o['variables']['v8_use_snapshot'] = b(options.with_snapshot)
712+
o['variables']['v8_use_snapshot'] = 0 if options.without_snapshot else 1
717713

718714
def configure_openssl(o):
719715
o['variables']['node_use_openssl'] = b(not options.without_ssl)

deps/cares/cares.gyp

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
'direct_dependent_settings': {
2727
'include_dirs': [ 'include' ]
2828
},
29-
'defines': [ 'HAVE_CONFIG_H' ],
3029
'sources': [
3130
'common.gypi',
3231
'include/ares.h',
@@ -96,7 +95,6 @@
9695
'src/inet_ntop.c',
9796
'src/ares_inet_net_pton.h',
9897
'src/setup_once.h',
99-
'src/windows_port.c'
10098
],
10199
'conditions': [
102100
[ 'library=="static_library"', {
@@ -107,7 +105,7 @@
107105
[ 'OS=="win"', {
108106
'include_dirs': [ 'config/win32' ],
109107
'sources': [
110-
'config/win32/ares_config.h',
108+
'src/config-win32.h',
111109
'src/windows_port.c',
112110
'src/ares_getenv.c',
113111
'src/ares_iphlpapi.h',
@@ -126,6 +124,7 @@
126124
'-Wextra',
127125
'-Wno-unused-parameter'
128126
],
127+
'defines': [ 'HAVE_CONFIG_H' ],
129128
}],
130129
[ 'OS not in "win android"', {
131130
'cflags': [

0 commit comments

Comments
 (0)