Compare commits

...

439 Commits

Author SHA1 Message Date
Jeremy Whitlock
76577e7077 domains: port fix abort on uncaught to v0.12
Port fbff705 and caeb677 from v0.10 to v0.12, original commit messages:

  fbff705
  Add v8::Isolate::SetAbortOnUncaughtException() so the user can be
  notified when an uncaught exception has bubbled.

  caeb677
  Do not abort the process if an error is thrown from within a domain,
  an error handler is setup for the domain and
  --abort-on-uncaught-exception was passed on the command line.

  However, if an error is thrown from within the top-level domain's
  error handler and --abort-on-uncaught-exception was passed on the
  command line, make the process abort.

Fixes: #8877

Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
PR-URL: https://github.com/joyent/node/pull/25835
2015-08-13 11:23:11 -07:00
Julien Valéry
9a6f1ce416 comma
PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:49 -04:00
Chad Walker
b03ab02fe8 doc: Change the link for v8 docs to v8dox.com
No offense to @izs, but the doxygen he put up 3.5 years ago isn't
accurate for node 0.12 nor io.js. I'm trying to keep up and have
multiple sets of doxygen of v8 available at http://v8dox.com/

PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:49 -04:00
Dyana Rose
1fd8f37efd doc: buffer, adding missing backtick
PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:48 -04:00
daveboivin
d384bf8f84 Update assert.markdown
The current wording "This module is used for writing unit tests for your applications, you can access it with require('assert')." implies that this module should only be used in development while unit testing.

The article "Error Handling in Node.js" by Joyent (https://www.joyent.com/developers/node/design/errors) uses the assert module in an efficient way to validate required function arguments.

PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:48 -04:00
Andrew Murray
89b22ccbe1 Fixed typo
PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:48 -04:00
James M Snell
162d0db3bb doc: tls.markdown, adjust version from v0.10.39 to v0.10.x
per https://github.com/joyent/node/pull/25591#discussion_r34824389

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
James M Snell
eda2560cdc doc: additional refinement to readable event
Per https://github.com/joyent/node/pull/25635#discussion_r33973696

Additional refinement to the clarification on the `readable` event

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
James M Snell
881d9bea01 doc: readable event clarification
per https://github.com/joyent/node/issues/14597

Indicate that `'readable'` indicates only that data can
be read from the stream, not that there is actually data
to be consumed. `readable.read([size])` can still return
null. Includes an example that illustrates the point.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
James M Snell
b6378f0c75 doc: stream.unshift does not reset reading state
Per https://github.com/joyent/node/issues/14604,

Document that performing an `unshift` during a read
can have unexpected results. Following the `unshift`
with a `push('')` resets the reading state appropriately.
Also indicate that doing an `unshift` during a read
is not optimal and should be avoided.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
Daniel Rentz
5ad05af380 Update util.markdown
Fix for https://github.com/joyent/node/issues/25559 (Typo in example of util.deprecate() documentation)

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:42 -07:00
fresheneesz
4952e2b4d2 doc: clarify Readable._read and Readable.push
Minor clarifications around Readable._read and Readable.push
to make their implementation/usage easier to understand.

https://github.com/joyent/node/issues/14124#issuecomment-115392674

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:42 -07:00
James M Snell
14000b97d4 doc: two minor stream doc improvements
per: https://github.com/joyent/node/issues/14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:42 -07:00
Benjamin Steephenson
8cbf7cb021 docs:events clarify emitter.listener() behavior
Clarifies that emitter.listener() returns a copy, not a reference
Resolves issue #9022

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:41 -07:00
Philippe Laferriere
6b6bd21497 doc: Clarified read method with specified size argument.
Made explicitely clear that when size bytes are not available, it will
return null, unless we've ended, in which case the data remaining in the
buffer will be returned.

Fixes #7273

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:41 -07:00
Jared Fox
cb660ab3d3 Update child_process.markdown, spelling
'the' to 'then'

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:41 -07:00
Michele Caini
59c67fe3cd updated documentation for fs.createReadStream
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:40 -07:00
Ville Skyttä
5ccb429ee8 doc, comments: Grammar and spelling fixes
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:40 -07:00
Ville Skyttä
16f547600a doc: Document http.request protocol option
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:40 -07:00
James M Snell
618e4ecda9 doc: add a note about readable in flowing mode
Original: https://github.com/joyent/node/pull/8682

Slightly modified version of the original PR (#8682) to add
appropriate line wrapping and fix a couple of grammar nits.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
James M Snell
0b165be37b doc: fix line wrapping in buffer.markdown
Fix the line wrapping in buffer.markdown

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
Sarath
53b6a615a5 Documentation update about Buffer initialization
fixes #7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
Chris Neave
b7229debbe docs: Fix default options for fs.createWriteStream()
The documentation for createWriteStream() references an
'encoding' property that has a default value of null. However,
this property is never referenced by createWriteStream() or
WritableState(). Instead a 'defaultEncoding' property is
referenced in WritableState() with a default of 'utf8' if no value
is supplied.

This fix updates the documentation to rename the 'encoding'
property to 'defaultEncoding' and indicate its default value of
'utf8'.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
James M Snell
70dd13f88d doc: add CleartextStream deprecation notice
Per: https://github.com/joyent/node/issues/8017

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:38 -07:00
James M Snell
418cde0765 doc: mention that mode is ignored if file exists
per: https://github.com/joyent/node/issues/6847

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:38 -07:00
James M Snell
85bcb281e4 doc: improve http.abort description
Per #4409, the documentation on http.abort is a bit lacking.
This provides a slight improvement.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:38 -07:00
Alexis Campailla
cf435d55db test: mark test-signal-unregister as flaky
This test just failed on Ubuntu in Jenkins, for a change that
is 100% Windows-specific.

Reviewed-By: Joao Reis <reis@janeasystems.com>
PR-URL: https://github.com/joyent/node/pull/25750
2015-07-24 02:04:43 -07:00
João Reis
ceb6a8c131 test: fix test-debug-port-from-cmdline
This change is a backport of 2b4b6006607c33a5699ec53afaf40f987dc11895
from io.js.

Original commit message:

  This test was failing because the spawned process was terminated
  before anything could be done, by calling child.stdin.end. With this
  change, the child's stdin is no longer closed. When the stdin is not
  a tty, io.js waits for the whole input before starting, so the child
  must be run with --interactive to process the command sent by the
  parent. The child is killed explicitly by the parent before it exits.

  This test was failing silently because the asserts were not called if
  nothing was received from the child. This fix moves assertOutputLines
  to always run on exit.

  Fixes: https://github.com/nodejs/io.js/issues/2177
  Refs: https://github.com/nodejs/io.js/issues/2094
  PR-URL: https://github.com/nodejs/io.js/pull/2186
  Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  Reviewed-By: Rod Vagg <rod@vagg.org>
  Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  Reviewed-By: Alexis Campailla <alexis@janeasystems.com>

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25748
2015-07-23 08:18:33 -07:00
João Reis
14db629497 win,msi: correct installation path registry keys
Since install is per machine only, installation path should be stored
in local machine instead of current user. The registry stores HKLM in
different places for 32 and 64 bit applications, so the installer will
not suggest the old path when upgrading from 32 to 64 bit version.

Fixes #5592
Fixes #25087

PR-URL: https://github.com/joyent/node/pull/25640
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-07-22 09:30:11 -04:00
João Reis
8e80528453 win,msi: change InstallScope to perMachine
The MSI install scope was set to the WiX default, which is per-user.
However, with UAC, it could not be installed by a standard user because
InstallPrivileges is elevated by default, hence the install scope
should be set to per-machine. Furthermore, the default install path is
a per-machine location and setting the system path requires
administrator privileges.

By changing the InstallScope to perMachine, Start Menu shortcuts are
placed in ProgramData and not the installing user's AppData folder,
making the shortcuts available to other users. This also fixes the
installation when AppData is a network folder.

The custom action is necessary to allow upgrades. Since a per-machine
MSI cannot upgrade an application installed per-user, the custom action
checks if there is going to be an upgrade to a previous version
installed per-user and sets the installation as per-user to allow
upgrading. Hence, the advantages of installing per-machine will only
apply in fresh installations.

Fixes #5849
Fixes #7629

PR-URL: https://github.com/joyent/node/pull/25640
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-07-22 09:30:11 -04:00
Fedor Indutny
b8d47a7b6f fix
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/25739
2015-07-20 11:47:07 -07:00
Fedor Indutny
22997731e6 test: add regression test for #25735
See: https://github.com/joyent/node/issues/25736

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/25739
2015-07-20 11:47:06 -07:00
Fedor Indutny
75697112e8 tls: do not hang without newSession handler
When listening for client hello parser events (like OCSP requests), do
not hang if `newSession` event handler is not present.

Fix: https://github.com/joyent/node/issues/8660
Fix: https://github.com/joyent/node/issues/25735

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/25739
2015-07-20 11:47:06 -07:00
Julien Gilli
39e05639f4 test: mark http-pipeline-flood flaky on win32
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25707
2015-07-17 11:46:04 -07:00
cgalibern
8b81f98c41 configure: add --without-mdb flag
Add a configuration flag that prevents mdb_v8.so from being built.
The default behavior is still the same and mdb_v8.so is built by default
on Solaris based platforms such as SmartOS.

Using --without-mdb fixes build issues on Solaris based platforms where
libproc.h is not available or not compatible with the one shipped by
SmartOS.

Fixes #6439.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25707
2015-07-17 11:46:03 -07:00
João Reis
78d256e7f5 test: unmark tests that are no longer flaky
- `test-crypto-domains` was fixed by
joyent/node@2afa3d8a03

- All tests under linux appear to be fixed and have not failed recently
on Jenkins

- `test-http-dns-fail` was fixed by the DNS configuration change
mentioned in joyent/node#8056

Fixes #25656
Fixes #25673

Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
PR-URL: https://github.com/joyent/node/pull/25676
2015-07-16 02:10:08 -07:00
Alexis Campailla
1083fa70f0 build: run-ci makefile rule
Adding a single rule to be called from Jenkins.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25653
2015-07-10 10:06:25 -07:00
Alexis Campailla
a9b642cf5b test: runner should return 0 on flaky tests
Make the test runner return a 0 exit code when only
flaky tests fail and --flaky-tests=dontcare is specified.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25653
2015-07-10 10:06:24 -07:00
Alexis Campailla
2d2494cf14 build: support flaky tests in test-ci
Adding support for specifying flaky test mode to
the test runner:
- via an environment variable FLAKY_TESTS for Makefile
- via an argument ignore-flaky for vcbuild.bat

Conflicts:
	Makefile

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25653
2015-07-10 10:06:24 -07:00
Alexis Campailla
b25d26f2ef build: support Jenkins via test-ci
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25653
2015-07-10 10:06:24 -07:00
Johan Bergström
d998a65058 tools: pass constant to logger instead of string
On a few of our installations (namely CentOS), passing 'INFO'
resulted in a silent loglevel. Use a logging constant instead.

Cherry-picked from 8606793999
Original commit metadata follows:
  Fixes: https://github.com/nodejs/build/issues/104
  PR-URL: https://github.com/nodejs/io.js/pull/1842
  Reviewed-By: Rod Vagg <rod@vagg.org>

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25653
2015-07-10 10:06:21 -07:00
Alexis Campailla
b48639befd test: support writing test output to file
This is a minimal effort to support test output written both to
stdout and file in order to get our buildbots understanding
test output.

Cherry picked from 31940738e2
Original commit message follows:
  PR-URL: https://github.com/iojs/io.js/pull/934
  Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
  Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

Conflicts:
	tools/test.py

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25653
2015-07-10 10:06:19 -07:00
Julien Gilli
b8ac6584fa Now working on 0.12.8 2015-07-09 16:52:08 -07:00
Julien Gilli
bd68784dee Merge branch 'v0.12.7-release' into v0.12 2015-07-09 16:51:47 -07:00
Julien Gilli
d3492aa7b3 2015.07.09, Version 0.12.7 (Stable)
* openssl: upgrade to 1.0.1p (CVE-2015-1793)

* npm: upgrade to 2.11.3

* V8: cherry-pick JitCodeEvent patch from upstream (Ben Noordhuis)

* win,msi: create npm folder in AppData directory (Steven Rockarts)
2015-07-09 15:41:19 -07:00
Julien Gilli
9c5e9fc155 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	AUTHORS
	ChangeLog
	deps/v8/src/log.cc
	src/node_version.h
2015-07-09 15:30:29 -07:00
Julien Gilli
e5aaa34ba0 Now working on 0.10.41 2015-07-09 14:58:52 -07:00
Julien Gilli
26bb1ad137 Merge branch 'v0.10.40-release' into v0.10 2015-07-09 14:58:16 -07:00
Julien Gilli
0439a28d51 2015.07.09, Version 0.10.40 (Maintenance)
* openssl: upgrade to 1.0.1p

* V8: back-port JitCodeEvent patch from upstream (Ben Noordhuis)

* win,msi: create npm folder in AppData directory (Steven Rockarts)
2015-07-09 14:19:36 -07:00
Shigeki Ohtsu
c5d7b31528 openssl: fix keypress requirement in apps on win32
reapply b910613792dac946b295855963869933a9089044

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>

PR: #25654
PR-URL: https://github.com/joyent/node/pull/25654
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-07-09 14:09:03 -07:00
Fedor Indutny
7ad593877e deps: fix openssl assembly error on ia32 win32
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>

PR: #25654
PR-URL: https://github.com/joyent/node/pull/25654
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-07-09 14:09:03 -07:00
Shigeki Ohtsu
984e7f9e40 deps: separate sha256/sha512-x86_64.pl for openssl
sha256-x86_64.pl does not exist in the origin openssl distribution. It
was copied from sha512-x86_64.pl and both sha256/sha512 scripts were
modified so as to generates only one asm file specified as its key
hash length.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>

PR: #25654
PR-URL: https://github.com/joyent/node/pull/25654
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-07-09 14:09:03 -07:00
Shigeki Ohtsu
8277822344 deps: copy all openssl header files to include dir
All symlink files in `deps/openssl/openssl/include/openssl/`
 are removed and replaced with real header files to avoid
issues on Windows.

PR: #25654
PR-URL: https://github.com/joyent/node/pull/25654
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-07-09 14:09:03 -07:00
Shigeki Ohtsu
0cf9f27703 deps: upgrade openssl sources to 1.0.1p
This just replaces all sources of openssl-1.0.1p.tar.gz
into deps/openssl/openssl.

PR: #25654
PR-URL: https://github.com/joyent/node/pull/25654
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-07-09 14:09:03 -07:00
Julien Gilli
6b489e62d0 Now working on 0.12.7 2015-07-03 19:35:14 -07:00
Julien Gilli
9d3288c843 Merge branch 'v0.12.6-release' into v0.12 2015-07-03 19:34:23 -07:00
Julien Gilli
0be9a77bb1 2015.07.03, Version 0.12.6 (Stable)
* V8: fix out-of-band write in utf8 decoder
2015-07-03 17:33:28 -07:00
Fedor Indutny
78b0e30954 deps: fix out-of-band write in utf8 decoder
Originally reported by: Kris Reeves <kris.re@bbhmedia.com>

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-07-03 17:32:01 -07:00
Michael Dawson
dbda13abb6 test: Fix test-npm Makefile target for npm 2.8.4
Changes in npm 2.8.4 broke the test-npm target.  This change
updates to allow the tests to run once again

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25294
2015-07-02 15:08:08 -07:00
João Reis
8294f32cff test: mark microtask-queue-run(-domain) as flaky
test-microtask-queue-run and test-microtask-queue-run-domain fail very
rarely at least on linux x64, windows 2012r2 x64 and smartos x86

Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
PR-URL: https://github.com/joyent/node/pull/25606
2015-07-02 11:01:46 -07:00
Steven Rockarts
4ffbce417c win,msi: create npm folder in AppData directory
Create the empty npm folder in Roaming\Appdata so that non-Administrator
users have a place to store global packages. This fixes the error Error:
ENOENT, stat error that occurs when a user tries to run the npm install
<package> command.

Bug: https://github.com/joyent/node/issues/8141
PR: https://github.com/joyent/node/pull/8838
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2015-07-01 11:06:52 -07:00
Steven Rockarts
18d413d299 win,msi: create npm folder in AppData directory
Create the empty npm folder in Roaming\Appdata so that non-Administrator
users have a place to store global packages. This fixes the error Error:
ENOENT, stat error that occurs when a user tries to run the npm install
<package> command.

Bug: https://github.com/joyent/node/issues/8141
PR: https://github.com/joyent/node/pull/8838
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2015-07-01 11:06:07 -07:00
yangguo@chromium.org
13ea50e927 V8: remove V8_HOST_CAN_READ_UNALIGNED and its uses
Fixes segfault in 32bit SmartOS when built with GCC 4.9.

This is the second of two backports from upstream v8:
1. 90dc5c9e66
2. 7cb82a76b4

Original commit message:

  Reland "Remove V8_HOST_CAN_READ_UNALIGNED and its uses."

  BUG=chromium:412967
  LOG=N
  R=jkummerow@chromium.org

  Review URL: https://codereview.chromium.org/571903002

  git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

V8 issue: https://code.google.com/p/chromium/issues/detail?id=412967

Fixes #25281

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25556
2015-07-01 08:37:03 -07:00
yangguo@chromium.org
48b0ca2616 V8: do not use wide reads in CopyCharsUnsigned
Fixes segfault in 32bit SmartOS when built with GCC 4.9.

This is the first of two backports from upstream v8:
1. 90dc5c9e66
2. 7cb82a76b4

Original commit message:

  Do not use wide reads in CopyCharsUnsigned.

  R=jkummerow@chromium.org
  BUG=chromium:412967
  LOG=Y

  Review URL: https://codereview.chromium.org/566583002

  git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

V8 issue: https://code.google.com/p/chromium/issues/detail?id=412967

Fixes #25281

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25556
2015-07-01 08:37:03 -07:00
Ben Noordhuis
88a27a9621 v8: cherry-pick JitCodeEvent patch from upstream
Original commit log follows:

    Meaningful name for builtins in JitCodeEvent API.

    Report builtins by name (e.g. "Builtin:ArgumentsAdaptorTrampoline")
    instead of labeling everything "Builtin:A builtin from the snapshot"

    Review URL: https://codereview.chromium.org/1216833002

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25589
2015-06-29 13:48:15 -07:00
Ben Noordhuis
5a60e0d904 v8: back-port JitCodeEvent patch from upstream
Original commit log follows:

    Meaningful name for builtins in JitCodeEvent API.

    Report builtins by name (e.g. "Builtin:ArgumentsAdaptorTrampoline")
    instead of labeling everything "Builtin:A builtin from the snapshot"

    Review URL: https://codereview.chromium.org/1216833002

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25588
2015-06-29 13:35:22 -07:00
Ben Noordhuis
5fc4fb108b src: fix signed/unsigned comparison warning
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25588
2015-06-29 13:35:22 -07:00
Forrest L Norvell
8917e430b8 deps: upgrade to npm 2.11.3
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25545
2015-06-26 12:52:29 -07:00
Julien Gilli
c3e02aeba6 Now working on 0.12.6 2015-06-22 12:53:07 -07:00
Julien Gilli
e359e01f93 Merge branch 'v0.12.5-release' into v0.12 2015-06-22 12:52:51 -07:00
Julien Gilli
61c6abf008 2015.06.22, Version 0.12.5 (Stable)
* openssl: upgrade to 1.0.1o (Addressing multiple CVEs)

* npm: upgrade to 2.11.2

* uv: upgrade to 1.6.1

* V8: avoid deadlock when profiling is active (Dmitri Melikyan)

* install: fix source path for openssl headers (Oguz Bastemur)

* install: make sure opensslconf.h is overwritten (Oguz Bastemur)

* timers: fix timeout when added in timer's callback (Julien Gilli)

* windows: broadcast WM_SETTINGCHANGE after install (Mathias Küsel)
2015-06-22 11:22:53 -07:00
Julien Gilli
f50c37d993 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	AUTHORS
	ChangeLog
	lib/timers.js
	src/node_version.h
	test/common.js
2015-06-22 11:11:51 -07:00
Julien Gilli
6f8400a11c Now working on 0.10.40 2015-06-22 09:45:56 -07:00
Julien Gilli
3a1d4b7257 Merge branch 'v0.10.39-release' into v0.10 2015-06-22 09:45:28 -07:00
Julien Gilli
615a35ccd2 2015.06.18, Version 0.10.39 (Maintenance)
* openssl: upgrade to 1.0.1o (Addressing multiple CVEs)

* install: fix source path for openssl headers (Oguz Bastemur)

* install: make sure opensslconf.h is overwritten (Oguz Bastemur)

* timers: fix timeout when added in timer's callback (Julien Gilli)

* windows: broadcast WM_SETTINGCHANGE after install (Mathias Küsel)
2015-06-18 22:57:52 -07:00
Julien Gilli
dcb7ef2e40 tls: revert disable RC4 and cipher lists changes
This reverts commit 67d9a56251.

This commit actually reverts both
67d9a56251 and
02a549ed2b (both related to ciphers list
changes). It does it in one commit because reverting
02a549ed2b results in an empty commit.

These changes are not yet ready to be released, and before they are we
want to be able to publish new releases. We're reverting them so that we
can submit a new PR that will contain all these changes plus what's
necessary to be able to land them properly.

Conflicts:
	src/node.cc

PR: #25511
PR-URL: https://github.com/joyent/node/pull/25511
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-18 22:37:10 -07:00
Rebecca Turner
20d8db1a42 deps: upgrade to npm 2.11.2
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25517
2015-06-18 16:29:39 -07:00
Shigeki Ohtsu
139dbe8bb7 test: remove 512 bits test in test-tls-dhe.js
Test of 512 bits key is failed after upgrading openssl-1.0.1o due to
its limit of 768 bits key size. Remove it and start from 1024 bits
test.

Reviewed-By: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/joyent/node/pull/25533
2015-06-17 15:20:53 -07:00
Shigeki Ohtsu
9463cfae33 openssl: fix keypress requirement in apps on win32
reapply b910613792dac946b295855963869933a9089044

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-06-17 12:55:20 -07:00
Fedor Indutny
81e30a11ba deps: fix openssl assembly error on ia32 win32
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-06-17 12:55:20 -07:00
Shigeki Ohtsu
3937563d9a deps: separate sha256/sha512-x86_64.pl for openssl
sha256-x86_64.pl does not exist in the origin openssl distribution. It
was copied from sha512-x86_64.pl and both sha256/sha512 scripts were
modified so as to generates only one asm file specified as its key
hash length.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-06-17 12:55:20 -07:00
Shigeki Ohtsu
ee9545469d deps: replace all headers in openssl
Change all openssl/include/openssl/*.h to include resolved symbolic
links and openssl/crypto/opensslconf.h to refer config/opensslconf.h.

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-06-17 12:55:19 -07:00
Shigeki Ohtsu
456c22f63f deps: upgrade to openssl-1.0.1o
This just replaces all sources of openssl-1.0.1o.tar.gz into
deps/openssl/openssl.

PR: #25523
PR-URL: https://github.com/joyent/node/pull/25523
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-06-17 12:55:19 -07:00
Julien Gilli
d38e865fce timers: fix timeout when added in timer's callback
When a timer is added in another timer's callback, its underlying timer
handle will be started with a timeout that is actually incorrect.

The reason is that  the value that represents the current time is not
updated between the time the original callback is called and the time
the added timer is processed by timers.listOnTimeout. That leads the
logic in timers.listOnTimeout to do an incorrect computation that makes
the added timer fire with a timeout of scheduledTimeout +
timeSpentInCallback.

This change fixes that and make timers scheduled within other timers'
callbacks fire as expected.

Fixes #9333 and #15447.

PR: #17203
PR-URL: https://github.com/joyent/node/pull/17203
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-06-17 11:36:38 -07:00
Trevor Norris
097607c782 build: fix use of strict aliasing
The -fno-strict-aliasing flag was added to fix compilation warnings when
building Node.js with GCC <= 4.4

PR: #25141

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25475
2015-06-16 15:50:24 -07:00
Saúl Ibarra Corretgé
50f961596d deps: update libuv to version 1.6.1
Fixes: https://github.com/joyent/node/issues/9310

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25475
2015-06-16 15:50:23 -07:00
Kat Marchán
69967c67ab deps: upgrade to npm 2.11.1
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25482
2015-06-11 12:43:32 -07:00
Dmitri Melikyan
b81a643f9a V8: avoid deadlock when profiling is active
A deadlock happens when sampler initiated by SIGPROF tries to lock
the thread and the thread is already locked by the same thread. As
a result, other thread involved in sampling process hangs. The
patch adds a check for thread lock before continuing sampler
operation.

The fix has been tested on a sample app under load with and without
profiling turned on.

Fixes issue #14576 and specifically the duplicate issue #25295

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25309
2015-06-10 10:32:03 -07:00
Shigeki Ohtsu
10349829f2 test: add -no_rand_screen for tls-server-verify
This improves the performance of openssl s_client on Windows and
gains several seconds to finish test-tls-server-verify.

(cherry picked from commit 2ff517e0e410ea33ba5a3d289a82fc315d120e8e)

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:05 -07:00
Shigeki Ohtsu
fa4aa347eb deps: add -no_rand_screen to openssl s_client
In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.

(cherry picked from commit 9f0f7c38e6df975dd39735d0e9ef968076369c74)

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:04 -07:00
Shigeki Ohtsu
cb63d93e03 test: kill child in tls-server-verify for speed up
For better performance of the test, the parent kills child processes
so as not to wait them to be ended.

(cherry picked from commit 833b23636045f7afc929196139021630a390391a)

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:04 -07:00
Alexis Campailla
83b7c07421 test,win: re-enable tls-server-verify in CI
Now that the test is fixed, node-accept-pull-request should
fail when the test fails.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:04 -07:00
João Reis
29bbb32171 test: improve console output of tls-server-verify
When running in parallel, it is not easy to identify what server and
client failed when the test fails. This adds identifiers to all lines
of console output.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:03 -07:00
João Reis
6d3450511b test: run tls-server-verify servers in parallel
Different servers must use different ports. Since we can count only on
common.PORT and common.PORT+1, run only 2 servers in parallel.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:03 -07:00
João Reis
1191e651e4 test: running tls-server-verify clients in parallel
OpenSSL s_client introduces some delay on Windows. With all clients
running sequentially, this delay is big enough to break CI. This fix runs
the clients in parallel (unless the test includes renegotiation),
reducing the total run time.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25368
2015-06-04 05:24:03 -07:00
Julien Gilli
85d670e5a2 Now working on 0.12.5 2015-05-22 23:47:33 -07:00
Julien Gilli
1150bec595 Merge branch 'v0.12.4-release' into v0.12 2015-05-22 23:47:12 -07:00
Julien Gilli
0a604e92e2 2015.05.22, Version 0.12.4 (Stable)
* npm: upgrade to 2.10.1

* V8: revert v8 Array.prototype.values() removal (cjihrig)

* win: bring back xp/2k3 support (Bert Belder)
2015-05-22 20:06:54 -07:00
Rebecca Turner
202c18bbc3 deps: upgrade to npm 2.10.1
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25364
2015-05-22 18:14:57 -07:00
Bert Belder
3122052890 win: bring back xp/2k3 support
Issue: https://github.com/joyent/node/issues/25348
The gyp/project files don't explicitly specify a subsystem version,
which results in the default being used. The default changed from
VS 2010 to VS 2012 and later.

Backport e8d08503c7821e8c92e9fa236ed7328e9bdfe62a from io.js.
Original commit message follows:

Chrome still runs on Windows XP, so there is no reason that iojs
couldn't.

PR: https://github.com/iojs/io.js/pull/512
(cherry picked from commit e8d08503c7821e8c92e9fa236ed7328e9bdfe62a)

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25367
2015-05-22 14:20:57 -07:00
cjihrig
e23450fa81 test: Array.prototype.values() regression test
This commit adds a regression test for
https://github.com/joyent/node/issues/25324

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25328
2015-05-22 11:52:07 -07:00
cjihrig
6157697bd5 deps: revert v8 Array.prototype.values() removal
The Node 0.12 line was initially released with a version
of v8 that included Array.prototype.values(). In
https://github.com/joyent/node/pull/18206, v8 was
updated to a version that dropped support for values().
https://codereview.chromium.org/647703003 removed this
method because it causes problems with some versions of
Outlook Web Access. This commit reverts the removal of
Array.prototype.values().

Original commit message:

Revert "Version 3.28.71.17 (merged r24706, r24708)"

This reverts commit 529541ecb58fd0d6df4dfbe41d01bff9ae21ff06.

Conflicts:
	src/version.cc

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25328
2015-05-22 11:52:06 -07:00
Chad Johnston
a294aeef03 doc: Using ciphers with tls.connect()
Refs #25270,#25271

Reviewed-By: Michael Dawson <mhdawsonibm@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25325
2015-05-21 07:14:52 -07:00
Gireesh Punathil
ebbb3560fa test: relax timing constraints for child process
With additional load in the system, the child process which runs sleep
command takes more time to run - typically slightly above 1 second,
but above 2 seconds under stress.

While the intent of the test is to test the functionality of spawnSync
and the child process in general, in effect it is testing the system
command sleep, and further, it's responsiveness.

Since from the name the purpose of the test seems to be unrelated to
the sleep behaviour, I believe a more meaningful assertion would be to
see the time taken is more than 1 second.

Reviewed-By: Michael Dawson <mhdawsonibm@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25291
2015-05-14 16:46:10 -07:00
Michael Dawson
97d4706e81 test: delete simple/test-process-active-wraps
This test currently fails when run on machines without
IPv6 enabled. Futher it was delete in io.js under
3143d732f6efd82da76e9c53ad192ac14071bf70 as the test
was known to have problems across platforms and
releases.

The existing test was hard to understand so I wrote
a new version but then found exactly what was
reported in the io.js pull request.  Behaviour varies
across platforms such that writing a solid test would
either be infeasible or test so little that
it does not seem to make sense to keep it.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25326
2015-05-14 15:28:32 -07:00
Julien Gilli
d2395f717b Now working on 0.12.4 2015-05-13 19:37:33 -07:00
Julien Gilli
1ae392e35e Merge branch 'v0.12.3-release' into v0.12 2015-05-13 19:36:55 -07:00
Julien Gilli
03431c7d7b 2015.05.13, Version 0.12.3 (Stable)
* V8: update to 3.28.71.19

* uv: upgrade to 1.5.0

* npm: upgrade to 2.9.1

* V8: don't busy loop in v8 cpu profiler thread (Mike Tunnicliffe)

* V8: fix issue with let bindings in for loops (adamk)

* debugger: don't spawn child process in remote mode (Jackson Tian)

* net: do not set V4MAPPED on FreeBSD (Julien Gilli)

* repl: make 'Unexpected token' errors recoverable (Julien Gilli)

* src: backport ignore ENOTCONN on shutdown race (Ben Noordhuis)

* src: fix backport of SIGINT crash fix on FreeBSD (Julien Gilli)
2015-05-13 17:30:45 -07:00
Julien Gilli
72188d87d0 tls,crypto: revert recent cipher lists changes
Revert "disable RC4, add --cipher-list command line switch" and
"tls: make --enable-legacy-cipher-list=val less verbose"

This reverts commit f9291a9449 and
b5737bb977.

There is still some work to be done to guarantee secure defaults and a
smooth upgrade path for v0.12.x users. Before this work is finished, we
want to be able to release new versions of v0.12.x. So instead of
waiting for these changes to be ready to ship, revert them and integrate
them when they're ready to be shipped.

Conflicts:
	src/node.cc

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25296
2015-05-13 15:37:32 -07:00
Forrest L Norvell
03cfbd65fb deps: upgrade npm to 2.9.1
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/25289
2015-05-12 21:03:01 -07:00
Julien Gilli
101e103e3b repl: make 'Unexpected token' errors recoverable
Fix the regexp used to detect 'Unexpected token' errors so that they can
be considered as recoverable. This fixes the following use case:

> var foo = 'bar \
... baz';
undefined
> foo
'bar baz'
>

Fixes #8874

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8875
2015-05-12 17:38:06 -07:00
Alexis Campailla
0dbaee4a9b test,win: disable test-tls-server-verify for CI
test-tls-server-verify takes a lont time to execute and times
out on the Jenkins machines.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25284
2015-05-12 09:01:35 -07:00
Mike Tunnicliffe
80cdae855f deps: don't busy loop in v8 cpu profiler thread
Backport 6964a9e0685fa186d9d9b7907be17505e839db1a from upstream v8.

Original commit message:

  Make CPU profiler do not hog 100% of CPU.

  Tick event processor should not stay in a tight loop
  when there's nothing to do. It can go sleep until next sample event.

  LOG=N
  BUG=v8:3967
  Committed: https://crrev.com/6964a9e0685fa186d9d9b7907be17505e839db1a
  Cr-Commit-Position: refs/heads/master@{#28211}

Fixes #25137
Related: #9439, #8789

PR: #25268
PR-URL: https://github.com/joyent/node/pull/25268
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-05-11 18:14:55 -07:00
Trevor Norris
e1cc263ce8 build: fix use of strict aliasing
The -fno-strict-aliasing flag was added to fix compilation warnings when
building Node.js with GCC <= 4.4

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179

PR: #25141
PR-URL: https://github.com/joyent/node/pull/25141
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-05-11 18:04:05 -07:00
Saúl Ibarra Corretgé
84f1ab6114 deps: update libuv to 1.5.0
PR: #25141
PR-URL: https://github.com/joyent/node/pull/25141
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-05-11 18:03:51 -07:00
Mathias Küsel
e7c84f82c7 win,msi: broadcast WM_SETTINGCHANGE after install
Backport 668bde8ac0d16382cbc98c904d8b5f55fd9fd9f0 from io.js.
Original commit message follows:

In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all
windows after modifying the PATH environment variable. This ensures that
the new PATH is visible to other processes without restarting windows
(although it's still necessary to close and reopen active console
windows).

Unfortunately, the broadcast doesn't always happen, for unknown reasons.
That's why this patch adds a custom action that unconditionally
broadcasts a WM_SETTINGCHANGE message.

Bug: https://github.com/iojs/io.js/issues/603
PR: https://github.com/iojs/io.js/pull/613
Reviewed-by: Bert Belder <bertbelder@gmail.com>
(cherry picked from commit 668bde8ac0d16382cbc98c904d8b5f55fd9fd9f0)

--Node.js commmit metadata--
PR-URL: https://github.com/joyent/node/pull/25100
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Fixes: https://github.com/joyent/node/issues/4356
2015-05-11 14:21:25 +02:00
João Reis
ad9947e3fa win,msi: Added empty InstallExecuteSequence group
This is needed so that we can backport
668bde8ac0d16382cbc98c904d8b5f55fd9fd9f0 from io.js with
a clean merge.

PR-URL: https://github.com/joyent/node/pull/25100
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Fixes: https://github.com/joyent/node/issues/4356
2015-05-11 14:18:53 +02:00
Michael Dawson
fcbf226a94 test: Extend timeout due to failure on AIX
The loopback on AIX is slower by default than on other platforms
and we've seen a number of tests fail on AIX for this reason. This
looks to be another instance.  Changing the test to bind to the
host ip instead of the loopback makes it pass reliably.

This change extends the timeout so that it passes reliably on AIX
even with the slower loopback behaviour

	modified:   test/simple/test-tls-wrap-timeout.js

Reviewed-By: coln Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25138
2015-05-06 12:40:30 -07:00
Forrest L Norvell
8fc40af034 deps: upgrade npm to 2.8.4
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/20311
2015-04-30 17:21:18 -07:00
Julien Gilli
03b4f443d5 test: make test-npm uses custom node, not global
When running make test-npm, make would use the node binary available in
the PATH, which would most of the time not be the same binary as the one
built from the source tree from where the make test-npm command in run.

This can be confusing, as it can lead users to think that they tested
npm with the version of node that was built from the current checkout of
the source tree when it would actually run the tests with a completely
different version.

This change modifies the PATH environment variable for all commands that
need to run the node binary to run npm's tests by adding the root of the
local checkout as the first entry, so that the custom built node is
always used.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/9107
2015-04-30 16:33:40 -07:00
Julien Gilli
cb55a05f52 test: add test for let bindings in for loops
072460265226c047369558b23e9ff2748965bf6c floats a patch on V8 that fixes
issue #9113 that would cause let bindings and continue statements in for
loops to not work properly.

This change adds a regression test that fails if that patch is not
properly floated, thus preventing us from not floating that patch after
future V8 upgrades.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/23948
2015-04-29 17:06:52 -07:00
adamk
2a5f4bd7ce v8: fix issue with let bindings in for loops
Backport b17eaaa5755e625493c5fe537f42b58838923c52 from upstream v8.

Original commit message:
  Fix desugaring of let bindings in for loops to handle continue properly

  This requires putting the original loop's body inside an inner for loop (with
  the same labels as the original loop) and re-binding the temp variables in its
  "next" expression. A second flag is added to the desugared code to ensure the
  loop body executes at most once per loop.

  BUG=v8:3683
  LOG=y

  Review URL: https://codereview.chromium.org/720863002

  Cr-Commit-Position: refs/heads/master@{#25363}

Fixes #9113 and #14411.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/23948
2015-04-29 17:06:52 -07:00
Julien Gilli
712cb4340b build: fix build for SmartOS
This change in V8: https://code.google.com/p/v8/source/detail?r=22210
has introduced a method named OS::GetCurrentThreadId which fails to
compile on OSes where a "gettid" syscall does not exist.

This build issue has been fixed upstream by several changes:
- https://code.google.com/p/v8/source/detail?r=23459.
- https://codereview.chromium.org/649553002
- https://codereview.chromium.org/642223003

Another minor fix to the upstream changes was also necessary.
See https://code.google.com/p/v8/issues/detail?id=3620 for
more information.

The other build issue was due to the fact that alloca.h is not included
by other system includes on SmartOS, which is assumed by V8.

Built and tested on Linux, MacOS X, Windows and SmartOS.

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18206
2015-04-29 14:25:50 -07:00
Yury Semikhatsky
5b2bf92211 deps: backport use strict fix for V8 debugger
Backport 2ad2237507c5b5f9047b8d94d2f4997327eae852 from V8.

Original commit message:

  Fix Unhandled ReferenceError in debug-debugger.js

  This fixes following exception in Sky on attempt to set a breakpoint
  "Unhandled: Uncaught ReferenceError: break_point is not defined"
  I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode.

  BUG=None
  LOG=N
  R=yangguo@chromium.org

  Review URL: https://codereview.chromium.org/741683002

  Cr-Commit-Position: refs/heads/master@{#25415}

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18206
2015-04-29 14:25:49 -07:00
Dave Pacheco
9a960c270c mdb_v8: fix dictionary properties access
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18206
2015-04-29 14:25:49 -07:00
Refael Ackermann
ace398ed42 deps: fix postmortem-metadata generator in v8
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18206
2015-04-29 14:25:49 -07:00
Trevor Norris
beff91c44e deps: apply floating irhydra patch to v8
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18206
2015-04-29 14:25:48 -07:00
Trevor Norris
32166a90cf deps: update V8 to 3.28.71.19
The 3.28.73 update was technically unstable code. This reverts the code
to the latest 3.28 stable release.

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18206
2015-04-29 14:25:48 -07:00
Julien Gilli
0e392f3b68 net: do not set V4MAPPED on FreeBSD
V4MAPPED is not supported on recent FreeBSD versions, at least on 10.1.
Thus, do not set this flag in net.connect on FreeBSD.

Fixes #8540 and #9204.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18204
2015-04-28 16:26:26 -07:00
Alexis Campailla
a58b17456a build,win: set env before generating projects
vcbuild.bat calls python configure before setting GYP_MSVS_VERSION,
so SelectVisualStudioVersion (tools\gyp\pylib\gyp\MSVSVersion.py)
defaults to 'auto' and selects VS 2005.

vcbuild sets the environment in the current shell, so this issue
would manifest itself only on the first invocation of the script
in any given shell windows.

Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
PR-URL: https://github.com/joyent/node/pull/20109
2015-04-23 15:16:25 -07:00
Oguz Bastemur
4028669531 install: make sure opensslconf.h is overwritten
PR: #14089
PR-URL: https://github.com/joyent/node/pull/14089
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-04-23 11:45:11 -07:00
Oguz Bastemur
9d19dfbfdb install: fix source path for openssl headers
PR: #14089
PR-URL: https://github.com/joyent/node/pull/14089
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-04-23 11:43:39 -07:00
AlexKVal
9800e0b428 docs: clarify usage of stream.Writable.write
Add separate sample code for the write-after-end case to avoid
confusion.

PR: #15517
PR-URL: https://github.com/joyent/node/pull/15517
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-04-15 11:27:34 -07:00
Julien Gilli
f99eaefe75 src: fix backport for SIGINT crash fix on FreeBSD
61fe1fe21b backported
b64983d77cc3ed2e4b585f3bfc8ed23802389a52 from io.js, but failed to
change nullptr to NULL, which lead to a build break on FreeBSD since the
current build system doesn't enable support for C++11.

This change replaces nullptr by NULL, and has been tested on
FreeBSD 10.1-RELEASE-p8.

Fixes #9326.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14819
2015-04-14 16:54:11 -07:00
Jackson Tian
f0ef597e09 debugger: don't spawn child process in remote mode
When debug in remote mode with host:port or pid, the interface
spawn child process also. If the debugger agent is running, will
get following output:

```
< Error: listen EADDRINUSE :::5858
<     at Object.exports._errnoException (util.js:734:11)
<     at exports._exceptionWithHostPort (util.js:757:20)
<     at Agent.Server._listen2 (net.js:1155:14)
<     at listen (net.js:1181:10)
<     at Agent.Server.listen (net.js:1268:5)
<     at Object.start (_debug_agent.js:21:9)
<     at startup (node.js:68:9)
<     at node.js:799:3
```

This fix won't spawn child process and no more error message was
shown.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/14172
2015-04-14 12:25:03 -07:00
Jackson Tian
c63a39b6cd debugger: improve help information
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/14172
2015-04-14 12:25:02 -07:00
Ben Noordhuis
d5b32246fb src: backport ignore ENOTCONN on shutdown race
This is a backport of ea37ac04f4e4e9248fb361d65a3cd69f57bcaba1

Original commit message:

  On AIX, OS X and the BSDs, calling shutdown() on one end of a pipe
  when the other end has closed the connection fails with ENOTCONN.

  The sequential/test-child-process-execsync test failed sporadically
  because of a race between the parent and the child where one closed
  its end of the pipe before the other got around to calling shutdown()
  on its end of the pipe.

  Libuv is not the right place to handle that because it can't tell if
  the ENOTCONN error is genuine but io.js can.

  Refs: libuv/libuv#268
  PR-URL: iojs#1214
  Reviewed-By: Bert Belder <bertbelder@gmail.com>

Fixes: https://github.com/joyent/node/issues/9444.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/14480
2015-04-13 15:18:03 -07:00
Gireesh Punathil
4e154d6ef8 test: immunize data flow from packet size and order
simple/test-child-process-stdout-flush-exit.js fails with an assertion.
The root cause for this assertion is that the expected boolean value of
true for the variable gotBye was false. This is set to true when the
piped stdout stream of the child writes the end token "goodbye". So the
error message would indicate that the end token was never received by
the parent, but in fact it did. The only difference is that the first
chunk itself had both 'hello' and 'goodbye' (as well as the filler
words in between) in AIX, while Linux receives them separately.

While this issue is not reproducible in Linux, the number of bytes
received each time a callback is called is not consistent across runs,
which is ratified as the actual content size of a UNIX domain data packet
is determined outside of the node's logic, instead in OS tunables, as well
as the runtime context of data transfer (depending on contigeous free
memory available in OS data structures at the time of sending).
In addition, around 200 filler words sent in between the 'hello' and
'goodbye' seem to indicate that the coalescence of chunks was a possibility
in Linux as well, and was devised to separate the first word from the last,
through an arbitrary delimiter.

Parser logic seem to be rigid and have assumptions about the order and size
of the data arrival. For example, it checks for 'goodbye' only when it does
not find 'hello' in it, as if they would always come separately. This
exclusiveness is what makes the test to fail in AIX.

Reviewed-By:
PR-URL: https://github.com/joyent/node/pull/14410
2015-04-13 12:53:26 -07:00
Paulo McNally
de904033fa doc: add link to workflow in api docs menu
Added link to workflow guidelines page in API docs' navigation menu.

Fixes https://github.com/joyent/node-website/issues/102.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/14570
2015-04-10 11:31:34 -07:00
James M Snell
b5737bb977 tls: make --enable-legacy-cipher-list=val less verbose
Per feedback on the commit, make the PrintHelp output for
--enable-legacy-cipher-list less verbose.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14414
2015-04-08 12:10:50 -07:00
James M Snell
f9291a9449 disable RC4, add --cipher-list command line switch
Disable RC4 in the default cipher list

Add the `--cipher-list` command line switch and `NODE_CIPHER_LIST`
environment variable to completely override the default cipher list.

Add the `--enable-legacy-cipher-list` and `NODE_LEGACY_CIPHER_LIST`
environment variable to selectively enable the default cipher list from
previous node.js releases.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14414
2015-04-08 12:10:49 -07:00
James M Snell
02a549ed2b tls: make the --enable-legacy-cipher-list help less verbose
Per feedback on the commit, make the PrintHelp for
--enable-legacy-cipher-list less verbose.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14413
2015-04-08 12:00:19 -07:00
James M Snell
67d9a56251 tls: disable RC4, add --cipher-list command line switch
Disable RC4 in the default cipher list

Add the `--cipher-list` command line switch and `NODE_CIPHER_LIST`
environment variable to completely override the default cipher list.

Add the `--enable-legacy-cipher-list` and `NODE_LEGACY_CIPHER_LIST`
environment variable to selectively enable the default cipher list from
previous node.js releases.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14413
2015-04-08 12:00:18 -07:00
Gireesh Punathil
66b243dd87 test: relax the timing window in test-child-process-fork-net2.js
In Linux, simple/test-child-process-fork-net2.js fails intermittently.

In SuSE Linux system, under network high load situations, this failure is
consistently reproducible.

The test case tests whether the TCP connections which were established between
the processes terminate in a timely and clean manner. After some iterations of
data transfer on established connections, the server is closed. The server does
not get closed immediately, instead waits for all the active connections to
terminate. A timed (200ms) callback closes the connections, which eventually
closes the server.

The start is the time when the server close is invoked.
The end is the time when the server is actually closed(onClose call back invoked).

Given that there is a minimum delay of 200ms before the connections are
terminated, expecting the elapsed time above 190 is reasonable and fair,
but looks like the leeway of 800ms for the upper bounds seem to be too
stringent, and breaking some scenarios of network load.

Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/joyent/node/pull/14129
2015-04-01 12:26:04 -07:00
Julien Gilli
c657dac5d5 Now working on 0.12.3 2015-03-31 16:22:54 -07:00
Julien Gilli
cac2a740a9 Merge branch 'v0.12.2-release' into v0.12 2015-03-31 16:22:18 -07:00
Julien Gilli
523d445705 2015.03.31, Version 0.12.2 (Stable)
* uv: Upgrade to 1.4.2

* npm: Upgrade to 2.7.4

* V8: do not add extra newline in log file (Julien Gilli)

* V8: Fix --max_old_space_size=4096 integer overflow (Andrei Sedoi)

* asyncwrap: fix constructor condition for early ret (Trevor Norris)

* buffer: align chunks on 8-byte boundary (Fedor Indutny)

* buffer: fix pool offset adjustment (Trevor Norris)

* build: fix use of strict aliasing (Trevor Norris)

* console: allow Object.prototype fields as labels (Colin Ihrig)

* fs: make F_OK/R_OK/W_OK/X_OK not writable (Jackson Tian)

* fs: properly handle fd passed to truncate() (Bruno Jouhier)

* http: fix assert on data/end after socket error (Fedor Indutny)

* lib: fix max size check in Buffer constructor (Ben Noordhuis)

* lib: fix stdio/ipc sync i/o regression (Ben Noordhuis)

* module: replace NativeModule.require (Herbert Vojčík)

* net: allow port 0 in connect() (cjihrig)

* net: unref timer in parent sockets (Fedor Indutny)

* path: refactor for performance and consistency (Nathan Woltman)

* smalloc: extend user API (Trevor Norris)

* src: fix for SIGINT crash on FreeBSD (Fedor Indutny)

* src: fix builtin modules failing with --use-strict (Julien Gilli)

* watchdog: fix timeout for early polling return (Saúl Ibarra Corretgé)
2015-03-31 15:13:01 -07:00
Gireesh Punathil
f3f4e28216 test: make cluster tests more time tolerant
simple tests test-cluster-master-error.js, test-cluster-master-kill.js
fails in AIX with assertion failure indicating that the workers were
alive even after the master terminated. A 200ms leeway is provided for
the workers to actually terminate, but the isAlive check returns
true in both the cases.

In AIX, the workers were actually terminating, but they took more time
- as much as 800ms (normal) to 1000ms (in rare cases).

Based on a C test we ran, it is found that the exit routines in AIX
is a bit more longer than that in Linux. There are a number of cleanup
activities performed in exit() system call, and depending on when the
signal handlers are shutdown in that sequence, the process will be
deemed as dead or alive, from another process's perspective.

process.kill(pid) is used in the test case to check the liveliness of
the worker, and when the kill() call is issued, even if the target
process is in it's exit sequences, if the signal handlers are not shut
down, it will respond to external signals, causing those calls to pass.

This fix extends the additional timeout for all platforms

Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/joyent/node/pull/9431
2015-03-31 15:02:17 -07:00
Fedor Indutny
61fe1fe21b src: backport fix for SIGINT crash on FreeBSD
This is a backport of b64983d77cc3ed2e4b585f3bfc8ed23802389a52.

Original commit message:

  src: reset signal handler to SIG_DFL on FreeBSD

  FreeBSD has a nasty bug with SA_RESETHAND reseting the SA_SIGINFO,
  that is in turn set for a libthr wrapper. This leads to a crash.
  Work around the issue by manually setting SIG_DFL in the signal
  handler.

  Fix: https://github.com/joyent/node/issues/9326
  PR-URL: https://github.com/iojs/io.js/pull/1218
  Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

Fixes #9326.

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14184
2015-03-27 18:03:55 -07:00
Fedor Indutny
d6484f3f7b http: fix assert on data/end after socket error
This change is a backport of 1a3ca8223e08d82051655d7d7e2ea31b439f1bf1
from io.js.

Original commit message:

  Read all pending data out of the socket on `error` event and ensure that
  no `data`/`end` handlers will be invoked on `socket.destroy()`.
  Otherwise following assertion happens:

      AssertionError: null == true
          at TLSSocket.socketOnData (_http_client.js:308:3)
          at TLSSocket.emit (events.js:107:17)
          at TLSSocket.Readable.read (_stream_readable.js:373:10)
          at TLSSocket.socketCloseListener (_http_client.js:229:10)
          at TLSSocket.emit (events.js:129:20)
          at TCP.close (net.js:476:12)

  Fix: https://github.com/joyent/node/issues/9348
  PR-URL: https://github.com/iojs/io.js/pull/1103
  Reviewed-By: Rod Vagg <rod@vagg.org>
  Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>

Fixes #9348.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/14087
2015-03-27 17:10:23 -07:00
Forrest L Norvell
2704c62933 deps: upgrade npm to 2.7.4
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/14180
2015-03-27 16:43:35 -07:00
Gireesh Punathil
13e1131406 test: address timing issues in simple http tests
simple tests test-http-request-end.js, test-http-default-encoding.js
hangs in AIX. The root cause for both the failures is related to the
timing with which packets are sent between the client and server.
On the client side, one factor that affects the timing is Nagle's
algorithm. With Nagle enabled there may be a delay between two packets
as the stack may wait until either:
  a. An acknowledgement for the first packet is received, or
  b. 200 ms elapses.
before sending the second packet.

Similarly at the server side 2 sequential packages can be delivered to
the application either together or separatly.

On AIX we see that they are delivered separately to the server, while on
Linux delivered together. If we change the timing, for example disabling
Nagle on AIX we see the 2 packets delivered together and the tests pass.

In the test case simple/test-http-request-end.js, the client request
handler of the server receives and stores the data in a data callback,
closes the server in a request end callback, and writes to the client
and ends the response, in-line with the request receipt. An HTTP parser
module parses the incoming message, and invokes callback routines which
are registered for HTTP events (such as header, body, end etc.)

Because the termination sequence arrive in a separate packet, there is a
delay in parsing that message and identify that the client request ended
(and thereby invoke the request end call backhandler). Due to this delay,
the response close happens first, which in-turn destroys the server
socket leading to the fd and watcher removal from the uv loop abandoning
further events on this connection, and end call back never being called,
causing the reported hang.  simple/test-http-default-encoding.js suffers
from the same problem.

Also, remove the timer logic from the test case. Test harness anyways
contain a timer which controls the individual tests so remove such
controls from the test case, as suggested by @tjfontaine

Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/joyent/node/pull/9432
2015-03-27 15:21:09 -07:00
Michael Dawson
5dd5ce75d7 test: Env variable to specify directory for pipes
At the uv layer pipes are connected with uv_pipe_connect.
The current spec for this method indicates that the maximum
length is limited to the size of length of
sizeof(sockaddr_un.sun_path), typically between 92 and
108 bytes. Anything longer than that just gets truncated.

The simple testsuite currently creates pipes in directories
under the directory where node was built.  In our jenkins
jobs this sometimes ends up being a deep enough path that
the path for the pipes is getting truncated.  The result
is that tests using pipes fail with errors that don't
make it obvious what the problem is.

Even if the errors were helpful, we still need a way
to avoid the truncation.

This patch adds the environment variable NODE_PIPE_DIR.
If set the tests create pipes in this directory instead of
the current defaults.  In addition the test harness is
updated to remove/delete this directory before/after
each test is run.

	modified:   test/common.js
	modified:   test/simple/test-net-pipe-connect-errors.js
	modified:   test/testpy/__init__.py
	modified:   test/simple/test-cluster-eaccess.js

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9381
2015-03-26 11:31:17 -07:00
Nathan Woltman
c66f8c21f0 path: refactor for performance and consistency
Improve performance by:
+ Not leaking the `arguments` object!
+ Getting the last character of a string by index, instead of
  with `.substr()` or `.slice()`

Improve code consistency by:
+ Using `[]` instead of `.charAt()` where possible
+ Using a function declaration instead of a var declaration
+ Using `.slice()` with clearer arguments
+ Checking if `dir` is truthy in `win32.format`
  (added tests for this)

Improve both by:
+ Making the reusable `trimArray()` function
+ Standardizing getting certain path statistics with
  the new `win32StatPath()` function

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9289
2015-03-25 12:28:50 -07:00
Julien Gilli
a0ce9cc38f Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	ChangeLog
	src/node_version.h
2015-03-23 21:36:37 -07:00
Julien Gilli
e80bcf5797 Now working on 0.12.2 2015-03-23 19:48:34 -07:00
Julien Gilli
59d3f6864b Merge branch 'v0.12.1-release' into v0.12
Conflicts:
	ChangeLog
2015-03-23 19:47:20 -07:00
Julien Gilli
0034086b49 2015.03.23, Version 0.12.1 (Stable)
* openssl: upgrade to 1.0.1m (Addressing multiple CVES)
2015-03-23 18:12:47 -07:00
Shigeki Ohtsu
a43219bcd1 openssl: fix keypress requirement in apps on win32
reapply b910613792dac946b295855963869933a9089044

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 17:48:13 -07:00
Shigeki Ohtsu
b5a37e5603 deps: remove unused backup file in openssl asm
deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm.orig was accidentally
committed before.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 17:48:13 -07:00
Shigeki Ohtsu
8d10b8d6f7 deps: remove vpaesni-x86_64.asm in x64-win32-masm
It is no longer used.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 17:48:13 -07:00
Fedor Indutny
9fb6cf1ebb deps: fix openssl assembly error on ia32 win32
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 17:48:13 -07:00
Shigeki Ohtsu
8874445312 deps: separate sha256/sha512-x86_64.pl for openssl
sha256-x86_64.pl does not exist in the origin openssl distribution. It
was copied from sha512-x86_64.pl and both sha256/sha512 scripts were
modified so as to generates only one asm file specified as its key
hash length.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 17:48:13 -07:00
Shigeki Ohtsu
1aa510321b deps: replace all headers in openssl
change all openssl/include/openssl/*.h to include resolved symbolic
links and openssl/crypto/opensslconf.h to refer config/opensslconf.h

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 17:48:13 -07:00
James M Snell
3b511a8ccd deps: upgrade to openssl-1.0.1m
Extract the tarball into deps/openssl/openssl

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>

Conflicts:
	deps/openssl/openssl/apps/s_client.c
2015-03-23 17:48:08 -07:00
Julien Gilli
7edfd5f6d1 Now working on 0.10.39 2015-03-23 14:44:18 -07:00
Julien Gilli
0b4e67f861 Merge branch 'v0.10.38-release' into v0.10 2015-03-23 14:43:55 -07:00
Saúl Ibarra Corretgé
7e9d2f8de8 watchdog: fix timeout for early polling return
Switch from running the loop with UV_RUN_ONCE to UV_RUN_DEFAULT, because
it's possible that the poll returns earlier than expected and thus the
timer is not run on a single interation.

The loop is not stopped either from the timer callback or from the async
handle's.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9410
2015-03-23 12:46:43 -07:00
Julien Gilli
0b5731a63c 2015.03.23, Version 0.10.38 (Maintenance)
* openssl: upgrade to 1.0.1m (Addressing multiple CVEs)
2015-03-23 12:23:33 -07:00
Shigeki Ohtsu
4b69c72b8b openssl: fix keypress requirement in apps on win32
reapply b910613792dac946b295855963869933a9089044

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:34:12 -07:00
Shigeki Ohtsu
1fc3fdf892 deps: remove unused backup file in openssl asm
deps/openssl/asm/x64-win32-masm/x86_64cpuid.asm.orig was accidentally
committed before.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:33:48 -07:00
Shigeki Ohtsu
15cdeb7d99 deps: remove vpaesni-x86_64.asm in x64-win32-masm
It is no longer used.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:33:30 -07:00
Fedor Indutny
63377ec3c3 deps: fix openssl assembly error on ia32 win32
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:33:13 -07:00
Shigeki Ohtsu
2b21c45f75 deps: separate sha256/sha512-x86_64.pl for openssl
sha256-x86_64.pl does not exist in the origin openssl distribution. It
was copied from sha512-x86_64.pl and both sha256/sha512 scripts were
modified so as to generates only one asm file specified as its key
hash length.

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:32:50 -07:00
Shigeki Ohtsu
10717f659b deps: replace all headers in openssl
change all openssl/include/openssl/*.h to include resolved symbolic
links and openssl/crypto/opensslconf.h to refer config/opensslconf.h

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:32:34 -07:00
James M Snell
c6e8a2c920 deps: upgrade to openssl-1.0.1m
Extract the tarball into deps/openssl/openssl

PR: #9451
PR-URL: https://github.com/joyent/node/pull/9451
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-23 11:31:29 -07:00
Trevor Norris
a93087007f deps: indicate uv has been patched
Because we are floating several patches on top of libuv, make that
apparent in the version number.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:57 -07:00
Ole André Vadla Ravnås
2fdeb7e932 uv: fix size calculation in select() fallback
Original commit message:

  darwin: fix size calculation in select() fallback

  Apple's `fd_set` stores its bits in an array of 32-bit integers, which
  means `FD_ISSET()` may read out of bounds if we allocate storage at
  byte granularity. There's also a chance that the `select()` call could
  corrupt the heap, although I didn't investigate that.

  This issue was discovered by LLVM's AddressSanitizer which caught
  `FD_ISSET()` trying to read out of bounds.

Ref: https://github.com/libuv/libuv/pull/241

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:57 -07:00
Julien Gilli
9613ac7cb8 uv: fix setsockopt for multicast options
Float patch to fix setsockopt for multicast on Solaris and derivatives.
Original commit message:

  solaris: fix setsockopt for multicast options

  On Solaris and derivatives such as SmartOS, the length of socket options
  for multicast and ttl options is not always sizeof(char).

  This fixes the udp_options and udp_options6 tests.

Ref: https://github.com/libuv/libuv/pull/243

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:56 -07:00
Alexis Campailla
3cce8ab647 uv: float win pipe patch
Float patch to fix pipe on Windows. Original commit message:

  win: fix pipe blocking writes

  In the code path for pipe blocking writes, WriteFile is already
  posting a completion packet to the I/O completion port.
  POST_COMPLETION_FOR_REQ was causing the same request to get
  returned twice by GetCompletionStatusEx.
  Also on the same code path, we were waiting on the wrong event.

  We need to update queued_bytes and write_queue_size when a
  blocking write request completes asynchronously.

Ref: https://github.com/libuv/libuv/pull/238

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:56 -07:00
Ben Noordhuis
2411bea0df lib: fix stdio/ipc sync i/o regression
process.send() should be synchronous, it should block until the message
has been sent in full, but it wasn't after the second-to-last libuv
upgrade because of commit libuv/libuv@393c1c5 ("unix: set non-block
mode in uv_{pipe,tcp,udp}_open"), which made its way into io.js in
commit 07bd05b ("deps: update libuv to 1.2.1").

Commit libuv/libuv@b36d4ff ("unix: implement uv_stream_set_blocking()")
as landed in io.js in commit 9681fca ("deps: update libuv to 1.4.0")
makes it possible to restore the synchronous behavior again and that's
precisely what this commit does.

The same line of reasoning applies to `net.Socket({ fd: 1 })`: creating
a socket object from a stdio file descriptor, like the `process.stdout`
getter does, should put the file descriptor in blocking mode for
compatibility reasons.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:56 -07:00
Trevor Norris
c0766eb1a4 build: fix use of strict aliasing
The -fno-strict-aliasing flag was added to fix compilation warnings when
building Node.js with GCC <= 4.4

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:55 -07:00
Trevor Norris
7a37910f25 deps: update libuv to 1.4.2
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
2015-03-19 12:06:55 -07:00
Julien Gilli
eb2764a945 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/build.mk
	deps/uv/config-unix.mk
	deps/uv/include/uv-private/uv-win.h
	deps/uv/src/unix/async.c
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	deps/uv/src/win/poll.c
	deps/uv/test/test-list.h
	deps/uv/uv.gyp
	lib/http.js
	src/node.js
	src/node_version.h
2015-03-16 14:26:55 -07:00
Julien Gilli
588c009781 make: remove node_dtrace from cpplint excludes
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8741
2015-03-13 10:46:53 -07:00
Alexis Campailla
e8b2109567 test: update flaky test definitions
test-fs-watch is flaky on OSX.
2015-03-13 15:00:46 +01:00
Julien Gilli
4332c77bf7 Now working on 0.10.38 2015-03-11 21:13:15 -07:00
Julien Gilli
50c23fb381 Merge branch 'v0.10.37-release' into v0.10 2015-03-11 21:12:00 -07:00
Julien Gilli
7d6b5b1d5b 2015.03.11, Version 0.10.37 (Maintenance)
* uv: update to 0.10.36 (CVE-2015-0278)

* domains: fix stack clearing after error handled (Jonas Dohse)

* buffer: reword Buffer.concat error message (Chris Dickinson)

* console: allow Object.prototype fields as labels (Julien Gilli)

* V8: log version in profiler log file (Ben Noordhuis)

* http: fix performance regression for GET requests (Florin-Cristian Gavrila)
2015-03-11 16:30:44 -07:00
Julien Gilli
219c80d099 build: allow custom PackageMaker path
Make PACKAGEMAKER customizable because PackageMaker is not necessarily
installed in /Developer on OSX anymore.

PR: #9377
PR-URL: https://github.com/joyent/node/pull/9377
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-03-11 16:25:36 -07:00
Fedor Indutny
a33f23cbbc buffer: align chunks on 8-byte boundary
When slicing global pool - ensure that the underlying buffer's data ptr
is 8-byte alignment to do not ruin expectations of 3rd party C++ addons.

NOTE: 0.10 node.js always returned aligned pointers and v0.12 should do
this too for compatibility.

PR-URL: https://github.com/joyent/node/pull/9375
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-03-11 11:47:54 -07:00
Jonas Dohse
f2a45caf2e domains: fix stack clearing after error handled
caeb67735b introduced a regression where
the domains stack would not be cleared after an error had been handled
by the top-level domain.

This change clears the domains stack regardless of the position of the
active domain in the stack.

PR: #9364
PR-URL: https://github.com/joyent/node/pull/9364
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-10 23:22:16 -07:00
Tyler Anton
51fe319faf docs: add return value for sync fs functions
Clarify that synchronous functions in fs with no return value return
undefined.

Specify that fs.openSync() returns an integer and fs.existsSync()
returns true or false.

Fixes #9313

PR: #9359
PR-URL: https://github.com/joyent/node/pull/9359
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-10 16:33:57 -07:00
Forrest L Norvell
cc6ee3f010 deps: upgrade npm to 2.7.0
PR: #9347
PR-URL: https://github.com/joyent/node/pull/9347
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-06 19:01:22 -08:00
Julien Gilli
a5be84fe9b url: revert reslove urls with . and ..
This reverts commit ad0684807c.

Initially, this bug fix targeted master, and I pushed to have it
included in v0.10. In retrospect, I'm not sure it should have made into
v0.10 as it seems it could break a lot of existing working code.

In my opinion, this change is still a bug fix, and it is not backward
incompatible per se. However, I'm not sure that taking the risk to break
a lot of users with a new 0.10.x release that would include this fix is
reasonable, especially now that 0.10.x releases are entering
maintenance mode.

PR-URL: https://github.com/joyent/node/pull/9257
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-06 12:44:06 -08:00
Saúl Ibarra Corretgé
dcff5d565c deps: update libuv to 0.10.36
PR: #9274
PR-URL: https://github.com/joyent/node/pull/9274
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-06 11:37:40 -08:00
Florin-Cristian Gavrila
8bcd0a4c4a http: fix performance regression for GET requests
A significant performance regressions has been introduced in 1fddc1f for
GET requests which send data through response.end(). The number of
requests per second dropped to somewhere around 6% of their previous
level.

The fix consists of removing a part of the lines added by 1fddc1f,
lines which were supposed to affect only HEAD requests, but interfered
with GET requests instead.

The lines removed would not have affected the behaviour in the case of
a HEAD request as this._hasBody would always be false. Therefore, they
were not required to fix the issue reported in #8361.

Fixes #8940.

PR: #9026
PR-URL: https://github.com/joyent/node/pull/9026
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-05 11:16:52 -08:00
cjihrig
1a2a4dac23 net: allow port 0 in connect()
The added validation allows non-negative numbers and numeric
strings. All other values result in a thrown exception.

Fixes: https://github.com/joyent/node/issues/9194
PR-URL: https://github.com/joyent/node/pull/9268
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@users.noreply.github.com>
2015-03-05 09:38:10 -05:00
Julien Gilli
b0425f0d2c Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	lib/buffer.js
2015-03-04 18:10:32 -08:00
Chris Dickinson
d01a900078 buffer: reword Buffer.concat error message
this brings the error messaging in line with
other node TypeError messages.

fixes joyent/node#7766.

PR: #8723
PR-URL: https://github.com/joyent/node/pull/8723
Reviewed-By: James M Snell <jasnell@users.noreply.github.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-04 17:44:53 -08:00
Forrest L Norvell
63fbd10b6c deps: upgrade npm to 2.6.1
PR: #9297
PR-URL: https://github.com/joyent/node/pull/9297
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-03 14:45:37 -08:00
Julien Gilli
d9a309f718 tests: fix race in test-http-curl-chunk-problem
This test setups two event listeners: one on a child process' exit event
, another for the same child process' stdandard output's 'data' event.
The data even listener writes to a stream, and the exit event listener
ends it.

Because the exit event can be emitted before the data event, there is a
chance that something will be written to the stream after it's ended,
and that an error is thrown.

This change makes the test end the stream in the listener for the child
process' standard output's end event, which is guaranteed to be emitted
after the last data event, thus avoiding the race.

PR: #9301
PR-URL: https://github.com/joyent/node/pull/9301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@users.noreply.github.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-03-03 14:35:36 -08:00
Julien Gilli
e82e86b1a7 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	lib/console.js
	test/simple/test-console.js
2015-02-27 16:49:00 -08:00
Julien Gilli
b233131901 src: fix builtin modules failing with --use-strict
Currently, lib/_tls_legacy.js and lib/crypto.js cannot be loaded when
--use-strict is passed to node. In addition to that, console.trace
throws because it uses arguments.callee.

This change fixes these issues and adds a test that makes sure
every external built-in module can be loaded with require when
--use-strict is enabled.

Please note that this change does not fix all issues with built-in
modules' code running with --use-strict. It is very likely that some
code in the built-in modules still fails when passing this flag.

However, fixing all code would require us to enable strict mode by
default in all builtins modules, which would certainly break existing
applications.

Fixes #9187.

PR: #9237
PR-URL: https://github.com/joyent/node/pull/9237
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-27 16:28:57 -08:00
Michael Dawson
3e40e126eb test: make destroyed-socket-write2.js more robust
test/simple/test-http-destroyed-socket-write2.js validates
that you get an appropriate error when trying to write to
a request when the response on the other side has been destroyed.

The test uses http.request to get a request and then keeps writing
to it until either it hits 128 writes or gets the expected error.
Since the writes are asynchronous we see that the writes just end
up adding events to the event loop, which then later get processed
once the connection supporting the request is fully ready.

The test is timing dependent and if takes too long for the connection
to be made the limit of 128 writes is exceeded and the test fails.
The fact that the test allows a number of writes is probably to allow
some delay for the connection to be ready for writing.

On AIX, in the default configuration using the loopback interface
is slower and the test fails because the delay is such that many
more writes can be queued up before the connection takes place.
If we use the host ip instead of defaulting to the loopback then
the test passes.

The test needs to be made more robust to delays. Since each write
simply enqueues an additional write to the event queue there is
probably no point in doing the second write until the first has
completed. This patch schedules the next write when the first one
completes and allows the test to pass even if it takes longer for
the connection to be ready for writing

PR-URL: https://github.com/joyent/node/pull/9270
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-27 12:14:06 -05:00
Robert Kowalski
5d821fe0be doc: add explanations for querystring
- add an article: `decode a non-utf8 string`
 - explain default and fallback behaviour of `querystring.unescape`

PR-URL: https://github.com/joyent/node/pull/9259
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-02-25 12:00:53 -08:00
h7lin
f1bf883959 doc: fix default value of opts.decodeURIComponent
In the documentation for querystring.parse, the documentation mentions
that the default value for options.decodeURIComponent is the
decodeURIComponent function, but it's actually the querystring.unescape
function.

PR-URL: https://github.com/joyent/node/pull/9259
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-02-25 12:00:44 -08:00
Robert Kowalski
08a1192478 doc: remove broken link to tracing api
closes joyent/node-website#77

PR: #9172
PR-URL: https://github.com/joyent/node/pull/9172
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-02-24 11:32:03 -08:00
Andrei Sedoi
2fc5eeb3da deps: backport a02d97e from v8 upstream
Original commit message:

  Fix --max_old_space_size=4096 integer overflow.

  BUG=v8:3857
  LOG=N

  Review URL: https://codereview.chromium.org/897543002

  Cr-Commit-Position: refs/heads/master@{#26510}

PR-URL: https://github.com/joyent/node/pull/9200
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-02-20 15:25:27 -07:00
Trevor Norris
9deade4322 smalloc: extend user API
node::Environment isn't accessible to user APIs, so extend smalloc to
also accept v8::Isolate.

Fixes: 75adde07 "src: remove `node_isolate` from source"
PR-URL: https://github.com/iojs/io.js/pull/905
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2015-02-20 15:19:30 -07:00
Fedor Indutny
bada87bd66 net: unref timer in parent sockets
`TLSSocket` wraps the original `net.Socket`, but writes/reads to/from
`TLSSocket` do not touch the timers of original `net.Socket`.

Introduce `socket._parent` property, and iterate through all parents
to unref timers and prevent timeout event on original `net.Socket`.

Fix: https://github.com/joyent/node/issues/9242
PR-URL: https://github.com/iojs/io.js/pull/891
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-19 11:46:59 -07:00
Julien Gilli
c8239c08d7 console: allow Object.prototype fields as labels
This is a backport of 6c3647c38d from
v0.12 to v0.10.

Console.prototype.timeEnd() returns NaN if the timer label
corresponds to a property on Object.prototype. In v0.12, this was fixed
by using Object.create(null) to construct the _times object

However, the version of V8 in the v0.10 branch makes this fix not work
as expected. In v0.10, this commit changes the _times object into a
array of objects of the form:

{ label: someLabel, time: staringWallClockTime }

someLabel can thus be any string, including any string that represents
any Object.prototype field.

Fixes #9116.

PR: #9215
PR-URL: https://github.com/joyent/node/pull/9215
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-17 18:08:11 -08:00
Bruno Jouhier
b3aa876f08 fs: properly handle fd passed to truncate()
Currently, fs.truncate() silently fails when a file descriptor
is passed as the first argument. This commit changes this
behavior to properly call fs.ftruncate().

PR-URL: https://github.com/joyent/node/pull/9161
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-17 12:09:20 -05:00
Julien Gilli
7b554024cc src: update AUTHORS after merge 2015-02-16 16:35:23 -08:00
Julien Gilli
a103712a62 deps: do not add extra newline in log file
The commit in v0.10 (431eb172f9) that
backported the original change
(https://codereview.chromium.org/806143002) did add an extra newline
because the logging facilities in v0.10's V8 do not add one.

When merging this commit in v0.12, V8's logging facilities now
automatically add the newline character, and the debug builds assert if
one is already present.
2015-02-16 16:15:51 -08:00
Julien Gilli
2b095bb76c deps: add test for V8 version in profiler's log
431eb172f9 had integrated the addition of
V8's version in V8's profiler log files, without backporting the test
that was included in the original change
(https://codereview.chromium.org/806143002). This commit backports this
test.

The newly added test was tested with
https://github.com/joyent/node/pull/9208.
2015-02-16 16:15:51 -08:00
Julien Gilli
a6bdd8fd07 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	deps/v8/src/log-utils.cc
2015-02-16 15:34:41 -08:00
Trevor Norris
a35ba2f67d buffer: fix pool offset adjustment
If the Buffer allocation isn't a slice then there's no need to adjust
the pool offset after realloc'ing the space available.

Fixes: 6462519 "buffer, doc: misc. fix and cleanup"
2015-02-16 14:13:53 -07:00
cjihrig
6c3647c38d console: allow Object.prototype fields as labels
Console.prototype.timeEnd() returns NaN if the timer label
corresponds to a property on Object.prototype. This commit
uses Object.create(null) to construct the _times object.

Fixes: https://github.com/joyent/node/issues/9069
PR-URL: https://github.com/joyent/node/pull/9116
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-13 10:22:30 -05:00
Herbert Vojčík
b8604fa480 module: replace NativeModule.require
The NativeModule system passes NativeModule.require transparently and so
is unnecessary to call explicitly.

The only one which should have the prefix is the in line 295, where
actually implements a big fs-based module system and actually requires a
native module. That is left unchanged.

PR-URL: https://github.com/joyent/node/pull/9201
Ref: https://github.com/joyent/node/issues/2009
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-12 14:37:30 -07:00
Dan Dascalescu
6c60a72d2b doc: fix code syntax
Add a ';' to the end of a function call in documentation.

PR-URL: https://github.com/joyent/node/pull/9198
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-12 14:25:33 -07:00
Jackson Tian
4823afcbe2 fs: make F_OK/R_OK/W_OK/X_OK not writable
Change the fs.F_OK/R_OK/W_OK/X_OK out of fs.js will lead unexpect
exception. Make these properties readonly.

PR-URL: https://github.com/joyent/node/pull/9060
[trev.norris@gmail.com test properties are read only]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2015-02-11 16:49:22 -07:00
Jan Schär
d2b546187a test: Timeout#unref() does not return instance
Timeout#unref() call returns undefined, not this. The test already
worked before, because the interval was still unref'd, and the test also
succeeds without clearing the interval.

PR-URL: https://github.com/joyent/node/pull/9171
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-11 14:53:44 -07:00
Debjeet Biswas
8d8a2f2190 doc: grammar fix in smalloc
PR-URL: https://github.com/joyent/node/pull/9164
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
2015-02-11 14:48:17 -07:00
Ben Noordhuis
04b63e022a lib: fix max size check in Buffer constructor
A number -> uint32 type coercion bug made buffer sizes
larger than kMaxLength (0x3fffffff) wrap around.

Instead of rejecting the requested size with an exception,
the constructor created a buffer with the wrong size.

PR-URL: https://github.com/iojs/io.js/pull/657
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-10 13:56:05 -07:00
Trevor Norris
605329d7f7 asyncwrap: fix constructor condition for early ret
AsyncWrap should always properly propagate asynchronous calls to any
child that is created. Regardless whether kCallInitHook is currently
active. The previous logic would always return early if kCallInitHook
wasn't set.

PR-URL: https://github.com/joyent/node/pull/9146
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-02-09 15:34:53 -07:00
Amir Saboury
ad0684807c url: reslove urls with . and ..
'.' and '..' are directory specs and resolving urls with or without the
hostname with '.' and '..' should add a trailing slash to the end of the
url.

Fixes: https://github.com/joyent/node/issues/8992
PR-URL: https://github.com/joyent/node/pull/9010
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-09 14:49:10 -07:00
Julien Gilli
a5dbcc9f1d Now working on 0.12.1 2015-02-06 14:04:56 -08:00
Julien Gilli
1de0ca8c44 Merge branch 'v0.12.0-release' into v0.12 2015-02-06 14:04:19 -08:00
Julien Gilli
2b18916ff0 2015.02.06, Version 0.12.0 (Stable)
* npm: Upgrade to 2.5.1

* mdb_v8: update for v0.12 (Dave Pacheco)
2015-02-06 12:04:23 -08:00
Forrest L Norvell
087a7519ce deps: upgrade npm to 2.5.1
Fixes #9126.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-02-06 11:55:44 -08:00
Julien Gilli
02566a77c9 Now working on 0.12.0 2015-02-05 15:29:13 -08:00
Julien Gilli
31610d0db4 tools: improve tooling around AUTHORS file
Replace tools/updateAuthors.awk with tools/update-authors.js. The new
tool generates an AUTHORS file that is stable-ordered alphanumerically.

Fixes #9077.

PR: #9088
PR-URL: https://github.com/joyent/node/pull/9088
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-05 12:50:26 -08:00
Julien Gilli
878c40e1b3 mdb_v8: fix symbols not loaded properly
V8_CONSTANT_REMOVED_SINCE(major, minor) can be used to mark a constant
has being removed from V8 since V8 version major.minor.

Reviewed-By: Dave Pacheco <dap@joyent.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-05 12:35:51 -08:00
Julien Gilli
ebfa7e350a mdb_v8: add tests for ::findjsobjects -k KIND
Reviewed-By: Dave Pacheco <dap@joyent.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-05 12:35:27 -08:00
Dave Pacheco
4312f8d760 mdb_v8: update for v0.12
Bugs fixed:

* v0.12 and later: in-object properties not printing correctly.
* 64-bit: not printing external strings correctly (offset was hardcoded
for 32-bit). This would happen with "::jsstack -vn0" because the
script "node.js" wasn't printed correctly, at least with 0.10 core
files.
* 64-bit: printing JS source (via "::jsstack -v") emits errors and shows
the wrong code.
* Several build warnings.
* Two-byte strings are unnecessarily truncated.
* Could print friendlier note when given obviously bogus function token
positions.

New features:

* ::jsstack prints much cleaner output by default.
* ::jsprint keys are now quoted.
* ::jsstack -v includes "this" value for each function on the stack.
* ::jsstack -v includes more details about each argument (constructor
names for each object).
* new commands: ::jsconstructor, ::jsfunctions, ::jssource, ::nodebuffer
and ::v8internal.
* ::findjsobjects and ::jsprint hidden flags for developers to measure
and improve test coverage.
* internal jsobj_properties() function is much better documented.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-05 12:34:38 -08:00
Ben Noordhuis
431eb172f9 deps: log V8 version in profiler log file
Patch from issue 800293002 authored by ben@strongloop.com

Review URL: https://codereview.chromium.org/806143002

PR-URL: https://github.com/joyent/node/pull/9043
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-04 12:46:17 -07:00
Julien Gilli
f46b085fbe Now working on 0.11.17 2015-01-30 09:05:48 -08:00
Julien Gilli
54d808d2ea Merge branch 'v0.11.16-release' into v0.12 2015-01-30 09:05:18 -08:00
Julien Gilli
8e42e5a073 2015.01.29, Version 0.11.16 (Unstable)
* openssl: Upgrade to 1.0.1l

* npm: Upgrade to 2.3.0

* url: revert support of `path` for url.format" (Julien Gilli)

* assert: use util.inspect() to create error messages (cjihrig)

* net: throw on invalid socket timeouts (cjihrig)

* url: fix parsing of ssh urls (Evan Lucas)
2015-01-29 22:13:10 -08:00
Julien Gilli
59265264d5 src: make build pass with GCC < 4.5
Building node with GCC > 4.4 on CentOS makes the node binary depend on a
more recent version of the C/C++ runtime that is not installed by
default on these older CentOS platforms, and probably on other platforms
as well.

Building node with the default gcc and g++ compilers that come with
these older versions of CentOS allows to ship a node binary that runs
out of the box on these setups with older C/C++ runtimes.

This change works around a bug that was fixed in GCC 4.5. Versions of
GCC < 4.5 would not support using the injected-class-name of a
template base class as a type name.

This change also disables aliasing optimizations for toolchains using
GCC <= 4.4 as they're not able to deal with the aliasing in the queue
implementation used by libuv and node (see src/queue.h).

Fixes #9079.

PR: #9098
PR-URL: https://github.com/joyent/node/pull/9098
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-29 16:23:38 -08:00
cjihrig
bcff90e0c2 assert: use util.inspect() to create error messages
Currently, JSON.stringify() is used to create error messages
on failed assertions. This causes an error when stringifying
objects with circular references. This commit switches out
JSON.stringify() for util.inspect(), which can handle
circular references.

PR: #8734
PR-URL: https://github.com/joyent/node/pull/8734
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-29 15:22:15 -08:00
Julien Gilli
3b392d33c7 Revert "url: support path for url.format"
This reverts commit d312b6d15c.

d312b6d15c introduced some confusion in
the existing API of url.format and url.parse.

The way the 'path' property overrides other properties in url.format's
input is too confusing for existing users compared to the issues it
fixes.

Fixes such as https://github.com/joyent/node/pull/9081 have been
proposed, but they do not make the API less confusing.

Instead, this change just reverts the original breaking change so that
it gives us more time after v0.12.0 is released to come up with a better
API for url.format, url.parse and other related APIs in the v0.13
development branch.

Fixes #9070.

Conflicts:
	doc/api/url.markdown

PR: #9109
PR-URL: https://github.com/joyent/node/pull/9109
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-29 12:07:16 -08:00
Forrest L Norvell
491ac6a843 deps: upgrade npm to 2.3.0
PR: #9086
PR-URL: https://github.com/joyent/node/pull/9086
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-27 17:41:30 -08:00
Julien Gilli
e67073256d build: enable small-icu support for build-release
On Windows, when building the "build-release" rule, enable both small-icu
and download-all.

This change also slightly refactors the build-release rule, mainly so that
it's easier to read.

The resulting MSI package was tested on Windows 7.

Fixes #9099.

PR: #9100
PR-URL: https://github.com/joyent/node/pull/9100
Reviewed-By: Steven R. Loomis <srloomis@us.ibm.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-26 15:59:16 -08:00
Timothy J Fontaine
ddd40fd5dc Merge remote-tracking branch 'origin/v0.10' into v0.12
Conflicts:
	ChangeLog
	doc/api/assert.markdown
	src/node_version.h
	test/simple/test-crypto-stream.js
	vcbuild.bat
2015-01-26 13:01:01 -08:00
Timothy J Fontaine
ff32b81516 Now working on 0.10.37 2015-01-26 12:28:48 -08:00
Timothy J Fontaine
6b264dd1f9 Merge branch 'v0.10.36-release' into v0.10 2015-01-26 12:28:08 -08:00
Timothy J Fontaine
09b482886b 2015.01.26, Version 0.10.36 (Stable)
* openssl: update to 1.0.1l

* v8: Fix debugger and strict mode regression (Julien Gilli)

* v8: don't busy loop in cpu profiler thread (Ben Noordhuis)
2015-01-26 10:28:23 -08:00
Timothy J Fontaine
6168fe6720 build: add win32 convenience build rule
PR-URL: https://github.com/joyent/node/pull/9085
PR: #9085

Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-23 15:17:05 -08:00
Evan Lucas
de5f24a084 url: fix parsing of ssh urls
Fix regression introduced in 6120472036
that broke parsing of some ssh: urls.

An example url is ssh://git@github.com:npm/npm.git

Fixes #9072.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-23 13:47:58 -08:00
cjihrig
f34757398f net: throw on invalid socket timeouts
This commit restricts socket timeouts non-negative, finite
numbers. Any other value throws a TypeError or RangeError.
This prevents subtle bugs that can happen due to type
coercion.

Fixes: https://github.com/joyent/node/issues/8618
PR-URL: https://github.com/joyent/node/pull/8884
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-22 13:14:05 -05:00
Fedor Indutny
9e387fb611 test: fix crypto-stream after openssl update
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:55 -08:00
Fedor Indutny
f5e9b6e84a build: remove vanished masm file from openssl build
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:54 -08:00
James M Snell
deef605085 deps: update openssl to 1.0.1l
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:54 -08:00
Fedor Indutny
b28c76e9d2 deps: update openssl to 1.0.1k
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-21 11:39:54 -08:00
Julien Gilli
f2b378b850 Now working on 0.11.16 2015-01-20 15:46:56 -08:00
Julien Gilli
2d8253d251 Merge branch 'v0.11.15-release' into v0.12 2015-01-20 15:42:57 -08:00
Julien Gilli
8a9f263a82 2015.01.20, Version 0.11.15 (Unstable)
* v8: Upgrade to 3.28.73

* uv: Upgrade to 1.0.2

* npm: Upgrade to v2.1.6

* uv: float patch to revert tty breakage (Trevor Norris)

* v8: re-implement debugger-agent (Fedor Indutny)

* v8: apply floating irhydra patch (Fedor Indutny)

* v8: fix postmortem-metadata generator (Refael Ackermann)

* debugger: fix unhandled error in setBreakpoint (Miroslav Bajtoš)

* async-wrap: add event hooks (Trevor Norris)

* async-wrap: expose async-wrap as binding (Trevor Norris)

* buffer, doc: misc. fix and cleanup (Trevor Norris)

* buffer: add generic functions for (u)int ops (Yazhong Liu)

* buffer: fix and cleanup fill() (Trevor Norris)

* buffer: mv floating point read/write checks to JS (Trevor Norris)

* build, i18n: improve Intl build, add "--with-intl" (Steven R. Loomis)

* build: add small-icu support for binary packages (Julien Gilli)

* build: do not generate support for libuv's probes (Julien Gilli)

* build: i18n: add icu config options (Steven R. Loomis)

* build: i18n: support little-endian machines (Steven Loomis)

* build: vcbuild fix "The input line is too long." (Alexis Campailla)

* child_process: improve spawn() argument handling (cjihrig)

* cluster: avoid race enabling debugger in worker (Timothy J Fontaine)

* cluster: cluster.disconnect() should check status (Sam Roberts)

* cluster: do not signal children in debug mode (Fedor Indutny)

* cluster: don't assert if worker has no handles (Sam Roberts)

* core: fix usage of uv_cwd (Saúl Ibarra Corretgé)

* core: replace uv_fs_readdir with uv_fs_scandir (Saúl Ibarra Corretgé)

* crypto: createDiffieHellman throw for bad args (Trevor Norris)

* crypto: lower RSS usage for TLSCallbacks (Fedor Indutny)

* crypto: store thread id as pointer-sized (Alexis Campailla)

* dns: propagate domain for c-ares methods (Chris Dickinson)

* fs: fix symlink error message (Vladimir Kurchatkin)

* http: Improve _addHeaderLines method (Jackson Tian)

* http: cleanup setHeader() (Trevor Norris)

* http: rename flush to flushHeaders (Timothy J Fontaine)

* lib,src: fix spawnSync ignoring its 'env' option (Juanjo)

* modules: adding load linked modules feature (Thorsten Lorenz)

* net: Make server.connections un-enumerable (Patrick Mooney)

* net: add pauseOnConnect option to createServer() (cjihrig)

* net: make connect() input validation synchronous (cjihrig)

* node: avoid automatic microtask runs (Vladimir Kurchatkin)

* node: fix throws before timer module is loaded (Trevor Norris)

* openssl: fix keypress requirement in apps on win32 (Fedor Indutny)

* path: added parse() and format() functions (Rory Bradford)

* path: allow calling platform specific methods (Timothy J Fontaine)

* path: don't lower-cases drive letters (Bert Belder)

* path: refactor normalizeArray() (Nathan Woltman)

* process: pid can be a string in process.kill() (Sam Roberts)

* readline: fix performance issue when large line (Jicheng Li)

* readline: should not require an output stream. (Julien Gilli)

* smalloc: check if obj has external data (Vladimir Kurchatkin)

* smalloc: don't allow to dispose typed arrays (Vladimir Kurchatkin)

* smalloc: fix bad assert for zero length data (Trevor Norris)

* smalloc: fix copyOnto optimization (Vladimir Kurchatkin)

* src: all wrap's now use actual FunctionTemplate (Trevor Norris)

* src: fix VC++ warning C4244 (Rasmus Christian Pedersen)

* src: remove Async Listener (Trevor Norris)

* stream: switch _writableState.buffer to queue (Chris Dickinson)

* streams: make setDefaultEncoding() throw (Brian White)

* streams: set default encoding for writable streams (Johnny Ray)

* tls: remove tls.createSecurePair code deprecation (Jackson Tian)

* tls_wrap: ignore ZERO_RETURN after close_notify (Fedor Indutny)

* url: change hostname regex to negate invalid chars (Jonathan Johnson)

* url: fixed encoding for slash switching emulation. (Evan Rutledge Borden)

* url: improve parsing speed (CGavrila)

* url: make query() consistent (Gabriel Wicke)

* url: support `path` for url.format (Yazhong Liu)

* util: add es6 Symbol support for `util.inspect` (gyson)
2015-01-20 13:22:17 -08:00
Andrei Sedoi
430096a90f doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-20 10:51:00 -05:00
Andrei Sedoi
e45c52c573 doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-20 10:39:10 -05:00
Julien Gilli
7a8ea15d6f test: fix test-debug-port-from-cmdline.js
Make this test less prone to race conditions by using synchronous
interprocess communication instead of a timer to determine when the
child process is ready to receive messages from its parent.

Also, remove a superfluous timer since the tests suite already makes
tests time out after a while.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-16 14:59:29 -08:00
Timothy J Fontaine
89f3c9037f http: rename flush to flushHeaders
In order to preserve the potential for a flush method being added to the
streams API, rename flush to flushHeaders which is much more clear about
the behavior of this method.

PR: #9048
PR-URL: https://github.com/joyent/node/pull/9048

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-16 13:42:43 -08:00
Timothy J Fontaine
efe1781f3d crypto: don't use transitionary ThrowException
Since the current environment is in scope use ThrowError on that,
instead of having to lookup the Environment again.

Added benefit, lint the source code.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-16 11:03:30 -08:00
Timothy J Fontaine
bb1f68f9d6 src: lint remove extra node_crypto include
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-16 11:02:55 -08:00
Julien Gilli
28d0cbbdfd test: fix test-fs-access.js
On non-windows supported platforms, fs.access(readOnlyFile, W_OK, ...)
is expected to fail, but always succeeds if node runs as the super user,
which is often the case for tests running on our continuous integration
platform.

This change makes the test try to change its process user id to nobody
on non-windows platforms so that the above mentioned test can pass and
still perform the actual desired test. If changing the process user id
to a nobody is not possible, then the test checks that
fs.access(readOnlyFile, W_OK, ...) actually succeeds.

Fixes #9033.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-16 10:35:44 -08:00
Steven R. Loomis
70d04e7f35 src: add license content from ICU
Added license info from:
 http://source.icu-project.org/repos/icu/icu/trunk/license.html
All text pasted. Long lines wrapped. (original is HTML.)

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-16 10:25:32 -08:00
Timothy J Fontaine
58fcc65985 test: debug-signal-cluster should not be racey
unref one superfluous timer (as the test suite already has a global
timeout), and improve the state machine to iterate the messages more
reliably.

Ultimately make the test complete more quickly.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-15 23:41:22 -08:00
Timothy J Fontaine
e9df9a0216 cluster: avoid race enabling debugger in worker
Previously if a worker's state machine had already transitioned into the
'listening' state when it received the message enabling the debugger,
the worker would never enable its debugger.

Change the logic to allow the 'listening' as a valid state for enabling
the debugger.

Fixes #6440

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-15 23:41:22 -08:00
Bert Belder
016e08458c path: don't lower-cases drive letters
In general path functions don't change the case of a path. Making an
exception for windows drive letters violates the principle of least
surprise.

Changing the drive letter case has caused a lot of issues, including
joyent/node#7031, joyent/node#7806 and lots of bikeshedding about
whether uppercase is the right case or lowercase.

This effectively reverts joyent/node@a05f973

Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-15 14:59:36 -08:00
Julien Gilli
67f87a743d build: add small-icu support for binary packages
Invokes the configure script used to build binary packages
(OSX pkg, binary tarballs, pkgsrc, MSI) with --download=all
--with-intl=small-icu.

Also makes PACKAGEMAKER customizable, because PackageMaker is not
necessarily installed in /Developer on OSX anymore.

Tested all binary packages on Windows, OSX, Linux and SmartOS.

Fixes #7676.

Reviewed-by: Steven R. Loomis <srl@icu-project.org>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-14 17:41:21 -08:00
Julien Gilli
408bffe212 test: fix ssl/tls options matrix test
The tests suite available in test/external/ssl-options was originally
written for security fixes made in the v0.10 branch. In this branch, the
client's default ciphers list is compatible with SSLv2.

After merging this change from v0.10 to v0.12, this tests suite was
broken because commits 5d2aef17ee and
f4c8020d10 make SSL/TLS clients use a
default ciphers list that is not compatible with the SSLv2 protocol.

This change fixes two issues:
1) The cipher list that was setup for a given test was not passed
properly to the client.
2) When either or both of clients/servers were using SSLv2, tests were
expected to succeed when at least the server end was using SSLv2
compatible ciphers. Now, tests are expected to succeed only if
SSLv2 compatible ciphers are used on both ends.

Fixes #9020.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-14 17:36:45 -08:00
Julien Gilli
ae00e97ef2 test: fix test-crypto-stream.js
A recent merge of v0.10 to v0.12
(0c7f6ca830) upgraded OpenSSL to version
1.0.1j. In v0.10, this required test-crypto-stream.js to be fixed with
commit 707cc25011. Basically, instead of
returning the proper error, Err_get_error() would return 0 and the test
for the error message needed to be updated in test-crypto-stream.js.

However, in the v0.12 branch, crypto error messages are handled a bit
differently since commit 26a1b712ec
landed. Instead of returning the default OpenSSL error message, it makes
the decipher stream return a default message specific to Node.js.

This commit updates test-crypto-stream.js to test the error object
against the proper default error message.

Fixes #9019.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-14 17:34:39 -08:00
Sam Roberts
85360f06db cluster: don't assert if worker has no handles
Do not assume that all workers share all shared handles.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-14 16:27:13 -08:00
Sam Roberts
f260ef8c3e cluster: cluster.disconnect() should check status
Workers that are already disconnected but not yet exited should not be
disconnected, trying to do so raises exceptions.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-14 16:27:12 -08:00
Julien Gilli
307daedd2c Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	test/simple/test-child-process-spawn-typeerror.js
2015-01-14 15:38:15 -08:00
Robert Kowalski
0c50195071 docs: delete unused/duplicate css files
- `sh.css` already exists in `api_assets`
 - `sh_vim-dark.css` is unused, but used in the repo `node-website`
        now

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-14 15:26:48 -08:00
cjihrig
0a430b9aec test: backport use executable in spawn() test
Backport 10703774f0 from the v0.12 branch.

Currently, the test-child-process-spawn-typeerror.js is
calling execFile() on a JavaScript source file, which is
causing failures on Windows. This commit switches to calling
spawn() on an actual executable.

Fixes #8930.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-13 14:54:44 -08:00
Julien Gilli
fbfe562d71 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	deps/v8/src/debug-debugger.js
	deps/v8/src/mirror-debugger.js
	deps/v8/src/platform-freebsd.cc
	deps/v8/src/platform-linux.cc
	deps/v8/src/platform-macos.cc
	deps/v8/src/platform-openbsd.cc
	deps/v8/src/platform-posix.cc
	deps/v8/src/platform-solaris.cc
	deps/v8/tools/gyp/v8.gyp
2015-01-13 12:39:14 -08:00
Julien Gilli
31051e5c7b deps: revert backport b593aa8 from v8 upstream
This reverts commit 45f1330425.

45f1330425 was basically breaking
node-inspector. V8 landed a patch upstream that would probably fix these
issues (see https://codereview.chromium.org/813873007), but without the
ability to properly test it in the wild, it's safer to just revert the
breaking change.

Fixes #8948.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-13 11:25:09 -08:00
Julien Gilli
21c2636c9a Merge remote-tracking branch 'upstream/v0.12' into merge-0-10-into-0-12 2015-01-12 18:36:08 -08:00
Julien Gilli
c315577994 child_process: fix test after latest merge
child_process.spawn's argument parsing is stricter in v0.12 than in
v0.10. Changes in tests merged from v0.10 that relied on the less-strict
argument parsing would fail. This change updates the test so that it
makes sure that the stricter argument parsing fails as expected.

This change also fixes a small typo introduced during the conflicts
resolution of said merge.
2015-01-12 17:40:47 -08:00
Colin Ihrig
29449349da fs: add access() and accessSync()
fs.exists() and fs.existsSync() do not follow the typical error first
callback convention. access() and accessSync() are added as alternatives
in this commit.

PR-URL: https://github.com/joyent/node/pull/8714
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-12 16:59:34 -08:00
Fedor Indutny
7f4b45dbe8 openssl: fix keypress requirement in apps on win32
Original source:

http://openssl.6102.n7.nabble.com/PATCH-s-client-Fix-keypress-requirement-with-redirected-input-on-Windows-td46787.html

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-12 16:51:46 -08:00
cjihrig
10703774f0 test: use executable in spawn() test
Currently, the test-child-process-spawn-typeerror.js is
calling execFile() on a JavaScript source file, which is
causing failures on Windows. This commit switches to calling
spawn() on an actual executable.

Reviewed-by: Sam Roberts <sam@strongloop.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-01-12 16:51:29 -08:00
Julien Gilli
e64ee2b3f7 tests: append instead of override environment
Some tests that rely on some environment variables being passed to child
processes would fail because they reset the child processes'
environement instead of appending to it. This would break on test
environments where some custom environment variables are needed to make
node work properly.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-12 16:51:14 -08:00
Julien Gilli
7325fe7987 src: fix indentation in _tls_wrap.js
Fix indentation issue in code added during the latest merge. This change
makes jslint pass for _tls_wrap.js.
2015-01-12 16:49:33 -08:00
Ben Noordhuis
6ebd85e105 v8: don't busy loop in cpu profiler thread
Reduce the overhead of the CPU profiler by replacing sched_yield() with
nanosleep() in V8's tick event processor thread.  The former only yields
the CPU when there is another process scheduled on the same CPU.

Before this commit, the thread would effectively busy loop and consume
100% CPU time.  By forcing a one nanosecond sleep period rounded up to
the task scheduler's granularity (about 50 us on Linux), CPU usage for
the processor thread now hovers around 10-20% for a busy application.

PR-URL: https://github.com/joyent/node/pull/8789
Ref: https://github.com/strongloop/strong-agent/issues/3
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-12 16:49:07 -08:00
Julien Gilli
893fe4c67d deps: remove duplicate uv__loop_configure
The latest merge resulted in uv__loop_configure being defined twice on
Windows. This changes removes one of these duplicates to fix the build
on this platform.
2015-01-12 16:47:56 -08:00
Julien Gilli
0c7f6ca830 Merge remote-tracking branch 'upstream/v0.10' into merge-0-10-into-0-12
Conflicts:
	AUTHORS
	ChangeLog
	configure
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/README.md
	deps/uv/config-unix.mk
	deps/uv/include/uv-private/uv-win.h
	deps/uv/include/uv.h
	deps/uv/src/unix/internal.h
	deps/uv/src/unix/kqueue.c
	deps/uv/src/unix/stream.c
	deps/uv/src/uv-common.c
	deps/uv/src/uv-common.h
	deps/uv/src/version.c
	deps/uv/src/win/poll.c
	deps/uv/test/test-osx-select.c
	deps/v8/src/debug-debugger.js
	deps/v8/src/isolate.cc
	deps/v8/src/isolate.h
	deps/v8/src/mirror-debugger.js
	doc/api/buffer.markdown
	doc/api/child_process.markdown
	doc/api/dns.markdown
	doc/api/tls.markdown
	doc/api/url.markdown
	lib/_stream_writable.js
	lib/assert.js
	lib/child_process.js
	lib/crypto.js
	lib/dgram.js
	lib/http.js
	lib/net.js
	lib/timers.js
	lib/tls.js
	src/node.cc
	src/node.h
	src/node.js
	src/node_crypto.cc
	src/node_version.h
	test/common.js
	test/simple/test-child-process-spawn-typeerror.js
	tools/certdata.txt
2015-01-12 15:59:37 -08:00
cjihrig
1fad3730c2 test: fix test-process-active-wraps.js
b636ba8186 caused a regression
on Windows due to the way server handles are cleaned up. This
commit fixes the test by allowing the handle to be cleaned up.

Fixes: https://github.com/joyent/node/issues/8986
PR-URL: https://github.com/joyent/node/pull/8998
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-08 18:41:51 -05:00
Chris Dickinson
c8ef97e4d9 src,zlib: revert concatenated-stream changes
Revert "src: fix windows build error" and "zlib: support
concatenated gzip files". Treating subsequent data as a
concatenated stream breaks npm install.

This reverts commits 93533e98f7
and 6f6a97958e.

Fixes: https://github.com/joyent/node/issues/8962
PR-URL: https://github.com/joyent/node/pull/8985
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-01-07 14:29:11 -08:00
Trevor Norris
372a2f56be smalloc: fix bad assert for zero length data
If the data length passed to smalloc.alloc() the array_length will be
zero, causing an overflow check to fail. This prevents that from
happening.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2015-01-05 02:24:40 -08:00
cjihrig
b636ba8186 net: make connect() input validation synchronous
Socket.prototype.connect() sometimes throws on bad inputs
after an asynchronous operation. This commit makes the input
validation synchronous. This commit also removes some hard
coded IP addresses.

PR-URL: https://github.com/joyent/node/pull/8180
Fixes: https://github.com/joyent/node/issues/8140
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-03 20:02:27 -05:00
Steven R. Loomis
8cfbeed27a docs: update to authors file
PR-URL: https://github.com/joyent/node/pull/8964
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-01-02 17:31:20 -08:00
Steven R. Loomis
a30839576c build: i18n: add icu config options
Make "--with-intl=none" the default and add "intl-none" option to
vcbuild.bat.

If icu data is missing print a warning unless either --download=all or
--download=icu is set. If set then automatically download, verify (MD5)
and unpack the ICU data if not already available.

There's a "list" of URLs being used, but right now only the first is
picked up. The logic works something like this:

* If there is no directory deps/icu,
  * If no zip file (currently icu4c-54_1-src.zip),
    * Download zip file (icu-project.org -> sf.net)
  * Verify the MD5 sum of the zipfile
    * If bad, print error and exit
  * Unpack the zipfile into deps/icu
* If deps/icu now exists, use it, else fail with help text

Add the configuration option "--with-icu-source=..."

Usage:
  * --with-icu-source=/path/to/my/other/icu
  * --with-icu-source=/path/to/icu54.zip
  * --with-icu-source=/path/to/icu54.tgz
  * --with-icu-source=http://example.com/icu54.tar.bz2

Add the configuration option "--with-icu-locals=...".  Allows choosing
which locales are used in the "small-icu" case.

Example:
    configure --with-intl=small-icu --with-icu-locales=tlh,grc,nl

(Also note that as of this writing, neither Klingon nor Ancient Greek
are in upstream CLDR data. Serving suggestion only.)

Don't use hard coded ../../out paths on windows. This was suggested by
@misterdjules as it causes test failures.  With this fix, "out" is no
longer created on windows and the following can run properly:

    python tools/test.py simple

Reduce space by about 1MB with ICU 54 (over without this patch). Also
trims a few other source files, but only conditional on the exact ICU
version used. This is to future-proof - a file that is unneeded now may
be needed in future ICUs.

Also:
  * Update distclean to remove icu related files
  * Refactor some code into tools/configure.d/nodedownload.py
  * Update docs
  * Add test

PR-URL: https://github.com/joyent/node/pull/8719
Fixes: https://github.com/joyent/node/issues/7676#issuecomment-64704230
[trev.norris@gmail.com small change to test's whitespace and logic]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2015-01-02 16:51:53 -08:00
CGavrila
6a03fce16e url: improve parsing speed
The url.parse() function now checks whether an escapable character is in
the URL before trying to escape it.

PR-URL: https://github.com/joyent/node/pull/8638
[trev.norris@gmail.com: Switch to use continue instead of if]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-12-30 14:00:19 -08:00
Timothy J Fontaine
fe2019699a Now working on 0.10.36 2014-12-23 17:31:00 -08:00
Timothy J Fontaine
cd6dff9728 Merge branch 'v0.10.35-release' into v0.10 2014-12-23 17:30:32 -08:00
Timothy J Fontaine
a363f61ca8 2014.12.22, Version 0.10.35 (Stable)
* tls: re-add 1024-bit SSL certs removed by f9456a2 (Chris Dickinson)

* timers: don't close interval timers when unrefd (Julien Gilli)

* timers: don't mutate unref list while iterating it (Julien Gilli)
2014-12-22 13:22:32 -08:00
James M Snell
102a861ec2 doc: clarify buffer api documentation
Better wording for start and end parameters, also document .length
should be considered readonly.

RE: #8857, #8859, #8913
PR: #8910
PR-URL: https://github.com/joyent/node/pull/8910

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:24:28 -08:00
James M Snell
48536394c9 doc: clarify add/removeListener semantics
Clarify that adding or removing a listener is not idempotent.

RE: #8853
PR: #8911
PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:12:48 -08:00
Julien Gilli
fd2cb7c611 timers: don't mutate unref list while iterating it
Commit 934bfe23a1 had introduced a
regression where node would crash trying to access a null unref timer if
a given unref timer's callback would remove other unref timers set to
fire in the future.

More generally, it makes the unrefTimeout function more solid by not
mutating the unrefList while traversing it.

Fixes #8897.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-22 11:45:31 -08:00
Chris Dickinson
1425ccd1b2 src: re-add 1024-bit SSL certs removed by f9456a2
this fixes a problem where connecting to AWS services
would report an untrusted cert error.

Fixes: https://github.com/joyent/node/issues/8894
PR-URL: https://github.com/joyent/node/pull/8904
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2014-12-19 17:11:40 -08:00
Julien Gilli
78db74dd88 timers: don't close interval timers when unrefd
This change fixes a regression introduced by commit
0d051238be, which contained a typo that
would cause every unrefd interval to fire only once.

Fixes #8900.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-19 15:41:55 -08:00
Jackson Tian
890baa03a8 doc: add details for http res/req end callback
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-19 13:02:47 -08:00
Chris Dickinson
91586661c9 stream: switch _writableState.buffer to queue
In cases where many small writes are made to a stream
lacking _writev, the array data structure backing the
WriteReq buffer would greatly increase GC pressure.

Specifically, in the fs.WriteStream case, the
clearBuffer routine would only clear a single WriteReq
from the buffer before exiting, but would cause the
entire backing array to be GC'd. Switching to [].shift
lessened pressure, but still the bulk of the time was
spent in memcpy.

This replaces that structure with a linked list-backed
queue so that adding and removing from the queue is O(1).
In the _writev case, collecting the buffer requires an
O(N) loop over the buffer, but that was already being
performed to collect callbacks, so slowdown should be
neglible.

PR-URL: https://github.com/joyent/node/pull/8826
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-18 09:39:05 -08:00
Timothy J Fontaine
1b81ea8276 Now working on 0.10.35 2014-12-17 14:39:51 -08:00
Timothy J Fontaine
a6757fb9d0 Merge branch 'v0.10.34-release' into v0.10 2014-12-17 14:39:24 -08:00
Ben Noordhuis
93533e98f7 src: fix windows build error
Fix a Windows-only build error that was introduced in
commit 1183ba4 ("zlib: support concatenated gzip files").

Rename the NO_ERROR and FAILED enumerations, they conflict
with macros of the same name in <winerror.h>.

PR-URL: https://github.com/joyent/node/pull/8893
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-17 14:13:20 -08:00
Timothy J Fontaine
52795f8fcc 2014.12.17, Version 0.10.34 (Stable)
* uv: update to v0.10.30

* zlib: upgrade to v1.2.8

* child_process: check execFile args is an array (Sam Roberts)

* child_process: check fork args is an array (Sam Roberts)

* crypto: update root certificates (Ben Noordhuis)

* domains: fix issues with abort on uncaught (Julien Gilli)

* timers: Avoid linear scan in _unrefActive. (Julien Gilli)

* timers: fix unref() memory leak (Trevor Norris)

* v8: add api for aborting on uncaught exception (Julien Gilli)

* debugger: fix when using "use strict" (Julien Gilli)
2014-12-17 13:21:23 -08:00
Miroslav Bajtoš
e93ff4f0ce debugger: fix unhandled error in setBreakpoint
Fix Interface.setBreakpoint() to correctly handle an attempt to set a
breakpoint in the current script when there is no current script.
This usually happens when the debugged process is not paused.

Fixes: https://github.com/joyent/node/issues/6453
PR-URL: https://github.com/joyent/node/pull/6460
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-17 13:00:48 -08:00
Trevor Norris
afb488db86 Revert "src: reduce cpu profiler overhead"
This reverts commit 1eb1e0a9af.
2014-12-17 12:45:23 -08:00
Ben Noordhuis
1eb1e0a9af src: reduce cpu profiler overhead
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active. Depends on https://github.com/libuv/libuv#15.

Ref: https://github.com/strongloop/strong-agent/issues/3
PR-URL: https://github.com/joyent/node/pull/8791
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-17 12:37:30 -08:00
cjihrig
f75a8ad723 test: remove redundant code in test
A block of asserts were duplicated in
test/simple/test-child-process-spawn-typeerror.js. This commit
removes the duplicated asserts.

Fixes: https://github.com/joyent/node/pull/8454
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-17 15:08:22 -05:00
Julien Gilli
542234ad98 doc: improve dns module's documentation
Make the difference between dns.lookup and other functions even clearer.

PR: #8747
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-17 11:54:31 -08:00
Julien Gilli
45f1330425 deps: backport b593aa8 from v8 upstream
Original commit message:

Enable "strict mode"; for debugger scripts

BUG=v8:3708

Review URL: https://codereview.chromium.org/736583007

Cr-Commit-Position: refs/heads/master@{#25420}
2014-12-17 11:47:26 -08:00
Julien Gilli
0ff51c6e06 deps: backport 2ad2237 from v8 upstream
Original commit message:

Fix Unhandled ReferenceError in debug-debugger.js

This fixes following exception in Sky on attempt to set a breakpoint
"Unhandled: Uncaught ReferenceError: break_point is not defined"
I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode.

BUG=None
LOG=N
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/741683002

Cr-Commit-Position: refs/heads/master@{#25415}
2014-12-17 11:47:26 -08:00
Shigeki Ohtsu
bddea12026 doc: Update LICENSE for zlib 1.2.8 2014-12-16 15:35:09 -08:00
Shigeki Ohtsu
710845cfd3 deps: fix zlib.gyp for zlib upgrade to 1.2.8
This adds new sources for gzip files and defines a new flag for mac and freebsd.
They are taken from third_party/zlib/zlib.gyp in Chromium repository.
2014-12-16 15:35:09 -08:00
Shigeki Ohtsu
33f74bbd90 deps: upgrade zlib to 1.2.8 2014-12-16 15:35:09 -08:00
Luis Reis
6f6a97958e zlib: support concatenated gzip files
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/6442
2014-12-16 15:11:50 -08:00
Julien Gilli
934bfe23a1 timers: Avoid linear scan in _unrefActive.
Before this change, _unrefActive would keep the unrefList sorted when
adding a new timer.

Because _unrefActive is called extremely frequently, this linear scan
(O(n) at worse) would make _unrefActive show high in the list of
contributors when profiling CPU usage.

This commit changes _unrefActive so that it doesn't try to keep the
unrefList sorted. The insertion thus happens in constant time.

However, when a timer expires, unrefTimeout has to go through the whole
unrefList because it's not ordered anymore.

It is usually not large enough to have a significant impact on
performance because:
- Most of the time, the timers will be removed before unrefTimeout is
  called because their users (sockets mainly) cancel them when an I/O
  operation takes place.
- If they're not, it means that some I/O took a long time to happen, and
  the initiator of subsequents I/O operations that would add more timers
  has to wait for them to complete.

With this change, _unrefActive does not show as a significant
contributor in CPU profiling reports anymore.

Fixes #8160.
PR-URL: #8751

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-16 11:44:23 -08:00
Ben Burns
5b9e5bdd03 doc: clarify create{Read,Write}Stream fd option
Clarify the fd option: it is preferred to the path parameter, omits
the "open" event if given, and is available on WriteStreams as well.

PR-URL: https://github.com/joyent/node/issues/7707
Fixes: https://github.com/joyent/node/issues/7707
Fixes: https://github.com/joyent/node/issues/7708
Fixes: https://github.com/joyent/node/issues/4367
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 22:25:58 -08:00
Trevor Norris
813114dab0 src: remove icu_config
ICU support in v0.12 generates a new icu_config.gypi. This was
accidentally committed after switching branches. The file has been removed
and added to .gitignore.

Fixes: 0d051238 "timers: fix unref() memory leak"
2014-12-15 15:36:00 -08:00
Steven R. Loomis
69b122a642 build: configure return exit status from gyp
Previously, 'configure' would not return an exit status
if gyp blows up. This can be tested via:

    date >> node.gyp ; ./configure && echo A-OK

You will get "A-OK" even though gyp had failed.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-15 13:55:11 -08:00
Julien Gilli
0603c8345b docs: clarify url.format documentation
The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Fixes #8796.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 12:29:36 -08:00
silverwind
d230fa9eb7 doc: fix typo secureOptions in tls
Documentation mentioned 'securityOptions', where it should have read
'secureOptions'.

Fixes #8608.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-11 23:27:49 -08:00
cjihrig
4bba87050c test: add test for spawnSync() env option
PR-URL: https://github.com/joyent/node/pull/8845
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-11 10:32:56 -08:00
Juanjo
946cec7b65 lib,src: fix spawnSync ignoring its 'env' option
PR-URL: https://github.com/joyent/node/pull/8546
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-11 10:31:06 -08:00
Alexis Campailla
8708c7abe5 test: mark more tests as flaky
Marking these two tests as flaky, since they have been failing
intermittenly in recent builds:
test-debug-signal-cluster
test-cluster-basic
2014-12-10 12:58:32 +01:00
Saúl Ibarra Corretgé
20a7088d9c deps: update libuv to 1.0.2
PR-URL: https://github.com/joyent/node/pull/8847
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 17:03:50 -08:00
Saúl Ibarra Corretgé
1c031c84d2 deps: update libuv to 0.10.30
PR-URL: https://github.com/joyent/node/pull/8849
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 12:41:46 -08:00
Julien Gilli
4dc660e164 build: do not generate support for libuv's probes
Dtrace probes were removed from libuv recently, but their usage by node
was not completely removed, causing build breaks on SmartOS.

Even though the build is working on other platforms, these probes are
not fired by libuv anymore, so there's no point in using them on these
platforms too.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 12:06:33 -08:00
pkcs
8120015f40 doc: clearer log messages in net code samples
Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-08 15:23:22 -08:00
Alejandro Oviedo
f5cb330ab1 docs: fix streams example for write() after end()
Currently there's an example using http.ServerResponse stream, which
has a known bug and will not throw an error while writing after end().
Changed to a writable stream from fs which behaves as expected.

fix #8814

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-06 19:27:05 -08:00
Brendan Ashworth
5e503f45d2 doc: fix grammar in tls and timers
Replace 'a' with 'an' where appropriate.
2014-12-05 14:12:48 -08:00
Brendan Ashworth
70195acbe3 doc: fix grammar and wording in tls and timers
In `tls.markdown`, there was a misuse of 'a' which has been replaced
with 'an'.

In `timers.markdown`...
  line 31: misuse of 'a', replaced with 'an'
  line 59: unclear wording, haywire 'a', added new comma
2014-12-05 12:30:40 -08:00
Jackson Tian
9653c4b8c7 doc: mention callback for http res/req write & end
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's write and end methods.
2014-12-05 10:59:40 -08:00
Trevor Norris
fe6d5be6b4 uv: float patch to revert tty breakage
Float https://github.com/libuv/libuv/commit/484a3a9 to fix incorrect
indentation in REPL.
2014-12-05 05:34:03 -08:00
Trevor Norris
709fc160e5 async-wrap: add event hooks
Call a user-defined callback at specific points in the lifetime of an
asynchronous event. Which are on instantiation, just before/after the
callback has been run.

**If any of these callbacks throws an exception, there is no forgiveness
or recovery. A message will be displayed and a core file dumped.**

Currently these only tie into AsyncWrap, meaning no call to a hook
callback will be made for timers or process.nextTick() events. Though
those will be added in a future commit.

Here are a few notes on how to make the hooks work:

- The "this" of all event hook callbacks is the request object.

- The zero field (kCallInitHook) of the flags object passed to
  setupHooks() must be set != 0 before the init callback will be called.

- kCallInitHook only affects the calling of the init callback. If the
  request object has been run through the create callback it will always
  run the before/after callbacks. Regardless of kCallInitHook.

- In the init callback the property "_asyncQueue" must be attached to
  the request object. e.g.

  function initHook() {
    this._asyncQueue = {};
  }

- DO NOT inspect the properties of the object in the init callback.
  Since the object is in the middle of being instantiated there are some
  cases when a getter is not complete, and doing so will cause Node to
  crash.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 05:00:45 -08:00
Trevor Norris
419f18d2e2 async-wrap: explicitly pass parent
When instantiating a new AsyncWrap allow the parent AsyncWrap to be
passed. This is useful for cases like TCP incoming connections, so the
connection can be tied to the server receiving the connection.

Because the current architecture instantiates the *Wrap inside a
v8::FunctionCallback, the parent pointer is currently wrapped inside a
new v8::External every time and passed as an argument. This adds ~80ns
to instantiation time.

A future optimization would be to add the v8::External as the data field
when creating the v8::FunctionTemplate, change the pointer just before
making the call then NULL'ing it out afterwards. This adds enough code
complexity that it will not be attempted until the current approach
demonstrates it is a bottle neck.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:57:01 -08:00
Trevor Norris
1293f0a228 async-wrap: expose async-wrap as binding
Expose basic hooks for AsyncWrap via the async_wrap binding. Right now
only the PROVIDER types are exposed. This is a preliminary step before
more functionality is added.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:56:45 -08:00
Trevor Norris
add955e6b8 src: remove unnecessary template parameter
The template class information is received via the type of the first
argument. So there is no need to use Wrap<T>(handle).

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:55:26 -08:00
Trevor Norris
5962dbef49 src: all wrap's now use actual FunctionTemplate
Instead of simply creating a new v8::Object to contain the connection
information, instantiate a new instance of a FunctionTemplate. This will
allow future improvements for debugging and performance probes.

Additionally, the "provider" argument in the ReqWrap constructor is no
longer optional.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:52:42 -08:00
Trevor Norris
b1e9d330aa node: fix throws before timer module is loaded
An edge case could occur when the setImmediate() in _fatalException()
would fire before the timers module had been loaded globally, causing
Node to crash.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:52:19 -08:00
Trevor Norris
42df679c45 node, async-wrap: remove MakeDomainCallback
C++ won't deoptimize like JS if specific conditional branches are
sporadically met in the future. Combined with the amount of code
duplication removal and simplified maintenance complexity, it makes more
sense to merge MakeCallback and MakeDomainCallback.

Additionally, type casting in V8 before verifying what that type is will
cause V8 to abort in debug mode if that type isn't what was expected.
Fix this by first checking the v8::Value before casting.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:37:53 -08:00
Trevor Norris
2593c14131 async-wrap: move MakeCallback to .cc
MakeCallback is too large a function to be inlined. Likewise, only
having header files will not allow for any part of AsyncWrap to be
exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN().

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:35:44 -08:00
Trevor Norris
b6559553a4 src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:33:26 -08:00
Alexis Campailla
0674cbaceb test: mark current flaky tests as flaky 2014-12-04 17:22:15 +01:00
Alexis Campailla
df3a2b2cf2 test: runner support for flaky tests
Adding --flaky-tests option, to allow regarding flaky tests failures
as non-fatal.

Currently only observed by the TapProgressIndicator, which will
add a # TODO directive to tests classified as flaky. According to the
TAP specification, the test harness is supposed to treat failures
that have a # TODO directive as non-fatal.
2014-12-04 17:22:14 +01:00
Fedor Indutny
8c868989be zlib: do not Unref() if wasn't Ref()ed
In very unlikely case, where `deflateInit2()` may return error (right
now happening only on exhausting all memory), the `ZCtx::Error()` will
be called and will try to `Unref()` the handle. But the problem is that
this handle was never `Ref()`ed, so it will trigger an assertion error
and crash the program.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/joyent/node/pull/8687
2014-12-04 18:10:13 +03:00
Ben Noordhuis
f9456a2d36 crypto: update root certificates
Update tools/certdata.txt to [0] (last updated on 2014-11-14) and
rebuild src/node_root_certs.h.

Refs joyent/node#8679 and joyent/node#8709.

[0] https://hg.mozilla.org/mozilla-central/raw-file/64206634959a/security/nss/lib/ckfw/builtins/certdata.txt
2014-12-04 16:57:48 +03:00
Ben Noordhuis
479b0b4e54 tools: customize mk-ca-bundle.pl
Remove unneeded functionality and tweak the generated output so we
can #include it in C++ source code.

This is a back-port of commit e159073 from the master branch.
2014-12-04 16:57:48 +03:00
Ben Noordhuis
3c9c920f57 tools: bundle mk-ca-bundle.pl from upstream curl
This is a back-port of commit 5ab863d from the master branch.
2014-12-04 16:57:48 +03:00
Trevor Norris
e67db0191d node: fix bad assert
It was my mistake to change an assert check. This changes it back to how
the assert was originally done.

Fixes: c131c1f "modules: adding load linked modules feature"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-12-03 17:19:07 -08:00
Carlos Campderrós
4815873bb5 doc: set logical umask in process.umask example
0644 seems to be the desired mode for new files (as it is a very weird
umask), and to achieve that the correct umask would be 0022.

PR-URL: https://github.com/joyent/node/pull/8039
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-02 22:35:36 -08:00
Jonathan Johnson
6120472036 url: change hostname regex to negate invalid chars
Regarding joyent/node#8520

This changes hostname validation from a whitelist regex approach
to a blacklist regex approach as described in https://url.spec.whatwg.org/#host-parsing.

url.parse misinterpreted `https://good.com+.evil.org/`
as `https://good.com/+.evil.org/`.  If we use url.parse to check the
validity of the hostname, the test passes, but in the browser the
user is redirected to the evil.org website.
2014-12-02 17:24:18 -08:00
Trevor Norris
c4f6c22c20 lint: fix code style
Couple code style fixes to pass cpplint

Fixes: 304c0b4 "crypto: store thread id as pointer-sized"
2014-12-02 17:10:40 -08:00
Yazhong Liu
d312b6d15c url: support path for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 10:55:22 -08:00
Thorsten Lorenz
c131c1f920 modules: adding load linked modules feature
- introduced NM_F_LINKED flag to identify linked modules
- setting node_is_initialized after calling V8::Initialize in order to
  make the right decision during initial module registration
- introduced modlist_linked in order to track modules that were
  pre-registered in order to complete it once node is initialized
- completing registration of linked module similarly to the way it's
  done inside DLOpen

PR-URL: https://github.com/joyent/node/pull/8386
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-01 15:07:43 -08:00
Alexis Campailla
304c0b43aa crypto: store thread id as pointer-sized
In 59658a8de7
the return of uv_thread_self() was changed from unsigned long to
uv_thread_t.

uv_thread_t is a HANDLE (pointer-sized) on Windows, which means that
on Win64 it cannot be stored with CRYPTO_THREADID_set_numeric without
data loss.

Furthermore, without this change there will be a build break on Windows
when the libuv change is integrated into Node, because of the
conversion from HANDLE to unsigned long.

Other related commits:
5845a6bcd5
919d8ec63a
2014-11-28 13:12:14 +01:00
Alexis Campailla
cb8cadbe62 Revert "crypto: cast uv_thread_t to unsigned long"
This reverts commit 0308ad2ce5.
2014-11-28 13:11:36 +01:00
Saúl Ibarra Corretgé
0308ad2ce5 crypto: cast uv_thread_t to unsigned long
Should work in all platforms and it fixes this compilation problem
on OSX:

../src/node_crypto.cc:154:3: error: no matching function for call to
'CRYPTO_THREADID_set_numeric'
  CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../deps/openssl/openssl/include/openssl/../../crypto/crypto.h:435:6:
    note: candidate function not viable: no known conversion from
          'uv_thread_t' (aka '_opaque_pthread_t *') to 'unsigned long'
          for 2nd argument
          void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned
          long val);
               ^
               1 error generated.

PR-URL: https://github.com/joyent/node/pull/8785
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 15:57:21 -08:00
Saúl Ibarra Corretgé
69904c8a78 deps: update libuv to 1.0.1
PR-URL: https://github.com/joyent/node/pull/8785
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 15:56:48 -08:00
Vladimir Kurchatkin
bf3e0f417b smalloc: don't allow to dispose typed arrays
PR-URL: https://github.com/joyent/node/pull/8743
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:39:02 -08:00
Trevor Norris
0d051238be timers: fix unref() memory leak
The destructor isn't being called for timers that have been unref'd.

Fixes: https://github.com/joyent/node/issues/8364
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:27:57 -08:00
Nathan Woltman
e0a0e913c7 path: refactor normalizeArray()
The normalizeArray() function now avoids using the slow Array#splice()
method to improve performance and now also filters out empty path parts.

Code that pre-filtered empty parts has been removed.

PR-URL: https://github.com/joyent/node/pull/8724
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:16:56 -08:00
Saúl Ibarra Corretgé
9d9ed61c5a deps: update libuv to 1.0.0
PR-URL: https://github.com/joyent/node/pull/8762
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:08:36 -08:00
Rory Bradford
2d17193f20 path: added parse() and format() functions
The parse() function splits a path and returns an object
with the different elements. The format() function is the
reverse of this and adds an objects corresponding path
elements to make up a string. Fixes #6976.

Fixes: https://github.com/joyent/node/issues/6976
PR-URL: https://github.com/joyent/node/pull/8750
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-11-20 16:21:11 -08:00
Timothy J Fontaine
6a90a06002 path: allow calling platform specific methods
Add path.posix and path.win32 which have the specific methods like
resolve and normalize so you can specifically normalize or resolve
based on the target platform.

PR-URL: https://github.com/joyent/node/pull/5661
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 16:10:55 -08:00
Steve Sharp
4dc8b26bbe doc: correct broken link in net.markdown
Fixes broken link to Readable Stream documentation.

Fixes: https://github.com/joyent/node/issues/8464
PR-URL: https://github.com/joyent/node/pull/8756
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 15:38:29 -08:00
MK Safi
6a6782343c doc: clarify return value of http.createServer
PR-URL: https://github.com/joyent/node/pull/6054
Reviewed-by: Isaac Z. Schlueter <i@izs.me>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-19 14:18:50 -08:00
Sam Roberts
3a08b7c3e0 doc: cover stdio option in child_process
- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-18 19:28:46 -08:00
Trevor Norris
a1b2875afd lint: fix lint issues
Forgot to fix these before landing the patch.

Fixes: e17c5a72
2014-11-18 16:42:10 -08:00
Julien Gilli
caeb67735b domains: fix issues with abort on uncaught
Do not abort the process if an error is thrown from within a domain, an
error handler is setup for the domain and --abort-on-uncaught-exception
was passed on the command line.

However, if an error is thrown from within the top-level domain's error
handler and --abort-on-uncaught-exception was passed on the command
line, make the process abort.

Fixes: https://github.com/joyent/node/issues/8631
Fixes: https://github.com/joyent/node/issues/8630
PR-URL: https://github.com/joyent/node/pull/8666
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:39:39 -08:00
Trevor Norris
fbff7054a4 v8: add api for aborting on uncaught exception
Add v8::Isolate::SetAbortOnUncaughtException() so the user can be
notified when an uncaught exception has bubbled.

PR-URL: https://github.com/joyent/node/pull/8666
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:37:54 -08:00
Sam Roberts
8032a21025 test: test all spawn parameter positions
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:20:31 -08:00
Sam Roberts
70dafa7b62 child_process: check fork args is an array
Optional fork args should be type-checked with same behaviour as the
equivalent argument to spawn.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:20:21 -08:00
Sam Roberts
e17c5a72b2 child_process: check execFile args is an array
execFile and spawn have same API signature with respect to optional arg
array and optional options object, they should have same behaviour with
respect to argument validation.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:20:06 -08:00
Sam Roberts
2ff29cc7e3 test: use assert.throw to test exceptions
The test wasn't checking directly that an assertion was thrown. Instead,
it was checking that spawn did not sucessfully spawn a non-existent
command.

However, the command chosen, dir, exists in GNU coreutils, so it exists
on Linux (though not on BSD derived OS X). The test as written passed on
Linux, even with the TypeError it is supposed to be checking for deleted
from spawn(). It would also pass on Windows if a ls.exe existed.

The approach is unnecessarily obscure, assert.throw() is for asserting
code throws, using it is more clear and works regardless of what
commands do or do not exist.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:19:52 -08:00
Sam Roberts
13a992b1c2 doc: document the fds behind stdin/out/err
Its common knowledge on unix, but node documentation depends on knowing
this, as it exposes both streams named after stdio, and the fd numbers,
so make this explicit.

Fixes: https://github.com/joyent/node/pull/8624
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:19:21 -08:00
Artur Cistov
adc0206de9 doc: fix typos in http.markdown
PR-URL: https://github.com/joyent/node/pull/4784
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-17 15:35:00 -08:00
Chris Dickinson
0fef250090 dns: propagate domain for c-ares methods
Fixes: https://github.com/joyent/node/issues/5471
PR-URL: https://github.com/joyent/node/pull/8732
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-17 12:34:37 -08:00
Sam Roberts
743a009bad process: pid can be a string in process.kill()
Not allowing string was a change from v0.10 behaviour, commented on in
joyent/node#7991. Allow them again, but still check that argument is
numberish. Also, simplify the fragile and non-portable test code
introduced in 832ec1cd50 that required fixups 2a415358ee, and
ef3c4ed3d.

PR-URL: https://github.com/joyent/node/pull/8531
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-17 12:15:54 -08:00
Vladimir Kurchatkin
f6556b678d fs: fix symlink error message
the arguments were swapped, so fs.symlink{Sync,} would
report that the wrong file EEXIST'd in error.

Fixes: https://github.com/joyent/node/issues/8651
Fixes: https://github.com/joyent/node/issues/4314
Fixes: https://github.com/joyent/node/issues/5381
PR-URL: https://github.com/joyent/node/pull/8657
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-15 17:01:13 -08:00
Julien Gilli
5ff59453a4 doc: clarify dns.lookup vs dns.resolve
Clarify and emphasize the differences between dns.lookup and the rest of
the functions in the dns module.

PR-URL: https://github.com/joyent/node/pull/8726
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-14 12:33:34 -08:00
haoxin
00d7b13a18 module: correct the order of the assertions
this puts the type-checking assertions in require
into proper order.

PR-URL: https://github.com/joyent/node/pull/8333
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-13 19:58:52 -08:00
Steven Loomis
855b1c98ca build: i18n: support little-endian machines
Note that this may not affect anything until powerpc support lands in
v8.

Related: https://github.com/srl295/node/issues/7
Related: ba8ab91bc4
PR-URL: https://github.com/joyent/node/pull/8712
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-13 11:25:55 -08:00
Steven R. Loomis
ea4dc7d444 build: i18n: fix icu toolset dependencies
So what I did here is to make the icutools library actually contain the
entire ICU dependencies needed for host-side tools. Sadly, this will
build ICU twice, but avoids conflicts between host and target side.
This all seems like a gyp bug of some sort, but without docs for
toolsets, who’s to say?

I removed the icuio library as a separate target, because it was only
used by the host-side tools.

PR-URL: https://github.com/joyent/node/pull/8681
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-11 16:18:22 -08:00
Steven R. Loomis
0339446cf7 build: i18n: fix build on OSX
Fix config option that doesn't work with OSX.

Fixes: https://github.com/joyent/node/issues/8521
PR-URL: https://github.com/joyent/node/pull/8602
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-11 16:14:59 -08:00
Eric Mill
88bd95cfef doc: update openssl commands to use best practices
This updates key size to 2048 and default hash function to sha256.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690
2014-11-11 20:39:57 +03:00
sudodoki
fd2226894a doc: note ability to require files within packages
Adding note to api/modules.markdown about ability to
load arbitrary path from modules from node_module path
by adding reference to path after module name in call
to require()

PR-URL: https://github.com/joyent/node/pull/7794
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-11-09 21:46:35 -08:00
Jackson Tian
d8a3c4ab2a tls: remove tls.createSecurePair code deprecation
In https://github.com/joyent/node/pulls/8695, the deprecation was
removed from doc.  This removes the deprecation from the code.

PR-URL: https://github.com/joyent/node/pull/8700
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-09 21:39:24 -08:00
Chris Dickinson
03bae7bded doc: remove tls.createSecurePair deprecation
pending tls.TLSSocket growing the ability to work
with streams, createSecurePair will remain.

PR-URL: https://github.com/joyent/node/pull/8695
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-07 14:33:05 -08:00
Trevor Norris
5845a6bcd5 uv: revert change causing build failures
Revert uv_thread_self() to return unsigned long instead of uv_thread_t.
This was causing a build failure on Windows and is only a temporary fix
until the proper patch lands upstream.

Reverts: https://github.com/joyent/libuv/commit/59658a8
Fixes: ce112c2 "deps: update uv to v1.0.0-rc2"
2014-11-07 13:44:09 -08:00
Saúl Ibarra Corretgé
e46cbaa06d core: fix usage of uv_cwd
It was modified in libuv to be consistent with uv_exepath and not
include the trailing NULL byte in the returned size.

PR-URL: https://github.com/joyent/node/pull/8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 16:51:12 -08:00
Saúl Ibarra Corretgé
a5f1307e45 core: replace uv_fs_readdir with uv_fs_scandir
PR-URL: https://github.com/joyent/node/pull/8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 16:50:58 -08:00
Saúl Ibarra Corretgé
ce112c27c6 deps: update uv to v1.0.0-rc2
PR-URL: https://github.com/joyent/node/pull/8566
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 16:49:57 -08:00
Timothy J Fontaine
28ae70ebad npm: Upgrade to v2.1.6 2014-11-05 10:35:43 -08:00
Forrest L Norvell
272aa589af test: more thorough tests for npm 2014-11-05 10:35:42 -08:00
Julien Gilli
3589a62104 build: fix build for SmartOS
This change in V8: https://code.google.com/p/v8/source/detail?r=22210
has introduced a method named OS::GetCurrentThreadId which fails to
compile on OSes where a "gettid" syscall does not exist.

This build issue has been fixed upstream by several changes:
- https://code.google.com/p/v8/source/detail?r=23459.
- https://codereview.chromium.org/649553002
- https://codereview.chromium.org/642223003

Another minor fix to the upstream changes was also necessary.
See https://code.google.com/p/v8/issues/detail?id=3620 for
more information.

The other build issue was due to the fact that alloca.h is not included
by other system includes on SmartOS, which is assumed by V8.

Built and tested on Linux, MacOS X, Windows and SmartOS.
2014-11-05 10:35:42 -08:00
Vladimir Kurchatkin
f65a5cbcde smalloc: check if obj has external data
PR-URL: https://github.com/joyent/node/pull/8655
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 00:33:00 -08:00
Fedor Indutny
d435f4b3eb Merge remote-tracking branch 'joyent/v0.10' into v0.10 2014-11-04 00:11:23 -05:00
Vladimir Kurchatkin
849fcdeca0 smalloc: fix copyOnto optimization
copyOnto is broken when one argument has 1 byte size and the other > 1
byte.

PR-URL: https://github.com/joyent/node/pull/8637
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-30 15:49:02 -07:00
cjihrig
c2b4f4809b net: add pauseOnConnect option to createServer()
Currently when a server receives a new connection the underlying socket
handle begins reading data immediately. This causes problems when
sockets are passed between processes, as data can be read by the first
process and thus never read by the second process.

This commit allows sockets that are constructed with a handle to be
paused initially.

PR-URL: https://github.com/joyent/node/pull/8576
Fixes: https://github.com/joyent/node/issues/7905
Fixes: https://github.com/joyent/node/issues/7784
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 14:11:20 -07:00
Vladimir Kurchatkin
15aa47e261 docs: fix smalloc.dispose() example
Also couple of additions about dispose and limitations of smalloc'ed
objects.

Fixes: https://github.com/joyent/node/pull/8625
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 12:58:05 -07:00
Trevor Norris
6a68d64629 lint: fix whitespace issues
Fixes: f6e5740 "path: resolve normalize drive letter to lower case"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-10-25 14:27:23 -07:00
Emmanuel Odeke
523929c927 repl: Private Buffer object in lib/* files
Fixes usage of global object 'Buffer' in lib/* files by ensuring that
each file does an explicit require('buffer').Buffer.  Previously, when
running a repl, due to usage of global 'Buffer', any redefinition of
Buffer would cause a crash eg var Buffer = {}.

Fixes: https://github.com/joyent/node/issues/8588
PR-URL: https://github.com/joyent/node/pull/8603
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-25 00:36:04 -07:00
Timothy J Fontaine
ea69dd7584 Now working on 0.10.34 2014-10-23 12:13:05 -07:00
Timothy J Fontaine
e59eca58ad Merge branch 'v0.10.33-release' into v0.10 2014-10-23 12:12:52 -07:00
Julien Gilli
8d045a30e9 tests: add TLS tests matrix
Add a test that goes through the whole matrix of:
- command line options (--enable-ssl*)
- secureOptions
- secureProtocols

and makes sure that compatible test setups actually work as expected.

The test works by spawning two processes for each test case: one client
and one server. The test passes if a SSL/TLS connection from the client
to the server is successful and the test case was supposed to pass, or
if the connection couldn't be established and the test case was supposed
to fail.

The test is currently located in the directory 'test/external' because
it has external dependencies.
2014-10-23 10:45:12 -07:00
Timothy J Fontaine
69080f5474 tls: enforce secureOptions on incoming clients
Reuse the secureProtocol and secureOptions of the server when creating
the secure context for incoming clients.
2014-10-23 10:45:04 -07:00
Timothy J Fontaine
b9283cf9d1 tls: honorCipherOrder should not degrade defaults
Specifying honorCipherOrder should not change the SSLv2/SSLv3 defaults
for a TLS server.

Use secureOptions logic in both lib/tls.js and lib/crypto.js
2014-10-23 10:44:56 -07:00
Timothy J Fontaine
fe2e8a4a24 2014.10.20, Version 0.10.33 (Stable)
* openssl: Update to 1.0.1j (Addressing multiple CVEs)

* uv: Update to v0.10.29

* child_process: properly support optional args (cjihrig)

* crypto: Disable autonegotiation for SSLv2/3 by default (Fedor Indutny,
Timothy J Fontaine, Alexis Campailla)

This is a behavior change, by default we will not allow the negotiation to
SSLv2 or SSLv3. If you want this behavior, run Node.js with either
`--enable-ssl2` or `--enable-ssl3` respectively.

This does not change the behavior for users specifically requesting
`SSLv2_method` or `SSLv3_method`. While this behavior is not advised, it is
assumed you know what you're doing since you're specifically asking to use
these methods.
2014-10-20 17:43:37 -07:00
Timothy J Fontaine
35443862a2 uv: Update to v0.10.29 2014-10-20 16:13:29 -07:00
Fedor Indutny
1349b680ba crypto: allow forcing SSLv2/v3 via secureProtocol
Force-enable SSLv2/v3 when `secureProtocol` is explicitly set
to `SSLv2_method` or `SSLv3_method`.

see discussion at #8551
2014-10-20 14:35:18 -07:00
dead-horse
f6e5740180 path: resolve normalize drive letter to lower case
make path.resolve work the same as path.normalize
2014-10-20 20:48:00 +02:00
Calvin Metcalf
7dbc024c85 doc: add note about key derivation
adds a note to the crypto docs passing along
the advice that openssl gives about what
key derivation function they recommend.

PR-URL: https://github.com/joyent/node/pull/8580
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-10-20 13:41:15 +04:00
Timothy J Fontaine
6c8593d456 crypto: move disaling SSLv2/3 into JavaScript 2014-10-17 15:16:26 -07:00
Timothy J Fontaine
226c98649d doc: clarify poodle mitigation 2014-10-17 15:15:45 -07:00
Timothy J Fontaine
b259f245f8 docs: update api location 2014-10-17 15:14:45 -07:00
Alexis Campailla
3139fa20d7 crypto: extra caution in setting ssl options
Always set ssl2/ssl3 disabled based on whether they are enabled in Node.
In some corner-case scenario, node with OPENSSL_NO_SSL3 defined could
be linked to openssl that has SSL3 enabled.
2014-10-16 18:45:47 +02:00
Timothy J Fontaine
3859fbdb7d test: fix test-net-listen-fd0 for pipes
In the case of a pipe'd input, i.e. from the CI the fd will be a PIPE
and when listen() is called it will return ENOTSOCK instead of EINVAL.

Backport: cd2d3aedaa
2014-10-15 18:48:34 -07:00
Timothy J Fontaine
2afa3d8a03 test: crypto-domains avoid spurious failures
The order of the callbacks is non-deterministic, so don't expect the
error messages to come back in the same order every time, instead just
verify they are expected messages.
2014-10-15 18:36:36 -07:00
Timothy J Fontaine
d601c76f4d crypto: allow runtime opt in using SSLv2/SSLv3
This change disables SSLv2/SSLv3 use by default, and introduces a
command line flag to opt into using SSLv2/SSLv3.

SSLv2 and SSLv3 are considered unsafe, and should only be used in
situations where compatibility with other components is required and
they cannot be upgrade to support newer forms of TLS.
2014-10-15 17:36:05 -07:00
Timothy J Fontaine
c1f4aacc75 build: revert change to disable ssl2 and ssl3 2014-10-15 14:49:41 -07:00
Fedor Indutny
707cc25011 test: fix test-crypto-stream
Because of constant-timeness change made in openssl-1.0.1j the error is
no longer returned from EVP_DecryptFinal_ex. Now it just return 0, and
thus the error message does not contain proper error code. Adapt to this
change, there is not much that we could do about it.
2014-10-15 14:07:00 -07:00
Fedor Indutny
e0e38c2f47 deps: update openssl to 1.0.1j 2014-10-15 14:06:03 -07:00
Fedor Indutny
d6712917f5 doc: document why SSL2/SSL3 is disabled
PR-URL: https://github.com/joyent/node/pull/8551
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-10-15 19:39:56 +04:00
Fedor Indutny
0ec78c961b configure: disable ssl2/ssl3 by default
PR-URL: https://github.com/joyent/node/pull/8551
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-10-15 19:39:40 +04:00
Swaagie
6a95e9f7e0 tls add secureOptions documentation
PR-URL: https://github.com/joyent/node/pull/8553
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-10-15 13:19:54 +04:00
Matthew Fitzsimmons
1524d48333 doc: update design to match nodejs.org 2014-10-13 14:17:39 -07:00
Timothy J Fontaine
641cea0926 doc: build branch versioned docs 2014-10-13 14:17:39 -07:00
Timothy J Fontaine
2b7c8a2f02 test: check for multi-localhost support 2014-10-13 14:17:39 -07:00
Alexis Campailla
d22637c36c build: vcbuild fix "The input line is too long."
vcbuild.bat is calling vcvars.bat, which doesn't detect if the environment
has already been set. This causes repeated entries to be added to the PATH,
which after a few invocations will lead to an error:
The input line is too long.
2014-10-10 15:14:47 +02:00
Fedor Indutny
d87ae24dfe hdr: always define NODE_WANT_INTERNALS
Otherwise the warning could be printed on some systems.

fix #8419
2014-09-26 10:31:10 +04:00
Calvin Metcalf
c8e0bdd7cf doc: document _transform callback takes 2 args
Expands the paragraph in the transform stream
implementation docs about the callback that is passed
to the _transform method to include details about how
two arguments may be passed, error and data.  A code
example is also included.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-09-23 15:53:58 +04:00
cjihrig
542ac7f3d2 child_process: properly support optional args
Currently, a TypeError is incorrectly thrown if the second argument is
an object. This commit allows the args argument to be properly omitted.

Fixes: https://github.com/joyent/node/issues/6068
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-09-17 15:13:34 -07:00
4117 changed files with 521306 additions and 338453 deletions

5
.gitignore vendored
View File

@@ -15,6 +15,7 @@ node_g
.benchmark_reports
/.project
/.cproject
icu_config.gypi
/out
@@ -27,6 +28,7 @@ Release/
*.suo
*.vcproj
*.vcxproj
!custom_actions.vcxproj
*.vcxproj.user
*.vcxproj.filters
UpgradeLog*.XML
@@ -46,6 +48,9 @@ ipch/
email.md
deps/v8-*
deps/icu
deps/icu*.zip
deps/icu*.tgz
deps/icu-tmp
./node_modules
.svn/

View File

@@ -2,6 +2,8 @@ Aaron Heckmann <aaron.heckmann@gmail.com> <aaron.heckmann+github@gmail.com>
Abe Fettig <abefettig@gmail.com> <abe@fettig.net>
Alex Kocharin <rlidwka@kocharin.ru>
Alex Kocharin <rlidwka@kocharin.ru> <alex@kocharin.ru>
Alexey Kupershtokh <wicked@alawar.com>
Alexis Campailla <orangemocha@github.com>
Alexis Sellier <self@cloudhead.net>
Alexis Sellier <self@cloudhead.net> <alexis@cloudhead.io>
Arlo Breault <arlolra@gmail.com>
@@ -13,10 +15,12 @@ Bert Belder <bertbelder@gmail.com> <bert@piscisaureus2.(none)>
Bert Belder <bertbelder@gmail.com> <info@2bs.nl>
Bert Belder <bertbelder@gmail.com> <piscisaureus@Berts-MacBook-Pro.local>
Brandon Benvie <brandon@bbenvie.com> <brandon@brandonbenvie.com>
Brandon Cheng <bcheng.gt@gmail.com>
Brian White <mscdex@mscdex.net>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Chew Choon Keat <choonkeat@gmail.com>
Christopher Lenz <cmlenz@gmail.com> <chris@lamech.local>
Colin Ihrig <cjihrig@gmail.com>
Daniel Berger <code+node@dpbis.net>
Daniel Chcouri <333222@gmail.com>
Daniel Gröber <darklord@darkboxed.org>
@@ -25,6 +29,7 @@ Daniel Pihlström <sciolist.se@gmail.com>
Dave Pacheco <dap@joyent.com> <dap@cs.brown.edu>
David Siegel <david@artcom.de> <david.siegel@artcom.de>
Domenic Denicola <domenic@domenicdenicola.com>
Doron Pagot <doronpagot@gmail.com>
Eduard Burtescu <eddy_me08@yahoo.com>
Einar Otto Stangvik <einaros@gmail.com>
Elliott Cable <me@ell.io>
@@ -38,6 +43,7 @@ Friedemann Altrock <frodenius@gmail.com>
Fuji Goro <gfuji@cpan.org>
Gabriel de Perthuis <g2p.code@gmail.com>
Gil Pedersen <git@gpost.dk> <github@gpost.dk>
Guillaume Goussard <guillaume.goussard@mgo.com>
Henry Chin <hheennrryy@gmail.com>
Herbert Vojčík <herby@mailbox.sk>
Igor Soarez <igorsoarez@gmail.com>
@@ -46,6 +52,7 @@ Isaac Z. Schlueter <i@izs.me>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Jake Verbaten <raynos2@gmail.com>
Jered Schmidt <tr@nslator.jp>
Jochen Eisinger <jochen@chromium.org>
Joe Shaw <joe@joeshaw.org> <joeshaw@litl.com>
Johan Bergström <bugs@bergstroem.nu>
Johan Dahlberg <jfd@distrop.com> <dahlberg.johan@gmail.com>
@@ -69,6 +76,7 @@ Micheil Smith <micheil@brandedcode.com> <micheil@yettobebranded.net>
Mikael Bourges-Sevenier <mikeseven@gmail.com> <msevenier@motorola.com>
Nebu Pookins<nebu@nebupookins.net>
Nicholas Kinsey <pyrotechnick@feistystudios.com>
Nicholas Vavilov <vvnicholas@gmail.com>
Onne Gorter <onne@onnlucky.com>
Paul Querna <pquerna@apache.org> <paul@querna.org>
Ray Morgan <rmorgan@zappos.com>
@@ -104,8 +112,10 @@ Trevor Burnham <trevor@databraid.com> <trevorburnham@gmail.com>
Tyler Larson <talltyler@gmail.com>
Vincent Voyer <v@fasterize.com>
Willi Eggeling <email@wje-online.de>
Yiyu He <dead_horse@qq.com>
Yoshihiro KIKUCHI <yknetg@gmail.com>
Yuichiro MASUI <masui@masuidrive.jp>
Yunsong Guo <eilian.yunsong@gmail.com>
Zachary Scott <zachary@zacharyscott.net> <zachary.s.scott@gmail.com>
Zoran Tomicic <ztomicic@gmail.com>
@@ -120,3 +130,5 @@ Michael Starzinger <mstarzinger@chromium.org>
Toon Verwaest <verwaest@chromium.org>
Vyacheslav Egorov <vegorov@chromium.org>
Yang Guo <yangguo@chromium.org>
Dan Carney <dcarney@chromium.org>
Sven Panne <svenpanne@chromium.org>

1250
AUTHORS

File diff suppressed because it is too large Load Diff

392
ChangeLog
View File

@@ -1,4 +1,284 @@
2014.09.24, Version 0.11.14 (Unstable)
2015.07.09, Version 0.12.7 (Stable)
* openssl: upgrade to 1.0.1p
* npm: upgrade to 2.11.3
* V8: cherry-pick JitCodeEvent patch from upstream (Ben Noordhuis)
* win,msi: create npm folder in AppData directory (Steven Rockarts)
2015.07.03, Version 0.12.6 (Stable), 0be9a77bb18ec15b4fb6a1fb0762f313b7351201
* V8: fix out-of-band write in utf8 decoder
2015.06.22, Version 0.12.5 (Stable), 61c6abf00898fe00eb7fcf2c23ba0b01cf12034c
* openssl: upgrade to 1.0.1o (Addressing multiple CVEs)
* npm: upgrade to 2.11.2
* uv: upgrade to 1.6.1
* V8: avoid deadlock when profiling is active (Dmitri Melikyan)
* install: fix source path for openssl headers (Oguz Bastemur)
* install: make sure opensslconf.h is overwritten (Oguz Bastemur)
* timers: fix timeout when added in timer's callback (Julien Gilli)
* windows: broadcast WM_SETTINGCHANGE after install (Mathias Küsel)
2015.05.22, Version 0.12.4 (Stable), 0a604e92e258c5ee2752d763e50721e35053f135
* npm: upgrade to 2.10.1
* V8: revert v8 Array.prototype.values() removal (cjihrig)
* win: bring back xp/2k3 support (Bert Belder)
2015.05.13, Version 0.12.3 (Stable), 03431c7d7b4b4a3054ca8ae2cfa8009e3e84a2c7
* V8: update to 3.28.71.19
* uv: upgrade to 1.5.0
* npm: upgrade to 2.9.1
* V8: don't busy loop in v8 cpu profiler thread (Mike Tunnicliffe)
* V8: fix issue with let bindings in for loops (adamk)
* debugger: don't spawn child process in remote mode (Jackson Tian)
* net: do not set V4MAPPED on FreeBSD (Julien Gilli)
* repl: make 'Unexpected token' errors recoverable (Julien Gilli)
* src: backport ignore ENOTCONN on shutdown race (Ben Noordhuis)
* src: fix backport of SIGINT crash fix on FreeBSD (Julien Gilli)
2015.03.31, Version 0.12.2 (Stable), 523d445705027438b83b8d5958c9beeb1c8711d9
* uv: Upgrade to 1.4.2
* npm: Upgrade to 2.7.4
* V8: do not add extra newline in log file (Julien Gilli)
* V8: Fix --max_old_space_size=4096 integer overflow (Andrei Sedoi)
* asyncwrap: fix constructor condition for early ret (Trevor Norris)
* buffer: align chunks on 8-byte boundary (Fedor Indutny)
* buffer: fix pool offset adjustment (Trevor Norris)
* build: fix use of strict aliasing (Trevor Norris)
* console: allow Object.prototype fields as labels (Colin Ihrig)
* fs: make F_OK/R_OK/W_OK/X_OK not writable (Jackson Tian)
* fs: properly handle fd passed to truncate() (Bruno Jouhier)
* http: fix assert on data/end after socket error (Fedor Indutny)
* lib: fix max size check in Buffer constructor (Ben Noordhuis)
* lib: fix stdio/ipc sync i/o regression (Ben Noordhuis)
* module: replace NativeModule.require (Herbert Vojčík)
* net: allow port 0 in connect() (cjihrig)
* net: unref timer in parent sockets (Fedor Indutny)
* path: refactor for performance and consistency (Nathan Woltman)
* smalloc: extend user API (Trevor Norris)
* src: fix for SIGINT crash on FreeBSD (Fedor Indutny)
* src: fix builtin modules failing with --use-strict (Julien Gilli)
* watchdog: fix timeout for early polling return (Saúl Ibarra Corretgé)
2015.03.23, Version 0.12.1 (Stable), 0034086b49f22cfde765a7e9f55db25f8eb310b6
* openssl: upgrade to 1.0.1m (Addressing multiple CVES)
2015.02.06, Version 0.12.0 (Stable), 2b18916ff054309a07408719b62e2b6a4f1e056a
* npm: Upgrade to 2.5.1
* mdb_v8: update for v0.12 (Dave Pacheco)
2015.01.29, Version 0.11.16 (Unstable), 8e42e5a0731040075e14cec087eea86729f2dc53
* openssl: Upgrade to 1.0.1l
* npm: Upgrade to 2.3.0
* url: revert support of `path` for url.format" (Julien Gilli)
* assert: use util.inspect() to create error messages (cjihrig)
* net: throw on invalid socket timeouts (cjihrig)
* url: fix parsing of ssh urls (Evan Lucas)
2015.01.20, Version 0.11.15 (Unstable), 8a9f263a82089814e69f277f9fecd2888705101b
* v8: Upgrade to 3.28.73
* uv: Upgrade to 1.0.2
* npm: Upgrade to v2.1.6
* uv: float patch to revert tty breakage (Trevor Norris)
* v8: re-implement debugger-agent (Fedor Indutny)
* v8: apply floating irhydra patch (Fedor Indutny)
* v8: fix postmortem-metadata generator (Refael Ackermann)
* debugger: fix unhandled error in setBreakpoint (Miroslav Bajtoš)
* async-wrap: add event hooks (Trevor Norris)
* async-wrap: expose async-wrap as binding (Trevor Norris)
* buffer, doc: misc. fix and cleanup (Trevor Norris)
* buffer: add generic functions for (u)int ops (Yazhong Liu)
* buffer: fix and cleanup fill() (Trevor Norris)
* buffer: mv floating point read/write checks to JS (Trevor Norris)
* build, i18n: improve Intl build, add "--with-intl" (Steven R. Loomis)
* build: add small-icu support for binary packages (Julien Gilli)
* build: do not generate support for libuv's probes (Julien Gilli)
* build: i18n: add icu config options (Steven R. Loomis)
* build: i18n: support little-endian machines (Steven Loomis)
* build: vcbuild fix "The input line is too long." (Alexis Campailla)
* child_process: improve spawn() argument handling (cjihrig)
* cluster: avoid race enabling debugger in worker (Timothy J Fontaine)
* cluster: cluster.disconnect() should check status (Sam Roberts)
* cluster: do not signal children in debug mode (Fedor Indutny)
* cluster: don't assert if worker has no handles (Sam Roberts)
* core: fix usage of uv_cwd (Saúl Ibarra Corretgé)
* core: replace uv_fs_readdir with uv_fs_scandir (Saúl Ibarra Corretgé)
* crypto: createDiffieHellman throw for bad args (Trevor Norris)
* crypto: lower RSS usage for TLSCallbacks (Fedor Indutny)
* crypto: store thread id as pointer-sized (Alexis Campailla)
* dns: propagate domain for c-ares methods (Chris Dickinson)
* fs: fix symlink error message (Vladimir Kurchatkin)
* http: Improve _addHeaderLines method (Jackson Tian)
* http: cleanup setHeader() (Trevor Norris)
* http: rename flush to flushHeaders (Timothy J Fontaine)
* lib,src: fix spawnSync ignoring its 'env' option (Juanjo)
* modules: adding load linked modules feature (Thorsten Lorenz)
* net: Make server.connections un-enumerable (Patrick Mooney)
* net: add pauseOnConnect option to createServer() (cjihrig)
* net: make connect() input validation synchronous (cjihrig)
* node: avoid automatic microtask runs (Vladimir Kurchatkin)
* node: fix throws before timer module is loaded (Trevor Norris)
* openssl: fix keypress requirement in apps on win32 (Fedor Indutny)
* path: added parse() and format() functions (Rory Bradford)
* path: allow calling platform specific methods (Timothy J Fontaine)
* path: don't lower-cases drive letters (Bert Belder)
* path: refactor normalizeArray() (Nathan Woltman)
* process: pid can be a string in process.kill() (Sam Roberts)
* readline: fix performance issue when large line (Jicheng Li)
* readline: should not require an output stream. (Julien Gilli)
* smalloc: check if obj has external data (Vladimir Kurchatkin)
* smalloc: don't allow to dispose typed arrays (Vladimir Kurchatkin)
* smalloc: fix bad assert for zero length data (Trevor Norris)
* smalloc: fix copyOnto optimization (Vladimir Kurchatkin)
* src: all wrap's now use actual FunctionTemplate (Trevor Norris)
* src: fix VC++ warning C4244 (Rasmus Christian Pedersen)
* src: remove Async Listener (Trevor Norris)
* stream: switch _writableState.buffer to queue (Chris Dickinson)
* streams: make setDefaultEncoding() throw (Brian White)
* streams: set default encoding for writable streams (Johnny Ray)
* tls: remove tls.createSecurePair code deprecation (Jackson Tian)
* tls_wrap: ignore ZERO_RETURN after close_notify (Fedor Indutny)
* url: change hostname regex to negate invalid chars (Jonathan Johnson)
* url: fixed encoding for slash switching emulation. (Evan Rutledge Borden)
* url: improve parsing speed (CGavrila)
* url: make query() consistent (Gabriel Wicke)
* url: support `path` for url.format (Yazhong Liu)
* util: add es6 Symbol support for `util.inspect` (gyson)
2014.09.24, Version 0.11.14 (Unstable), 902090af5375e497dded310575f19de5328a9bbc
* uv: Upgrade to v1.0.0-rc1
@@ -787,7 +1067,111 @@
* console: `console.dir()` bypasses inspect() methods (Nathan Rajlich)
2014.09.16, Version 0.10.32 (Stable)
2015.07.09, Version 0.10.40 (Maintenance), 0439a28d519fb6efe228074b0588a59452fc1677
* openssl: upgrade to 1.0.1p
* V8: back-port JitCodeEvent patch from upstream (Ben Noordhuis)
* win,msi: create npm folder in AppData directory (Steven Rockarts)
2015.06.18, Version 0.10.39 (Maintenance), 615a35ccd2cb5cba80901862aefe51a940995f44
* openssl: upgrade to 1.0.1o (Addressing multiple CVEs)
* install: fix source path for openssl headers (Oguz Bastemur)
* install: make sure opensslconf.h is overwritten (Oguz Bastemur)
* timers: fix timeout when added in timer's callback (Julien Gilli)
* windows: broadcast WM_SETTINGCHANGE after install (Mathias Küsel)
2015.03.23, Version 0.10.38 (Maintenance), 0b5731a63cc40c4fe9275c79158fe0a5dd4d1609
* openssl: upgrade to 1.0.1m (Addressing multiple CVEs)
2015.03.11, Version 0.10.37 (Maintenance), 7d6b5b1d5ba726331f9ccaaae59af7cd53eee82e
* uv: update to 0.10.36 (CVE-2015-0278)
* domains: fix stack clearing after error handled (Jonas Dohse)
* buffer: reword Buffer.concat error message (Chris Dickinson)
* console: allow Object.prototype fields as labels (Julien Gilli)
* V8: log version in profiler log file (Ben Noordhuis)
* http: fix performance regression for GET requests (Florin-Cristian Gavrila)
2015.01.26, Version 0.10.36 (Stable), 09b482886bdd3d863c3d4e7d71264eac0daaf9e1
* openssl: update to 1.0.1l
* v8: Fix debugger and strict mode regression (Julien Gilli)
* v8: don't busy loop in cpu profiler thread (Ben Noordhuis)
2014.12.22, Version 0.10.35 (Stable), a363f61ca839e817eb6853c5dc5af8c3b9b9226b
* tls: re-add 1024-bit SSL certs removed by f9456a2 (Chris Dickinson)
* timers: don't close interval timers when unrefd (Julien Gilli)
* timers: don't mutate unref list while iterating it (Julien Gilli)
2014.12.17, Version 0.10.34 (Stable), 52795f8fcc2de77cf997e671ea58614e5e425dfe
* uv: update to v0.10.30
* zlib: upgrade to v1.2.8
* child_process: check execFile args is an array (Sam Roberts)
* child_process: check fork args is an array (Sam Roberts)
* crypto: update root certificates (Ben Noordhuis)
* domains: fix issues with abort on uncaught (Julien Gilli)
* timers: Avoid linear scan in _unrefActive. (Julien Gilli)
* timers: fix unref() memory leak (Trevor Norris)
* v8: add api for aborting on uncaught exception (Julien Gilli)
* debugger: fix when using "use strict" (Julien Gilli)
2014.10.20, Version 0.10.33 (Stable), 8d045a30e95602b443eb259a5021d33feb4df079
* openssl: Update to 1.0.1j (Addressing multiple CVEs)
* uv: Update to v0.10.29
* child_process: properly support optional args (cjihrig)
* crypto: Disable autonegotiation for SSLv2/3 by default (Fedor Indutny,
Timothy J Fontaine, Alexis Campailla)
This is a behavior change, by default we will not allow the negotiation to
SSLv2 or SSLv3. If you want this behavior, run Node.js with either
`--enable-ssl2` or `--enable-ssl3` respectively.
This does not change the behavior for users specifically requesting
`SSLv2_method` or `SSLv3_method`. While this behavior is not advised, it is
assumed you know what you're doing since you're specifically asking to use
these methods.
2014.09.16, Version 0.10.32 (Stable), 0fe0d121551593c23a565db8397f85f17bb0f00e
* npm: Update to 1.4.28
@@ -839,7 +1223,7 @@
* deps: backport 4ed5fde4f from v8 upstream (Fedor Indutny)
* deps: cherry-pick eca441b2 from OpenSSL (Fedor Indutny)
*
* lib: remove and restructure calls to isNaN() (cjihrig)
@@ -2418,7 +2802,7 @@
- Support for parallel use of the cache folder
- Retry on registry timeouts or network failures (Trent Mick)
- Reduce 'engines' failures to a warning
- Use new zsh completion if aviailable (Jeremy Cantrell)
- Use new zsh completion if available (Jeremy Cantrell)
* Fix #3577 Un-break require('sys')

394
LICENSE
View File

@@ -294,9 +294,9 @@ maintained libraries. The externally maintained libraries used by Node are:
- Zlib at deps/zlib. zlib's license follows:
"""
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.4, March 14th, 2010
version 1.2.8, April 28th, 2013
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -314,9 +314,8 @@ maintained libraries. The externally maintained libraries used by Node are:
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly
Mark Adler
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
*/
"""
@@ -782,3 +781,388 @@ maintained libraries. The externally maintained libraries used by Node are:
END OF TERMS AND CONDITIONS
"""
- ICU's license follows:
From http://source.icu-project.org/repos/icu/icu/trunk/license.html
"""
ICU License - ICU 1.8.1 and later
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1995-2014 International Business Machines Corporation and others
All rights reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished
to do so, provided that the above copyright notice(s) and this
permission notice appear in all copies of the Software and that
both the above copyright notice(s) and this permission notice
appear in supporting documentation.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written
authorization of the copyright holder.
All trademarks and registered trademarks mentioned herein are the
property of their respective owners.
Third-Party Software Licenses
This section contains third-party software notices and/or
additional terms for licensed third-party software components
included within ICU libraries.
1. Unicode Data Files and Software
COPYRIGHT AND PERMISSION NOTICE
Copyright © 1991-2014 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that
(a) this copyright and permission notice appear with all copies
of the Data Files or Software,
(b) this copyright and permission notice appear in associated
documentation, and
(c) there is clear notice in each modified Data File or in the Software
as well as in the documentation associated with the Data File(s) or
Software that the data or software has been modified.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)
# The Google Chrome software developed by Google is licensed
# under the BSD license. Other software included in this distribution
# is provided under other licenses, as set forth below.
#
# The BSD License
# http://opensource.org/licenses/bsd-license.php
# Copyright (C) 2006-2008, Google Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
# Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided with
# the distribution.
# Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# The word list in cjdict.txt are generated by combining three
word lists listed
# below with further processing for compound word breaking. The
frequency is generated
# with an iterative training against Google web corpora.
#
# * Libtabe (Chinese)
# - https://sourceforge.net/project/?group_id=1519
# - Its license terms and conditions are shown below.
#
# * IPADIC (Japanese)
# - http://chasen.aist-nara.ac.jp/chasen/distribution.html
# - Its license terms and conditions are shown below.
#
# ---------COPYING.libtabe ---- BEGIN--------------------
#
# /*
# * Copyrighy (c) 1999 TaBE Project.
# * Copyright (c) 1999 Pai-Hsiang Hsiao.
# * All rights reserved.
# *
# * Redistribution and use in source and binary forms, with or without
# * modification, are permitted provided that the following conditions
# * are met:
# *
# * . Redistributions of source code must retain the above copyright
# * notice, this list of conditions and the following disclaimer.
# * . Redistributions in binary form must reproduce the above copyright
# * notice, this list of conditions and the following disclaimer in
# * the documentation and/or other materials provided with the
# * distribution.
# * . Neither the name of the TaBE Project nor the names of its
# * contributors may be used to endorse or promote products derived
# * from this software without specific prior written permission.
# *
# * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# * OF THE POSSIBILITY OF SUCH DAMAGE.
# */
#
# /*
# * Copyright (c) 1999 Computer Systems and Communication Lab,
# * Institute of Information Science, Academia Sinica.
# * All rights reserved.
# *
# * Redistribution and use in source and binary forms, with or without
# * modification, are permitted provided that the following conditions
# * are met:
# *
# * . Redistributions of source code must retain the above copyright
# * notice, this list of conditions and the following disclaimer.
# * . Redistributions in binary form must reproduce the above copyright
# * notice, this list of conditions and the following disclaimer in
# * the documentation and/or other materials provided with the
# * distribution.
# * . Neither the name of the Computer Systems and Communication Lab
# * nor the names of its contributors may be used to endorse or
# * promote products derived from this software without specific
# * prior written permission.
# *
# * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# * OF THE POSSIBILITY OF SUCH DAMAGE.
# */
#
# Copyright 1996 Chih-Hao Tsai @ Beckman Institute, University of Illinois
# c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4
#
# ---------------COPYING.libtabe-----END------------------------------------
#
#
# ---------------COPYING.ipadic-----BEGIN------------------------------------
#
# Copyright 2000, 2001, 2002, 2003 Nara Institute of Science
# and Technology. All Rights Reserved.
#
# Use, reproduction, and distribution of this software is permitted.
# Any copy of this software, whether in its original form or modified,
# must include both the above copyright notice and the following
# paragraphs.
#
# Nara Institute of Science and Technology (NAIST),
# the copyright holders, disclaims all warranties with regard to this
# software, including all implied warranties of merchantability and
# fitness, in no event shall NAIST be liable for
# any special, indirect or consequential damages or any damages
# whatsoever resulting from loss of use, data or profits, whether in an
# action of contract, negligence or other tortuous action, arising out
# of or in connection with the use or performance of this software.
#
# A large portion of the dictionary entries
# originate from ICOT Free Software. The following conditions for ICOT
# Free Software applies to the current dictionary as well.
#
# Each User may also freely distribute the Program, whether in its
# original form or modified, to any third party or parties, PROVIDED
# that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear
# on, or be attached to, the Program, which is distributed substantially
# in the same form as set out herein and that such intended
# distribution, if actually made, will neither violate or otherwise
# contravene any of the laws and regulations of the countries having
# jurisdiction over the User or the intended distribution itself.
#
# NO WARRANTY
#
# The program was produced on an experimental basis in the course of the
# research and development conducted during the project and is provided
# to users as so produced on an experimental basis. Accordingly, the
# program is provided without any warranty whatsoever, whether express,
# implied, statutory or otherwise. The term "warranty" used herein
# includes, but is not limited to, any warranty of the quality,
# performance, merchantability and fitness for a particular purpose of
# the program and the nonexistence of any infringement or violation of
# any right of any third party.
#
# Each user of the program will agree and understand, and be deemed to
# have agreed and understood, that there is no warranty whatsoever for
# the program and, accordingly, the entire risk arising from or
# otherwise connected with the program is assumed by the user.
#
# Therefore, neither ICOT, the copyright holder, or any other
# organization that participated in or was otherwise related to the
# development of the program and their respective officials, directors,
# officers and other employees shall be held liable for any and all
# damages, including, without limitation, general, special, incidental
# and consequential damages, arising out of or otherwise in connection
# with the use or inability to use the program or any product, material
# or result produced or otherwise obtained by using the program,
# regardless of whether they have been advised of, or otherwise had
# knowledge of, the possibility of such damages at any time during the
# project or thereafter. Each user will be deemed to have agreed to the
# foregoing by his or her commencement of use of the program. The term
# "use" as used herein includes, but is not limited to, the use,
# modification, copying and distribution of the program and the
# production of secondary products from the program.
#
# In the case where the program, whether in its original form or
# modified, was distributed or delivered to or received by a user from
# any person, organization or entity other than ICOT, unless it makes or
# grants independently of ICOT any specific warranty to the user in
# writing, such person, organization or entity, will also be exempted
# from and not be held liable to the user for any such damages as noted
# above as far as the program is concerned.
#
# ---------------COPYING.ipadic-----END------------------------------------
3. Lao Word Break Dictionary Data (laodict.txt)
# Copyright (c) 2013 International Business Machines Corporation
# and others. All Rights Reserved.
#
# Project: http://code.google.com/p/lao-dictionary/
# Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt
# License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt
# (copied below)
#
# This file is derived from the above dictionary, with slight modifications.
# --------------------------------------------------------------------------------
# Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer. Redistributions in binary
# form must reproduce the above copyright notice, this list of conditions and
# the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# --------------------------------------------------------------------------------
4. Burmese Word Break Dictionary Data (burmesedict.txt)
# Copyright (c) 2014 International Business Machines Corporation
# and others. All Rights Reserved.
#
# This list is part of a project hosted at:
# github.com/kanyawtech/myanmar-karen-word-lists
#
# --------------------------------------------------------------------------------
# Copyright (c) 2013, LeRoy Benjamin Sharon
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright notice, this
# list of conditions and the following disclaimer in the documentation and/or
# other materials provided with the distribution.
#
# Neither the name Myanmar Karen Word Lists, nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# --------------------------------------------------------------------------------
5. Time Zone Database
ICU uses the public domain data and code derived from Time Zone
Database for its time zone support. The ownership of the TZ
database is explained in BCP 175: Procedure for Maintaining the
Time Zone Database section 7.
7. Database Ownership
The TZ database itself is not an IETF Contribution or an IETF
document. Rather it is a pre-existing and regularly updated work
that is in the public domain, and is intended to remain in the public
domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do not apply
to the TZ Database or contributions that individuals make to it.
Should any claims be made and substantiated against the TZ Database,
the organization that is providing the IANA Considerations defined in
this RFC, under the memorandum of understanding with the IETF,
currently ICANN, may act in accordance with all competent court
orders. No ownership claims will be made by ICANN or the IETF Trust
on the database or the code. Any person making a contribution to the
database or code waives all rights to future claims in that
contribution or in the TZ Database.
"""

View File

@@ -6,6 +6,7 @@ NINJA ?= ninja
DESTDIR ?=
SIGN ?=
PREFIX ?= /usr/local
FLAKY_TESTS ?= run
NODE ?= ./node
@@ -78,10 +79,12 @@ clean:
distclean:
-rm -rf out
-rm -f config.gypi
-rm -f config.gypi icu_config.gypi
-rm -f config.mk
-rm -rf node node_g blog.html email.md
-rm -rf node_modules
-rm -rf deps/icu
-rm -rf deps/icu4c*.tgz deps/icu4c*.zip deps/icu-tmp
test: all
$(PYTHON) tools/test.py --mode=release simple message
@@ -125,6 +128,9 @@ test-all-http1: test-build
test-all-valgrind: test-build
$(PYTHON) tools/test.py --mode=debug,release --valgrind
test-ci:
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --arch=$(DESTCPU) --flaky-tests=$(FLAKY_TESTS) simple message internet
test-release: test-build
$(PYTHON) tools/test.py --mode=release
@@ -147,7 +153,20 @@ test-debugger: all
$(PYTHON) tools/test.py debugger
test-npm: node
./node deps/npm/test/run.js
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" \
PATH="../../:${PATH}" node cli.js install
cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \
npm_config_prefix="$(shell pwd)/npm-prefix" \
npm_config_tmp="$(shell pwd)/npm-tmp" \
PATH="../../:${PATH}" node cli.js run-script test-legacy && \
PATH="../../:${PATH}" node cli.js run-script test && \
PATH="../../:${PATH}" node cli.js prune --prod && \
cd ../.. && \
rm -rf npm-cache npm-tmp npm-prefix
test-npm-publish: node
npm_package_config_publishtest=true ./node deps/npm/test/run.js
@@ -176,6 +195,9 @@ website_files = \
doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node
doc-branch: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.)
doc-branch: doc
$(apidoc_dirs):
mkdir -p $@
@@ -189,10 +211,10 @@ out/doc/%: doc/%
cp -r $< $@
out/doc/api/%.json: doc/api/%.markdown node
out/Release/node tools/doc/generate.js --format=json $< > $@
NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=json $< > $@
out/doc/api/%.html: doc/api/%.markdown node
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
email.md: ChangeLog tools/email-footer.md
bash tools/changelog-head.sh | sed 's|^\* #|* \\#|g' > $@
@@ -211,14 +233,25 @@ website-upload: doc
rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
doc-branch-upload: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.)
doc-branch-upload: doc-branch
echo $(NODE_DOC_VERSION)
rsync -r out/doc/api/ node@nodejs.org:~/web/nodejs.org/$(NODE_DOC_VERSION)
docopen: out/doc/api/all.html
-google-chrome out/doc/api/all.html
docclean:
-rm -rf out/doc
run-ci:
$(PYTHON) ./configure --without-snapshot $(CONFIG_FLAGS)
$(MAKE)
$(MAKE) test-ci
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
VERSION=v$(RAWVER)
NODE_DOC_VERSION=$(VERSION)
RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py)
PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
@@ -244,7 +277,7 @@ TARBALL=$(TARNAME).tar.gz
BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
BINARYTAR=$(BINARYNAME).tar.gz
PKG=out/$(TARNAME).pkg
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz
ifdef NIGHTLY
@@ -282,10 +315,12 @@ pkg: $(PKG)
$(PKG): release-only
rm -rf $(PKGDIR)
rm -rf out/deps out/Release
$(PYTHON) ./configure --without-snapshot --dest-cpu=ia32 --tag=$(TAG)
$(PYTHON) ./configure --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=ia32 --tag=$(TAG)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)/32
rm -rf out/deps out/Release
$(PYTHON) ./configure --without-snapshot --dest-cpu=x64 --tag=$(TAG)
$(PYTHON) ./configure --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=x64 --tag=$(TAG)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
lipo $(PKGDIR)/32/usr/local/bin/node \
@@ -294,7 +329,7 @@ $(PKG): release-only
-create
mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node
rm -rf $(PKGDIR)/32
$(packagemaker) \
$(PACKAGEMAKER) \
--id "org.nodejs.Node" \
--doc tools/osx-pkg.pmdoc \
--out $(PKG)
@@ -317,7 +352,8 @@ tar: $(TARBALL)
$(BINARYTAR): release-only
rm -rf $(BINARYNAME)
rm -rf out/deps out/Release
$(PYTHON) ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(PYTHON) ./configure --prefix=/ --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
cp README.md $(BINARYNAME)
cp LICENSE $(BINARYNAME)
@@ -330,8 +366,9 @@ binary: $(BINARYTAR)
$(PKGSRC): release-only
rm -rf dist out
$(PYTHON) configure --prefix=/ --without-snapshot \
--dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(PYTHON) configure --prefix=/ --without-snapshot --download=all \
--with-intl=small-icu --dest-cpu=$(DESTCPU) --tag=$(TAG) \
$(CONFIG_FLAGS)
$(MAKE) install DESTDIR=dist
(cd dist; find * -type f | sort) > packlist
pkg_info -X pkg_install | \
@@ -398,8 +435,6 @@ jslint:
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_dtrace.cc
CPPLINT_EXCLUDE += src/node_dtrace.cc
CPPLINT_EXCLUDE += src/node_root_certs.h
CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc
CPPLINT_EXCLUDE += src/queue.h
@@ -413,4 +448,9 @@ cpplint:
lint: jslint cpplint
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all test-addons build-addons website-upload pkg blog blogclean tar binary release-only bench-http-simple bench-idle bench-all bench bench-misc bench-array bench-buffer bench-net bench-http bench-fs bench-tls
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean \
check uninstall install install-includes install-bin all staticlib \
dynamiclib test test-all test-addons build-addons website-upload pkg \
blog blogclean tar binary release-only bench-http-simple bench-idle \
bench-all bench bench-misc bench-array bench-buffer bench-net \
bench-http bench-fs bench-tls run-ci

View File

@@ -83,30 +83,103 @@ make doc
man doc/node.1
```
### To build `Intl` (ECMA-402) support:
### `Intl` (ECMA-402) support:
*Note:* more docs, including how to reduce disk footprint, are on
[Intl](https://github.com/joyent/node/wiki/Intl) support is not
enabled by default.
#### "small" (English only) support
This option will build with "small" (English only) support, but
the full `Intl` (ECMA-402) APIs. With `--download=all` it will
download the ICU library as needed.
Unix/Macintosh:
```sh
./configure --with-intl=small-icu --download=all
```
Windows:
```sh
vcbuild small-icu download-all
```
The `small-icu` mode builds
with English-only data. You can add full data at runtime.
*Note:* more docs are on
[the wiki](https://github.com/joyent/node/wiki/Intl).
#### Build with full ICU support (all locales supported by ICU):
With the `--download=all`, this may download ICU if you don't
have an ICU in `deps/icu`.
Unix/Macintosh:
```sh
./configure --with-intl=full-icu --download=all
```
Windows:
```sh
vcbuild full-icu download-all
```
#### Build with no Intl support `:-(`
The `Intl` object will not be available.
This is the default at present, so this option is not normally needed.
Unix/Macintosh:
```sh
./configure --with-intl=none
```
Windows:
```sh
vcbuild intl-none
```
#### Use existing installed ICU (Unix/Macintosh only):
```sh
pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
```
#### Build ICU from source:
#### Build with a specific ICU:
First: Unpack latest ICU
[icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
as `deps/icu` (You'll have: `deps/icu/source/...`)
You can find other ICU releases at
[the ICU homepage](http://icu-project.org/download).
Download the file named something like `icu4c-**##.#**-src.tgz` (or
`.zip`).
Unix/Macintosh:
Unix/Macintosh: from an already-unpacked ICU
```sh
./configure --with-intl=full-icu
./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu
```
Windows:
Unix/Macintosh: from a local ICU tarball
```sh
./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu.tgz
```
Unix/Macintosh: from a tarball URL
```sh
./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz
```
Windows: first unpack latest ICU to `deps/icu`
[icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
as `deps/icu` (You'll have: `deps/icu/source/...`)
```sh
vcbuild full-icu

View File

@@ -135,8 +135,21 @@
},
'VCLinkerTool': {
'conditions': [
['target_arch=="ia32"', {
'TargetMachine' : 1, # /MACHINE:X86
'target_conditions': [
['_type=="executable"', {
'AdditionalOptions': [ '/SubSystem:Console,"5.01"' ],
}],
],
}],
['target_arch=="x64"', {
'TargetMachine' : 17 # /MACHINE:X64
'TargetMachine' : 17, # /MACHINE:AMD64
'target_conditions': [
['_type=="executable"', {
'AdditionalOptions': [ '/SubSystem:Console,"5.02"' ],
}],
],
}],
],
'GenerateDebugInformation': 'true',
@@ -144,11 +157,6 @@
'DataExecutionPrevention': 2, # enable DEP
'AllowIsolation': 'true',
'SuppressStartupBanner': 'true',
'target_conditions': [
['_type=="executable"', {
'SubSystem': 1, # console executable
}],
],
},
},
'msvs_disabled_warnings': [4351, 4355, 4800],

168
configure vendored
View File

@@ -6,6 +6,8 @@ import re
import shlex
import subprocess
import sys
import shutil
import string
CC = os.environ.get('CC', 'cc')
@@ -13,6 +15,10 @@ root_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(root_dir, 'tools', 'gyp', 'pylib'))
from gyp.common import GetFlavor
# imports in tools/configure.d
sys.path.insert(0, os.path.join(root_dir, 'tools', 'configure.d'))
import nodedownload
# parse our options
parser = optparse.OptionParser()
@@ -236,26 +242,36 @@ parser.add_option('--with-etw',
dest='with_etw',
help='build with ETW (default is true on Windows)')
parser.add_option('--download',
action='store',
dest='download_list',
help=nodedownload.help())
parser.add_option('--with-icu-path',
action='store',
dest='with_icu_path',
help='Path to icu.gyp (ICU i18n, Chromium version only.)')
parser.add_option('--with-icu-locales',
action='store',
dest='with_icu_locales',
help='Comma-separated list of locales for "small-icu". Default: "root,en". "root" is assumed.')
parser.add_option('--with-intl',
action='store',
dest='with_intl',
help='Intl mode: none, full-icu, small-icu (default is none)')
parser.add_option('--with-icu-source',
action='store',
dest='with_icu_source',
help='Intl mode: optional local path to icu/ dir, or path/URL of icu source archive.')
parser.add_option('--with-perfctr',
action='store_true',
dest='with_perfctr',
help='build with performance counters (default is true on Windows)')
parser.add_option('--with-sslv2',
action='store_true',
dest='with_sslv2',
help='enable SSL v2')
parser.add_option('--without-dtrace',
action='store_true',
dest='without_dtrace',
@@ -266,6 +282,11 @@ parser.add_option('--without-etw',
dest='without_etw',
help='build without ETW')
parser.add_option('--without-mdb',
action='store_true',
dest='without_mdb',
help='build without mdb')
parser.add_option('--without-npm',
action='store_true',
dest='without_npm',
@@ -287,6 +308,16 @@ parser.add_option('--without-ssl',
dest='without_ssl',
help='build without SSL')
parser.add_option('--without-ssl2',
action='store_true',
dest='ssl2',
help='Disable SSL v2')
parser.add_option('--without-ssl3',
action='store_true',
dest='ssl3',
help='Disable SSL v3')
parser.add_option('--xcode',
action='store_true',
dest='use_xcode',
@@ -294,6 +325,8 @@ parser.add_option('--xcode',
(options, args) = parser.parse_args()
# set up auto-download list
auto_downloads = nodedownload.parse(options.download_list)
def b(value):
"""Returns the string 'true' if value is truthy, 'false' otherwise."""
@@ -526,7 +559,7 @@ def configure_node(o):
# if we're on illumos based systems wrap the helper library into the
# executable
if flavor == 'solaris':
o['variables']['node_use_mdb'] = 'true'
o['variables']['node_use_mdb'] = b(not options.without_mdb)
else:
o['variables']['node_use_mdb'] = 'false'
@@ -645,11 +678,12 @@ def configure_openssl(o):
if options.without_ssl:
return
# OpenSSL uses `#ifndef OPENSSL_NO_SSL2` checks so only define the
# macro when we want to _disable_ SSL2.
if not options.with_sslv2:
if options.ssl2:
o['defines'] += ['OPENSSL_NO_SSL2=1']
if options.ssl3:
o['defines'] += ['OPENSSL_NO_SSL3=1']
if options.shared_openssl:
(libs, cflags) = pkg_config('openssl') or ('-lssl -lcrypto', '')
@@ -712,6 +746,35 @@ def glob_to_var(dir_base, dir_sub):
return list
def configure_intl(o):
icus = [
{
'url': 'http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.zip',
# from https://ssl.icu-project.org/files/icu4c/54.1/icu4c-src-54_1.md5:
'md5': '6b89d60e2f0e140898ae4d7f72323bca',
},
]
def icu_download(path):
# download ICU, if needed
for icu in icus:
url = icu['url']
md5 = icu['md5']
local = url.split('/')[-1]
targetfile = os.path.join(root_dir, 'deps', local)
if not os.path.isfile(targetfile):
if nodedownload.candownload(auto_downloads, "icu"):
nodedownload.retrievefile(url, targetfile)
else:
print ' Re-using existing %s' % targetfile
if os.path.isfile(targetfile):
sys.stdout.write(' Checking file integrity with MD5:\r')
gotmd5 = nodedownload.md5sum(targetfile)
print ' MD5: %s %s' % (gotmd5, targetfile)
if (md5 == gotmd5):
return targetfile
else:
print ' Expected: %s *MISMATCH*' % md5
print '\n ** Corrupted ZIP? Delete %s to retry download.\n' % targetfile
return None
icu_config = {
'variables': {}
}
@@ -723,11 +786,11 @@ def configure_intl(o):
write(icu_config_name, do_not_edit +
pprint.pformat(icu_config, indent=2) + '\n')
# small ICU is off by default.
# always set icu_small, node.gyp depends on it being defined.
o['variables']['icu_small'] = b(False)
with_intl = options.with_intl
with_icu_source = options.with_icu_source
have_icu_path = bool(options.with_icu_path)
if have_icu_path and with_intl:
print 'Error: Cannot specify both --with-icu-path and --with-intl'
@@ -739,6 +802,13 @@ def configure_intl(o):
o['variables']['icu_gyp_path'] = options.with_icu_path
return
# --with-intl=<with_intl>
# set the default
if with_intl is None:
with_intl = 'none' # The default mode of Intl
# sanity check localelist
if options.with_icu_locales and (with_intl != 'small-icu'):
print 'Error: --with-icu-locales only makes sense with --with-intl=small-icu'
sys.exit(1)
if with_intl == 'none' or with_intl is None:
o['variables']['v8_enable_i18n_support'] = 0
return # no Intl
@@ -746,6 +816,12 @@ def configure_intl(o):
# small ICU (English only)
o['variables']['v8_enable_i18n_support'] = 1
o['variables']['icu_small'] = b(True)
with_icu_locales = options.with_icu_locales
if not with_icu_locales:
with_icu_locales = 'root,en'
locs = set(with_icu_locales.split(','))
locs.add('root') # must have root
o['variables']['icu_locales'] = string.join(locs,',')
elif with_intl == 'full-icu':
# full ICU
o['variables']['v8_enable_i18n_support'] = 1
@@ -769,20 +845,78 @@ def configure_intl(o):
# Note: non-ICU implementations could use other 'with_intl'
# values.
# this is just the 'deps' dir. Used for unpacking.
icu_parent_path = os.path.join(root_dir, 'deps')
# The full path to the ICU source directory.
icu_full_path = os.path.join(icu_parent_path, 'icu')
# icu-tmp is used to download and unpack the ICU tarball.
icu_tmp_path = os.path.join(icu_parent_path, 'icu-tmp')
# --with-icu-source processing
# first, check that they didn't pass --with-icu-source=deps/icu
if with_icu_source and os.path.abspath(icu_full_path) == os.path.abspath(with_icu_source):
print 'Ignoring redundant --with-icu-source=%s' % (with_icu_source)
with_icu_source = None
# if with_icu_source is still set, try to use it.
if with_icu_source:
if os.path.isdir(icu_full_path):
print 'Deleting old ICU source: %s' % (icu_full_path)
shutil.rmtree(icu_full_path)
# now, what path was given?
if os.path.isdir(with_icu_source):
# it's a path. Copy it.
print '%s -> %s' % (with_icu_source, icu_full_path)
shutil.copytree(with_icu_source, icu_full_path)
else:
# could be file or URL.
# Set up temporary area
if os.path.isdir(icu_tmp_path):
shutil.rmtree(icu_tmp_path)
os.mkdir(icu_tmp_path)
icu_tarball = None
if os.path.isfile(with_icu_source):
# it's a file. Try to unpack it.
icu_tarball = with_icu_source
else:
# Can we download it?
local = os.path.join(icu_tmp_path, with_icu_source.split('/')[-1]) # local part
icu_tarball = nodedownload.retrievefile(with_icu_source, local)
# continue with "icu_tarball"
nodedownload.unpack(icu_tarball, icu_tmp_path)
# Did it unpack correctly? Should contain 'icu'
tmp_icu = os.path.join(icu_tmp_path, 'icu')
if os.path.isdir(tmp_icu):
os.rename(tmp_icu, icu_full_path)
shutil.rmtree(icu_tmp_path)
else:
print ' Error: --with-icu-source=%s did not result in an "icu" dir.' % with_icu_source
shutil.rmtree(icu_tmp_path)
sys.exit(1)
# ICU mode. (icu-generic.gyp)
byteorder = sys.byteorder
o['variables']['icu_gyp_path'] = 'tools/icu/icu-generic.gyp'
# ICU source dir relative to root
icu_full_path = os.path.join(root_dir, 'deps/icu')
o['variables']['icu_path'] = icu_full_path
if not os.path.isdir(icu_full_path):
print 'Error: ICU path is not a directory: %s' % (icu_full_path)
print '* ECMA-402 (Intl) support didn\'t find ICU in %s..' % (icu_full_path)
# can we download (or find) a zipfile?
localzip = icu_download(icu_full_path)
if localzip:
nodedownload.unpack(localzip, icu_parent_path)
if not os.path.isdir(icu_full_path):
print ' Cannot build Intl without ICU in %s.' % (icu_full_path)
print ' (Fix, or disable with "--with-intl=none" )'
sys.exit(1)
else:
print '* Using ICU in %s' % (icu_full_path)
# Now, what version of ICU is it? We just need the "major", such as 54.
# uvernum.h contains it as a #define.
uvernum_h = os.path.join(icu_full_path, 'source/common/unicode/uvernum.h')
if not os.path.isfile(uvernum_h):
print 'Error: could not load %s - is ICU installed?' % uvernum_h
print ' Error: could not load %s - is ICU installed?' % uvernum_h
sys.exit(1)
icu_ver_major = None
matchVerExp = r'^\s*#define\s+U_ICU_VERSION_SHORT\s+"([^"]*)".*'
@@ -792,7 +926,7 @@ def configure_intl(o):
if m:
icu_ver_major = m.group(1)
if not icu_ver_major:
print 'Could not read U_ICU_VERSION_SHORT version from %s' % uvernum_h
print ' Could not read U_ICU_VERSION_SHORT version from %s' % uvernum_h
sys.exit(1)
icu_endianness = sys.byteorder[0]; # TODO(srl295): EBCDIC should be 'e'
o['variables']['icu_ver_major'] = icu_ver_major
@@ -819,8 +953,8 @@ def configure_intl(o):
# this is the icudt*.dat file which node will be using (platform endianness)
o['variables']['icu_data_file'] = icu_data_file
if not os.path.isfile(icu_data_path):
print 'Error: ICU prebuilt data file %s does not exist.' % icu_data_path
print 'See the README.md.'
print ' Error: ICU prebuilt data file %s does not exist.' % icu_data_path
print ' See the README.md.'
# .. and we're not about to build it from .gyp!
sys.exit(1)
# map from variable name to subdirs
@@ -912,4 +1046,4 @@ else:
gyp_args += args
subprocess.call(gyp_args)
sys.exit(subprocess.call(gyp_args))

View File

@@ -17,6 +17,14 @@
"include",
],
},
'conditions': [
[ 'gcc_version<=44', {
# GCC versions <= 4.4 do not handle the aliasing in the queue
# implementation, so disable aliasing on these platforms
# to avoid subtle bugs
'cflags': [ '-fno-strict-aliasing' ],
}],
],
"sources": [
"src/agent.cc",
],

1553
deps/mdb_v8/mdb_v8.c vendored

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
'target_name': 'mdb_v8',
'product_prefix': '',
'type': 'loadable_module',
'cflags': [ '-fPIC' ],
'cflags': [ '-fPIC', '-Wno-missing-field-initializers', '-Wno-sign-compare' ],
'sources': [
'mdb_v8.c',
'mdb_v8_cfg.c',

10
deps/mdb_v8/v8dbg.h vendored
View File

@@ -39,7 +39,10 @@
* Determine whether a given pointer refers to a SMI, Failure, or HeapObject.
*/
#define V8_IS_SMI(ptr) (((ptr) & V8_SmiTagMask) == V8_SmiTag)
#define V8_IS_FAILURE(ptr) (((ptr) & V8_FailureTagMask) == V8_FailureTag)
#define V8_IS_FAILURE(ptr) (V8_FailureTagMask != -1 && \
V8_FailureTagMask != -1 && \
((ptr) & V8_FailureTagMask) == V8_FailureTag)
#define V8_IS_HEAPOBJECT(ptr) \
(((ptr) & V8_HeapObjectTagMask) == V8_HeapObjectTag)
@@ -48,6 +51,8 @@
* using the upper 31 bits.
*/
#define V8_SMI_VALUE(smi) ((smi) >> (V8_SmiValueShift + V8_SmiShiftSize))
#define V8_VALUE_SMI(value) \
((value) << (V8_SmiValueShift + V8_SmiShiftSize))
/*
* Determine the encoding and representation of a V8 string.
@@ -77,4 +82,7 @@
#define V8_DESC_ISFIELD(x) \
((V8_SMI_VALUE(x) & V8_PROP_TYPE_MASK) == V8_PROP_TYPE_FIELD)
#define V8_PROP_FIELDINDEX(value) \
((V8_SMI_VALUE(value) & V8_FIELDINDEX_MASK) >> V8_FIELDINDEX_SHIFT)
#endif /* _V8DBG_H */

53
deps/npm/.mailmap vendored Normal file
View File

@@ -0,0 +1,53 @@
Alex K. Wolfe <alexkwolfe@gmail.com>
Andrew Bradley <cspotcode@gmail.com>
Andrew Lunny <alunny@gmail.com>
Arlo Breault <arlolra@gmail.com>
Benjamin Coe <bencoe@gmail.com>
Benjamin Coe <bencoe@gmail.com> <ben@npmjs.com>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Cedric Nelson <cedric.nelson@gmail.com>
Charlie Robbins <charlie.robbins@gmail.com>
Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
Danila Gerasimov <danila.gerasimov@gmail.com>
David Beitey <david@davidjb.com>
Domenic Denicola <domenic@domenicdenicola.com>
Einar Otto Stangvik <einaros@gmail.com>
Erik Wienhold <git@ewie.name>
Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com>
Evan Lucas <evan@btc.com> <evanlucas@me.com>
Faiq Raza <faiqrazarizvi@gmail.com>
Forbes Lindesay <forbes@lindesay.co.uk>
Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com>
Gabriel Barros <descartavel1@gmail.com>
Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Isaac Z. Schlueter <i@izs.me> isaacs <i@izs.me>
Jake Verbaten <raynos2@gmail.com>
James Sanders <jimmyjazz14@gmail.com>
Jason Smith <jhs@iriscouch.com>
Jonas Weber <github@jonasw.de>
Julien Meddah <julien.meddah@deveryware.com>
Kris Windham <kriswindham@gmail.com>
Lin Clark <lin.w.clark@gmail.com>
Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com>
Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org>
Max Goodman <c@chromakode.com>
Maxim Bogushevich <boga1@mail.ru>
Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com>
Michael Hayes <michael@hayes.io> <mhayes@newrelic.com>
Nicolas Morel <marsup@gmail.com>
Olivier Melcher <olivier.melcher@gmail.com>
Ra'Shaun Stovall <rashaunstovall@gmail.com>
Rebecca Turner <me@re-becca.org> <turner@mikomi.org>
Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com>
Ryan Emery <seebees@gmail.com>
Sam Mikes <smikes@cubane.com>
Takaya Kobayashi <jigsaw@live.jp>
Timo Weiß <timoweiss@Timo-MBP.local>
Tony <zearin@gonk.net>
Trent Mick <trentm@gmail.com> <trent.mick@joyent.com>
Visnu Pitiyanuvath <visnupx@gmail.com>
Will Elwood <w.elwood08@gmail.com>
Wout Mertens <Wout.Mertens@gmail.com>
Yeonghoon Park <sola92@gmail.com>
Zeke Sikelianos <zeke@sikelianos.com>

2
deps/npm/.npmignore vendored
View File

@@ -25,3 +25,5 @@ html/*.png
/npm-*.tgz
*.pyc
/test/tap/builtin-config

10
deps/npm/.travis.yml vendored
View File

@@ -1,11 +1,15 @@
language: node_js
node_js:
- "0.11"
- iojs
- "0.12"
- "0.10"
- "0.8"
env:
- DEPLOY_VERSION=testing
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- "npm install -g npm/npm"
- "sudo mkdir -p /var/run/couchdb"
script: "npm run-script tap"
script: "npm run-script test-all"
notifications:
slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8

278
deps/npm/AUTHORS vendored
View File

@@ -4,8 +4,6 @@ Steve Steiner <ssteinerX@gmail.com>
Mikeal Rogers <mikeal.rogers@gmail.com>
Aaron Blohowiak <aaron.blohowiak@gmail.com>
Martyn Smith <martyn@dollyfish.net.nz>
Mathias Pettersson <mape@mape.me>
Brian Hammond <brian@fictorial.com>
Charlie Robbins <charlie.robbins@gmail.com>
Francisco Treacy <francisco.treacy@gmail.com>
Cliffano Subagio <cliffano@gmail.com>
@@ -16,7 +14,6 @@ James Sanders <jimmyjazz14@gmail.com>
Reid Burke <me@reidburke.com>
Arlo Breault <arlolra@gmail.com>
Timo Derstappen <teemow@gmail.com>
Bradley Meck <bradley.meck@gmail.com>
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Ben Noordhuis <info@bnoordhuis.nl>
Tor Valamo <tor.valamo@gmail.com>
@@ -25,36 +22,42 @@ Olivier Melcher <olivier.melcher@gmail.com>
Tomaž Muraus <kami@k5-storitve.net>
Evan Meagher <evan.meagher@gmail.com>
Orlando Vazquez <ovazquez@gmail.com>
Kai Chen <kaichenxyz@gmail.com>
George Miroshnykov <gmiroshnykov@lohika.com>
Geoff Flarity <geoff.flarity@gmail.com>
Max Goodman <c@chromakode.com>
Pete Kruckenberg <pete@kruckenberg.com>
Laurie Harper <laurie@holoweb.net>
Chris Wong <chris@chriswongstudio.com>
Max Goodman <c@chromacode.com>
Scott Bronson <brons_github@rinspin.com>
Federico Romero <federomero@gmail.com>
Visnu Pitiyanuvath <visnupx@gmail.com>
Irakli Gozalishvili <rfobic@gmail.com>
Mark Cahill <mark@tiemonster.info>
Zearin <zearin@gonk.net>
Tony <zearin@gonk.net>
Iain Sproat <iainsproat@gmail.com>
Trent Mick <trentm@gmail.com>
Felix Geisendörfer <felix@debuggable.com>
Conny Brunnkvist <cbrunnkvist@gmail.com>
Jameson Little <t.jameson.little@gmail.com>
Conny Brunnkvist <conny@fuchsia.se>
Will Elwood <w.elwood08@gmail.com>
Dean Landolt <dean@deanlandolt.com>
Oleg Efimov <efimovov@gmail.com>
Martin Cooper <mfncooper@gmail.com>
Jameson Little <t.jameson.little@gmail.com>
cspotcode <cspotcode@gmail.com>
Maciej Małecki <maciej.malecki@notimplemented.org>
Jann Horn <jannhorn@googlemail.com>
Andrew Bradley <cspotcode@gmail.com>
Maciej Małecki <me@mmalecki.com>
Stephen Sugden <glurgle@gmail.com>
Michael Budde <mbudde@gmail.com>
Jason Smith <jhs@iriscouch.com>
Gautham Pai <buzypi@gmail.com>
David Trejo <david.daniel.trejo@gmail.com>
Paul Vorbach <paul@vorb.de>
George Ornbo <george@shapeshed.com>
Tim Oxley <secoif@gmail.com>
Tyler Green <tyler.green2@gmail.com>
atomizer <danila.gerasimov@gmail.com>
Dave Pacheco <dap@joyent.com>
Danila Gerasimov <danila.gerasimov@gmail.com>
Rod Vagg <rod@vagg.org>
Christian Howe <coderarity@gmail.com>
Andrew Lunny <alunny@gmail.com>
@@ -63,7 +66,7 @@ Adam Blackburn <regality@gmail.com>
Kris Windham <kriswindham@gmail.com>
Jens Grunert <jens.grunert@gmail.com>
Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
Dalmais Maxence <github@maxired.fr>
Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
Marcus Ekwall <marcus.ekwall@gmail.com>
Aaron Stacy <aaron.r.stacy@gmail.com>
Phillip Howell <phowell@cothm.org>
@@ -71,88 +74,217 @@ Domenic Denicola <domenic@domenicdenicola.com>
James Halliday <mail@substack.net>
Jeremy Cantrell <jmcantrell@gmail.com>
Ribettes <patlogan29@gmail.com>
Einar Otto Stangvik <einaros@gmail.com>
Don Park <donpark@docuverse.com>
Einar Otto Stangvik <einaros@gmail.com>
Kei Son <heyacct@gmail.com>
Nicolas Morel <marsup@gmail.com>
Mark Dube <markisdee@gmail.com>
Nathan Rajlich <nathan@tootallnate.net>
Maxim Bogushevich <boga1@mail.ru>
Justin Beckwith <justbe@microsoft.com>
Meaglin <Meaglin.wasabi@gmail.com>
Ben Evans <ben@bensbit.co.uk>
Nathan Zadoks <nathan@nathan7.eu>
Brian White <mscdex@gmail.com>
Brian White <mscdex@mscdex.net>
Jed Schmidt <tr@nslator.jp>
Ian Livingstone <ianl@cs.dal.ca>
Patrick Pfeiffer <patrick@buzzle.at>
Paul Miller <paul@paulmillr.com>
seebees <seebees@gmail.com>
Ryan Emery <seebees@gmail.com>
Carl Lange <carl@flax.ie>
Jan Lehnardt <jan@apache.org>
Alexey Kreschuk <akrsch@gmail.com>
Di Wu <dwu@palantir.com>
Florian Margaine <florian@margaine.com>
Forbes Lindesay <forbes@lindesay.co.uk>
Ian Babrou <ibobrik@gmail.com>
Jaakko Manninen <jaakko@rocketpack.fi>
Johan Nordberg <its@johan-nordberg.com>
Johan Sköld <johan@skold.cc>
Larz Conwell <larz@larz-laptop.(none)>
Luke Arduini <luke.arduini@gmail.com>
Marcel Klehr <mklehr@gmx.net>
Mathias Bynens <mathias@qiwi.be>
Matt Lunn <matt@mattlunn.me.uk>
Matt McClure <matt.mcclure@mapmyfitness.com>
Nirk Niggler <nirk.niggler@gmail.com>
Paolo Fragomeni <paolo@async.ly>
Jake Verbaten (Raynos) <raynos2@gmail.com>
Robert Kowalski <rok@kowalski.gd>
Schabse Laks <Dev@SLaks.net>
Stuart Knightley <stuart@stuartk.com>
Stuart P. Bentley <stuart@testtrack4.com>
Johan Sköld <johan@skold.cc>
Stuart Knightley <stuart@stuartk.com>
Niggler <nirk.niggler@gmail.com>
Paolo Fragomeni <paolo@async.ly>
Jaakko Manninen <jaakko@rocketpack.fi>
Luke Arduini <luke.arduini@gmail.com>
Larz Conwell <larz@larz-laptop.(none)>
Marcel Klehr <mklehr@gmx.net>
Robert Kowalski <rok@kowalski.gd>
Forbes Lindesay <forbes@lindesay.co.uk>
Vaz Allen <vaz@tryptid.com>
elisee <elisee@sparklin.org>
Evan You <yyx990803@gmail.com>
Wil Moore III <wil.moore@wilmoore.com>
Dylan Greene <dylang@gmail.com>
zeke <zeke@sikelianos.com>
Andrew Horton <andrew.j.horton@gmail.com>
Denis Gladkikh <outcoldman@gmail.com>
Daniel Santiago <daniel.santiago@highlevelwebs.com>
Alex Kocharin <alex@kocharin.ru>
Evan Lucas <evanlucas@me.com>
Steve Mason <stevem@brandwatch.com>
Quinn Slack <qslack@qslack.com>
Sébastien Santoro <dereckson@espace-win.org>
CamilleM <camille.moulin@alterway.fr>
Tom Huang <hzlhu.dargon@gmail.com>
Sergey Belov <peimei@ya.ru>
Younghoon Park <sola92@gmail.com>
Yazhong Liu <yorkiefixer@gmail.com>
Mikola Lysenko <mikolalysenko@gmail.com>
Rafael de Oleza <rafa@spotify.com>
Yeonghoon Park <sola92@gmail.com>
Franck Cuny <franck.cuny@gmail.com>
Alan Shaw <alan@freestyle-developments.co.uk>
Alex Rodionov <p0deje@gmail.com>
Alexej Yaroshevich <alex@qfox.ru>
Elan Shanker <elan.shanker@gmail.com>
François Frisch <francoisfrisch@gmail.com>
Gabriel Falkenberg <gabriel.falkenberg@gmail.com>
Jason Diamond <jason@diamond.name>
Jess Martin <jessmartin@gmail.com>
Jon Spencer <jon@jonspencer.ca>
Matt Colyer <matt@colyer.name>
Jake Verbaten <raynos2@gmail.com>
Schabse Laks <Dev@SLaks.net>
Florian Margaine <florian@margaine.com>
Johan Nordberg <its@johan-nordberg.com>
Ian Babrou <ibobrik@gmail.com>
Di Wu <dwu@palantir.com>
Mathias Bynens <mathias@qiwi.be>
Matt McClure <matt.mcclure@mapmyfitness.com>
Maximilian Antoni <maximilian.antoni@juliusbaer.com>
Matt Lunn <matt@mattlunn.me.uk>
Alexey Kreschuk <akrsch@gmail.com>
elisee <elisee@sparklin.org>
Robert Gieseke <robert.gieseke@gmail.com>
François Frisch <francoisfrisch@gmail.com>
Trevor Burnham <tburnham@hubspot.com>
Alan Shaw <alan@freestyle-developments.co.uk>
TJ Holowaychuk <tj@vision-media.ca>
Nicholas Kinsey <pyro@feisty.io>
Paulo Cesar <pauloc062@gmail.com>
Quim Calpe <quim@kalpe.com>
Robert Gieseke <robert.gieseke@gmail.com>
Spain Train <michael.spainhower@opower.com>
TJ Holowaychuk <tj@vision-media.ca>
Elan Shanker <elan.shanker@gmail.com>
Jon Spencer <jon@jonspencer.ca>
Jason Diamond <jason@diamond.name>
Maximilian Antoni <mail@maxantoni.de>
Thom Blake <tblake@brightroll.com>
Trevor Burnham <tburnham@hubspot.com>
Jess Martin <jessmartin@gmail.com>
Spain Train <michael.spainhower@opower.com>
Alex Rodionov <p0deje@gmail.com>
Matt Colyer <matt@colyer.name>
Evan You <yyx990803@gmail.com>
bitspill <bitspill+github@bitspill.net>
Gabriel Falkenberg <gabriel.falkenberg@gmail.com>
Alexej Yaroshevich <alex@qfox.ru>
Quim Calpe <quim@kalpe.com>
Steve Mason <stevem@brandwatch.com>
Wil Moore III <wil.moore@wilmoore.com>
Sergey Belov <peimei@ya.ru>
Tom Huang <hzlhu.dargon@gmail.com>
CamilleM <camille.moulin@alterway.fr>
Sébastien Santoro <dereckson@espace-win.org>
Evan Lucas <evan@btc.com>
Quinn Slack <qslack@qslack.com>
Alex Kocharin <alex@kocharin.ru>
Daniel Santiago <daniel.santiago@highlevelwebs.com>
Denis Gladkikh <outcoldman@gmail.com>
Andrew Horton <andrew.j.horton@gmail.com>
Zeke Sikelianos <zeke@sikelianos.com>
Dylan Greene <dylang@gmail.com>
Franck Cuny <franck.cuny@gmail.com>
Yeonghoon Park <sola92@gmail.com>
Rafael de Oleza <rafa@spotify.com>
Mikola Lysenko <mikolalysenko@gmail.com>
Yazhong Liu <yorkiefixer@gmail.com>
Neil Gentleman <ngentleman@gmail.com>
Kris Kowal <kris.kowal@cixar.com>
Alex Gorbatchev <alex.gorbatchev@gmail.com>
Shawn Wildermuth <shawn@wildermuth.com>
Wesley de Souza <wesleywex@gmail.com>
yoyoyogi <yogesh.k@gmail.com>
J. Tangelder <j.tangelder@gmail.com>
Jean Lauliac <jean@lauliac.com>
Andrey Kislyuk <kislyuk@gmail.com>
Thorsten Lorenz <thlorenz@gmx.de>
Julian Gruber <julian@juliangruber.com>
Benjamin Coe <bencoe@gmail.com>
Alex Ford <Alex.Ford@CodeTunnel.com>
Matt Hickford <matt.hickford@gmail.com>
Sean McGivern <sean.mcgivern@rightscale.com>
C J Silverio <ceejceej@gmail.com>
Robin Tweedie <robin@songkick.com>
Miroslav Bajtoš <miroslav@strongloop.com>
David Glasser <glasser@davidglasser.net>
Gianluca Casati <casati_gianluca@yahoo.it>
Forrest L Norvell <ogd@aoaioxxysz.net>
Karsten Tinnefeld <k.tinnefeld@googlemail.com>
Bryan Burgers <bryan@burgers.io>
David Beitey <david@davidjb.com>
Evan You <yyou@google.com>
Zach Pomerantz <zmp@umich.edu>
Chris Williams <cwilliams88@gmail.com>
sudodoki <smd.deluzion@gmail.com>
Mick Thompson <dthompson@gmail.com>
Felix Rabe <felix@rabe.io>
Michael Hayes <michael@hayes.io>
Chris Dickinson <christopher.s.dickinson@gmail.com>
Bradley Meck <bradley.meck@gmail.com>
GeJ <geraud@gcu.info>
Andrew Terris <atterris@gmail.com>
Michael Nisi <michael.nisi@gmail.com>
fengmk2 <fengmk2@gmail.com>
Adam Meadows <adam.meadows@gmail.com>
Chulki Lee <chulki.lee@gmail.com>
不四 <busi.hyy@taobao.com>
dead_horse <dead_horse@qq.com>
Kenan Yildirim <kenan@kenany.me>
Laurie Voss <git@seldo.com>
Rebecca Turner <me@re-becca.org>
Hunter Loftis <hunter@hunterloftis.com>
Peter Richardson <github@zoomy.net>
Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
Filip Weiss <me@fiws.net>
Timo Weiß <timoweiss@Timo-MBP.local>
Christopher Hiller <chiller@badwing.com>
Jérémy Lal <kapouer@melix.org>
Anders Janmyr <anders@janmyr.com>
Chris Meyers <chris.meyers.fsu@gmail.com>
Ludwig Magnusson <ludwig@mediatool.com>
Wout Mertens <Wout.Mertens@gmail.com>
Nick Santos <nick@medium.com>
Terin Stock <terinjokes@gmail.com>
Faiq Raza <faiqrazarizvi@gmail.com>
Thomas Torp <thomas@erupt.no>
Sam Mikes <smikes@cubane.com>
Mat Tyndall <mat.tyndall@gmail.com>
Tauren Mills <tauren@sportzing.com>
Ron Martinez <ramartin.net@gmail.com>
Kazuhito Hokamura <k.hokamura@gmail.com>
Tristan Davies <github@tristan.io>
David Volm <david@volminator.com>
Lin Clark <lin.w.clark@gmail.com>
Ben Page <bpage@dewalch.com>
Jeff Jo <jeffjo@squareup.com>
martinvd <martinvdpub@gmail.com>
Mark J. Titorenko <nospam-github.com@titorenko.net>
Oddur Sigurdsson <oddurs@gmail.com>
Eric Mill <eric@konklone.com>
Gabriel Barros <descartavel1@gmail.com>
KevinSheedy <kevinsheedy@gmail.com>
Aleksey Smolenchuk <aleksey@uber.com>
Ed Morley <emorley@mozilla.com>
Blaine Bublitz <blaine@iceddev.com>
Andrey Fedorov <anfedorov@gmail.com>
Daijiro Wachi <daijiro.wachi@gmail.com>
Luc Thevenard <lucthevenard@gmail.com>
Aria Stewart <aredridel@nbtsc.org>
Charlie Rudolph <charles.w.rudolph@gmail.com>
Vladimir Rutsky <rutsky@users.noreply.github.com>
Isaac Murchie <isaac@saucelabs.com>
Marcin Wosinek <marcin.wosinek@gmail.com>
David Marr <davemarr@gmail.com>
Bryan English <bryan@bryanenglish.com>
Anthony Zotti <amZotti@users.noreply.github.com>
Karl Horky <karl.horky@gmail.com>
Jordan Harband <ljharb@gmail.com>
Guðlaugur Stefán Egilsson <gulli@kolibri.is>
Helge Skogly Holm <helge.holm@gmail.com>
Peter A. Shevtsov <petr.shevtsov@gmail.com>
Alain Kalker <a.c.kalker@gmail.com>
Bryant Williams <b.n.williams@gmail.com>
Jonas Weber <github@jonasw.de>
Tim Whidden <twhid@twhid.com>
Andreas <functino@users.noreply.github.com>
Karolis Narkevicius <karolis.n@gmail.com>
Adrian Lynch <adi_ady_ade@hotmail.com>
Richard Littauer <richard.littauer@gmail.com>
Oli Evans <oli@zilla.org.uk>
Matt Brennan <mattyb1000@gmail.com>
Jeff Barczewski <jeff.barczewski@gmail.com>
Danny Fritz <dannyfritz@gmail.com>
Takaya Kobayashi <jigsaw@live.jp>
Ra'Shaun Stovall <rashaunstovall@gmail.com>
Julien Meddah <julien.meddah@deveryware.com>
Michiel Sikma <michiel@wedemandhtml.com>
Jakob Krigovsky <jakob.krigovsky@gmail.com>
Charmander <~@charmander.me>
Erik Wienhold <git@ewie.name>
James Butler <james.butler@sandfox.co.uk>
Kevin Kragenbrink <kevin@gaikai.com>
Arnaud Rinquin <rinquin.arnaud@gmail.com>
Mike MacCana <mike.maccana@gmail.com>
Antti Mattila <anttti@fastmail.fm>
laiso <laiso@lai.so>
Matt Zorn <zornme@gmail.com>
Kyle Mitchell <kyle@kemitchell.com>
Jeremiah Senkpiel <fishrock123@rocketmail.com>
Michael Klein <mischkl@users.noreply.github.com>
Simen Bekkhus <sbekkhus91@gmail.com>
Victor <victor.shih@gmail.com>
thefourtheye <thechargingvolcano@gmail.com>
Clay Carpenter <claycarpenter@gmail.com>
bangbang93 <bangbang93@163.com>
Nick Malaguti <nmalaguti@palantir.com>
Cedric Nelson <cedric.nelson@gmail.com>
Kat Marchán <kzm@sykosomatic.org>
Andrew <talktome@aboutandrew.co.uk>
Eduardo Pinho <enet4mikeenet@gmail.com>

2338
deps/npm/CHANGELOG.md vendored

File diff suppressed because it is too large Load Diff

View File

@@ -7,3 +7,6 @@
issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues).
* Ensure your new issue conforms to the [Contributing
Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines).
Participation in this open source project is subject to the [npm Code
of Conduct](http://www.npmjs.com/policies/conduct).

100
deps/npm/Makefile vendored
View File

@@ -31,6 +31,28 @@ misc_mandocs = $(shell find doc/misc -name '*.md' \
|sed 's|doc/misc/|man/man7/|g' ) \
man/man7/npm-index.7
cli_partdocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/partial/doc/cli/|g' ) \
html/partial/doc/README.html
api_partdocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/api/|html/partial/doc/api/|g' )
files_partdocs = $(shell find doc/files -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/files/|html/partial/doc/files/|g' ) \
html/partial/doc/files/npm-json.html \
html/partial/doc/files/npm-global.html
misc_partdocs = $(shell find doc/misc -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/misc/|html/partial/doc/misc/|g' ) \
html/partial/doc/index.html
cli_htmldocs = $(shell find doc/cli -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/cli/|html/doc/cli/|g' ) \
@@ -53,6 +75,8 @@ misc_htmldocs = $(shell find doc/misc -name '*.md' \
mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs)
partdocs = $(api_partdocs) $(cli_partdocs) $(files_partdocs) $(misc_partdocs)
htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)
all: doc
@@ -61,10 +85,10 @@ latest:
@echo "Installing latest published npm"
@echo "Use 'make install' or 'make link' to install the code"
@echo "in this folder that you're looking at right now."
node cli.js install -g -f npm
node cli.js install -g -f npm ${NPMOPTS}
install: docclean all
node cli.js install -g -f
install: all
node cli.js install -g -f ${NPMOPTS}
# backwards compat
dev: install
@@ -79,7 +103,7 @@ clean: markedclean marked-manclean doc-clean uninstall
uninstall:
node cli.js rm npm -g -f
doc: $(mandocs) $(htmldocs)
doc: $(mandocs) $(htmldocs) $(partdocs)
markedclean:
rm -rf node_modules/marked node_modules/.bin/marked .building_marked
@@ -119,43 +143,73 @@ man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json
@[ -d man/man5 ] || mkdir -p man/man5
scripts/doc-build.sh $< $@
doc/misc/npm-index.md: scripts/index-build.js package.json
node scripts/index-build.js > $@
html/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json
@[ -d man/man7 ] || mkdir -p man/man7
scripts/doc-build.sh $< $@
html/doc/README.html: README.md $(html_docdeps)
doc/misc/npm-index.md: scripts/index-build.js package.json
node scripts/index-build.js > $@
# html/doc depends on html/partial/doc
html/doc/%.html: html/partial/doc/%.html
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
html/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
html/doc/README.html: html/partial/doc/README.html
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
html/doc/cli/%.html: html/partial/doc/cli/%.html
@[ -d html/doc/cli ] || mkdir -p html/doc/cli
scripts/doc-build.sh $< $@
html/doc/api/%.html: doc/api/%.md $(html_docdeps)
@[ -d html/doc/api ] || mkdir -p html/doc/api
html/doc/misc/%.html: html/partial/doc/misc/%.html
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
scripts/doc-build.sh $< $@
html/doc/files/npm-json.html: html/doc/files/package.json.html
cp $< $@
html/doc/files/npm-global.html: html/doc/files/npm-folders.html
cp $< $@
html/doc/files/%.html: doc/files/%.md $(html_docdeps)
html/doc/files/%.html: html/partial/doc/files/%.html
@[ -d html/doc/files ] || mkdir -p html/doc/files
scripts/doc-build.sh $< $@
html/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
html/doc/api/%.html: html/partial/doc/api/%.html
@[ -d html/doc/api ] || mkdir -p html/doc/api
scripts/doc-build.sh $< $@
html/partial/doc/index.html: doc/misc/npm-index.md $(html_docdeps)
@[ -d html/partial/doc ] || mkdir -p html/partial/doc
scripts/doc-build.sh $< $@
html/partial/doc/README.html: README.md $(html_docdeps)
@[ -d html/partial/doc ] || mkdir -p html/partial/doc
scripts/doc-build.sh $< $@
html/partial/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
@[ -d html/partial/doc/cli ] || mkdir -p html/partial/doc/cli
scripts/doc-build.sh $< $@
html/partial/doc/api/%.html: doc/api/%.md $(html_docdeps)
@[ -d html/partial/doc/api ] || mkdir -p html/partial/doc/api
scripts/doc-build.sh $< $@
html/partial/doc/files/npm-json.html: html/partial/doc/files/package.json.html
cp $< $@
html/partial/doc/files/npm-global.html: html/partial/doc/files/npm-folders.html
cp $< $@
html/partial/doc/files/%.html: doc/files/%.md $(html_docdeps)
@[ -d html/partial/doc/files ] || mkdir -p html/partial/doc/files
scripts/doc-build.sh $< $@
html/partial/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
@[ -d html/partial/doc/misc ] || mkdir -p html/partial/doc/misc
scripts/doc-build.sh $< $@
marked: node_modules/.bin/marked
node_modules/.bin/marked:

126
deps/npm/README.md vendored
View File

@@ -1,4 +1,4 @@
npm(1) -- node package manager
npm(1) -- a JavaScript package manager
==============================
[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm)
## SYNOPSIS
@@ -36,21 +36,27 @@ paths, etc.) then read on.
## Fancy Install (Unix)
There's a pretty robust install script at
<https://www.npmjs.org/install.sh>. You can download that and run it.
<https://www.npmjs.com/install.sh>. You can download that and run it.
Here's an example using curl:
curl -L https://npmjs.org/install.sh | sh
```sh
curl -L https://www.npmjs.com/install.sh | sh
```
### Slightly Fancier
You can set any npm configuration params with that script:
npm_config_prefix=/some/path sh install.sh
```sh
npm_config_prefix=/some/path sh install.sh
```
Or, you can run it in uber-debuggery mode:
npm_debug=1 sh install.sh
```sh
npm_debug=1 sh install.sh
```
### Even Fancier
@@ -62,10 +68,15 @@ arbitrary config keys using the `./configure --key=val ...`, and then
run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful
for testing, or running stuff without actually installing npm itself.)
## Fancy Windows Install
## Windows Install or Upgrade
You can download a zip file from <https://npmjs.org/dist/>, and unpack it
in the same folder where node.exe lives.
You can download a zip file from <https://github.com/npm/npm/releases>, and
unpack it in the `node_modules\npm\` folder inside node's installation folder.
To upgrade to npm 2, follow the Windows upgrade instructions in
the npm Troubleshooting Guide:
<https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows>
If that's not fancy enough for you, then you can fetch the code with
git, and mess with it directly.
@@ -74,40 +85,18 @@ git, and mess with it directly.
No.
## Permissions when Using npm to Install Other Stuff
**tl;dr**
* Use `sudo` for greater safety. Or don't, if you prefer not to.
* npm will downgrade permissions if it's root before running any build
scripts that package authors specified.
### More details...
As of version 0.3, it is recommended to run npm as root.
This allows npm to change the user identifier to the `nobody` user prior
to running any package build or test commands.
If you are not the root user, or if you are on a platform that does not
support uid switching, then npm will not attempt to change the userid.
If you would like to ensure that npm **always** runs scripts as the
"nobody" user, and have it fail if it cannot downgrade permissions, then
set the following configuration param:
npm config set unsafe-perm false
This will prevent running in unsafe mode, even as non-root users.
## Uninstalling
So sad to see you go.
sudo npm uninstall npm -g
```sh
sudo npm uninstall npm -g
```
Or, if that fails,
sudo make uninstall
```sh
sudo make uninstall
```
## More Severe Uninstalling
@@ -121,13 +110,17 @@ remove them.
To remove cruft left behind by npm 0.x, you can use the included
`clean-old.sh` script file. You can run it conveniently like this:
npm explore npm -g -- sh scripts/clean-old.sh
```sh
npm explore npm -g -- sh scripts/clean-old.sh
```
npm uses two configuration files, one for per-user configs, and another
for global (every-user) configs. You can view them by doing:
npm config get userconfig # defaults to ~/.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
```sh
npm config get userconfig # defaults to ~/.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
```
Uninstalling npm does not remove configuration files by default. You
must remove them yourself manually if you want them gone. Note that
@@ -136,26 +129,35 @@ you have chosen.
## Using npm Programmatically
If you would like to use npm programmatically, you can do that.
It's not very well documented, but it *is* rather simple.
Although npm can be used programmatically, its API is meant for use by the CLI
*only*, and no guarantees are made regarding its fitness for any other purpose.
If you want to use npm to reliably perform some task, the safest thing to do is
to invoke the desired `npm` command with appropriate arguments.
Most of the time, unless you actually want to do all the things that
npm does, you should try using one of npm's dependencies rather than
using npm itself, if possible.
The semantic version of npm refers to the CLI itself, rather than the
underlying API. _The internal API is not guaranteed to remain stable even when
npm's version indicates no breaking changes have been made according to
semver._
Eventually, npm will be just a thin cli wrapper around the modules
that it depends on, but for now, there are some things that you must
use npm itself to do.
If you _still_ would like to use npm programmatically, it's _possible_. The API
isn't very well documented, but it _is_ rather simple.
var npm = require("npm")
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
npm.commands.install(["some", "args"], function (er, data) {
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
npm.on("log", function (message) { .... })
})
Eventually, npm will be just a thin CLI wrapper around the modules that it
depends on, but for now, there are some things that only the CLI can do. You
should try using one of npm's dependencies first, and only use the API if what
you're trying to do is only supported by npm itself.
```javascript
var npm = require("npm")
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
npm.commands.install(["some", "args"], function (er, data) {
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
npm.registry.log.on("log", function (message) { .... })
})
```
The `load` function takes an object hash of the command-line configs.
The various `npm.commands.<cmd>` functions take an **array** of
@@ -173,13 +175,13 @@ help config` to learn about all the options you can set there.
## More Docs
Check out the [docs](https://www.npmjs.org/doc/),
especially the [faq](https://www.npmjs.org/doc/faq.html).
Check out the [docs](https://docs.npmjs.com/),
especially the [faq](https://docs.npmjs.com/misc/faq).
You can use the `npm help` command to read any of them.
If you're a developer, and you want to use npm to publish your program,
you should [read this](https://www.npmjs.org/doc/developers.html)
you should [read this](https://docs.npmjs.com/misc/developers)
## Legal Stuff
@@ -193,13 +195,13 @@ npm, Inc. or the Node.js project.
Data published to the npm registry is not part of npm itself, and is
the sole property of the publisher. While every effort is made to
ensure accountability, there is absolutely no guarantee, warrantee, or
ensure accountability, there is absolutely no guarantee, warranty, or
assertion expressed or implied as to the quality, fitness for a
specific purpose, or lack of malice in any given npm package.
If you have a complaint about a package in the public npm registry,
and cannot [resolve it with the package
owner](https://www.npmjs.org/doc/misc/npm-disputes.html), please email
owner](https://docs.npmjs.com/misc/disputes), please email
<support@npmjs.com> and explain the situation.
Any data published to The npm Registry (including user account
@@ -228,8 +230,6 @@ When you find issues, please report them:
* web:
<https://github.com/npm/npm/issues>
* email:
<npm-@googlegroups.com>
Be sure to include *all* of the output from the npm command that didn't work
as expected. The `npm-debug.log` file is also helpful to provide.

View File

@@ -1,2 +1,6 @@
#!/usr/bin/env sh
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
if [ "x$npm_config_node_gyp" = "x" ]; then
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
else
"$npm_config_node_gyp" "$@"
fi

View File

@@ -1 +1,5 @@
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
if not defined npm_config_node_gyp (
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
) else (
node %npm_config_node_gyp% %*
)

View File

@@ -21,7 +21,7 @@ log.info("it worked if it ends with", "ok")
var path = require("path")
, npm = require("../lib/npm.js")
, npmconf = require("npmconf")
, npmconf = require("../lib/config/core.js")
, errorHandler = require("../lib/utils/error-handler.js")
, configDefs = npmconf.defs

View File

@@ -10,4 +10,4 @@ npm-bin(3) -- Display npm bin folder
Print the folder where npm will install executables.
This function should not be used programmatically. Instead, just refer
to the `npm.bin` member.
to the `npm.bin` property.

View File

@@ -27,4 +27,4 @@ array of results is returned. Each result is an object with these properties:
* file:
Name of the file that matched
The silent parameter is not neccessary not used, but it may in the future.
The silent parameter is not necessary not used, but it may in the future.

View File

@@ -10,9 +10,9 @@ npm-load(3) -- Load config settings
npm.load() must be called before any other function call. Both parameters are
optional, but the second is recommended.
The first parameter is an object hash of command-line config params, and the
second parameter is a callback that will be called when npm is loaded and
ready to serve.
The first parameter is an object containing command-line config params, and the
second parameter is a callback that will be called when npm is loaded and ready
to serve.
The first parameter should follow a similar structure as the package.json
config object.

View File

@@ -52,5 +52,5 @@ List packages in the global install prefix instead of in the current
project.
Note, if parseable is set or long isn't set, then duplicates will be trimmed.
This means that if a submodule a same dependency as a parent module, then the
This means that if a submodule has the same dependency as a parent module, then the
dependency will only be output once.

View File

@@ -1,5 +1,5 @@
npm-restart(3) -- Start a package
=================================
npm-restart(3) -- Restart a package
===================================
## SYNOPSIS
@@ -7,14 +7,33 @@ npm-restart(3) -- Start a package
## DESCRIPTION
This runs a package's "restart" script, if one was provided.
Otherwise it runs package's "stop" script, if one was provided, and then
the "start" script.
This restarts a package (or multiple packages).
This runs a package's "stop", "restart", and "start" scripts, and associated
pre- and post- scripts, in the order given below:
1. prerestart
2. prestop
3. stop
4. poststop
5. restart
6. prestart
7. start
8. poststart
9. postrestart
If no version is specified, then it restarts the "active" version.
npm can run tests on multiple packages. Just specify multiple packages
in the `packages` parameter.
npm can restart multiple packages. Just specify multiple packages in
the `packages` parameter.
## NOTE
Note that the "restart" script is run **in addition to** the "stop"
and "start" scripts, not instead of them.
This is the behavior as of `npm` major version 2. A change in this
behavior will be accompanied by an increase in major version number
## SEE ALSO

View File

@@ -9,5 +9,5 @@ npm-start(3) -- Start a package
This runs a package's "start" script, if one was provided.
npm can run tests on multiple packages. Just specify multiple packages
in the `packages` parameter.
npm can start multiple packages. Just specify multiple packages in the
`packages` parameter.

View File

@@ -1,28 +0,0 @@
npm-submodule(3) -- Add a package as a git submodule
====================================================
## SYNOPSIS
npm.commands.submodule(packages, callback)
## DESCRIPTION
For each package specified, npm will check if it has a git repository url
in its package.json description then add it as a git submodule at
`node_modules/<pkg name>`.
This is a convenience only. From then on, it's up to you to manage
updates by using the appropriate git commands. npm will stubbornly
refuse to update, modify, or remove anything with a `.git` subfolder
in it.
This command also does not install missing dependencies, if the package
does not include them in its git repository. If `npm ls` reports that
things are missing, you can either install, link, or submodule them yourself,
or you can do `npm explore <pkgname> -- npm install` to install the
dependencies into the submodule folder.
## SEE ALSO
* npm help json
* git help submodule

View File

@@ -18,6 +18,6 @@ is the package name and version is the version number (much like installing a
specific version).
The second element is the name of the tag to tag this version with. If this
parameter is missing or falsey (empty), the default froom the config will be
parameter is missing or falsey (empty), the default from the config will be
used. For more information about how to set this config, check
`man 3 npm-config` for programmatic usage or `man npm-config` for cli usage.

View File

@@ -2,10 +2,17 @@ npm-update(3) -- Update a package
=================================
## SYNOPSIS
npm.commands.update(packages, callback)
# DESCRIPTION
Updates a package, upgrading it to the latest version. It also installs any missing packages.
Updates a package, upgrading it to the latest version. It also installs any
missing packages.
The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.
The `packages` argument is an array of packages to update. The `callback`
parameter will be called when done or when an error occurs.
## SEE ALSO
* npm-update(1)

View File

@@ -1,5 +1,5 @@
npm(3) -- node package manager
==============================
npm(3) -- javascript package manager
====================================
## SYNOPSIS
@@ -25,13 +25,12 @@ This is the API documentation for npm.
To find documentation of the command line
client, see `npm(1)`.
Prior to using npm's commands, `npm.load()` must be called.
If you provide `configObject` as an object hash of top-level
configs, they override the values stored in the various config
locations. In the npm command line client, this set of configs
is parsed from the command line options. Additional configuration
params are loaded from two configuration files. See `npm-config(1)`,
`npm-config(7)`, and `npmrc(5)` for more information.
Prior to using npm's commands, `npm.load()` must be called. If you provide
`configObject` as an object map of top-level configs, they override the values
stored in the various config locations. In the npm command line client, this
set of configs is parsed from the command line options. Additional
configuration params are loaded from two configuration files. See
`npm-config(1)`, `npm-config(7)`, and `npmrc(5)` for more information.
After that, each of the functions are accessible in the
commands object: `npm.commands.<cmd>`. See `npm-index(7)` for a list of
@@ -88,9 +87,9 @@ command.
## MAGIC
For each of the methods in the `npm.commands` hash, a method is added to
the npm object, which takes a set of positional string arguments rather
than an array and a callback.
For each of the methods in the `npm.commands` object, a method is added to the
npm object, which takes a set of positional string arguments rather than an
array and a callback.
If the last argument is a callback, then it will use the supplied
callback. However, if no callback is provided, then it will print out

63
deps/npm/doc/cli/npm-access.md vendored Normal file
View File

@@ -0,0 +1,63 @@
npm-access(1) -- Set access level on published packages
=======================================================
## SYNOPSIS
npm access public [<package>]
npm access restricted [<package>]
npm access add <read-only|read-write> <entity> [<package>]
npm access rm <entity> [<package>]
npm access ls [<package>]
npm access edit [<package>]
## DESCRIPTION
Used to set access controls on private packages.
For all of the subcommands, `npm access` will perform actions on the packages
in the current working directory if no package name is passed to the
subcommand.
* public / restricted:
Set a package to be either publicly accessible or restricted.
* add / rm:
Add or remove the ability of users and teams to have read-only or read-write
access to a package.
* ls:
Show all of the access privileges for a package. Will only show permissions
for packages to which you have at least read access.
* edit:
Set the access privileges for a package at once using `$EDITOR`.
## DETAILS
`npm access` always operates directly on the current registry, configurable
from the command line using `--registry=<registry url>`.
Unscoped packages are *always public*.
Scoped packages *default to restricted*, but you can either publish them as
public using `npm publish --access=public`, or set their access as public using
`npm access public` after the initial publish.
You must have privileges to set the access of a package:
* You are an owner of an unscoped or scoped package.
* You are a member of the team that owns a scope.
* You have been given read-write privileges for a package, either as a member
of a team or directly as an owner.
If your account is not paid, then attempts to publish scoped packages will fail
with an HTTP 402 status code (logically enough), unless you use
`--access=public`.
## SEE ALSO
* npm-publish(1)
* npm-config(7)
* npm-registry(7)

View File

@@ -3,7 +3,7 @@ npm-adduser(1) -- Add a registry user account
## SYNOPSIS
npm adduser [--registry=url] [--scope=@orgname]
npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
## DESCRIPTION
@@ -13,13 +13,14 @@ the default registry will be used (see `npm-config(7)`).
The username, password, and email are read in from prompts.
You may use this command to change your email address, but not username
or password.
To reset your password, go to <https://www.npmjs.com/forgot>
To reset your password, go to <https://www.npmjs.org/forgot>
To change your email address, go to <https://www.npmjs.com/email-edit>
You may use this command multiple times with the same user account to
authorize on a new machine.
authorize on a new machine. When authenticating on a new machine,
the username, password and email address must all match with
your existing record.
`npm login` is an alias to `adduser` and behaves exactly the same way.
@@ -45,6 +46,21 @@ e.g.
This will set a registry for the given scope and login or create a user for
that registry at the same time.
### always-auth
Default: false
If specified, save configuration indicating that all requests to the given
registry should include authorization information. Useful for private
registries. Can be used with `--registry` and / or `--scope`, e.g.
npm adduser --registry=http://private-registry.example.com --always-auth
This will ensure that all requests to that registry (including for tarballs)
include an authorization header. See `always-auth` in `npm-config(7)` for more
details on always-auth. Registry-specific configuration of `always-auth` takes
precedence over any global configuration.
## SEE ALSO
* npm-registry(7)

View File

@@ -12,7 +12,10 @@ npm-build(1) -- Build a package
This is the plumbing command called by `npm link` and `npm install`.
It should generally not be called directly.
It should generally be called during installation, but if you need to run it
directly, run:
npm run-script build
## SEE ALSO

73
deps/npm/doc/cli/npm-dist-tag.md vendored Normal file
View File

@@ -0,0 +1,73 @@
npm-dist-tag(1) -- Modify package distribution tags
===================================================
## SYNOPSIS
npm dist-tag add <pkg>@<version> [<tag>]
npm dist-tag rm <pkg> <tag>
npm dist-tag ls [<pkg>]
## DESCRIPTION
Add, remove, and enumerate distribution tags on a package:
* add:
Tags the specified version of the package with the specified tag, or the
`--tag` config if not specified.
* rm:
Clear a tag that is no longer in use from the package.
* ls:
Show all of the dist-tags for a package, defaulting to the package in
the current prefix.
A tag can be used when installing packages as a reference to a version instead
of using a specific version number:
npm install <name>@<tag>
When installing dependencies, a preferred tagged version may be specified:
npm install --tag <tag>
This also applies to `npm dedupe`.
Publishing a package sets the "latest" tag to the published version unless the
`--tag` option is used. For example, `npm publish --tag=beta`.
## PURPOSE
Tags can be used to provide an alias instead of version numbers. For
example, `npm` currently uses the tag "next" to identify the upcoming
version, and the tag "latest" to identify the current version.
A project might choose to have multiple streams of development, e.g.,
"stable", "canary".
## CAVEATS
This command used to be known as `npm tag`, which only created new tags, and so
had a different syntax.
Tags must share a namespace with version numbers, because they are specified in
the same slot: `npm install <pkg>@<version>` vs `npm install <pkg>@<tag>`.
Tags that can be interpreted as valid semver ranges will be rejected. For
example, `v1.4` cannot be used as a tag, because it is interpreted by semver as
`>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>.
The simplest way to avoid semver problems with tags is to use tags that do not
begin with a number or the letter `v`.
## SEE ALSO
* npm-tag(1)
* npm-publish(1)
* npm-install(1)
* npm-dedupe(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npm-tag(3)
* npmrc(5)

View File

@@ -32,7 +32,6 @@ The shell to run for the `npm explore` command.
## SEE ALSO
* npm-submodule(1)
* npm-folders(5)
* npm-edit(1)
* npm-rebuild(1)

View File

@@ -3,7 +3,7 @@ npm-init(1) -- Interactively create a package.json file
## SYNOPSIS
npm init
npm init [-f|--force|-y|--yes]
## DESCRIPTION
@@ -18,8 +18,21 @@ the options in there.
It is strictly additive, so it does not delete options from your package.json
without a really good reason to do so.
If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only
defaults and not prompt you for any options.
## CONFIGURATION
### scope
* Default: none
* Type: String
The scope under which the new module should be created.
## SEE ALSO
* <https://github.com/isaacs/init-package-json>
* package.json(5)
* npm-version(1)
* npm-scope(7)

View File

@@ -43,9 +43,10 @@ after packing it up into a tarball (b).
it installs the current package context (ie, the current working
directory) as a global package.
By default, `npm install` will install all modules listed as
dependencies. With the `--production` flag,
npm will not install modules listed in `devDependencies`.
By default, `npm install` will install all modules listed as dependencies.
With the `--production` flag (or when the `NODE_ENV` environment variable
is set to `production`), npm will not install modules listed in
`devDependencies`.
* `npm install <folder>`:
@@ -154,24 +155,12 @@ after packing it up into a tarball (b).
npm install sax@">=0.1.0 <0.2.0"
npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
* `npm install <githubname>/<githubrepo>`:
Install the package at `https://github.com/githubname/githubrepo" by
attempting to clone it using `git`.
Example:
npm install mygithubuser/myproject
To reference a package in a git repo that is not on GitHub, see git
remote urls below.
* `npm install <git remote url>`:
Install a package by cloning a git remote url. The format of the git
url is:
<protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>]
`<protocol>` is one of `git`, `git+ssh`, `git+http`, or
`git+https`. If no `<commit-ish>` is specified, then `master` is
@@ -183,6 +172,53 @@ after packing it up into a tarball (b).
git+https://isaacs@github.com/npm/npm.git
git://github.com/npm/npm.git#v1.0.27
* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:
* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:
Install the package at `https://github.com/githubname/githubrepo` by
attempting to clone it using `git`.
If you don't specify a *commit-ish* then `master` will be used.
Examples:
npm install mygithubuser/myproject
npm install github:mygithubuser/myproject
* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>]`:
Install the package at `https://gist.github.com/gistID` by attempting to
clone it using `git`. The GitHub username associated with the gist is
optional and will not be saved in `package.json` if `--save` is used.
If you don't specify a *commit-ish* then `master` will be used.
Example:
npm install gist:101a11beef
* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:
Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`
by attempting to clone it using `git`.
If you don't specify a *commit-ish* then `master` will be used.
Example:
npm install bitbucket:mybitbucketuser/myproject
* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:
Install the package at `https://gitlab.com/gitlabname/gitlabrepo`
by attempting to clone it using `git`.
If you don't specify a *commit-ish* then `master` will be used.
Example:
npm install gitlab:mygitlabuser/myproject
You may combine multiple arguments, and even multiple types of arguments.
For example:

View File

@@ -22,7 +22,7 @@ Note that `package-name` is taken from `package.json`,
not from directory name.
The package name can be optionally prefixed with a scope. See `npm-scope(7)`.
The scope must by preceded by an @-symbol and followed by a slash.
The scope must be preceded by an @-symbol and followed by a slash.
When creating tarballs for `npm publish`, the linked packages are
"snapshotted" to their current state by resolving the symbolic links.
@@ -38,7 +38,8 @@ For example:
npm link redis # link-install the package
Now, any changes to ~/projects/node-redis will be reflected in
~/projects/node-bloggy/node_modules/redis/
~/projects/node-bloggy/node_modules/node-redis/. Note that the link should
be to the package name, not the directory name for that package.
You may also shortcut the two steps in one. For example, to do the
above use-case in a shorter way:
@@ -49,7 +50,7 @@ above use-case in a shorter way:
The second line is the equivalent of doing:
(cd ../node-redis; npm link)
npm link redis
npm link node-redis
That is, it first creates a global link, and then links the global
installation target into your project's `node_modules` folder.

50
deps/npm/doc/cli/npm-logout.md vendored Normal file
View File

@@ -0,0 +1,50 @@
npm-logout(1) -- Log out of the registry
========================================
## SYNOPSIS
npm logout [--registry=url] [--scope=@orgname]
## DESCRIPTION
When logged into a registry that supports token-based authentication, tell the
server to end this token's session. This will invalidate the token everywhere
you're using it, not just for the current environment.
When logged into a legacy registry that uses username and password authentication, this will
clear the credentials in your user configuration. In this case, it will _only_ affect
the current environment.
If `--scope` is provided, this will find the credentials for the registry
connected to that scope, if set.
## CONFIGURATION
### registry
Default: http://registry.npmjs.org/
The base URL of the npm package registry. If `scope` is also specified,
it takes precedence.
### scope
Default: none
If specified, the user and login credentials given will be associated
with the specified scope. See `npm-scope(7)`. You can use both at the same time,
e.g.
npm adduser --registry=http://myregistry.example.com --scope=@myco
This will set a registry for the given scope and login or create a user for
that registry at the same time.
## SEE ALSO
* npm-adduser(1)
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-whoami(1)

View File

@@ -67,6 +67,20 @@ project.
Max display depth of the dependency tree.
### prod / production
* Type: Boolean
* Default: false
Display only the dependency tree for packages in `dependencies`.
### dev
* Type: Boolean
* Default: false
Display only the dependency tree for packages in `devDependencies`.
## SEE ALSO
* npm-config(1)

View File

@@ -15,8 +15,10 @@ removed.
Extraneous packages are packages that are not listed on the parent
package's dependencies list.
If the `--production` flag is specified, this command will remove the
packages specified in your `devDependencies`.
If the `--production` flag is specified or the `NODE_ENV` environment
variable is set to `production`, this command will remove the packages
specified in your `devDependencies`. Setting `--production=false` will
negate `NODE_ENV` being set to `production`.
## SEE ALSO

View File

@@ -4,12 +4,14 @@ npm-publish(1) -- Publish a package
## SYNOPSIS
npm publish <tarball> [--tag <tag>]
npm publish <folder> [--tag <tag>]
npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
npm publish <folder> [--tag <tag>] [--access <public|restricted>]
## DESCRIPTION
Publishes a package to the registry so that it can be installed by name.
Publishes a package to the registry so that it can be installed by name. See
`npm-developers(7)` for details on what's included in the published package, as
well as details on how the package is built.
By default npm will publish to the public registry. This can be overridden by
specifying a different default registry or using a `npm-scope(7)` in the name
@@ -27,6 +29,12 @@ specifying a different default registry or using a `npm-scope(7)` in the name
<name>@<tag>` will install this version. By default, `npm publish` updates
and `npm install` installs the `latest` tag.
* `[--access <public|restricted>]`
Tells the registry whether this package should be published as public or
restricted. Only applies to scoped packages, which default to `restricted`.
If you don't have a paid account, you must publish with `--access public`
to publish scoped packages.
Fails if the package name and version combination already exists in
the specified registry.
@@ -37,6 +45,7 @@ it is removed with npm-unpublish(1).
## SEE ALSO
* npm-registry(7)
* npm-scope(7)
* npm-adduser(1)
* npm-owner(1)
* npm-deprecate(1)

View File

@@ -1,5 +1,5 @@
npm-restart(1) -- Start a package
=================================
npm-restart(1) -- Restart a package
===================================
## SYNOPSIS
@@ -7,11 +7,28 @@ npm-restart(1) -- Start a package
## DESCRIPTION
This runs a package's "restart" script, if one was provided.
Otherwise it runs package's "stop" script, if one was provided, and then
the "start" script.
This restarts a package.
If no version is specified, then it restarts the "active" version.
This runs a package's "stop", "restart", and "start" scripts, and associated
pre- and post- scripts, in the order given below:
1. prerestart
2. prestop
3. stop
4. poststop
5. restart
6. prestart
7. start
8. poststart
9. postrestart
## NOTE
Note that the "restart" script is run **in addition to** the "stop"
and "start" scripts, not instead of them.
This is the behavior as of `npm` major version 2. A change in this
behavior will be accompanied by an increase in major version number
## SEE ALSO
@@ -20,3 +37,4 @@ If no version is specified, then it restarts the "active" version.
* npm-test(1)
* npm-start(1)
* npm-stop(1)
* npm-restart(3)

View File

@@ -8,13 +8,33 @@ npm-run-script(1) -- Run arbitrary package scripts
## DESCRIPTION
This runs an arbitrary command from a package's `"scripts"` object.
If no package name is provided, it will search for a `package.json`
in the current folder and use its `"scripts"` object. If no `"command"`
is provided, it will list the available top level scripts.
This runs an arbitrary command from a package's `"scripts"` object. If no
`"command"` is provided, it will list the available scripts. `run[-script]` is
used by the test, start, restart, and stop commands, but can be called
directly, as well. When the scripts in the package are printed out, they're
separated into lifecycle (test, start, restart) and directly-run scripts.
It is used by the test, start, restart, and stop commands, but can be
called directly, as well.
As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
use custom arguments when executing scripts. The special option `--` is used by
[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
all the arguments after the `--` directly to your script:
npm run test -- --grep="pattern"
The arguments will only be passed to the script specified after ```npm run```
and not to any pre or post script.
The `env` script is a special built-in command that can be used to list
environment variables that will be available to the script at runtime. If an
"env" command is defined in your package it will take precedence over the
built-in.
In addition to the shell's pre-existing `PATH`, `npm run` adds
`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by
locally-installed dependencies can be used without the `node_modules/.bin`
prefix. For example, if there is a `devDependency` on `tap` in your package,
you should write `"scripts": {"test": "tap test/\*.js"}` instead of `"scripts":
{"test": "node_modules/.bin/tap test/\*.js"}` to run your tests.
## SEE ALSO

View File

@@ -9,18 +9,18 @@ npm-shrinkwrap(1) -- Lock down dependency versions
This command locks down the versions of a package's dependencies so
that you can control exactly which versions of each dependency will be
used when your package is installed. The "package.json" file is still
required if you want to use "npm install".
used when your package is installed. The `package.json` file is still
required if you want to use `npm install`.
By default, "npm install" recursively installs the target's
dependencies (as specified in package.json), choosing the latest
By default, `npm install` recursively installs the target's
dependencies (as specified in `package.json`), choosing the latest
available version that satisfies the dependency's semver pattern. In
some situations, particularly when shipping software where each change
is tightly managed, it's desirable to fully specify each version of
each dependency recursively so that subsequent builds and deploys do
not inadvertently pick up newer versions of a dependency that satisfy
the semver pattern. Specifying specific semver patterns in each
dependency's package.json would facilitate this, but that's not always
dependency's `package.json` would facilitate this, but that's not always
possible or desirable, as when another author owns the npm package.
It's also possible to check dependencies directly into source control,
but that may be undesirable for other reasons.
@@ -48,18 +48,18 @@ package B:
and package C:
{
"name": "C,
"name": "C",
"version": "0.0.1"
}
If these are the only versions of A, B, and C available in the
registry, then a normal "npm install A" will install:
registry, then a normal `npm install A` will install:
A@0.1.0
`-- B@0.0.1
`-- C@0.0.1
However, if B@0.0.2 is published, then a fresh "npm install A" will
However, if B@0.0.2 is published, then a fresh `npm install A` will
install:
A@0.1.0
@@ -78,7 +78,7 @@ In this case, A's author can run
npm shrinkwrap
This generates npm-shrinkwrap.json, which will look something like this:
This generates `npm-shrinkwrap.json`, which will look something like this:
{
"name": "A",
@@ -88,7 +88,7 @@ This generates npm-shrinkwrap.json, which will look something like this:
"version": "0.0.1",
"dependencies": {
"C": {
"version": "0.1.0"
"version": "0.0.1"
}
}
}
@@ -96,44 +96,44 @@ This generates npm-shrinkwrap.json, which will look something like this:
}
The shrinkwrap command has locked down the dependencies based on
what's currently installed in node_modules. When "npm install"
installs a package with a npm-shrinkwrap.json file in the package
root, the shrinkwrap file (rather than package.json files) completely
what's currently installed in node_modules. When `npm install`
installs a package with an `npm-shrinkwrap.json` in the package
root, the shrinkwrap file (rather than `package.json` files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
installs of this package will use B@0.0.1 and C@0.1.0, regardless the
dependencies and versions listed in A's, B's, and C's package.json
installs of this package will use B@0.0.1 and C@0.0.1, regardless the
dependencies and versions listed in A's, B's, and C's `package.json`
files.
### Using shrinkwrapped packages
Using a shrinkwrapped package is no different than using any other
package: you can "npm install" it by hand, or add a dependency to your
package.json file and "npm install" it.
package: you can `npm install` it by hand, or add a dependency to your
`package.json` file and `npm install` it.
### Building shrinkwrapped packages
To shrinkwrap an existing package:
1. Run "npm install" in the package root to install the current
1. Run `npm install` in the package root to install the current
versions of all dependencies.
2. Validate that the package works as expected with these versions.
3. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish
3. Run `npm shrinkwrap`, add `npm-shrinkwrap.json` to git, and publish
your package.
To add or update a dependency in a shrinkwrapped package:
1. Run "npm install" in the package root to install the current
1. Run `npm install` in the package root to install the current
versions of all dependencies.
2. Add or update dependencies. "npm install" each new or updated
package individually and then update package.json. Note that they
2. Add or update dependencies. `npm install` each new or updated
package individually and then update `package.json`. Note that they
must be explicitly named in order to be installed: running `npm
install` with no arguments will merely reproduce the existing
shrinkwrap.
3. Validate that the package works as expected with the new
dependencies.
4. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and
4. Run `npm shrinkwrap`, commit the new `npm-shrinkwrap.json`, and
publish your package.
You can use npm-outdated(1) to view dependencies with newer versions
@@ -141,14 +141,14 @@ available.
### Other Notes
A shrinkwrap file must be consistent with the package's package.json
file. "npm shrinkwrap" will fail if required dependencies are not
A shrinkwrap file must be consistent with the package's `package.json`
file. `npm shrinkwrap` will fail if required dependencies are not
already installed, since that would result in a shrinkwrap that
wouldn't actually work. Similarly, the command will fail if there are
extraneous packages (not referenced by package.json), since that would
indicate that package.json is not correct.
extraneous packages (not referenced by `package.json`), since that would
indicate that `package.json` is not correct.
Since "npm shrinkwrap" is intended to lock down your dependencies for
Since `npm shrinkwrap` is intended to lock down your dependencies for
production use, `devDependencies` will not be included unless you
explicitly set the `--dev` flag when you run `npm shrinkwrap`. If
installed `devDependencies` are excluded, then npm will print a

View File

@@ -1,28 +0,0 @@
npm-submodule(1) -- Add a package as a git submodule
====================================================
## SYNOPSIS
npm submodule <pkg>
## DESCRIPTION
If the specified package has a git repository url in its package.json
description, then this command will add it as a git submodule at
`node_modules/<pkg name>`.
This is a convenience only. From then on, it's up to you to manage
updates by using the appropriate git commands. npm will stubbornly
refuse to update, modify, or remove anything with a `.git` subfolder
in it.
This command also does not install missing dependencies, if the package
does not include them in its git repository. If `npm ls` reports that
things are missing, you can either install, link, or submodule them yourself,
or you can do `npm explore <pkgname> -- npm install` to install the
dependencies into the submodule folder.
## SEE ALSO
* package.json(5)
* git help submodule

View File

@@ -7,6 +7,8 @@ npm-tag(1) -- Tag a published version
## DESCRIPTION
THIS COMMAND IS DEPRECATED. See npm-dist-tag(1) for details.
Tags the specified version of the package with the specified tag, or the
`--tag` config if not specified.
@@ -23,6 +25,29 @@ This also applies to `npm dedupe`.
Publishing a package always sets the "latest" tag to the published version.
## PURPOSE
Tags can be used to provide an alias instead of version numbers. For
example, `npm` currently uses the tag "next" to identify the upcoming
version, and the tag "latest" to identify the current version.
A project might choose to have multiple streams of development, e.g.,
"stable", "canary".
## CAVEATS
Tags must share a namespace with version numbers, because they are
specified in the same slot: `npm install <pkg>@<version>` vs `npm
install <pkg>@<tag>`.
Tags that can be interpreted as valid semver ranges will be
rejected. For example, `v1.4` cannot be used as a tag, because it is
interpreted by semver as `>=1.4.0 <1.5.0`. See
<https://github.com/npm/npm/issues/6082>.
The simplest way to avoid semver problems with tags is to use tags
that do not begin with a number or the letter `v`.
## SEE ALSO
* npm-publish(1)
@@ -31,4 +56,5 @@ Publishing a package always sets the "latest" tag to the published version.
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npm-tag(3)
* npmrc(5)

View File

@@ -8,9 +8,11 @@ npm-update(1) -- Update a package
## DESCRIPTION
This command will update all the packages listed to the latest version
(specified by the `tag` config).
(specified by the `tag` config), respecting semver.
It will also install missing packages.
It will also install missing packages. As with all commands that install
packages, the `--dev` flag will cause `devDependencies` to be processed
as well.
If the `-g` flag is specified, this command will update globally installed
packages.
@@ -18,10 +20,135 @@ packages.
If no package name is specified, all packages in the specified location (global
or local) will be updated.
As of `npm@2.6.1`, the `npm update` will only inspect top-level packages.
Prior versions of `npm` would also recursively inspect all dependencies.
To get the old behavior, use `npm --depth 9999 update`, but be warned that
simultaneous asynchronous update of all packages, including `npm` itself
and packages that `npm` depends on, often causes problems up to and including
the uninstallation of `npm` itself.
To restore a missing `npm`, use the command:
```
curl -L https://npmjs.com/install.sh | sh
```
## EXAMPLES
IMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later. For
older versions of `npm`, you must specify `--depth 0` to get the behavior
described below.
For the examples below, assume that the current package is `app` and it depends
on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are:
```
{
dist-tags: { latest: "1.2.2" },
versions: { "1.2.2",
"1.2.1",
"1.2.0",
"1.1.2",
"1.1.1",
"1.0.0",
"0.4.1",
"0.4.0",
"0.2.0"
}
}
```
### Caret Dependencies
If `app`'s `package.json` contains:
```
dependencies: {
dep1: "^1.1.1"
}
```
Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and
`1.2.2` satisfies `^1.1.1`.
### Tilde Dependencies
However, if `app`'s `package.json` contains:
```
dependencies: {
dep1: "~1.1.1"
}
```
In this case, running `npm update` will install `dep1@1.1.2`. Even though the `latest`
tag points to `1.2.2`, this version does not satisfy `~1.1.1`, which is equivalent
to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies `~1.1.1` is used,
which is `1.1.2`.
### Caret Dependencies below 1.0.0
Suppose `app` has a caret dependency on a version below `1.0.0`, for example:
```
dependencies: {
dep1: "^0.2.0"
}
```
`npm update` will install `dep1@0.2.0`, because there are no other
versions which satisfy `^0.2.0`.
If the dependence were on `^0.4.0`:
```
dependencies: {
dep1: "^0.4.0"
}
```
Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting
version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)
### Recording Updates with `--save`
When you want to update a package and save the new version as
the minimum required dependency in `package.json`, you can use
`npm update --save`. For example if `package.json` contains
```
dependencies: {
dep1: "^1.1.1"
}
```
Then `npm update --save` will install `dep1@1.2.2` (i.e., `latest`),
and `package.json` will be modified:
```
dependencies: {
dep1: "^1.2.2"
}
```
Note that `npm` will only write an updated version to `package.json`
if it installs a new package.
### Updating Globally-Installed Packages
`npm update -g` will apply the `update` action to each globally- installed
package that is `outdated` -- that is, has a version that is different from
`latest`.
NOTE: If a package has been upgraded to a version newer than `latest`, it will
be _downgraded_.
## SEE ALSO
* npm-install(1)
* npm-outdated(1)
* npm-shrinkwrap(1)
* npm-registry(7)
* npm-folders(5)
* npm-ls(1)

View File

@@ -8,15 +8,17 @@ npm-version(1) -- Bump a package version
## DESCRIPTION
Run this in a package directory to bump the version and write the new
data back to the package.json file.
data back to `package.json` and, if present, `npm-shrinkwrap.json`.
The `newversion` argument should be a valid semver string, *or* a
valid second argument to semver.inc (one of "patch", "minor", "major",
"prepatch", "preminor", "premajor", "prerelease"). In the second case,
the existing version will be incremented by 1 in the specified field.
If run in a git repo, it will also create a version commit and tag, and
fail if the repo is not clean.
If run in a git repo, it will also create a version commit and tag, and fail if
the repo is not clean. This behavior is controlled by `git-tag-version` (see
below), and can be disabled on the command line by running `npm
--no-git-tag-version version`
If supplied with `--message` (shorthand: `-m`) config option, npm will
use it as a commit message when creating a version commit. If the
@@ -38,8 +40,28 @@ in your git config for this to work properly. For example:
Enter passphrase:
If "preversion", "version", "postversion" in the "scripts" property of
the package.json, it will execute by running `npm version`. preversion
and version ware executed before bump the package version, postversion
was executed after bump the package version. For example to run `npm version`
after passed all test:
"scripts": { "preversion": "npm test" }
## CONFIGURATION
### git-tag-version
* Default: true
* Type: Boolean
Commit and tag the version change.
## SEE ALSO
* npm-init(1)
* npm-run-script(1)
* npm-scripts(7)
* package.json(5)
* semver(7)
* config(7)

View File

@@ -24,7 +24,7 @@ For example, to show the dependencies of the `ronn` package at version
npm view ronn@0.3.5 dependencies
You can view child field by separating them with a period.
You can view child fields by separating them with a period.
To view the git repository URL for the latest version of npm, you could
do this:

View File

@@ -1,5 +1,5 @@
npm(1) -- node package manager
==============================
npm(1) -- javascript package manager
====================================
## SYNOPSIS

View File

@@ -17,7 +17,7 @@ The four relevant files are:
* per-project config file (/path/to/my/project/.npmrc)
* per-user config file (~/.npmrc)
* global config file ($PREFIX/npmrc)
* global config file ($PREFIX/etc/npmrc)
* npm builtin config file (/path/to/npm/npmrc)
All npm config files are an ini-formatted list of `key = value`
@@ -30,6 +30,17 @@ Each of these files is loaded, and config options are resolved in
priority order. For example, a setting in the userconfig file would
override the setting in the globalconfig file.
Array values are specified by adding "[]" after the key name. For
example:
key[] = "first value"
key[] = "second value"
**NOTE:** Because local (per-project or per-user) `.npmrc` files can contain
sensitive credentials, they must be readable and writable _only_ by your user
account (i.e. must have a mode of `0600`), otherwise they _will be ignored by
npm!_
### Per-project config file
When working locally in a project, a `.npmrc` file in the root of the

View File

@@ -17,18 +17,27 @@ them. The name and version together form an identifier that is assumed
to be completely unique. Changes to the package should come along with
changes to the version.
The name is what your thing is called. Some tips:
The name is what your thing is called.
Some rules:
* The name must be shorter than 214 characters. This includes the scope for
scoped packages.
* The name can't start with a dot or an underscore.
* New packages must not have uppercase letters in the name.
* The name ends up being part of a URL, an argument on the command line, and a
folder name. Therefore, the name can't contain any non-URL-safe characters.
Some tips:
* Don't use the same name as a core Node module.
* Don't put "js" or "node" in the name. It's assumed that it's js, since you're
writing a package.json file, and you can specify the engine using the "engines"
field. (See below.)
* The name ends up being part of a URL, an argument on the command line, and a
folder name. Any name with non-url-safe characters will be rejected.
Also, it can't start with a dot or an underscore.
* The name will probably be passed as an argument to require(), so it should
be something short, but also reasonably descriptive.
* You may want to check the npm registry to see if there's something by that name
already, before you get too attached to it. http://registry.npmjs.org/
already, before you get too attached to it. <https://www.npmjs.com/>
A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
`npm-scope(7)` for more detail.
@@ -75,7 +84,7 @@ with your package.
It should look like this:
{ "url" : "http://github.com/owner/project/issues"
{ "url" : "https://github.com/owner/project/issues"
, "email" : "project@hostname.com"
}
@@ -89,9 +98,8 @@ If a url is provided, it will be used by the `npm bugs` command.
You should specify a license for your package so that people know how they are
permitted to use it, and any restrictions you're placing on it.
The simplest way, assuming you're using a common license such as BSD-3-Clause
or MIT, is to just specify the standard SPDX ID of the license you're using,
like this:
If you're using a common license such as BSD-2-Clause or MIT, add a
current SPDX license identifier for the license you're using, like this:
{ "license" : "BSD-3-Clause" }
@@ -99,8 +107,45 @@ You can check [the full list of SPDX license IDs](https://spdx.org/licenses/).
Ideally you should pick one that is
[OSI](http://opensource.org/licenses/alphabetical) approved.
It's also a good idea to include a LICENSE file at the top level in
your package.
If your package is licensed under multiple common licenses, use an [SPDX license
expression syntax version 2.0 string](http://npmjs.com/package/spdx), like this:
{ "license" : "(ISC OR GPL-3.0)" }
If you are using a license that hasn't been assigned an SPDX identifier, or if
you are using a custom license, use the following valid SPDX expression:
{ "license" : "LicenseRef-LICENSE" }
Then include a LICENSE file at the top level of the package.
Some old packages used license objects or a "licenses" property containing an
array of license objects:
// Not valid metadata
{ "license" :
{ "type" : "ISC"
, "url" : "http://opensource.org/licenses/ISC"
}
}
// Not valid metadata
{ "licenses" :
[
{ "type": "MIT"
, "url": "http://www.opensource.org/licenses/mit-license.php"
}
, { "type": "Apache-2.0"
, "url": "http://opensource.org/licenses/apache2.0.php"
}
]
}
Those styles are now deprecated. Instead, use SPDX expressions, like this:
{ "license": "ISC" }
{ "license": "(MIT OR Apache-2.0)" }
## people fields: author, contributors
@@ -114,7 +159,7 @@ is an object with a "name" field and optionally "url" and "email", like this:
Or you can shorten that all into a single string, and npm will parse it for you:
"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)
"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
Both email and url are optional either way.
@@ -154,12 +199,12 @@ command name to local file name. On install, npm will symlink that file into
installs.
For example, npm has this:
For example, myapp could have this:
{ "bin" : { "npm" : "./cli.js" } }
{ "bin" : { "myapp" : "./cli.js" } }
So, when you install npm, it'll create a symlink from the `cli.js` script to
`/usr/local/bin/npm`.
So, when you install myapp, it'll create a symlink from the `cli.js` script to
`/usr/local/bin/myapp`.
If you have a single executable, and its name should be the name
of the package, then you can just supply it as a string. For example:
@@ -219,7 +264,7 @@ will create entries for `man foo` and `man 2 foo`
The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec details a
few ways that you can indicate the structure of your package using a `directories`
hash. If you look at [npm's package.json](http://registry.npmjs.org/npm/latest),
object. If you look at [npm's package.json](https://registry.npmjs.org/npm/latest),
you'll see that it has directories for doc, lib, and man.
In the future, this information may be used in other creative ways.
@@ -231,10 +276,10 @@ with the lib folder in any way, but it's useful meta info.
### directories.bin
If you specify a "bin" directory, then all the files in that folder will
be used as the "bin" hash.
If you specify a `bin` directory, then all the files in that folder will
be added as children of the `bin` path.
If you have a "bin" hash already, then this has no effect.
If you have a `bin` path already, then this has no effect.
### directories.man
@@ -253,28 +298,39 @@ Put example scripts in here. Someday, it might be exposed in some clever way.
## repository
Specify the place where your code lives. This is helpful for people who
want to contribute. If the git repo is on github, then the `npm docs`
want to contribute. If the git repo is on GitHub, then the `npm docs`
command will be able to find you.
Do it like this:
"repository" :
{ "type" : "git"
, "url" : "http://github.com/npm/npm.git"
, "url" : "https://github.com/npm/npm.git"
}
"repository" :
{ "type" : "svn"
, "url" : "http://v8.googlecode.com/svn/trunk/"
, "url" : "https://v8.googlecode.com/svn/trunk/"
}
The URL should be a publicly available (perhaps read-only) url that can be handed
directly to a VCS program without any modification. It should not be a url to an
html project page that you put in your browser. It's for computers.
For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
shortcut syntax you use for `npm install`:
"repository": "npm/npm"
"repository": "gist:11081aaa281"
"repository": "bitbucket:example/repo"
"repository": "gitlab:another/repo"
## scripts
The "scripts" member is an object hash of script commands that are run
The "scripts" property is a dictionary containing script commands that are run
at various times in the lifecycle of your package. The key is the lifecycle
event, and the value is the command to run at that point.
@@ -282,9 +338,9 @@ See `npm-scripts(7)` to find out more about writing package scripts.
## config
A "config" hash can be used to set configuration
parameters used in package scripts that persist across upgrades. For
instance, if a package had the following:
A "config" object can be used to set configuration parameters used in package
scripts that persist across upgrades. For instance, if a package had the
following:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
@@ -298,13 +354,13 @@ configs.
## dependencies
Dependencies are specified with a simple hash of package name to
Dependencies are specified in a simple object that maps a package name to a
version range. The version range is a string which has one or more
space-separated descriptors. Dependencies can also be identified with
a tarball or git URL.
space-separated descriptors. Dependencies can also be identified with a
tarball or git URL.
**Please do not put test harnesses or transpilers in your
`dependencies` hash.** See `devDependencies`, below.
`dependencies` object.** See `devDependencies`, below.
See semver(7) for more details about specifying version ranges.
@@ -340,7 +396,7 @@ For example, these are all valid:
, "two" : "2.x"
, "thr" : "3.3.x"
, "lat" : "latest"
, "dyl" : "~/projects/dyl"
, "dyl" : "file:../dyl"
}
}
@@ -366,26 +422,40 @@ an argument to `git checkout`. The default is `master`.
## GitHub URLs
As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
As of version 1.1.65, you can refer to GitHub urls as just "foo":
"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be
included. For example:
{
"name": "foo",
"version": "0.0.0",
"dependencies": {
"express": "visionmedia/express"
"express": "visionmedia/express",
"mocha": "visionmedia/mocha#4727d357ea"
}
}
## Local Paths
As of version 2.0.0 you can provide a path to a local directory that
contains a package. Local paths can be in the form:
As of version 2.0.0 you can provide a path to a local directory that contains a
package. Local paths can be saved using `npm install --save`, using any of
these forms:
../foo/bar
~/foo/bar
./foo/bar
/foo/bar
in which case they will be normalized to a relative path and added to your
`package.json`. For example:
{
"name": "baz",
"dependencies": {
"bar": "file:../foo/bar"
}
}
This feature is helpful for local offline development and creating
tests that require npm installing where you don't want to hit an
external server, but should not be used when publishing packages
@@ -397,8 +467,8 @@ If someone is planning on downloading and using your module in their
program, then they probably don't want or need to download and build
the external test or documentation framework that you use.
In this case, it's best to list these additional items in a
`devDependencies` hash.
In this case, it's best to map these additional items in a `devDependencies`
object.
These things will be installed when doing `npm link` or `npm install`
from the root of a package, and can be managed like any other npm
@@ -429,29 +499,35 @@ run this script as well, so that you can test it easily.
## peerDependencies
In some cases, you want to express the compatibility of your package with an
In some cases, you want to express the compatibility of your package with a
host tool or library, while not necessarily doing a `require` of this host.
This is usually refered to as a *plugin*. Notably, your module may be exposing
This is usually referred to as a *plugin*. Notably, your module may be exposing
a specific interface, expected and specified by the host documentation.
For example:
{
"name": "tea-latte",
"version": "1.3.5"
"version": "1.3.5",
"peerDependencies": {
"tea": "2.x"
}
}
This ensures your package `tea-latte` can be installed *along* with the second
major version of the host package `tea` only. The host package is automatically
installed if needed. `npm install tea-latte` could possibly yield the following
dependency graph:
major version of the host package `tea` only. `npm install tea-latte` could
possibly yield the following dependency graph:
├── tea-latte@1.3.5
└── tea@2.2.0
**NOTE: npm versions 1 and 2 will automatically install `peerDependencies` if
they are not explicitly depended upon higher in the dependency tree. In the
next major version of npm (npm@3), this will no longer be the case. You will
receive a warning that the peerDependency is not installed instead.** The
behavior in npms 1 & 2 was frequently confusing and could easily put you into
dependency hell, a situation that npm is designed to avoid as much as possible.
Trying to install another plugin with a conflicting requirement will cause an
error. For this reason, make sure your plugin requirement is as broad as
possible, and not to lock it down to specific patch versions.
@@ -469,11 +545,11 @@ If this is spelled `"bundleDependencies"`, then that is also honorable.
## optionalDependencies
If a dependency can be used, but you would like npm to proceed if it
cannot be found or fails to install, then you may put it in the
`optionalDependencies` hash. This is a map of package name to version
or url, just like the `dependencies` hash. The difference is that
failure is tolerated.
If a dependency can be used, but you would like npm to proceed if it cannot be
found or fails to install, then you may put it in the `optionalDependencies`
object. This is a map of package name to version or url, just like the
`dependencies` object. The difference is that build failures do not cause
installation to fail.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
@@ -520,16 +596,17 @@ field is advisory only.
## engineStrict
**NOTE: This feature is deprecated and will be removed in npm 3.0.0.**
If you are sure that your module will *definitely not* run properly on
versions of Node/npm other than those specified in the `engines` hash,
versions of Node/npm other than those specified in the `engines` object,
then you can set `"engineStrict": true` in your package.json file.
This will override the user's `engine-strict` config setting.
Please do not do this unless you are really very very sure. If your
engines hash is something overly restrictive, you can quite easily and
engines object is something overly restrictive, you can quite easily and
inadvertently lock yourself into obscurity and prevent your users from
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
updating to new versions of Node. Consider this choice carefully.
## os
@@ -575,11 +652,11 @@ does help prevent some confusion if it doesn't work as expected.
If you set `"private": true` in your package.json, then npm will refuse
to publish it.
This is a way to prevent accidental publication of private repositories.
If you would like to ensure that a given package is only ever published
to a specific registry (for example, an internal registry),
then use the `publishConfig` hash described below
to override the `registry` config param at publish-time.
This is a way to prevent accidental publication of private repositories. If
you would like to ensure that a given package is only ever published to a
specific registry (for example, an internal registry), then use the
`publishConfig` dictionary described below to override the `registry` config
param at publish-time.
## publishConfig

View File

@@ -10,7 +10,7 @@ designed to reduce visual clutter and make bugs more apparent.
If you want to contribute to npm (which is very encouraged), you should
make your code conform to npm's style.
Note: this concerns npm's code not the specific packages at npmjs.org
Note: this concerns npm's code not the specific packages that you can download from the npm registry.
## Line Length
@@ -21,7 +21,7 @@ statements onto multiple lines.
## Indentation
Two-spaces. Tabs are better, but they look like hell in web browsers
(and on github), and node uses 2 spaces, so that's that.
(and on GitHub), and node uses 2 spaces, so that's that.
Configure your editor appropriately.
@@ -147,7 +147,7 @@ Use appropriate log levels. See `npm-config(7)` and search for
## Case, naming, etc.
Use `lowerCamelCase` for multiword identifiers when they refer to objects,
functions, methods, members, or anything not specified in this section.
functions, methods, properties, or anything not specified in this section.
Use `UpperCamelCase` for class names (things that you'd pass to "new").

View File

@@ -3,7 +3,7 @@ npm-config(7) -- More than you probably want to know about npm configuration
## DESCRIPTION
npm gets its configuration values from 6 sources, in this priority:
npm gets its configuration values from the following sources, sorted by priority:
### Command Line Flags
@@ -55,7 +55,6 @@ The following shorthands are parsed on the command-line:
* `-m`: `--message`
* `-p`, `--porcelain`: `--parseable`
* `-reg`: `--registry`
* `-v`: `--version`
* `-f`: `--force`
* `-desc`: `--description`
* `-S`: `--save`
@@ -107,6 +106,16 @@ See package.json(5) for more information.
## Config Settings
### access
* Default: `restricted`
* Type: Access
When publishing scoped packages, the access level defaults to `restricted`. If
you want your scoped package to be publicly viewable (and installable) set
`--access=public`. The only valid values for `access` are `public` and
`restricted`. Unscoped packages _always_ have an access level of `public`.
### always-auth
* Default: false
@@ -137,14 +146,22 @@ The browser that is called by the `npm docs` command to open websites.
### ca
* Default: The npm CA certificate
* Type: String or null
* Type: String, Array or null
The Certificate Authority signing certificate that is trusted for SSL
connections to the registry.
connections to the registry. Values should be in PEM format with newlines
replaced by the string "\n". For example:
ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
Set to `null` to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority.
Multiple CAs can be trusted by specifying an array of certificates:
ca[]="..."
ca[]="..."
See also the `strict-ssl` config.
### cafile
@@ -226,8 +243,13 @@ If true, then only prints color codes for tty file descriptors.
* Default: Infinity
* Type: Number
The depth to go when recursing directories for `npm ls` and
`npm cache ls`.
The depth to go when recursing directories for `npm ls`,
`npm cache ls`, and `npm outdated`.
For `npm outdated`, a setting of `Infinity` will be treated as `0`
since that gives more useful information. To show the outdated status
of all packages and dependents, use a large integer value,
e.g., `npm outdated --depth 9999`
### description
@@ -361,11 +383,23 @@ The string that starts all the debugging log output.
### https-proxy
* Default: the `HTTPS_PROXY` or `https_proxy` or `HTTP_PROXY` or
`http_proxy` environment variables.
* Default: null
* Type: url
A proxy to use for outgoing https requests.
A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
proxy settings will be honored by the underlying `request` library.
### if-present
* Default: false
* Type: Boolean
If true, npm will not exit with an error code when `run-script` is invoked for
a script that isn't defined in the `scripts` section of `package.json`. This
option can be used when it's desirable to optionally run a script when it's
present and fail if the script fails. This is useful, for example, when running
scripts that may only apply for some builds in an otherwise generic CI setup.
### ignore-scripts
@@ -384,37 +418,37 @@ documentation for the
[init-package-json](https://github.com/isaacs/init-package-json) module
for more information, or npm-init(1).
### init.author.name
### init-author-name
* Default: ""
* Type: String
The value `npm init` should use by default for the package author's name.
### init.author.email
### init-author-email
* Default: ""
* Type: String
The value `npm init` should use by default for the package author's email.
### init.author.url
### init-author-url
* Default: ""
* Type: String
The value `npm init` should use by default for the package author's homepage.
### init.license
### init-license
* Default: "ISC"
* Type: String
The value `npm init` should use by default for the package license.
### init.version
### init-version
* Default: "0.0.0"
* Default: "1.0.0"
* Type: semver
The value that `npm init` should use by default for the package
@@ -464,7 +498,7 @@ to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
### loglevel
* Default: "http"
* Default: "warn"
* Type: String
* Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
@@ -472,7 +506,7 @@ What level of logs to report. On failure, *all* logs are written to
`npm-debug.log` in the current working directory.
Any logs of a higher level than the setting are shown.
The default is "http", which shows http, warn, and error output.
The default is "warn", which shows warn and error output.
### logstream
@@ -510,7 +544,7 @@ Any "%s" in the message will be replaced with the version number.
* Default: process.version
* Type: semver or false
The node version to use when checking package's "engines" hash.
The node version to use when checking a package's `engines` map.
### npat
@@ -532,7 +566,7 @@ usage.
* Default: true
* Type: Boolean
Attempt to install packages in the `optionalDependencies` hash. Note
Attempt to install packages in the `optionalDependencies` object. Note
that if these packages fail to install, the overall installation
process is not aborted.
@@ -577,10 +611,12 @@ this as true.
### proxy
* Default: `HTTP_PROXY` or `http_proxy` environment variable, or null
* Default: null
* Type: url
A proxy to use for outgoing http requests.
A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
`http_proxy` environment variables are set, proxy settings will be
honored by the underlying `request` library.
### rebuild-bundle
@@ -610,8 +646,8 @@ Remove failed installs.
Save installed packages to a package.json file as dependencies.
When used with the `npm rm` command, it removes it from the dependencies
hash.
When used with the `npm rm` command, it removes it from the `dependencies`
object.
Only works if there is already a package.json file present.
@@ -632,10 +668,10 @@ bundledDependencies list.
* Default: false
* Type: Boolean
Save installed packages to a package.json file as devDependencies.
Save installed packages to a package.json file as `devDependencies`.
When used with the `npm rm` command, it removes it from the
devDependencies hash.
`devDependencies` object.
Only works if there is already a package.json file present.
@@ -657,7 +693,7 @@ Save installed packages to a package.json file as
optionalDependencies.
When used with the `npm rm` command, it removes it from the
devDependencies hash.
`devDependencies` object.
Only works if there is already a package.json file present.
@@ -669,7 +705,7 @@ Only works if there is already a package.json file present.
Configure how versions of packages installed to a package.json file via
`--save` or `--save-dev` get prefixed.
For example if a package has version `1.2.3`, by default it's version is
For example if a package has version `1.2.3`, by default its version is
set to `^1.2.3` which allows minor upgrades for that package, but after
`npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows
patch upgrades.
@@ -768,6 +804,19 @@ it will install the specified tag.
Also the tag that is added to the package@version specified by the `npm
tag` command, if no explicit tag is given.
### tag-version-prefix
* Default: `"v"`
* Type: String
If set, alters the prefix used when tagging a new version when performing a
version increment using `npm-version`. To remove the prefix altogether, set it
to the empty string: `""`.
Because other tools may rely on the convention that npm version tags look like
`v1.0.0`, _only use this property if it is absolutely necessary_. In
particular, use care when overriding this setting for public packages.
### tmp
* Default: TMPDIR environment variable, or "/tmp"
@@ -818,7 +867,7 @@ The location of user-level configuration settings.
### umask
* Default: 022
* Type: Octal numeric string
* Type: Octal numeric string in range 0000..0777 (0..511)
The "umask" value to use when setting the file creation mode on files
and folders.
@@ -848,8 +897,8 @@ Only relevant when specified explicitly on the command line.
* Default: false
* Type: boolean
If true, output the npm version as well as node's `process.versions`
hash, and exit successfully.
If true, output the npm version as well as node's `process.versions` map, and
exit successfully.
Only relevant when specified explicitly on the command line.
@@ -865,7 +914,6 @@ Set to `"browser"` to view html help content in the default web browser.
## SEE ALSO
* npm-config(1)
* npm-config(7)
* npmrc(5)
* npm-scripts(7)
* npm-folders(5)

View File

@@ -76,7 +76,7 @@ least, you need:
* scripts:
If you have a special compilation or installation script, then you
should put it in the `scripts` hash. You should definitely have at
should put it in the `scripts` object. You should definitely have at
least a basic smoke-test command as the "scripts.test" field.
See npm-scripts(7).
@@ -86,8 +86,8 @@ least, you need:
then you need to specify that in the "main" field.
* directories:
This is a hash of folders. The best ones to include are "lib" and
"doc", but if you specify a folder full of man pages in "man", then
This is an object mapping names to folders. The best ones to include are
"lib" and "doc", but if you use "man" to specify a folder full of man pages,
they'll get installed just like these ones.
You can use `npm init` in the root of your package in order to get you
@@ -102,6 +102,14 @@ ignore the stuff matched by the `.gitignore` file. If you *want* to
include something that is excluded by your `.gitignore` file, you can
create an empty `.npmignore` file to override it.
`.npmignore` files follow the [same pattern rules](http://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files)
as `.gitignore` files:
* Blank lines or lines starting with `#` are ignored.
* Standard glob patterns work.
* You can end patterns with a forward slash `/` to specify a directory.
* You can negate a pattern by starting it with an exclamation point `!`.
By default, the following paths and files are ignored, so there's no
need to add them to `.npmignore` explicitly:

View File

@@ -3,7 +3,7 @@ npm-faq(7) -- Frequently Asked Questions
## Where can I find these docs in HTML?
<https://www.npmjs.org/doc/>, or run:
<https://docs.npmjs.com/>, or run:
npm config set viewer browser
@@ -80,7 +80,7 @@ Usually, no. Allow npm to resolve dependencies for your packages.
For packages you **deploy**, such as websites and apps,
you should use npm shrinkwrap to lock down your full dependency tree:
https://www.npmjs.org/doc/cli/npm-shrinkwrap.html
<https://docs.npmjs.com/cli/shrinkwrap>
If you are paranoid about depending on the npm ecosystem,
you should run a private npm mirror or a private cache.
@@ -135,7 +135,7 @@ Arguments are greps. `npm search jsdom` shows jsdom packages.
## How do I update npm?
npm update npm -g
npm install npm -g
You can also update all outdated local packages by doing `npm update` without
any arguments, or global packages by doing `npm update -g`.
@@ -147,7 +147,7 @@ command.)
In those cases, you can do this:
curl https://www.npmjs.org/install.sh | sh
curl https://www.npmjs.com/install.sh | sh
## What is a `package`?
@@ -307,7 +307,7 @@ See `npm-registry(7)`.
## I forgot my password, and can't publish. How do I reset it?
Go to <https://npmjs.org/forgot>.
Go to <https://npmjs.com/forgot>.
## I get ECONNREFUSED a lot. What's up?
@@ -327,13 +327,38 @@ on Freenode IRC.
## Why no namespaces?
Please see this discussion: <https://github.com/npm/npm/issues/798>
npm has only one global namespace. If you want to namespace your own packages,
you may: simply use the `-` character to separate the names or use scoped
packages. npm is a mostly anarchic system. There is not sufficient need to
impose namespace rules on everyone.
tl;dr - It doesn't actually make things better, and can make them worse.
As of 2.0, npm supports scoped packages, which allow you to publish a group of
related modules without worrying about name collisions.
If you want to namespace your own packages, you may: simply use the
`-` character to separate the names. npm is a mostly anarchic system.
There is not sufficient need to impose namespace rules on everyone.
Every npm user owns the scope associated with their username. For example, the
user named `npm` owns the scope `@npm`. Scoped packages are published inside a
scope by naming them as if they were files under the scope directory, e.g., by
setting `name` in `package.json` to `@npm/npm`.
Scoped packages are supported by the public npm registry. The npm client is
backwards-compatible with un-scoped registries, so it can be used to work with
scoped and un-scoped registries at the same time.
Unscoped packages can only depend on other unscoped packages. Scoped packages
can depend on packages from their own scope, a different scope, or the public
registry (unscoped).
For the current documentation of scoped packages, see
<https://docs.npmjs.com/misc/scope>
References:
1. For the reasoning behind the "one global namespace", please see this
discussion: <https://github.com/npm/npm/issues/798> (TL;DR: It doesn't
actually make things better, and can make them worse.)
2. For the pre-implementation discussion of the scoped package feature, see
this discussion: <https://github.com/npm/npm/issues/5239>
## Who does npm?
@@ -341,7 +366,7 @@ npm was originally written by Isaac Z. Schlueter, and many others have
contributed to it, some of them quite substantially.
The npm open source project, The npm Registry, and [the community
website](https://www.npmjs.org) are maintained and operated by the
website](https://www.npmjs.com) are maintained and operated by the
good folks at [npm, Inc.](http://www.npmjs.com)
## I have a question or request not addressed here. Where should I put it?

View File

@@ -3,7 +3,7 @@ npm-index(7) -- Index of all npm documentation
### README(1)
node package manager
a JavaScript package manager
## Command Line Documentation
@@ -11,7 +11,11 @@ Using npm on the command line
### npm(1)
node package manager
javascript package manager
### npm-access(1)
Set access level on published packages
### npm-adduser(1)
@@ -53,6 +57,10 @@ Reduce duplication
Deprecate a version of a package
### npm-dist-tag(1)
Modify package distribution tags
### npm-docs(1)
Docs for a package in a web browser maybe
@@ -85,6 +93,10 @@ Install a package
Symlink a package folder
### npm-logout(1)
Log out of the registry
### npm-ls(1)
List installed packages
@@ -123,7 +135,7 @@ Open package repository page in the browser
### npm-restart(1)
Start a package
Restart a package
### npm-rm(1)
@@ -161,10 +173,6 @@ Start a package
Stop a package
### npm-submodule(1)
Add a package as a git submodule
### npm-tag(1)
Tag a published version
@@ -203,7 +211,7 @@ Using npm in your Node programs
### npm(3)
node package manager
javascript package manager
### npm-bin(3)
@@ -299,7 +307,7 @@ Open package repository page in the browser
### npm-restart(3)
Start a package
Restart a package
### npm-root(3)
@@ -325,10 +333,6 @@ Start a package
Stop a package
### npm-submodule(3)
Add a package as a git submodule
### npm-tag(3)
Tag a published version

View File

@@ -31,9 +31,10 @@ similar) design doc to implement the APIs.
If you set up continuous replication from the official CouchDB, and then
set your internal CouchDB as the registry config, then you'll be able
to read any published packages, in addition to your private ones, and by
default will only publish internally. If you then want to publish a
package for the whole world to see, you can simply override the
`--registry` config for that command.
default will only publish internally.
If you then want to publish a package for the whole world to see, you can
simply override the `--registry` option for that `publish` command.
## I don't want my package published in the official registry. It's private.
@@ -57,7 +58,7 @@ effectively implement the entire CouchDB API anyway.
## Is there a website or something to see package docs and such?
Yes, head over to <https://npmjs.org/>
Yes, head over to <https://npmjs.com/>
## SEE ALSO

View File

@@ -13,9 +13,9 @@ followed by a slash, e.g.
Scopes are a way of grouping related packages together, and also affect a few
things about the way npm treats the package.
**As of 2014-09-03, scoped packages are not supported by the public npm registry**.
However, the npm client is backwards-compatible with un-scoped registries, so
it can be used to work with scoped and un-scoped registries at the same time.
Scoped packages are supported by the public npm registry. The npm
client is backwards-compatible with un-scoped registries, so it can be
used to work with scoped and un-scoped registries at the same time.
## Installing scoped packages
@@ -25,8 +25,8 @@ scoped modules will be in `node_modules/@myorg/packagename`. The scope folder
(`@myorg`) is simply the name of the scope preceded by an @-symbol, and can
contain any number of scoped packages.
A scoped package is install by referencing it by name, preceded by an @-symbol,
in `npm install`:
A scoped package is installed by referencing it by name, preceded by an
@-symbol, in `npm install`:
npm install @myorg/mypackage
@@ -51,10 +51,29 @@ just specifying to require the module `mypackage` in the folder called `@myorg`.
## Publishing scoped packages
Scoped packages can be published to any registry that supports them.
*As of 2014-09-03, the public npm registry does not support scoped packages*,
so attempting to publish a scoped package to the registry will fail unless
you have associated that scope with a different registry, see below.
Scoped packages can be published to any registry that supports them, including
the public npm registry.
(As of 2015-04-19, the public npm registry **does** support scoped packages)
If you wish, you may associate a scope with a registry; see below.
### Publishing public scoped packages to the public npm registry
To publish a public scoped package, you must specify `--access public` with
the initial publication. This will publish the package and set access
to `public` as if you had run `npm access public` after publishing.
### Publishing private scoped packages to the npm registry
To publish a private scoped package to the npm registry, you must have
an [npm Private Modules](https://www.npmjs.com/private-modules)
account.
You can then publish the module with `npm publish` or `npm publish
--access restricted`, and it will be present in the npm registry, with
restricted access. You can then change the access permissions, if
desired, with `npm access` or on the npmjs.com website.
## Associating a scope with a registry
@@ -81,4 +100,5 @@ that registry instead.
## SEE ALSO
* npm-install(1)
* npm-publish(1)
* npm-publish(1)
* npm-access(1)

View File

@@ -3,7 +3,7 @@ npm-scripts(7) -- How npm handles the "scripts" field
## DESCRIPTION
npm supports the "scripts" member of the package.json script, for the
npm supports the "scripts" property of the package.json script, for the
following scripts:
* prepublish:
@@ -19,10 +19,10 @@ following scripts:
Run BEFORE the package is uninstalled.
* postuninstall:
Run AFTER the package is uninstalled.
* preupdate:
Run BEFORE the package is updated with the update command.
* update, postupdate:
Run AFTER the package is updated with the update command.
* preversion, version:
Run BEFORE bump the package version.
* postversion:
Run AFTER bump the package version.
* pretest, test, posttest:
Run by the `npm test` command.
* prestop, stop, poststop:
@@ -33,50 +33,29 @@ following scripts:
Run by the `npm restart` command. Note: `npm restart` will run the
stop and start scripts if no `restart` script is provided.
Additionally, arbitrary scripts can be executed by running `npm run-script
<pkg> <stage>`. *Pre* and *post* commands with matching names will be run for
those as well (e.g. `premyscript`, `myscript`, `postmyscript`).
Additionally, arbitrary scripts can be executed by running `npm
run-script <pkg> <stage>`. *Pre* and *post* commands with matching
names will be run for those as well (e.g. `premyscript`, `myscript`,
`postmyscript`).
## NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
## COMMON USES
**tl;dr** Don't use `install`. Use a `.gyp` file for compilation, and
`prepublish` for anything else.
You should almost never have to explicitly set a `preinstall` or
`install` script. If you are doing this, please consider if there is
another option.
The only valid use of `install` or `preinstall` scripts is for
compilation which must be done on the target architecture. In early
versions of node, this was often done using the `node-waf` scripts, or
a standalone `Makefile`, and early versions of npm required that it be
explicitly set in package.json. This was not portable, and harder to
do properly.
In the current version of node, the standard way to do this is using a
`.gyp` file. If you have a file with a `.gyp` extension in the root
of your package, then npm will run the appropriate `node-gyp` commands
automatically at install time. This is the only officially supported
method for compiling binary addons, and does not require that you add
anything to your package.json file.
If you have to do other things before your package is used, in a way
If you need to perform operations on your package before it is used, in a way
that is not dependent on the operating system or architecture of the
target system, then use a `prepublish` script instead. This includes
target system, use a `prepublish` script. This includes
tasks such as:
* Compile CoffeeScript source code into JavaScript.
* Create minified versions of JavaScript source code.
* Compiling CoffeeScript source code into JavaScript.
* Creating minified versions of JavaScript source code.
* Fetching remote resources that your package will use.
The advantage of doing these things at `prepublish` time instead of
`preinstall` or `install` time is that they can be done once, in a
single place, and thus greatly reduce complexity and variability.
The advantage of doing these things at `prepublish` time is that they can be done once, in a
single place, thus reducing complexity and variability.
Additionally, this means that:
* You can depend on `coffee-script` as a `devDependency`, and thus
your users don't need to have it installed.
* You don't need to include the minifiers in your package, reducing
* You don't need to include minifiers in your package, reducing
the size for your users.
* You don't need to rely on your users having `curl` or `wget` or
other system tools on the target machines.
@@ -136,7 +115,7 @@ Configuration parameters are put in the environment with the
`npm_config_` prefix. For instance, you can view the effective `root`
config by checking the `npm_config_root` environment variable.
### Special: package.json "config" hash
### Special: package.json "config" object
The package.json "config" keys are overwritten in the environment if
there is a config param of `<name>[@<version>]:<key>`. For example,
@@ -237,6 +216,11 @@ above.
* Don't prefix your script commands with "sudo". If root permissions
are required for some reason, then it'll fail with that error, and
the user will sudo the npm command in question.
* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish`
for anything else. You should almost never have to explicitly set a
preinstall or install script. If you are doing this, please consider if
there is another option. The only valid use of `install` or `preinstall`
scripts is for compilation which must be done on the target architecture.
## SEE ALSO

View File

@@ -16,12 +16,12 @@ As a command-line utility:
$ semver -h
Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | -d <dec>]
Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
Test if version(s) satisfy the supplied range(s), and sort them.
Multiple versions or ranges may be supplied, unless increment
or decrement options are specified. In that case, only a single
version may be used, and it is incremented by the specified level
option is specified. In that case, only a single version may
be used, and it is incremented by the specified level
Program exits successfully if any valid version satisfies
all supplied ranges, and prints all satisfying versions.
@@ -101,6 +101,30 @@ the user is indicating that they are aware of the risk. However, it
is still not appropriate to assume that they have opted into taking a
similar risk on the *next* set of prerelease versions.
#### Prerelease Identifiers
The method `.inc` takes an additional `identifier` string argument that
will append the value of the string as a prerelease identifier:
```javascript
> semver.inc('1.2.3', 'pre', 'beta')
'1.2.4-beta.0'
```
command-line example:
```shell
$ semver 1.2.3 -i prerelease --preid beta
1.2.4-beta.0
```
Which then can be used to increment further:
```shell
$ semver 1.2.4-beta.0 -i prerelease
1.2.4-beta.1
```
### Advanced Range Syntax
Advanced range syntax desugars to primitive comparators in
@@ -140,7 +164,7 @@ numeric values in the `[major, minor, patch]` tuple.
A partial version range is treated as an X-Range, so the special
character is in fact optional.
* `` (empty string) := `*` := `>=0.0.0`
* `""` (empty string) := `*` := `>=0.0.0`
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
@@ -161,8 +185,6 @@ comparator. Allows minor-level changes if not.
`1.2.4-beta.2` would not, because it is a prerelease of a
different `[major, minor, patch]` tuple.
Note: this is the same as the `~>` operator in rubygems.
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
Allows changes that do not modify the left-most non-zero digit in the
@@ -226,6 +248,9 @@ strings that they parse.
same as `prepatch`. It increments the patch version, then makes a
prerelease. If the input version is already a prerelease it simply
increments it.
* `major(v)`: Return the major version number.
* `minor(v)`: Return the minor version number.
* `patch(v)`: Return the patch version number.
### Comparison
@@ -245,6 +270,9 @@ strings that they parse.
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
in descending order when passed to `Array.sort()`.
* `diff(v1, v2)`: Returns difference between two versions by the release type
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
or null if the versions are the same.
### Ranges

View File

@@ -9,7 +9,7 @@
<body>
<div id="wrapper">
<h1><a href="cli/npm.html">npm</a></h1> <p>node package manager</p>
<h1><a href="cli/npm.html">npm</a></h1> <p>a JavaScript package manager</p>
<p><a href="https://travis-ci.org/npm/npm"><img src="https://img.shields.io/travis/npm/npm/master.svg" alt="Build Status"></a></p>
<h2 id="synopsis">SYNOPSIS</h2>
<p>This is just enough info to get you up and running.</p>
@@ -30,52 +30,42 @@ and prior, clone the git repo and dig through the old tags and branches.</p>
paths, etc.) then read on.</p>
<h2 id="fancy-install-unix-">Fancy Install (Unix)</h2>
<p>There&#39;s a pretty robust install script at
<a href="https://www.npmjs.org/install.sh">https://www.npmjs.org/install.sh</a>. You can download that and run it.</p>
<a href="https://www.npmjs.com/install.sh">https://www.npmjs.com/install.sh</a>. You can download that and run it.</p>
<p>Here&#39;s an example using curl:</p>
<pre><code>curl -L https://npmjs.org/install.sh | sh
</code></pre><h3 id="slightly-fancier">Slightly Fancier</h3>
<pre><code class="lang-sh">curl -L https://www.npmjs.com/install.sh | sh
</code></pre>
<h3 id="slightly-fancier">Slightly Fancier</h3>
<p>You can set any npm configuration params with that script:</p>
<pre><code>npm_config_prefix=/some/path sh install.sh
</code></pre><p>Or, you can run it in uber-debuggery mode:</p>
<pre><code>npm_debug=1 sh install.sh
</code></pre><h3 id="even-fancier">Even Fancier</h3>
<pre><code class="lang-sh">npm_config_prefix=/some/path sh install.sh
</code></pre>
<p>Or, you can run it in uber-debuggery mode:</p>
<pre><code class="lang-sh">npm_debug=1 sh install.sh
</code></pre>
<h3 id="even-fancier">Even Fancier</h3>
<p>Get the code with git. Use <code>make</code> to build the docs and do other stuff.
If you plan on hacking on npm, <code>make link</code> is your friend.</p>
<p>If you&#39;ve got the npm source code, you can also semi-permanently set
arbitrary config keys using the <code>./configure --key=val ...</code>, and then
run npm commands by doing <code>node cli.js &lt;cmd&gt; &lt;args&gt;</code>. (This is helpful
for testing, or running stuff without actually installing npm itself.)</p>
<h2 id="fancy-windows-install">Fancy Windows Install</h2>
<p>You can download a zip file from <a href="https://npmjs.org/dist/">https://npmjs.org/dist/</a>, and unpack it
in the same folder where node.exe lives.</p>
<h2 id="windows-install-or-upgrade">Windows Install or Upgrade</h2>
<p>You can download a zip file from <a href="https://github.com/npm/npm/releases">https://github.com/npm/npm/releases</a>, and
unpack it in the <code>node_modules\npm\</code> folder inside node&#39;s installation folder.</p>
<p>To upgrade to npm 2, follow the Windows upgrade instructions in
the npm Troubleshooting Guide:</p>
<p><a href="https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows">https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows</a></p>
<p>If that&#39;s not fancy enough for you, then you can fetch the code with
git, and mess with it directly.</p>
<h2 id="installing-on-cygwin">Installing on Cygwin</h2>
<p>No.</p>
<h2 id="permissions-when-using-npm-to-install-other-stuff">Permissions when Using npm to Install Other Stuff</h2>
<p><strong>tl;dr</strong></p>
<ul>
<li>Use <code>sudo</code> for greater safety. Or don&#39;t, if you prefer not to.</li>
<li>npm will downgrade permissions if it&#39;s root before running any build
scripts that package authors specified.</li>
</ul>
<h3 id="more-details-">More details...</h3>
<p>As of version 0.3, it is recommended to run npm as root.
This allows npm to change the user identifier to the <code>nobody</code> user prior
to running any package build or test commands.</p>
<p>If you are not the root user, or if you are on a platform that does not
support uid switching, then npm will not attempt to change the userid.</p>
<p>If you would like to ensure that npm <strong>always</strong> runs scripts as the
&quot;nobody&quot; user, and have it fail if it cannot downgrade permissions, then
set the following configuration param:</p>
<pre><code>npm config set unsafe-perm false
</code></pre><p>This will prevent running in unsafe mode, even as non-root users.</p>
<h2 id="uninstalling">Uninstalling</h2>
<p>So sad to see you go.</p>
<pre><code>sudo npm uninstall npm -g
</code></pre><p>Or, if that fails,</p>
<pre><code>sudo make uninstall
</code></pre><h2 id="more-severe-uninstalling">More Severe Uninstalling</h2>
<pre><code class="lang-sh">sudo npm uninstall npm -g
</code></pre>
<p>Or, if that fails,</p>
<pre><code class="lang-sh">sudo make uninstall
</code></pre>
<h2 id="more-severe-uninstalling">More Severe Uninstalling</h2>
<p>Usually, the above instructions are sufficient. That will remove
npm, but leave behind anything you&#39;ve installed.</p>
<p>If you would like to remove all the packages that you have installed,
@@ -83,34 +73,43 @@ then you can use the <code>npm ls</code> command to find them, and then <code>np
remove them.</p>
<p>To remove cruft left behind by npm 0.x, you can use the included
<code>clean-old.sh</code> script file. You can run it conveniently like this:</p>
<pre><code>npm explore npm -g -- sh scripts/clean-old.sh
</code></pre><p>npm uses two configuration files, one for per-user configs, and another
<pre><code class="lang-sh">npm explore npm -g -- sh scripts/clean-old.sh
</code></pre>
<p>npm uses two configuration files, one for per-user configs, and another
for global (every-user) configs. You can view them by doing:</p>
<pre><code>npm config get userconfig # defaults to ~/.npmrc
<pre><code class="lang-sh">npm config get userconfig # defaults to ~/.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
</code></pre><p>Uninstalling npm does not remove configuration files by default. You
</code></pre>
<p>Uninstalling npm does not remove configuration files by default. You
must remove them yourself manually if you want them gone. Note that
this means that future npm installs will not remember the settings that
you have chosen.</p>
<h2 id="using-npm-programmatically">Using npm Programmatically</h2>
<p>If you would like to use npm programmatically, you can do that.
It&#39;s not very well documented, but it <em>is</em> rather simple.</p>
<p>Most of the time, unless you actually want to do all the things that
npm does, you should try using one of npm&#39;s dependencies rather than
using npm itself, if possible.</p>
<p>Eventually, npm will be just a thin cli wrapper around the modules
that it depends on, but for now, there are some things that you must
use npm itself to do.</p>
<pre><code>var npm = require(&quot;npm&quot;)
<p>Although npm can be used programmatically, its API is meant for use by the CLI
<em>only</em>, and no guarantees are made regarding its fitness for any other purpose.
If you want to use npm to reliably perform some task, the safest thing to do is
to invoke the desired <code>npm</code> command with appropriate arguments.</p>
<p>The semantic version of npm refers to the CLI itself, rather than the
underlying API. <em>The internal API is not guaranteed to remain stable even when
npm&#39;s version indicates no breaking changes have been made according to
semver.</em></p>
<p>If you <em>still</em> would like to use npm programmatically, it&#39;s <em>possible</em>. The API
isn&#39;t very well documented, but it <em>is</em> rather simple.</p>
<p>Eventually, npm will be just a thin CLI wrapper around the modules that it
depends on, but for now, there are some things that only the CLI can do. You
should try using one of npm&#39;s dependencies first, and only use the API if what
you&#39;re trying to do is only supported by npm itself.</p>
<pre><code class="lang-javascript">var npm = require(&quot;npm&quot;)
npm.load(myConfigObject, function (er) {
if (er) return handlError(er)
npm.commands.install([&quot;some&quot;, &quot;args&quot;], function (er, data) {
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
npm.on(&quot;log&quot;, function (message) { .... })
npm.registry.log.on(&quot;log&quot;, function (message) { .... })
})
</code></pre><p>The <code>load</code> function takes an object hash of the command-line configs.
</code></pre>
<p>The <code>load</code> function takes an object hash of the command-line configs.
The various <code>npm.commands.&lt;cmd&gt;</code> functions take an <strong>array</strong> of
positional argument <strong>strings</strong>. The last argument to any
<code>npm.commands.&lt;cmd&gt;</code> function is a callback. Some commands take other
@@ -122,11 +121,11 @@ change the value for <em>all</em> npm commands in that process.</p>
command line arguments using nopt. You may also want to check out <code>npm
help config</code> to learn about all the options you can set there.</p>
<h2 id="more-docs">More Docs</h2>
<p>Check out the <a href="https://www.npmjs.org/doc/">docs</a>,
especially the <a href="https://www.npmjs.org/doc/faq.html">faq</a>.</p>
<p>Check out the <a href="https://docs.npmjs.com/">docs</a>,
especially the <a href="https://docs.npmjs.com/misc/faq">faq</a>.</p>
<p>You can use the <code>npm help</code> command to read any of them.</p>
<p>If you&#39;re a developer, and you want to use npm to publish your program,
you should <a href="https://www.npmjs.org/doc/developers.html">read this</a></p>
you should <a href="https://docs.npmjs.com/misc/developers">read this</a></p>
<h2 id="legal-stuff">Legal Stuff</h2>
<p>&quot;npm&quot; and &quot;The npm Registry&quot; are owned by npm, Inc.
All rights reserved. See the included LICENSE file for more details.</p>
@@ -135,13 +134,13 @@ All rights reserved. See the included LICENSE file for more details.</p>
npm, Inc. or the Node.js project.</p>
<p>Data published to the npm registry is not part of npm itself, and is
the sole property of the publisher. While every effort is made to
ensure accountability, there is absolutely no guarantee, warrantee, or
ensure accountability, there is absolutely no guarantee, warranty, or
assertion expressed or implied as to the quality, fitness for a
specific purpose, or lack of malice in any given npm package.</p>
<p>If you have a complaint about a package in the public npm registry,
and cannot <a href="https://www.npmjs.org/doc/misc/npm-disputes.html">resolve it with the package
and cannot <a href="https://docs.npmjs.com/misc/disputes">resolve it with the package
owner</a>, please email
<a href="&#x6d;&#97;&#105;&#108;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#x70;&#x6f;&#114;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#x63;&#111;&#x6d;">&#x73;&#117;&#112;&#x70;&#x6f;&#114;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#x63;&#111;&#x6d;</a> and explain the situation.</p>
<a href="&#109;&#97;&#x69;&#x6c;&#116;&#111;&#58;&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#116;&#64;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;">&#115;&#x75;&#112;&#x70;&#x6f;&#114;&#116;&#64;&#110;&#x70;&#109;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;</a> and explain the situation.</p>
<p>Any data published to The npm Registry (including user account
information) may be removed or modified at the sole discretion of the
npm server administrators.</p>
@@ -160,8 +159,6 @@ ban your account in extreme cases. So don&#39;t do that.</p>
<ul>
<li>web:
<a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a></li>
<li>email:
<a href="&#x6d;&#97;&#105;&#108;&#x74;&#111;&#58;&#110;&#112;&#109;&#45;&#x40;&#x67;&#111;&#111;&#103;&#108;&#x65;&#x67;&#x72;&#111;&#117;&#112;&#115;&#x2e;&#x63;&#x6f;&#109;">&#110;&#112;&#109;&#45;&#x40;&#x67;&#111;&#111;&#103;&#108;&#x65;&#x67;&#x72;&#111;&#117;&#112;&#115;&#x2e;&#x63;&#x6f;&#109;</a></li>
</ul>
<p>Be sure to include <em>all</em> of the output from the npm command that didn&#39;t work
as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p>
@@ -169,10 +166,10 @@ as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p
will no doubt tell you to put the output in a gist or email.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="cli/npm.html">npm(1)</a></li>
<li><a href="misc/npm-faq.html">npm-faq(7)</a></li>
<li><a href="cli/npm-help.html">npm-help(1)</a></li>
<li><a href="misc/npm-index.html">npm-index(7)</a></li>
<li><a href="cli/npm.html"><a href="cli/npm.html">npm(1)</a></a></li>
<li><a href="misc/npm-faq.html"><a href="misc/npm-faq.html">npm-faq(7)</a></a></li>
<li><a href="cli/npm-help.html"><a href="cli/npm-help.html">npm-help(1)</a></a></li>
<li><a href="misc/npm-index.html"><a href="misc/npm-index.html">npm-index(7)</a></a></li>
</ul>
</div>
@@ -186,5 +183,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.0.0</p>
<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.11.3</p>

View File

@@ -15,7 +15,7 @@
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>Print the folder where npm will install executables.</p>
<p>This function should not be used programmatically. Instead, just refer
to the <code>npm.bin</code> member.</p>
to the <code>npm.bin</code> property.</p>
</div>
@@ -28,5 +28,5 @@ to the <code>npm.bin</code> member.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-bin &mdash; npm@2.0.0</p>
<p id="footer">npm-bin &mdash; npm@2.11.3</p>

View File

@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-bugs &mdash; npm@2.0.0</p>
<p id="footer">npm-bugs &mdash; npm@2.11.3</p>

View File

@@ -18,7 +18,7 @@ npm.commands.cache.clean([args], callback)
npm.commands.cache.add([args], callback)
npm.commands.cache.read(name, version, forceBypass, callback)
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This acts much the same ways as the <a href="../cli/npm-cache.html">npm-cache(1)</a> command line
<p>This acts much the same ways as the <a href="../cli/npm-cache.html"><a href="../cli/npm-cache.html">npm-cache(1)</a></a> command line
functionality.</p>
<p>The callback is called with the package.json data of the thing that is
eventually added to or read from the cache.</p>
@@ -42,5 +42,5 @@ incrementation.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-cache &mdash; npm@2.0.0</p>
<p id="footer">npm-cache &mdash; npm@2.11.3</p>

View File

@@ -22,7 +22,7 @@ commands are special and take other optional arguments.</p>
usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-index.html">npm-index(7)</a></li>
<li><a href="../misc/npm-index.html"><a href="../misc/npm-index.html">npm-index(7)</a></a></li>
</ul>
</div>
@@ -36,5 +36,5 @@ usage, or <code>man 3 npm-&lt;command&gt;</code> for programmatic usage.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-commands &mdash; npm@2.0.0</p>
<p id="footer">npm-commands &mdash; npm@2.11.3</p>

View File

@@ -43,7 +43,7 @@ the duration of a program, use the <code>npm.config.set</code> and <code>npm.con
functions instead.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../api/npm.html">npm(3)</a></li>
<li><a href="../api/npm.html"><a href="../api/npm.html">npm(3)</a></a></li>
</ul>
</div>
@@ -57,5 +57,5 @@ functions instead.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-config &mdash; npm@2.0.0</p>
<p id="footer">npm-config &mdash; npm@2.11.3</p>

View File

@@ -31,9 +31,9 @@ a deprecation warning to all who attempt to install it.</p>
<p>To un-deprecate a package, specify an empty string (<code>&quot;&quot;</code>) for the <code>message</code> argument.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../api/npm-publish.html">npm-publish(3)</a></li>
<li><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></li>
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
<li><a href="../api/npm-publish.html"><a href="../api/npm-publish.html">npm-publish(3)</a></a></li>
<li><a href="../api/npm-unpublish.html"><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></a></li>
<li><a href="../misc/npm-registry.html"><a href="../misc/npm-registry.html">npm-registry(7)</a></a></li>
</ul>
</div>
@@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-deprecate &mdash; npm@2.0.0</p>
<p id="footer">npm-deprecate &mdash; npm@2.11.3</p>

View File

@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-docs &mdash; npm@2.0.0</p>
<p id="footer">npm-docs &mdash; npm@2.11.3</p>

View File

@@ -36,5 +36,5 @@ and how this is used.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-edit &mdash; npm@2.0.0</p>
<p id="footer">npm-edit &mdash; npm@2.11.3</p>

View File

@@ -31,5 +31,5 @@ sure to use <code>npm rebuild &lt;pkg&gt;</code> if you make any changes.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-explore &mdash; npm@2.0.0</p>
<p id="footer">npm-explore &mdash; npm@2.11.3</p>

View File

@@ -31,7 +31,7 @@ An array of all matching lines (and some adjacent lines).</li>
<li>file:
Name of the file that matched</li>
</ul>
<p>The silent parameter is not neccessary not used, but it may in the future.</p>
<p>The silent parameter is not necessary not used, but it may in the future.</p>
</div>
@@ -44,5 +44,5 @@ Name of the file that matched</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-help-search &mdash; npm@2.0.0</p>
<p id="footer">npm-help-search &mdash; npm@2.11.3</p>

View File

@@ -26,7 +26,7 @@ JavaScript makes it stupid simple to output formatted JSON, that is the
preferred method. If you&#39;re sure you want to handle command-line prompting,
then go ahead and use this programmatically.</p>
<h2 id="see-also">SEE ALSO</h2>
<p><a href="../files/package.json.html">package.json(5)</a></p>
<p><a href="../files/package.json.html"><a href="../files/package.json.html">package.json(5)</a></a></p>
</div>
@@ -39,5 +39,5 @@ then go ahead and use this programmatically.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-init &mdash; npm@2.0.0</p>
<p id="footer">npm-init &mdash; npm@2.11.3</p>

View File

@@ -32,5 +32,5 @@ installed or when an error has been encountered.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-install &mdash; npm@2.0.0</p>
<p id="footer">npm-install &mdash; npm@2.11.3</p>

View File

@@ -42,5 +42,5 @@ the package in the current working directory</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-link &mdash; npm@2.0.0</p>
<p id="footer">npm-link &mdash; npm@2.11.3</p>

View File

@@ -15,9 +15,9 @@
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>npm.load() must be called before any other function call. Both parameters are
optional, but the second is recommended.</p>
<p>The first parameter is an object hash of command-line config params, and the
second parameter is a callback that will be called when npm is loaded and
ready to serve.</p>
<p>The first parameter is an object containing command-line config params, and the
second parameter is a callback that will be called when npm is loaded and ready
to serve.</p>
<p>The first parameter should follow a similar structure as the package.json
config object.</p>
<p>For example, to emulate the --dev flag, pass an object that looks like this:</p>
@@ -37,5 +37,5 @@ config object.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-load &mdash; npm@2.0.0</p>
<p id="footer">npm-load &mdash; npm@2.11.3</p>

View File

@@ -49,7 +49,7 @@ taken if it is serialized to JSON.</p>
<p>List packages in the global install prefix instead of in the current
project.</p>
<p>Note, if parseable is set or long isn&#39;t set, then duplicates will be trimmed.
This means that if a submodule a same dependency as a parent module, then the
This means that if a submodule has the same dependency as a parent module, then the
dependency will only be output once.</p>
</div>
@@ -63,5 +63,5 @@ dependency will only be output once.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-ls &mdash; npm@2.0.0</p>
<p id="footer">npm-ls &mdash; npm@2.11.3</p>

View File

@@ -28,5 +28,5 @@ currently outdated.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-outdated &mdash; npm@2.0.0</p>
<p id="footer">npm-outdated &mdash; npm@2.11.3</p>

View File

@@ -32,8 +32,8 @@ or you can&#39;t. Future versions may contain more fine-grained access levels,
that is not implemented at this time.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../api/npm-publish.html">npm-publish(3)</a></li>
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
<li><a href="../api/npm-publish.html"><a href="../api/npm-publish.html">npm-publish(3)</a></a></li>
<li><a href="../misc/npm-registry.html"><a href="../misc/npm-registry.html">npm-registry(7)</a></a></li>
</ul>
</div>
@@ -47,5 +47,5 @@ that is not implemented at this time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-owner &mdash; npm@2.0.0</p>
<p id="footer">npm-owner &mdash; npm@2.11.3</p>

View File

@@ -33,5 +33,5 @@ overwritten the second time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-pack &mdash; npm@2.0.0</p>
<p id="footer">npm-pack &mdash; npm@2.11.3</p>

View File

@@ -29,5 +29,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-prefix &mdash; npm@2.0.0</p>
<p id="footer">npm-prefix &mdash; npm@2.11.3</p>

View File

@@ -30,5 +30,5 @@ package&#39;s dependencies list.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-prune &mdash; npm@2.0.0</p>
<p id="footer">npm-prune &mdash; npm@2.11.3</p>

View File

@@ -30,9 +30,9 @@ current working directory.</p>
the registry. Overwrites when the &quot;force&quot; environment variable is set.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
<li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li>
<li><a href="../api/npm-owner.html">npm-owner(3)</a></li>
<li><a href="../misc/npm-registry.html"><a href="../misc/npm-registry.html">npm-registry(7)</a></a></li>
<li><a href="../cli/npm-adduser.html"><a href="../cli/npm-adduser.html">npm-adduser(1)</a></a></li>
<li><a href="../api/npm-owner.html"><a href="../api/npm-owner.html">npm-owner(3)</a></a></li>
</ul>
</div>
@@ -46,5 +46,5 @@ the registry. Overwrites when the &quot;force&quot; environment variable is set
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-publish &mdash; npm@2.0.0</p>
<p id="footer">npm-publish &mdash; npm@2.11.3</p>

View File

@@ -30,5 +30,5 @@ the new binary. If no &#39;packages&#39; parameter is specify, every package wil
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-rebuild &mdash; npm@2.0.0</p>
<p id="footer">npm-rebuild &mdash; npm@2.11.3</p>

View File

@@ -33,5 +33,5 @@ friendly for programmatic use.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-repo &mdash; npm@2.0.0</p>
<p id="footer">npm-repo &mdash; npm@2.11.3</p>

View File

@@ -9,20 +9,36 @@
<body>
<div id="wrapper">
<h1><a href="../api/npm-restart.html">npm-restart</a></h1> <p>Start a package</p>
<h1><a href="../api/npm-restart.html">npm-restart</a></h1> <p>Restart a package</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm.commands.restart(packages, callback)
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This runs a package&#39;s &quot;restart&quot; script, if one was provided.
Otherwise it runs package&#39;s &quot;stop&quot; script, if one was provided, and then
the &quot;start&quot; script.</p>
<p>This restarts a package (or multiple packages).</p>
<p>This runs a package&#39;s &quot;stop&quot;, &quot;restart&quot;, and &quot;start&quot; scripts, and associated
pre- and post- scripts, in the order given below:</p>
<ol>
<li>prerestart</li>
<li>prestop</li>
<li>stop</li>
<li>poststop</li>
<li>restart</li>
<li>prestart</li>
<li>start</li>
<li>poststart</li>
<li>postrestart</li>
</ol>
<p>If no version is specified, then it restarts the &quot;active&quot; version.</p>
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
<p>npm can restart multiple packages. Just specify multiple packages in
the <code>packages</code> parameter.</p>
<h2 id="note">NOTE</h2>
<p>Note that the &quot;restart&quot; script is run <strong>in addition to</strong> the &quot;stop&quot;
and &quot;start&quot; scripts, not instead of them.</p>
<p>This is the behavior as of <code>npm</code> major version 2. A change in this
behavior will be accompanied by an increase in major version number</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../api/npm-start.html">npm-start(3)</a></li>
<li><a href="../api/npm-stop.html">npm-stop(3)</a></li>
<li><a href="../api/npm-start.html"><a href="../api/npm-start.html">npm-start(3)</a></a></li>
<li><a href="../api/npm-stop.html"><a href="../api/npm-stop.html">npm-stop(3)</a></a></li>
</ul>
</div>
@@ -36,5 +52,5 @@ in the <code>packages</code> parameter.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-restart &mdash; npm@2.0.0</p>
<p id="footer">npm-restart &mdash; npm@2.11.3</p>

View File

@@ -29,5 +29,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-root &mdash; npm@2.0.0</p>
<p id="footer">npm-root &mdash; npm@2.11.3</p>

View File

@@ -23,11 +23,11 @@ one element, then the first is assumed to be the package and the second is
assumed to be the command to run. All other elements are ignored.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
<li><a href="../api/npm-test.html">npm-test(3)</a></li>
<li><a href="../api/npm-start.html">npm-start(3)</a></li>
<li><a href="../api/npm-restart.html">npm-restart(3)</a></li>
<li><a href="../api/npm-stop.html">npm-stop(3)</a></li>
<li><a href="../misc/npm-scripts.html"><a href="../misc/npm-scripts.html">npm-scripts(7)</a></a></li>
<li><a href="../api/npm-test.html"><a href="../api/npm-test.html">npm-test(3)</a></a></li>
<li><a href="../api/npm-start.html"><a href="../api/npm-start.html">npm-start(3)</a></a></li>
<li><a href="../api/npm-restart.html"><a href="../api/npm-restart.html">npm-restart(3)</a></a></li>
<li><a href="../api/npm-stop.html"><a href="../api/npm-stop.html">npm-stop(3)</a></a></li>
</ul>
</div>
@@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-run-script &mdash; npm@2.0.0</p>
<p id="footer">npm-run-script &mdash; npm@2.11.3</p>

View File

@@ -53,5 +53,5 @@ like).</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-search &mdash; npm@2.0.0</p>
<p id="footer">npm-search &mdash; npm@2.11.3</p>

View File

@@ -33,5 +33,5 @@ been saved.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-shrinkwrap &mdash; npm@2.0.0</p>
<p id="footer">npm-shrinkwrap &mdash; npm@2.11.3</p>

View File

@@ -14,8 +14,8 @@
<pre><code>npm.commands.start(packages, callback)
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This runs a package&#39;s &quot;start&quot; script, if one was provided.</p>
<p>npm can run tests on multiple packages. Just specify multiple packages
in the <code>packages</code> parameter.</p>
<p>npm can start multiple packages. Just specify multiple packages in the
<code>packages</code> parameter.</p>
</div>
@@ -28,5 +28,5 @@ in the <code>packages</code> parameter.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-start &mdash; npm@2.0.0</p>
<p id="footer">npm-start &mdash; npm@2.11.3</p>

View File

@@ -28,5 +28,5 @@ in the <code>packages</code> parameter.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-stop &mdash; npm@2.0.0</p>
<p id="footer">npm-stop &mdash; npm@2.11.3</p>

View File

@@ -42,5 +42,4 @@ dependencies into the submodule folder.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-submodule &mdash; npm@2.0.0</p>
<p id="footer">npm-submodule &mdash; npm@1.4.28</p>

View File

@@ -21,7 +21,7 @@ currently used.</p>
is the package name and version is the version number (much like installing a
specific version).</p>
<p>The second element is the name of the tag to tag this version with. If this
parameter is missing or falsey (empty), the default froom the config will be
parameter is missing or falsey (empty), the default from the config will be
used. For more information about how to set this config, check
<code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p>
@@ -36,5 +36,5 @@ used. For more information about how to set this config, check
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-tag &mdash; npm@2.0.0</p>
<p id="footer">npm-tag &mdash; npm@2.11.3</p>

View File

@@ -30,5 +30,5 @@ in the <code>packages</code> parameter.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
<p id="footer">npm-test &mdash; npm@2.0.0</p>
<p id="footer">npm-test &mdash; npm@2.11.3</p>

Some files were not shown because too many files have changed in this diff Show More