0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

713 Commits

Author SHA1 Message Date
Ben Noordhuis
c30fc8d495 src: support UTF-8 in compiled-in JS source files
Detect it when source files in lib/ are not ASCII.  Decode them as UTF-8
and store them as UTF-16 in the binary so they can be used as external
string resources without non-ASCII characters getting mangled.

Fixes: https://github.com/nodejs/node/issues/10673
PR-URL: https://github.com/nodejs/node/pull/11129
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-13 19:16:14 +01:00
Jan Krems
fc3f0d63b4
build: add node-inspect integration test
This just adds an additional make target (`make test-node-inspect`) but
will not include the new debugger in releases.

PR-URL: https://github.com/nodejs/node/pull/10187
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-13 14:50:29 +01:00
Ben Noordhuis
bae093a70b test: remove dependency on node-weak
Replace node-weak with a small hand-rolled add-on.  We can now drop
node-weak and nan, reducing the size of the source tree by about 750 kB
and the size of the tarball by about 150-300 kB.

PR-URL: https://github.com/nodejs/node/pull/11239
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-02-11 14:21:29 +01:00
Ben Noordhuis
3c46bb9931 tools: add compile_commands.json gyp generator
Add a compile_commands.json generator for use with clang-based tooling.

Pass the (undocumented) -C switch to configure to make it generate the
files in out/Debug and out/Release.

PR-URL: https://github.com/nodejs/node/pull/7986
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-09 22:32:22 +01:00
Julien Gilli
23cda7d9de
test: fix test.py command line options processing
https://github.com/nodejs/node/pull/11086 had introduced a regression
that broke command line options processing for tools/test.py.

Basically, it made tools/test.py discard the command line argument that
would be passed after `--abort-on-timeout`. For instance, when running:

```
$ python tools/test.py --abort-on-timeout path/to/some-test
```

all tests would be run because the last command line argument
(`/path/to/some-test`) would be discarded.

This change fixes this regression.

Refs: https://github.com/nodejs/node/pull/11086
PR-URL: https://github.com/nodejs/node/pull/11153
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-02-04 06:15:25 +01:00
Julien Gilli
3b488eccc1 test: add --abort-on-timeout option to test.py
Currently, when a process times out, it is terminated by sending it the
SIGTERM signal. Sending SIGBART instead allows the operating system to
generate a core file that can be investigated later using post-mortem
debuggers such as llnode or mdb_v8.

This can be very useful when investigating flaky tests that time out,
since in that case the failure is difficult to reproduce, and being able
to look at a core file makes a big difference.

With these changes, passing the --abort-on-timeout command line option
to tools/test.py now sends SIGABRT to processes timing out on all
platforms but Windows.

PR-URL: https://github.com/nodejs/node/pull/11086
Ref: https://github.com/nodejs/node/issues/11026
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-02-03 08:26:22 -08:00
James M Snell
0d9ea4fdcd doc: add documentation for url.format(URL[, options]);
PR-URL: https://github.com/nodejs/node/pull/10857
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-02-02 12:36:21 -08:00
Sakthipriyan Vairamani (thefourtheye)
63f110addb
doc: replace newlines in deprecation with space
As it is, each line in the deprecation heading which are wrapped at 80
characters in the *.md files, are shown in different lines. For example

    > Stability: 0 - Deprecated: Use
    > `Buffer.from(arrayBuffer[, byteOffset [, length]])`
    > instead.

is shown in three different lines. This patch replaces the newlines
with space characters, so that the output will be in single line.

PR-URL: https://github.com/nodejs/node/pull/11074

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-02-01 23:40:42 +05:30
Timothy Gu
29f758731f tools: add MDN link for Iterable
PR-URL: https://github.com/nodejs/node/pull/11060
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-01-31 23:51:07 -08:00
Phillip Johnsen
01b90ee1db tools,doc: add Google Analytics tracking.
Adds Google Analytics tracking script to all doc pages when
`DOCS_ANALYTICS` is set when running `make`:

```bash
$ DOCS_ANALYTICS=<GOOGLE ANALYTICS ID> make
```

By default (when `DOCS_ANALYTICS` is not set), no tracking scripts are
included.

It respects "Do Not Track" settings end users might have in their
browser.

Also changes make target `doc-upload` from depending on the
`$(TARBALL)` target, to only depend on `doc` directly.

PR-URL: https://github.com/nodejs/node/pull/6601
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-01-25 21:54:34 +01:00
James M Snell
0c712b6743 tools: add mdn link for Iterator
PR-URL: https://github.com/nodejs/node/pull/10620
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-01-23 09:57:36 -08:00
Javis Sullivan
4424e847d5 doc: remove duplicate properties bullet in readme
PR-URL: https://github.com/nodejs/node/pull/10741
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-01-13 09:53:53 -08:00
Gibson Fahnestock
57f6a106fb test: fix temp-dir option in tools/test.py
If a temp-dir is specified and already exists, the NODE_TEST_DIR
environment variable will never be set. This fixes that.

