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

155 Commits

Author SHA1 Message Date
James M Snell
e71e71b513 http2: introducing HTTP/2
At long last: The initial *experimental* implementation of HTTP/2.

This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.

This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.

Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.

The JS API is defined within `internal/http2/*.js`.

There are two APIs provided: Core and Compat.

The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.

The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.

Tests, documentation and initial benchmarks are included.

The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.

When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.

To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.

Additional configuration options to enable verbose debugging are provided:

```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```

The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.

The following illustrates as simple HTTP/2 server and client interaction:

(The HTTP/2 client and server support both plain text and TLS connections)

```jt client = http2.connect('http://localhost:80');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
  client.destroy();
});

// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
  stream.respond({ ':status': 200 });
  stream.write('hello ');
  stream.end('world');
});
server.listen(80);
```

```js
const http2 = require('http2');
const client = http2.connect('http://localhost');

```

Author: Anna Henningsen <anna@addaleax.net>
Author: Colin Ihrig <cjihrig@gmail.com>
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Author: James M Snell <jasnell@gmail.com>
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com>
Author: Robert Kowalski <rok@kowalski.gd>
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Author: Sebastiaan Deckers <sebdeckers83@gmail.com>
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:44 -07:00
Jason Ginchereau
cee8d6d65e build,win: fix python detection script
Handle spaces in the path to python.exe, in case it is installed
under some directory like "C:\Program Files".

PR-URL: https://github.com/nodejs/node/pull/14546
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-08-01 10:56:04 -07:00
Kunal Pathak
09dd6bbec6 build,test: run v8 tests on windows
`vcbuild.bat test-v8` : Runs unit test from v8 repo
`vcbuild.bat test-v8-intl` : Runs intl test from v8 repo
`vcbuild.bat test-v8` : Runs benchmarks from v8 repo

The runs needs
https://www.chromium.org/developers/how-tos/install-depot-tools
installed on the machine expects environment variable
`DEPOT_TOOLS_PATH` to be set to the path.

Set environment variable `DISABLE_V8_I18N` to disable i18n.

PR-URL: https://github.com/nodejs/node/pull/13992
Refs: https://github.com/nodejs/node/pull/4704
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-26 18:08:30 -07:00
Nikolai Vavilov
be3f3d40e2 build: prevent VsDevCmd.bat from changing cwd
VsDevCmd.bat changes the current working directory to
"%USERPROFILE%\Source" if it exists. Setting VSCMD_START_DIR overrides
this behavior.

PR-URL: https://github.com/nodejs/node/pull/14303
Fixes: https://github.com/nodejs/node/issues/14300
Refs: https://developercommunity.visualstudio.com/content/problem/26780/vsdevcmdbat-changes-the-current-working-directory.html
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-17 20:00:42 +03:00
Kyle Farnung
d48472c20f
build: split up cpplint to avoid long cmd lines
Refactors cpplint slightly to allow multiple runs of it. This allows
downstream projects to run cpplint on their dependencies.

PR-URL: https://github.com/nodejs/node/pull/14116
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2017-07-09 13:28:31 -04:00
Refael Ackermann
8206a01c99
build,win: skip vcvarsall.bat if env is set
PR-URL: https://github.com/nodejs/node/pull/13806
Fixes: https://github.com/nodejs/node/issues/13765
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-09 13:21:33 -04:00
Refael Ackermann
7022260b55 build: add async-hooks testing to vcbuild.bat
PR-URL: https://github.com/nodejs/node/pull/13381
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2017-07-01 22:02:45 -04:00
Refael Ackermann
9e5a2118cc build,windows: restore DISTTYPEDIR
* rename :exit to :distexit

PR-URL: https://github.com/nodejs/node/pull/13969
Refs: https://github.com/nodejs/node/pull/13900#pullrequestreview-46906389
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2017-06-30 16:12:07 -04:00
João Reis
c9cf7c2780 build,win: respect VS version for building addons
When building in machines with multiple versions of Visual Studio
installed, node-gyp should respect the vs2015/vs2017 arguments passed
to vcbuild.bat instead of relying on its own detection mechanism.

PR-URL: https://github.com/nodejs/node/pull/13911
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-30 19:21:32 +01:00
João Reis
e783475412 build,win: use latest installed VS by default
vcbuild.bat should detect what version of Visual Studio to use, it
should simply work without any parameter if any supported version is
installed. It should default to the latest version, to match the
behavior of `node-gyp`.