PR-URL: https://github.com/nodejs/node/pull/10723
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-01-12 13:32:02 -08:00
Sam Roberts
0c8cfd4eca eslint: remove dangling eslint symlink
Reapplication of https://github.com/nodejs/node/pull/9299 since the
symlink was re-added in f44969a5a.

PR-URL: https://github.com/nodejs/node/pull/10771
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-01-12 13:29:36 -08:00
Teddy Katz
5d31448844 tools,test: enforce assert.ifError with lint rule
This adds an ESLint rule to enforce the use of `assert.ifError(err)`
instead of `if (err) throw err;` in tests.

PR-URL: https://github.com/nodejs/node/pull/10671
Ref: https://github.com/nodejs/node/pull/10543
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
2017-01-09 09:20:38 -08:00
Rich Trott
4e5cf85ada tools: add lint rule to enforce timer arguments
Add a custom ESLint rule to require that setTimeout() and setInterval()
get called with at least two arguments. This prevents omitting the
duration or interval.

PR-URL: https://github.com/nodejs/node/pull/9472
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-06 15:24:28 -08:00
Rich Trott
38b18e330f tools: remove no-useless-regex-char-class-escape
The `no-useless-regex-char-class-escape` custom lint rule was introduced
as a less aggressive alternative to some enhancements that were
introduced into ESLint. Those enhancements were blocking us from
updating ESLint. However, they have since been relaxed and the custom
rule is no longer needed. Remove it.

PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-01-06 14:36:38 -08:00
Rich Trott
33cd0aa70c tools: remove custom align-function-arguments rule
ESLint `indent` rule now has options that duplicate functionality in our
custom `align-function-arguments` rule. Remove
`align-function-arguments` custom rule.

PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-01-06 14:36:34 -08:00
Rich Trott
f44969a5ab tools: update ESLint to current version
We have been stalled on ESLint 3.8.0 for some time. Current ESLint is
3.13.0. We have been unable to upgrade because of more aggressive
reporting on some rules, including indentation.

ESLint configuration options and bugfixes are now such that we can
reasonably upgrade.

PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-01-06 14:36:27 -08:00
Sakthipriyan Vairamani (thefourtheye)
26bf9545e0
Revert "test: test.py add option to use node in path"
This reverts commit 4198253a18.

PR-URL: https://github.com/nodejs/node/pull/10613

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-04 23:17:59 +05:30
George Adams
4198253a18 test: test.py add option to use node in path
This pr adds the ability to run `tools/test.py --path`. This means that
instead of defaulting to out/Release we can use the node version from
the path.

PR-URL: https://github.com/nodejs/node/pull/9674
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-04 12:18:50 +00:00
Rich Trott
79117b98b9 tools: refactor json.js
* Simplify regular expressions (see below)
* Remove unneeded `parseYAML()` wrapper
* Remove unused callback argument

Regular expression simplifications include:

* Changing trailing `*?$/` to `*$/` because non-greedy matching to the
  end of a line will not change behavior
* Change regexp beginnings like `/^(?:property:?\s*)?[^.\[]+` to the
  equivalent `/[^.\]]+`
* For regular expressions changed per the above, remove
  case-insensitivity if it no longer affects the regexp

PR-URL: https://github.com/nodejs/node/pull/10442
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2016-12-28 22:34:42 -08:00
Michaël Zasso
966e5cfb81 tools: enforce linebreak after ternary operators
This is to be consistent with the other operators and helps
understanding the context when the code is grepped.

PR-URL: https://github.com/nodejs/node/pull/10213
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-22 20:27:59 -08:00
Bill Ticehurst
7a0fe9f471 win,msi: add required UIRef for localized strings
Reviewed-By: João Reis <reis@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/8884
2016-12-20 14:41:23 +00:00
Michaël Zasso
7cb98138a9 tools: forbid template literals in assert.throws
Extend the assert-throws-arguments custom ESLint rule to also check for
the use of template literals as a second argument to assert.throws.

PR-URL: https://github.com/nodejs/node/pull/10301
Ref: https://github.com/nodejs/node/pull/10282#discussion_r92607290
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2016-12-19 08:04:36 +01:00
Anna Henningsen
def6dfb62c
test: set stdin too for pseudo-tty tests
Ref: https://github.com/nodejs/node/pull/10037
Ref: https://github.com/nodejs/node/pull/10146
PR-URL: https://github.com/nodejs/node/pull/10149
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-09 15:19:52 +01:00
Daniel Bevenius
a8137dd06d tools: add macosx-firwall script to avoid popups
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: https://github.com/nodejs/node/issues/8911
PR-URL: https://github.com/nodejs/node/pull/10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-09 08:31:08 +01:00
Michaël Zasso
0ae1684396 tools: add ESLint rule for assert.throws arguments
The second argument to "assert.throws" is usually a validation RegExp or
function for the thrown error. However, the function also accepts a
string and in this case it is interpreted as a message for the
AssertionError and not used for validation. It is common for people to
forget this and pass a validation string by mistake.
This new rule checks that we never pass a string literal as a second argument
to "assert.throws". Additionally, there is an option to enforce the
function to be called with at least two arguments. It is currently off
because we have many tests that do not comply with this rule.

PR-URL: https://github.com/nodejs/node/pull/10089
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-05 16:01:12 +01:00
Rich Trott
fe1dcb5873 tools: remove unneeded escaping in generate.js
`-` does not need to be escaped in a regular expression outside of
character classes.

PR-URL: https://github.com/nodejs/node/pull/9781
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-11-27 10:23:31 -08:00
Francis Gulotta
951ba0d0a9 tools: allow test.py to use full paths of tests
Allow test.py to run tests with a 'tests/' prefix or a '.js' postfix

PR-URL: https://github.com/nodejs/node/pull/9694
Fixes: https://github.com/nodejs/node/issues/9684
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-26 16:19:56 +08:00
Prince J Wesley
5cf0157b82 tools: Add no useless regex char class rule
Eslint Rule:
Disallow useless escape in regex character class
with optional override characters option and auto
fixable with eslint --fix option.

Usage:
no-useless-regex-char-class-escape: [2, { override: ['[', ']'] }]

PR-URL: https://github.com/nodejs/node/pull/9591
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2016-11-23 22:06:37 -08:00
Prince J Wesley
0f4c7b8c37 lib,tools: remove unneeded escaping of /
The `/` character does not need to be escaped when occurring inside a
character class in a regular expression. Remove such instances of
escaping in the code base.

PR-URL: https://github.com/nodejs/node/pull/9591
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2016-11-23 22:06:24 -08:00
Stewart Addison
625a2716c6 deps: backport GYP fix to fix AIX shared suffix
Required to support the shared library builds on AIX - this sets the
shared library suffix within GYP to .a instead of .so on AIX
My patch: https://codereview.chromium.org/2492233002/ was landed as
as part of this one which fixed some other (not required, but
included for completeness of the backport) changes:

Ref: https://codereview.chromium.org/2511733005/
2016-11-22 14:20:07 -05:00
Anna Henningsen
79c382787f
tools: use better regexp for manpage references
In practice, manpage names may contain dots (e.g. `resolv.conf(5)`).

PR-URL: https://github.com/nodejs/node/pull/9632
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-20 00:56:05 +01:00
Ben Noordhuis
a804627837 tools: make run-valgrind.py useful
Node.js does not clean up on exit so don't complain about memory leaks
but do complain about invalid memory access.  In the future we may want
to add a cleanup-on-exit flag or put together a suppression list.

PR-URL: https://github.com/nodejs/node/pull/9520
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-15 17:01:24 +01:00
Ben Noordhuis
e762ca0060 tools: fix run-valgrind.py script
The script had a dependency on the copy of valgrind that is bundled
with V8 but that only gets checked out when doing a full depot_tools
checkout.  Use the system-provided valgrind.

PR-URL: https://github.com/nodejs/node/pull/9520
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-15 17:01:22 +01:00
Ben Noordhuis
043a98c494 tools: copy run-valgrind.py to tools/
It was a symbolic link to deps/v8/tools/run-valgrind.py before.  We are
going to make changes to it and we don't want to carry the patch forward
so make a copy.

PR-URL: https://github.com/nodejs/node/pull/9520
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-15 17:00:00 +01:00
Johan Bergström
b634ef70da test: output tap13 instead of almost-tap
Produce a tap13-compatible output which makes it
simpler to parse. Output is still readable by
the jenkins tap plugin.

PR-URL: https://github.com/nodejs/node/pull/9262
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-11-10 15:22:54 -03:00
Jaideep Bajwa
4aca347527 v8: update make-v8.sh to use git
google build tool gclient doesn't support
svn anymore. Updating v8 build script to use
git instead.

PR-URL: https://github.com/nodejs/node/pull/9393
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-09 17:34:22 -05:00
Myles Borins
b315e2455e tools: use long format for gpg fingerprint
Git has been using my Long format fingerprint in the tagging messages,
this has been causing the release script to fail on my keys.