PR-URL: https://github.com/nodejs/node/pull/13911
Fixes: https://github.com/nodejs/node/issues/13641
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-30 19:20:07 +01:00
Refael Ackermann
614dbbd728 build,windows: implement PEP514 python detection
PR-URL: https://github.com/nodejs/node/pull/13900
Fixes: https://github.com/nodejs/node/issues/13882
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-28 11:46:24 -04:00
Rich Trott
22436b055d build: check for linter in bin rather than lib
Make the "can we lint?" check in Makefile and vcbuild.bat depend on
bin/eslint.js rather than lib/eslint.js. In ESLint 4.0.0, lib/eslint.js
is not present. The lint rules call bin/eslint.js so check for that
instead.

PR-URL: https://github.com/nodejs/node/pull/13645
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-17 12:56:50 -07:00
Roman Reiss
ecf6a46d98
src,lib,test,doc: correct misspellings
PR-URL: https://github.com/nodejs/node/pull/13719
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-17 19:17:46 +02:00
Gibson Fahnestock
b7473c2117 build: fail linter if linting not available
PR-URL: https://github.com/nodejs/node/pull/13658
Ref: https://github.com/nodejs/node/pull/13645#issuecomment-308100452
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@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: Tobias Nießen <tniessen@tnie.de>
2017-06-16 09:34:34 -07:00
Refael Ackermann
780acc2208 build,windows: check for VS version and arch
PR-URL: https://github.com/nodejs/node/pull/13485
Fixes: https://github.com/nodejs/node/issues/13398
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-10 16:56:28 -04:00
Refael Ackermann
df02f391aa build: merge test suite groups
PR-URL: https://github.com/nodejs/node/pull/13378
Refs: https://github.com/nodejs/node/pull/13340
Refs: https://github.com/nodejs/node/pull/13336
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2017-06-10 13:22:16 -04:00
Nikolai Vavilov
3fe980d3e6 build: fix typo
PR-URL: https://github.com/nodejs/node/pull/13396
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-02 16:14:56 +03:00
Refael Ackermann
1c93e8c94b
win: make buildable on VS2017
* Set default to `vs2015` since `vs2017` is not CI-green yet
* changes vcbuild.bat arg from `vc2015` to `vs2015`/`vs2017`
  `vc` as in Visual C++ is actually versions 14.0 or 14.10
  `vs` as in Visual Studio is 2015 or 2017
  Ref: http://lists.boost.org/Archives/boost/2017/03/233597.php 🤦
* keep `vc2015` for backward compatibility but "undocumented"
* tools: transplant vswhere wrapper from `msvs-com-helper`
  Ref: https://github.com/node4good/msvs-com-helper

PR-URL: https://github.com/nodejs/node/pull/11852
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-05 10:36:05 +02:00
Tony Rice
e488857402
build: add static option to vcbuild.bat
Passes --enable-static to ./configure.

PR-URL: https://github.com/nodejs/node/pull/12764
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-03 15:20:55 +02:00
Brian White
7a5bac5d36
build: add target for checking for perm deopts
PR-URL: https://github.com/nodejs/node/pull/12456
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-30 03:17:25 -04:00
Vse Mozhet Byt
42dca99cd7 doc, tools: add doc linting to CI
PR-URL: https://github.com/nodejs/node/pull/12640
Fixes: https://github.com/nodejs/node/issues/12635
Refs: https://github.com/nodejs/node/pull/12563
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-25 22:44:09 +03:00
Sam Roberts
f2282bb812 src: allow CLI args in env with NODE_OPTIONS
Not all CLI options are supported, those that are problematic from a
security or implementation point of view are disallowed, as are ones
that are inappropriate (for example, -e, -p, --i), or that only make
sense when changed with code changes (such as options that change the
javascript syntax or add new APIs).