It would also be wise to be using the long format on keys based on some
attacks that hack been found in the wild around short keys.

PR-URL: https://github.com/nodejs/node/pull/9258
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-11-07 10:34:10 -05:00
Rich Trott
4463d2b360 benchmark,lib,test,tools: remove unneeded . escape
The `.` character does not need to be escaped when it appears inside a
regular expression character class. This removes instances of
unnecessary escapes of the `.` character.

This also removes a few unnecessary escapes of the `(` and `)`
characters within character classes too.

PR-URL: https://github.com/nodejs/node/pull/9449
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
2016-11-06 19:22:01 -08:00
Steven R. Loomis
03023fa7ae
deps: Intl: ICU 58 bump: configure/LICENSE/docs
* bump to ICU 58.1 - update URL / hash
* does not attempt to reduce size - yet
* patch to work around http://bugs.icu-project.org/trac/ticket/12822
  ( compile issue on Windows)
* Fix ICU shrinker to delete old license.html file
  (update to https://github.com/nodejs/node/pull/8674 )

Fixes: https://github.com/nodejs/node/issues/7844
PR-URL: https://github.com/nodejs/node/pull/9234
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-31 13:42:52 -07:00
Sam Roberts
de24c45de7 tools: remove dangling eslint symlink
The tools/eslint/node_modules/.bin/eslint symlink was unused by node,
but was present, and pointed at a non-existent file. This causes
problems for tooling.

Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9299
2016-10-27 09:30:39 -07:00
Rich Trott
60a78aedb9 tools: make --repeat work with -j in test.py
The repeat option in test.py did not work as expected if `-j` was set to
more than one. Repeated tests running at the same time could share temp
directories and cause test failures. This was observed with:

    tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive

By using copy.deepCopy(), the repeated tests are separate objects and
not references to the same objects. Setting `thread_id` on one of them
will now not change the `thread_id` on all of them. And `thread_id` is
how the temp directory (and common.PORT as well) are determined.

Refs: https://github.com/nodejs/node/pull/9228
PR-URL: https://github.com/nodejs/node/pull/9249
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-10-26 12:15:57 -07:00
James M Snell
e8eaaa7724 buffer: add buffer.transcode
Add buffer.transcode(source, from, to) method. Primarily uses ICU
to transcode a buffer's content from one of Node.js' supported
encodings to another.

Originally part of a proposal to add a new unicode module. Decided
to refactor the approach towrds individual PRs without a new module.

Refs: https://github.com/nodejs/node/pull/8075
PR-URL: https://github.com/nodejs/node/pull/9038
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-10-25 10:12:02 -07:00
Ben Noordhuis
e4290dec2d src,tools: speed up startup by 2.5%
Use zero-copy external string resources for storing the built-in JS
source code.  Saves a few hundred kilobyte of memory and consistently
speeds up `benchmark/misc/startup.js` by 2.5%.

Everything old is new again!  Commit 74954ce ("Add string class that
uses ExternalAsciiStringResource.") from 2011 did the same thing but
I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal()
with unaligned strings") because of a limitation in the V8 API.

V8 no longer requires that strings are aligned if they are one-byte
strings so it should be safe to re-enable external strings again.

PR-URL: https://github.com/nodejs/node/pull/5458
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-10-25 13:16:16 +02:00
Rich Trott
3dbf900e85 tools: replace custom lint rule for getter/setter
Replace custom `no-definegetter-definesetter` lint rule with ESLint's
built-in `no-restricted-properties`.

Refs: https://github.com/nodejs/node/pull/9112#pullrequestreview-4378536
PR-URL: https://github.com/nodejs/node/pull/9194
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-10-21 07:37:10 -07:00
Evan Lucas
6845d6e318 tools: fix release script on macOS 10.12
Previously, we were relying on the output of gpg from git tag -v to
verify that the key selected by the releaser is the key that was used
to sign the tag. This output can change depending on the version of git
being used. Now, we just check that the output of git tag -v contains
the key selected.

Fixes: https://github.com/nodejs/node/issues/8822
PR-URL: https://github.com/nodejs/node/pull/8824
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-10-20 09:57:43 -07:00
Rich Trott
2981f24f92 tools: update ESLint to v3.8.0
Update ESLint to v3.8.0.

* Installed with `npm install --production` to avoid installing
  unnecessary dev files
* Used `dmn -f clean` to further eliminate unneeded files

PR-URL: https://github.com/nodejs/node/pull/9112
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-10-18 15:28:21 -07:00
Rod Vagg
64b9b39f07 tools: check tag is on github before release
PR-URL: https://github.com/nodejs/node/pull/9142
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-19 02:14:27 +11:00