PR-URL: https://github.com/nodejs/node/pull/12028
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2017-04-25 09:59:54 -07:00
Vse Mozhet Byt
b4fea2a3d6 doc: add eslint-plugin-markdown
* install eslint-plugin-markdown
* add doc/.eslintrc.yaml
* add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->`
  for the rest of problematic code
* .js files in doc folder added to .eslintignore
* update Makefile and vcbuild.bat

PR-URL: https://github.com/nodejs/node/pull/12563
Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-04-25 00:06:17 +03:00
Sebastian Van Sande
3d2181c5f0 test: run the addon tests last
Running the addon tests before the parallel, sequential, etc. tests
can be a problem if there is a bug in node that prevents the
addon tests from running properly. When the addon tests fail for any
reason, then none of the other tests (e.g. parallel, etc.)
are executed.

Running the addon tests last fixes this.

Refs: https://github.com/nodejs/node/issues/12031
PR-URL: https://github.com/nodejs/node/pull/12062
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-04-13 18:34:29 -04:00
João Reis
6cfedf0481 build,win: limit maxcpucount to 2 for MSBuild
MSBuild invokes cl.exe with /MP (set in common.gypi), making it
compile sources in parallel using a number of internal processes
equal to the number of effective processors. MSBuild /m uses a
similar mechanism, so the number of compiler processes can grow to
the number of effective processors squared.

This limits MSBuild to 2 processes, to still use some parallelization
while requiring less memory. Cl.exe is still invoked with /MP, thus
the maximum number of processes is limited to twice the number of
effective processors.

PR-URL: https://github.com/nodejs/node/pull/12184
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-11 11:24:40 +01:00
Jason Ginchereau
56e881d0b0
n-api: add support for abi stable module API
Add support for abi stable module API (N-API) as "Experimental feature".
The goal of this API is to provide a stable Node API for native
module developers. N-API aims to provide ABI compatibility guarantees
across different Node versions and also across different
Node VMs - allowing N-API enabled native modules to just work
across different versions and flavors of Node.js without recompilation.

A more detailed introduction is provided in:
https://github.com/nodejs/node-eps/blob/master/005-ABI-Stable-Module-API.md
and https://github.com/nodejs/abi-stable-node/blob/doc/VM%20Summit.pdf.

The feature, during its experimental state, will be guarded by a runtime
flag "--napi-modules". Only when this flag is added to the command line
will N-API modules along with regular non N-API modules be supported.

The API is defined by the methods in "src/node_api.h" and
"src/node_api_types.h". This is the best
starting point to review the API surface. More documentation will follow.

In addition to the implementation of the API using V8, which is included
in this PR, the API has also been validated against chakracore and that
port is available in
https://github.com/nodejs/abi-stable-node/tree/api-prototype-chakracore-8.x.

The current plan is to provide N-API support in versions 8.X and 6.X
directly. For older versions, such as 4.X or pre N-API versions of 6.X,
we plan to create an external npm module to provide a migration path
that will allow modules targeting older Node.js versions to use the API,
albeit without getting the advantage of not having to recompile.

In addition, we also plan an external npm package with C++ sugar to
simplify the use of the API. The sugar will be in-line only and will
only use the exported N-API methods but is not part of the N-API
itself. The current version is in:
https://github.com/nodejs/node-api.

This PR is a result of work in the abi-stable-node repo:
https://github.com/nodejs/abi-stable-node/tree/doc,
with this PR being the cumulative work on the api-prototype-8.x
branch with the following contributors in alphabetical order:

Author: Arunesh Chandra <arunesh.chandra@microsoft.com>
Author: Gabriel Schulhof <gabriel.schulhof@intel.com>
Author: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Author: Ian Halliday <ianhall@microsoft.com>
Author: Jason Ginchereau <jasongin@microsoft.com>
Author: Michael Dawson <michael_dawson@ca.ibm.com>
Author: Sampson Gao <sampsong@ca.ibm.com>
Author: Taylor Woll <taylor.woll@microsoft.com>
PR-URL: https://github.com/nodejs/node/pull/11975
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-03 10:31:25 +02:00
Morgan Brenner
a8a042a6d3 build: add lint option to vcbuild.bat help
PR-URL: https://github.com/nodejs/node/pull/11992
Fixes: https://github.com/nodejs/node/issues/11971
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-24 08:22:39 -07:00
liusi
379eec357d build: add cpp linting to windows build
This PR adds cpp linting to windows build script. After this change,
running command `vcbuild lint` will run both cpp linting and javascript
linting on a windows machine.

PR-URL: https://github.com/nodejs/node/pull/11856
Fixes: https://github.com/nodejs/node/issues/11816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-17 09:22:46 -07:00
Nikolai Vavilov
d08836003c build: build an x64 build by default on Windows
PR-URL: https://github.com/nodejs/node/pull/11537
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-02-28 13:41:03 +02: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
Nikolai Vavilov
7cd6a7ddcb build: notify about the redundancy of "nosign"
vcbuild doesn't sign by default since
92ed1ab450, but there might be people who
haven't noticed the change. This adds a message informing them that
"nosign" is no longer necessary.

PR-URL: https://github.com/nodejs/node/pull/11119
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-02-03 20:35:10 +02:00
Joe Doyle
92ed1ab450 build: change nosign flag to sign and flips logic
Makes the default build on Windows not try to sign the node.exe
binary after a build. Instead the 'sign' flag now indicates that the
binary should be signed. The 'nosign' flag is left as a noop.

Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/10156
2016-12-18 01:19:34 +00:00
Rich Trott
eed8b0525c test: move tick-processor tests to own directory
The tick-processor tests are inherently non-deterministic. They
therefore have false negatives from time to time. They also
sometimes leave extra processes running.

Move them to their own directory until these issues are sorted. Note
that this means that the tests will not be run in CI. Like the inspector
tests and other tests, they will have to be run manually when they are
wanted.

PR-URL: https://github.com/nodejs/node/pull/9506
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matthew Loring <mattloring@google.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-09 19:34:56 -08:00
Rod Vagg
7014566273 win,build: try multiple timeservers when signing
PR-URL: https://github.com/nodejs/node/pull/9155
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: João Reis <reis@janeasystems.com>
2016-10-19 00:11:02 +11:00
João Reis
75a970bac3 win,tools: ignore linting for line breaks
Line breaks on Windows should be CRLF, but Node also supports LF.
Hence, do not check line breaks on Windows, when running
vcbuild jslint.

Fixes: https://github.com/nodejs/node/issues/6912
PR-URL: https://github.com/nodejs/node/pull/8785
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-07 10:56:02 -07:00
Ben Noordhuis
a63dd852b4 build: run cctests as part of test-ci target
Enable the cctests on the CI now that they know how to write TAP output.

PR-URL: https://github.com/nodejs/node/pull/8034
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-03 19:47:50 +02:00
Ben Noordhuis
a3f861de9d build: remove VS 2013 switch from vcbuild.bat
Support for Visual Studio 2013 has officially been dropped, remove the
build option for that compiler.

PR-URL: https://github.com/nodejs/node/pull/8067
Refs: https://github.com/nodejs/node/issues/7484
Refs: https://github.com/nodejs/node/pull/8049
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joao Reis <reis@janeasystems.com>
2016-09-23 18:06:06 +02:00
Eugene Ostroukhov
b4a249f66b inspector: introduce a smoke test
This test executes a simple debug session over the inspector protocol.

PR-URL: https://github.com/nodejs/node/pull/8429
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-19 12:40:16 -07:00
João Reis
137b7cb67f win,build: forward release_urlbase to configure
The RELEASE_URLBASE environment variable is used in releases as
a prefix for links in the process.release object. The Makefile picks
it and forwards it to configure, but vcbuild.bat did not. Hence, in
Windows, Node releases have a correct process.release because it uses
the default URL, but nightlies, RCs and so on do not, breaking
node-gyp. This enables native modules to be built with such versions
of Node.

PR-URL: https://github.com/nodejs/node/pull/8430
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
2016-09-09 13:15:52 +02:00
João Reis
446c9cdb02 win,build: exit when addons fail to build
PR-URL: https://github.com/nodejs/node/pull/8412
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-09-08 01:03:35 +01:00
João Reis
b57c962979 win,build: skip finding VS when not needed
PR-URL: https://github.com/nodejs/node/pull/8412
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-09-08 01:02:47 +01:00
João Reis
292168eb6d win,build: fail on invalid option in vcbuild
PR-URL: https://github.com/nodejs/node/pull/8412
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-09-08 01:01:00 +01:00
Rich Trott
5a7a6d9b01 tools: enable caching for jslint task
PR-URL: https://github.com/nodejs/node/pull/8296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-08-30 10:42:25 -07:00
Richard Lau
18017d675b build: add missing files to zip and 7z packages
Add nodevars.bat, node_etw_provider.man and node_perfctr_provider.man
to the zip and 7z packages.

PR-URL: https://github.com/nodejs/node/pull/8069
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-08-25 17:37:16 -04:00
Rich Trott
dbbbf217de build: do not lint src dir for JS errors
There are no JavaScript files in the `src` directory. It can be
safely omitted from the JavaScript linting step.

PR-URL: https://github.com/nodejs/node/pull/8128
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-18 14:39:23 -07:00
Rich Trott
e313c0286b tools: update to ESLint 3.2.2
PR-URL: https://github.com/nodejs/node/pull/7999
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-08-09 21:19:02 -07:00
Stefan Budeanu
88e862ba82 build: windows sharedlib support
Added "dll" option to vcbuild.bat
Insure that Unix SO name is not used on Windows (i.e. produce a .dll file)
Insure that Node and its V8 dependency link against the Visual C++ Runtime
dynamically.
Requires backported V8 patch, see PR 7802.

Ref: https://github.com/nodejs/node/pull/7802

PR-URL: https://github.com/nodejs/node/pull/7487
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-08-05 09:27:48 -04:00
Rich Trott
cbbddc4fb0 tools: increase lint coverage
Extend linting to tools/license2rtf.js and any other JS that gets added
to the `tools` directory by default.

This incidentally simplifies lint invocation.

PR-URL: https://github.com/nodejs/node/pull/7647
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-07-13 11:17:33 -07:00
Bartosz Sosnowski
2369f89a03 win,build: add creation of zip and 7z package
Add a step in vcbuild.bat to create a minimal package including node
and npm that can be used as an alternative to the MSI.

Compress the node.pdb file as zip and 7z.

All files are uploaded as part of build-release.

Reviewed-By: Joao Reis <reis@janeasystems.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
PR-URL: https://github.com/nodejs/node/pull/5995
Fixes: https://github.com/nodejs/build/issues/299
Fixes: https://github.com/nodejs/node/issues/5696
2016-05-31 11:51:59 +01:00