Compare commits

..

4 Commits

Author SHA1 Message Date
Alexis Campailla
06990da3f6 test: debug-signal-cluster increase timeouts
The test needs a little more time to run so that it passes for all
builds (eg: Windows, debug)
2014-01-13 17:51:17 -08:00
Alexis Campailla
4946c833f3 debug client: connect after child is ready
We now wait to connect to the debuggee until we know that
its error stream has data, to ensure that the output message
"connecting..... ok" appears after "Debugger listening on port xyz"

I also increased the test timeout to let the more complex
tests finish in time on Windows

This change fixes the following unit tests on Windows:
 test-debugger-repl.js
 test-debugger-repl-term.js
 test-debugger-repl-utf8.js
 test-debugger-repl-restart.js
2014-01-13 17:42:27 -08:00
Timothy J Fontaine
dcd5224e1f test: move debugger repl into own section 2014-01-13 17:35:41 -08:00
Timothy J Fontaine
be3aaeb0e9 test: refactor to use common testcfg 2014-01-13 17:09:12 -08:00
7784 changed files with 571148 additions and 1117947 deletions

10
.gitignore vendored
View File

@@ -15,7 +15,6 @@ node_g
.benchmark_reports
/.project
/.cproject
icu_config.gypi
/out
@@ -43,13 +42,8 @@ ipch/
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
/test/addons/doc-*/
email.md
deps/v8-*
deps/icu
deps/icu*.zip
deps/icu*.tgz
deps/icu-tmp
./node_modules
.svn/
@@ -69,7 +63,3 @@ deps/zlib/zlib.target.mk
/SHASUMS*.txt*
/tools/wrk/wrk
# test artifacts
tools/faketime
icu_config.gypi

View File

@@ -2,8 +2,6 @@ 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>
@@ -15,12 +13,10 @@ 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>
@@ -29,7 +25,6 @@ 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>
@@ -43,7 +38,6 @@ 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>
@@ -52,7 +46,6 @@ 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>
@@ -76,7 +69,6 @@ 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>
@@ -112,10 +104,8 @@ 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>
@@ -130,5 +120,3 @@ 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>

1189
AUTHORS

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@ through the process.
Fork the project [on GitHub](https://github.com/joyent/node) and check out
your copy.
```sh
```
$ git clone git@github.com:username/node.git
$ cd node
$ git remote add upstream git://github.com/joyent/node.git
@@ -48,7 +48,7 @@ does not align with that of a project maintainer.
Okay, so you have decided on the proper branch. Create a feature branch
and start hacking:
```sh
```
$ git checkout -b my-feature-branch -t origin/v0.10
```
@@ -59,7 +59,7 @@ $ git checkout -b my-feature-branch -t origin/v0.10
Make sure git knows your name and email address:
```sh
```
$ git config --global user.name "J. Random User"
$ git config --global user.email "j.random.user@example.com"
```
@@ -99,7 +99,7 @@ what subsystem (or subsystems) your changes touch.
Use `git rebase` (not `git merge`) to sync your work from time to time.
```sh
```
$ git fetch upstream
$ git rebase upstream/v0.10 # or upstream/master
```
@@ -111,30 +111,17 @@ Bug fixes and features should come with tests. Add your tests in the
test/simple/ directory. Look at other tests to see how they should be
structured (license boilerplate, common includes, etc.).
```sh
```
$ make jslint test
```
Make sure the linter is happy and that all tests pass. Please, do not submit
patches that fail either check.
If you are updating tests and just want to run a single test to check it, you
can use this syntax to run it exactly as the test harness would:
```
python tools/test.py -v --mode=release simple/test-stream2-transform
```
You can run tests directly with node:
```
node ./test/simple/test-streams2-transform.js
```
### PUSH
```sh
```
$ git push origin my-feature-branch
```
@@ -147,6 +134,12 @@ feature branch. Post a comment in the pull request afterwards; GitHub does
not send out notifications when you add commits.
### CONTRIBUTOR LICENSE AGREEMENT
Please visit http://nodejs.org/cla.html and sign the Contributor License
Agreement. You only need to do that once.
[stability index page]: https://github.com/joyent/node/blob/master/doc/api/documentation.markdown
[issue tracker]: https://github.com/joyent/node/issues
[node.js mailing list]: http://groups.google.com/group/nodejs

854
ChangeLog
View File

@@ -1,591 +1,4 @@
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.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
* http_parser: Upgrade to v2.3.0
* npm: Upgrade to v2.0.0
* openssl: Upgrade to v1.0.1i
* v8: Upgrade to 3.26.33
* Add fast path for simple URL parsing (Gabriel Wicke)
* Added support for options parameter in console.dir() (Xavi Magrinyà)
* Cluster: fix shared handles on Windows (Alexis Campailla)
* buffer: Fix incorrect Buffer.compare behavior (Feross Aboukhadijeh)
* buffer: construct new buffer from buffer toJSON() output (cjihrig)
* buffer: improve Buffer constructor (Kang-Hao Kenny)
* build: linking CoreFoundation framework for OSX (Thorsten Lorenz)
* child_process: accept uid/gid everywhere (Fedor Indutny)
* child_process: add path to spawn ENOENT Error (Ryan Cole)
* child_process: copy spawnSync() cwd option to proper buffer (cjihrig)
* child_process: do not access stderr when stdio set to 'ignore' (cjihrig)
* child_process: don't throw on EAGAIN (Charles)
* child_process: don't throw on EMFILE/ENFILE (Ben Noordhuis)
* child_process: use full path for cmd.exe on Win32 (Ed Morley)
* cluster: allow multiple calls to setupMaster() (Ryan Graham)
* cluster: centralize removal from workers list. (Julien Gilli)
* cluster: enable error/message events using .worker (cjihrig)
* cluster: include settings object in 'setup' event (Ryan Graham)
* cluster: restore v0.10.x setupMaster() behaviour (Ryan Graham)
* cluster: support options in Worker constructor (cjihrig)
* cluster: test events emit on cluster.worker (Sam Roberts)
* console: console.dir() accepts options object (Xavi Magrinyà)
* crypto: add `honorCipherOrder` argument (Fedor Indutny)
* crypto: allow padding in RSA methods (Fedor Indutny)
* crypto: clarify RandomBytes() error msg (Mickael van der Beek)
* crypto: never store pointer to conn in SSL_CTX (Fedor Indutny)
* crypto: unsigned value can't be negative (Brian White)
* dgram: remove new keyword from errnoException (Jackson Tian)
* dns: always set variable family in lookup() (cjihrig)
* dns: include host name in error message if available (Maciej Małecki)
* dns: introduce lookupService function (Saúl Ibarra Corretgé)
* dns: send lookup c-ares errors to callback (Chris Dickinson)
* dns: throw if hostname is not string or falsey (cjihrig)
* events: Output the event that is leaking (Arnout Kazemier)
* fs: close file if fstat() fails in readFile() (cjihrig)
* fs: fs.readFile should not throw uncaughtException (Jackson Tian)
* http: add 308 status_code, see RFC7238 (Yazhong Liu)
* http: don't default OPTIONS to chunked encoding (Nick Muerdter)
* http: fix bailout for writeHead (Alex Kocharin)
* http: remove unused code block (Fedor Indutny)
* http: write() after end() emits an error. (Julien Gilli)
* lib, src: add vm.runInDebugContext() (Ben Noordhuis)
* lib: noisy deprecation of child_process customFds (Ryan Graham)
* module: don't require fs several times (Robert Kowalski)
* net,dgram: workers can listen on exclusive ports (cjihrig)
* net,stream: add isPaused, don't read() when paused (Chris Dickinson)
* net: Ensure consistent binding to IPV6 if address is absent (Raymond Feng)
* net: add remoteFamily for socket (Jackson Tian)
* net: don't emit listening if handle is closed (Eli Skeggs)
* net: don't prefer IPv4 addresses during resolution (cjihrig)
* net: don't throw on net.Server.close() (cjihrig)
* net: reset `errorEmitted` on reconnect (Ed Umansky)
* node: set names for prototype methods (Trevor Norris)
* node: support v8 microtask queue (Vladimir Kurchatkin)
* path: fix slice OOB in trim (Lucio M. Tato)
* path: isAbsolute() should always return boolean (Herman Lee)
* process: throw TypeError if kill pid not a number (Sam Roberts)
* querystring: custom encode and decode (fengmk2)
* querystring: do not add sep for empty array (cjihrig)
* querystring: remove prepended ? from query field (Ezequiel Rabinovich)
* readline: fix close event of readline.Interface() (Yazhong Liu)
* readline: fixes scoping bug (Dan Kaplun)
* readline: implements keypress buffering (Dan Kaplun)
* repl: fix multi-line input (Fedor Indutny)
* repl: fix overwrite for this._prompt (Yazhong Liu)
* repl: proper `setPrompt()` and `multiline` support (Fedor Indutny)
* stream: don't try to finish if buffer is not empty (Vladimir Kurchatkin)
* stream: only end reading on null, not undefined (Jonathan Reem)
* streams: set default hwm properly for Duplex (Andrew Oppenlander)
* string_bytes: ucs2 support big endian (Andrew Low)
* tls, crypto: add DHE support (Shigeki Ohtsu)
* tls: `checkServerIdentity` option (Trevor Livingston)
* tls: add DHE-RSA-AES128-SHA256 to the def ciphers (Shigeki Ohtsu)
* tls: better error reporting at cert validation (Fedor Indutny)
* tls: support multiple keys/certs (Fedor Indutny)
* tls: throw an error, not string (Jackson Tian)
* udp: make it possible to receive empty udp packets (Andrius Bentkus)
* url: treat \ the same as / (isaacs)
2014.05.01, Version 0.11.13 (Unstable), 99c9930ad626e2796af23def7cac19b65c608d18
* v8: upgrade to 3.24.35.22
* buffer: add compare and equals methods (Sean McArthur)
* buffer: improve {read,write}{U}Int* methods (Nick Apperson)
* buffer: return uint if MSB is 1 in readUInt32 (goussardg)
* buffer: truncate buffer after string decode (Fedor Indutny)
* child_process: fix assertion error in spawnSync (Shigeki Ohtsu)
* crypto: fix memory leak in CipherBase::Final (Fedor Indutny)
* crypto: improve error messages (Ingmar Runge)
* crypto: move `createCredentials` to tls (Fedor Indutny)
* crypto: work around OpenSSL oddness (Fedor Indutny)
* dgram: introduce `reuseAddr` option (Fedor Indutny)
* domain: don't crash on "throw null" (Alex Kocharin)
* events: check if _events is an own property (Vladimir Kurchatkin)
* fs: improve performance of all stat functions (James Pickard)
* fs: return blksize on stats object (Trevor Norris)
* http: add request.flush() method (Ben Noordhuis)
* http: better client "protocol not supported" error (Nathan Rajlich)
* http: use defaultAgent.protocol in protocol check (Nathan Rajlich)
* main: Handle SIGINT properly. (Geir Hauge)
* net: bind to `::` TCP address by default (Fedor Indutny)
* readline: consider newlines for cursor position (Yazhong Liu)
* stream: split `objectMode` for Duplex (Vladimir Kurchatkin)
* tls: `getPeerCertificate(detailed)` (Fedor Indutny)
* tls: do not call SNICallback unless present (Fedor Indutny)
* tls: force readable/writable to `true` (Fedor Indutny)
* tls: support OCSP on client and server (Fedor Indutny)
* util: made util.isArray a direct alias for Array.isArray (Evan Carroll)
2014.03.11, Version 0.11.12 (Unstable), 7d6b8db40f32e817ff145b7cfe6b3aec3179fba7
* uv: Upgrade to v0.11.22 (Timothy J Fontaine)
* buffer: allow toString to accept Infinity for end (Brian White)
* child_process: add spawnSync/execSync (Bert Belder, Timothy J Fontaine)
* cluster: handle bind errors on Windows (Alexis Campailla)
* contextify: handle infinite recursion errors (Fedor Indutny)
* crypto: allow custom generator for DiffieHellman (Brian White)
* crypto: allow setting add'l authenticated data (Brian White)
* crypto: fix CipherFinal return value check (Brian White)
* crypto: make NewSessionDoneCb public (Fedor Indutny)
* dgram: pass the bytes sent to the send callback (Timothy J Fontaine)
* dns: validate arguments in resolver (Kenan Sulayman)
* dns: verify argument is valid function in resolve (Kenan Sulayman)
* http: avoid duplicate keys in writeHead (David Björklund)
* net: add localPort to connect options (Timothy J Fontaine)
* node: do not print SyntaxError hints to stderr (Fedor Indutny)
* node: invoke `beforeExit` again if loop was active (Fedor Indutny)
* node: make AsyncListenerInst field more explicit (Trevor Norris)
* os: networkInterfaces include scopeid for ipv6 (Xidorn Quan)
* process: allow changing `exitCode` in `on('exit')` (Fedor Indutny)
* readline: fix `line` event, if input emit 'end' (Yazhong Liu)
* src: add tracing.v8.on('gc') statistics hooks (Ben Noordhuis)
* src: add v8.getHeapStatistics() function (Ben Noordhuis)
* src: emit 'beforeExit' event on process object (Ben Noordhuis)
* src: move AsyncListener from process to tracing (Trevor Norris)
* tls: fix crash in SNICallback (Fedor Indutny)
* tls: introduce asynchronous `newSession` (Fedor Indutny)
* util: show meaningful values for boxed primitives (Nathan Rajlich)
* vm: don't copy Proxy object from parent context (Ben Noordhuis)
* windows: make stdout/sterr pipes blocking (Alexis Campailla)
* zlib: add sync versions for convenience methods (Nikolai Vavilov)
2014.01.29, Version 0.11.11 (Unstable), b46e77421581ea358e221a8a843d057c747f7e90
* v8: Upgrade to 3.22.24.19
* http_parser: Upgrade to 2.2.1
* openssl: Upgrade to 1.0.1f
* uv: Upgrade to 0.11.18
* async-listener: revamp of subsystem (Trevor Norris)
* node: do not ever close stdio (Fedor Indutny)
* http: use writev on chunked encoding (Trevor Norris)
* async_wrap/timers: remove Add/RemoveAsyncListener (Trevor Norris)
* child_process: better error reporting for exec (Fedor Indutny)
* crypto: add newline to cert and key if not present (Fedor Indutny)
* crypto: clear error in GetPeerCertificate (Fedor Indutny)
* crypto: honor default ciphers in client mode (Jacob Hoffman-Andrews)
* crypto: introduce .setEngine(engine, [flags]) (Fedor Indutny)
* crypto: support custom pbkdf2 digest methods (Ben Noordhuis)
* domain: fix off-by-one in Domain.exit() (Ryan Graham)
* http: concatenate duplicate headers by default (Alex Kocharin)
* http: do not emit EOF non-readable socket (Fedor Indutny)
* node: fix argument parsing with -p arg (Alexis Campailla)
* path: improve POSIX path.join() performance (Jo Liss)
* tls: emit `clientError` on early socket close (Fedor Indutny)
* tls: introduce `.setMaxSendFragment(size)` (Fedor Indutny)
* tls: make cert/pfx optional in tls.createServer() (Ben Noordhuis)
* tls: process accumulated input (Fedor Indutny)
* tls: show human-readable error messages (Ben Noordhuis)
* util: handle escaped forward slashes correctly (Tom Gallacher)
2013.12.31, Version 0.11.10 (Unstable), 66931791f06207d1cdfea5ec1529edf3c94026d3
2013.12.31, Version 0.11.10 (Unstable)
* http_parser: update to 2.2
@@ -1032,271 +445,6 @@
* console: `console.dir()` bypasses inspect() methods (Nathan Rajlich)
2015.03.23, Version 0.10.38 (Maintenance)
* 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
* v8: fix a crash introduced by previous release (Fedor Indutny)
* configure: add --openssl-no-asm flag (Fedor Indutny)
* crypto: use domains for any callback-taking method (Chris Dickinson)
* http: do not send `0\r\n\r\n` in TE HEAD responses (Fedor Indutny)
* querystring: fix unescape override (Tristan Berger)
* url: Add support for RFC 3490 separators (Mathias Bynens)
2014.08.19, Version 0.10.31 (Stable), 7fabdc23d843cb705d2d0739e7bbdaaf50aa3292
* v8: backport CVE-2013-6668
* openssl: Update to v1.0.1i
* npm: Update to v1.4.23
* cluster: disconnect should not be synchronous (Sam Roberts)
* fs: fix fs.readFileSync fd leak when get RangeError (Jackson Tian)
* stream: fix Readable.wrap objectMode falsy values (James Halliday)
* timers: fix timers with non-integer delay hanging. (Julien Gilli)
2014.07.31, Version 0.10.30 (Stable), bc0ff830aff1e016163d855e86ded5c98b0899e8
* uv: Upgrade to v0.10.28
* npm: Upgrade to v1.4.21
* v8: Interrupts must not mask stack overflow.
* Revert "stream: start old-mode read in a next tick" (Fedor Indutny)
* buffer: fix sign overflow in `readUIn32BE` (Fedor Indutny)
* buffer: improve {read,write}{U}Int* methods (Nick Apperson)
* child_process: handle writeUtf8String error (Fedor Indutny)
* deps: backport 4ed5fde4f from v8 upstream (Fedor Indutny)
*
* lib: remove and restructure calls to isNaN() (cjihrig)
* module: eliminate double `getenv()` (Maciej Małecki)
* stream2: flush extant data on read of ended stream (Chris Dickinson)
* streams: remove unused require('assert') (Rod Vagg)
* timers: backport f8193ab (Julien Gilli)
* util.h: interface compatibility (Oguz Bastemur)
* zlib: do not crash on write after close (Fedor Indutny)
2014.06.05, Version 0.10.29 (Stable), ce82d6b8474bde7ac7df6d425fb88fb1bcba35bc
* openssl: to 1.0.1h (CVE-2014-0224)
* npm: upgrade to 1.4.14
* utf8: Prevent Node from sending invalid UTF-8 (Felix Geisendörfer)
- *NOTE* this introduces a breaking change, previously you could construct
invalid UTF-8 and invoke an error in a client that was expecting valid
UTF-8, now unmatched surrogate pairs are replaced with the unknown UTF-8
character. To restore the old functionality simply have NODE_INVALID_UTF8
environment variable set.
* child_process: do not set args before throwing (Greg Sabia Tucker)
* child_process: spawn() does not throw TypeError (Greg Sabia Tucker)
* constants: export O_NONBLOCK (Fedor Indutny)
* crypto: improve memory usage (Alexis Campailla)
* fs: close file if fstat() fails in readFile() (cjihrig)
* lib: name EventEmitter prototype methods (Ben Noordhuis)
* tls: fix performance issue (Alexis Campailla)
2014.05.01, Version 0.10.28 (Stable), b148cbe09d4657766fdb61575ba985734c2ff0a8
* npm: upgrade to v1.4.9
2014.05.01, Version 0.10.27 (Stable), cb7911f78ae96ef7a540df992cc1359ba9636e86
* npm: upgrade to v1.4.8
* openssl: upgrade to 1.0.1g
* uv: update to v0.10.27
* dns: fix certain txt entries (Fedor Indutny)
* assert: Ensure reflexivity of deepEqual (Mike Pennisi)
* child_process: fix deadlock when sending handles (Fedor Indutny)
* child_process: fix sending handle twice (Fedor Indutny)
* crypto: do not lowercase cipher/hash names (Fedor Indutny)
* dtrace: workaround linker bug on FreeBSD (Fedor Indutny)
* http: do not emit EOF non-readable socket (Fedor Indutny)
* http: invoke createConnection when no agent (Nathan Rajlich)
* stream: remove useless check (Brian White)
* timer: don't reschedule timer bucket in a domain (Greg Brail)
* url: treat \ the same as / (isaacs)
* util: format as Error if instanceof Error (Rod Vagg)
2014.02.18, Version 0.10.26 (Stable), cc56c62ed879ad4f93b1fdab3235c43e60f48b7e
* uv: Upgrade to v0.10.25 (Timothy J Fontaine)
* npm: upgrade to 1.4.3 (isaacs)
* v8: support compiling with VS2013 (Fedor Indutny)
* cares: backport TXT parsing fix (Fedor Indutny)
* crypto: throw on SignFinal failure (Fedor Indutny)
* crypto: update root certificates (Ben Noordhuis)
* debugger: Fix breakpoint not showing after restart (Farid Neshat)
* fs: make unwatchFile() insensitive to path (iamdoron)
* net: do not re-emit stream errors (Fedor Indutny)
* net: make Socket destroy() re-entrance safe (Jun Ma)
* net: reset `endEmitted` on reconnect (Fedor Indutny)
* node: do not close stdio implicitly (Fedor Indutny)
* zlib: avoid assertion in close (Fedor Indutny)
2014.01.23, Version 0.10.25 (Stable), b0e5f195dfce3e2b99f5091373d49f6616682596
* uv: Upgrade to v0.10.23
* npm: Upgrade to v1.3.24
* v8: Fix enumeration for objects with lots of properties
* child_process: fix spawn() optional arguments (Sam Roberts)
* cluster: report more errors to workers (Fedor Indutny)
* domains: exit() only affects active domains (Ryan Graham)
* src: OnFatalError handler must abort() (Timothy J Fontaine)
* stream: writes may return false but forget to emit drain (Yang Tianyang)
2013.12.18, Version 0.10.24 (Stable), b7fd6bc899ccb629d790c47aee06aba87e535c41
* uv: Upgrade to v0.10.21

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.8, April 28th, 2013
version 1.2.4, March 14th, 2010
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2010 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,8 +314,9 @@ 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
jloup@gzip.org madler@alumni.caltech.edu
Jean-loup Gailly
Mark Adler
*/
"""
@@ -781,388 +782,3 @@ 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.
"""

122
Makefile
View File

@@ -78,12 +78,10 @@ clean:
distclean:
-rm -rf out
-rm -f config.gypi icu_config.gypi
-rm -f 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
@@ -102,44 +100,32 @@ test/gc/node_modules/weak/build/Release/weakref.node:
--directory="$(shell pwd)/test/gc/node_modules/weak" \
--nodedir="$(shell pwd)"
build-addons:
@if [ ! -f node ]; then make all; fi
rm -rf test/addons/doc-*/
./node tools/doc/addon-verify.js
$(foreach dir, \
$(sort $(dir $(wildcard test/addons/*/*.gyp))), \
./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
--directory="$(shell pwd)/$(dir)" \
--nodedir="$(shell pwd)" && ) echo "build done"
test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
$(PYTHON) tools/test.py --mode=release gc
test-build: all build-addons
test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
test-all: all test/gc/node_modules/weak/build/Release/weakref.node
$(PYTHON) tools/test.py --mode=debug,release
make test-npm
test-all-http1: test-build
test-all-http1: all
$(PYTHON) tools/test.py --mode=debug,release --use-http1
test-all-valgrind: test-build
test-all-valgrind: all
$(PYTHON) tools/test.py --mode=debug,release --valgrind
test-release: test-build
test-release: all
$(PYTHON) tools/test.py --mode=release
test-debug: test-build
test-debug: all
$(PYTHON) tools/test.py --mode=debug
test-message: test-build
test-message: all
$(PYTHON) tools/test.py message
test-simple: all
$(PYTHON) tools/test.py simple
test-pummel: all wrk
test-pummel: all
$(PYTHON) tools/test.py pummel
test-internet: all
@@ -149,49 +135,45 @@ test-debugger: all
$(PYTHON) tools/test.py debugger
test-npm: node
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-all && \
PATH="../../:${PATH}" node cli.js prune --prod && \
cd ../.. && \
rm -rf npm-cache npm-tmp npm-prefix
./node deps/npm/test/run.js
test-npm-publish: node
npm_package_config_publishtest=true ./node deps/npm/test/run.js
test-addons: test-build
$(PYTHON) tools/test.py --mode=release addons
test-timers:
$(MAKE) --directory=tools faketime
$(PYTHON) tools/test.py --mode=release timers
test-timers-clean:
$(MAKE) --directory=tools clean
apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json))
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/download out/doc/logos out/doc/images
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
doc_images = $(addprefix out/,$(wildcard doc/images/* doc/*.jpg doc/*.png))
website_files = \
out/doc/index.html \
out/doc/v0.4_announcement.html \
out/doc/cla.html \
out/doc/sh_main.js \
out/doc/sh_javascript.min.js
out/doc/sh_javascript.min.js \
out/doc/sh_vim-dark.css \
out/doc/sh.css \
out/doc/favicon.ico \
out/doc/pipe.css \
out/doc/about/index.html \
out/doc/community/index.html \
out/doc/download/index.html \
out/doc/logos/index.html \
out/doc/changelog.html \
$(doc_images)
doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node
doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ blog node
doc-branch: NODE_DOC_VERSION = v$(shell $(PYTHON) tools/getnodeversion.py | cut -f1,2 -d.)
doc-branch: doc
blogclean:
rm -rf out/blog
blog: doc/blog out/Release/node tools/blog
out/Release/node tools/blog/generate.js doc/blog/ out/blog/ doc/blog.html doc/rss.xml
$(apidoc_dirs):
mkdir -p $@
@@ -202,14 +184,17 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh node
bash tools/build-changelog.sh
out/doc/%.html: doc/%.html node
cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
out/doc/%: doc/%
cp -r $< $@
out/doc/api/%.json: doc/api/%.markdown node
NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=json $< > $@
out/Release/node tools/doc/generate.js --format=json $< > $@
out/doc/api/%.html: doc/api/%.markdown node
NODE_DOC_VERSION=$(NODE_DOC_VERSION) out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
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' > $@
@@ -218,6 +203,9 @@ email.md: ChangeLog tools/email-footer.md
blog.html: email.md
cat $< | ./node tools/doc/node_modules/.bin/marked > $@
blog-upload: blog
rsync -r out/blog/ node@nodejs.org:~/web/nodejs.org/blog/
website-upload: doc
rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
ssh node@nodejs.org '\
@@ -228,11 +216,6 @@ 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
@@ -241,7 +224,6 @@ docclean:
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)
@@ -267,7 +249,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
@@ -305,12 +287,10 @@ pkg: $(PKG)
$(PKG): release-only
rm -rf $(PKGDIR)
rm -rf out/deps out/Release
$(PYTHON) ./configure --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=ia32 --tag=$(TAG)
$(PYTHON) ./configure --without-snapshot --dest-cpu=ia32 --tag=$(TAG)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)/32
rm -rf out/deps out/Release
$(PYTHON) ./configure --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=x64 --tag=$(TAG)
$(PYTHON) ./configure --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 \
@@ -319,7 +299,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)
@@ -342,8 +322,7 @@ tar: $(TARBALL)
$(BINARYTAR): release-only
rm -rf $(BINARYNAME)
rm -rf out/deps out/Release
$(PYTHON) ./configure --prefix=/ --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(PYTHON) ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
cp README.md $(BINARYNAME)
cp LICENSE $(BINARYNAME)
@@ -356,9 +335,8 @@ binary: $(BINARYTAR)
$(PKGSRC): release-only
rm -rf dist out
$(PYTHON) configure --prefix=/ --without-snapshot --download=all \
--with-intl=small-icu --dest-cpu=$(DESTCPU) --tag=$(TAG) \
$(CONFIG_FLAGS)
$(PYTHON) configure --prefix=/ --without-snapshot \
--dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(MAKE) install DESTDIR=dist
(cd dist; find * -type f | sort) > packlist
pkg_info -X pkg_install | \
@@ -425,17 +403,19 @@ 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
CPPLINT_EXCLUDE += src/tree.h
CPPLINT_EXCLUDE += src/v8abbr.h
CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard src/*.cc src/*.h src/*.c tools/icu/*.h tools/icu/*.cc deps/debugger-agent/include/* deps/debugger-agent/src/*))
CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard src/*.cc src/*.h src/*.c))
cpplint:
@$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)
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 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

162
README.md
View File

@@ -6,28 +6,32 @@ Evented I/O for V8 javascript.
Prerequisites (Unix only):
* GCC 4.2 or newer
* G++ 4.2 or newer
* Python 2.6 or 2.7
* GNU Make 3.81 or newer
* libexecinfo (FreeBSD and OpenBSD only)
Unix/Macintosh:
```sh
./configure
make
make install
```
./configure
make
make install
With libicu i18n support:
svn checkout --force --revision 214189 \
http://src.chromium.org/svn/trunk/deps/third_party/icu46 \
deps/v8/third_party/icu46
./configure --with-icu-path=deps/v8/third_party/icu46/icu.gyp
make
make install
If your python binary is in a non-standard location or has a
non-standard name, run the following instead:
```sh
export PYTHON=/path/to/python
$PYTHON ./configure
make
make install
```
export PYTHON=/path/to/python
$PYTHON ./configure
make
make install
Prerequisites (Windows only):
@@ -36,154 +40,38 @@ Prerequisites (Windows only):
Windows:
```sh
vcbuild nosign
```
vcbuild nosign
You can download pre-built binaries for various operating systems from
[http://nodejs.org/download/](http://nodejs.org/download/). The Windows
and OS X installers will prompt you for the location in which to install.
and OS X installers will prompt you for the location to install to.
The tarballs are self-contained; you can extract them to a local directory
with:
```sh
tar xzf /path/to/node-<version>-<platform>-<arch>.tar.gz
```
tar xzf /path/to/node-<version>-<platform>-<arch>.tar.gz
Or system-wide with:
```sh
cd /usr/local && tar --strip-components 1 -xzf \
/path/to/node-<version>-<platform>-<arch>.tar.gz
```
cd /usr/local && tar --strip-components 1 -xzf \
/path/to/node-<version>-<platform>-<arch>.tar.gz
### To run the tests:
Unix/Macintosh:
```sh
make test
```
make test
Windows:
```sh
vcbuild test
```
vcbuild test
### To build the documentation:
```sh
make doc
```
make doc
### To read the documentation:
```sh
man doc/node.1
```
### `Intl` (ECMA-402) support:
[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 with a specific ICU:
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: from an already-unpacked ICU
```sh
./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu
```
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
```
man doc/node.1
Resources for Newcomers
---

View File

@@ -1,115 +0,0 @@
# Node.js core benchmark tests
This folder contains benchmark tests to measure the performance for certain
Node.js APIs.
## How to run tests
There are two ways to run benchmark tests:
1. Run all tests of a given type, for example, buffers
```sh
node benchmark/common.js buffers
```
The above command will find all scripts under `buffers` directory and require
each of them as a module. When a test script is required, it creates an instance
of `Benchmark` (a class defined in common.js). In the next tick, the `Benchmark`
constructor iterates through the configuration object property values and run
the test function with each of the combined arguments in spawned processes. For
example, buffers/buffer-read.js has the following configuration:
```js
var bench = common.createBenchmark(main, {
noAssert: [false, true],
buffer: ['fast', 'slow'],
type: ['UInt8', 'UInt16LE', 'UInt16BE',
'UInt32LE', 'UInt32BE',
'Int8', 'Int16LE', 'Int16BE',
'Int32LE', 'Int32BE',
'FloatLE', 'FloatBE',
'DoubleLE', 'DoubleBE'],
millions: [1]
});
```
The runner takes one item from each of the property array value to build a list
of arguments to run the main function. The main function will receive the conf
object as follows:
- first run:
```js
{ noAssert: false,
buffer: 'fast',
type: 'UInt8',
millions: 1
}
```
- second run:
```js
{
noAssert: false,
buffer: 'fast',
type: 'UInt16LE',
millions: 1
}
```
...
In this case, the main function will run 2*2*14*1 = 56 times. The console output
looks like the following:
```
buffers//buffer-read.js
buffers/buffer-read.js noAssert=false buffer=fast type=UInt8 millions=1: 271.83
buffers/buffer-read.js noAssert=false buffer=fast type=UInt16LE millions=1: 239.43
buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244.57
...
```
2. Run an individual test, for example, buffer-slice.js
```sh
node benchmark/buffers/buffer-read.js
```
The output:
```
buffers/buffer-read.js noAssert=false buffer=fast type=UInt8 millions=1: 246.79
buffers/buffer-read.js noAssert=false buffer=fast type=UInt16LE millions=1: 240.11
buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 245.91
...
```
## How to write a benchmark test
The benchmark tests are grouped by types. Each type corresponds to a subdirectory,
such as `arrays`, `buffers`, or `fs`.
Let's add a benchmark test for Buffer.slice function. We first create a file
buffers/buffer-slice.js.
### The code snippet
```js
var common = require('../common.js'); // Load the test runner
var SlowBuffer = require('buffer').SlowBuffer;
// Create a benchmark test for function `main` and the configuration variants
var bench = common.createBenchmark(main, {
type: ['fast', 'slow'], // Two types of buffer
n: [512] // Number of times (each unit is 1024) to call the slice API
});
function main(conf) {
// Read the parameters from the configuration
var n = +conf.n;
var b = conf.type === 'fast' ? buf : slowBuf;
bench.start(); // Start benchmarking
for (var i = 0; i < n * 1024; i++) {
// Add your test here
b.slice(10, 256);
}
bench.end(n); // End benchmarking
}
```

View File

@@ -28,8 +28,9 @@ function main(conf) {
var b = Buffer(N);
var s = '';
for (var i = 0; i < 256; ++i) s += String.fromCharCode(i);
for (var i = 0; i < N; i += 256) b.write(s, i, 256, 'ascii');
bench.start();
for (var i = 0; i < N; i += 256) b.write(s, i, 256, 'ascii');
for (var i = 0; i < 32; ++i) b.toString('base64');
bench.end(64);
}

View File

@@ -1,42 +0,0 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// 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. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common.js');
var bench = common.createBenchmark(main, {
size: [16, 512, 1024, 4096, 16386],
millions: [1]
});
function main(conf) {
var iter = (conf.millions >>> 0) * 1e6;
var size = (conf.size >>> 0);
var b0 = new Buffer(size).fill('a');
var b1 = new Buffer(size).fill('a');
b1[size - 1] = 'b'.charCodeAt(0);
bench.start();
for (var i = 0; i < iter; i++) {
Buffer.compare(b0, b1);
}
bench.end(iter / 1e6);
}

View File

@@ -20,12 +20,9 @@ function main(conf) {
var fn = 'read' + conf.type;
buff.writeDoubleLE(0, 0, noAssert);
var testFunction = new Function('buff', [
"for (var i = 0; i !== " + len + "; i++) {",
" buff." + fn + "(0, " + JSON.stringify(noAssert) + ");",
"}"
].join("\n"));
bench.start();
testFunction(buff);
for (var i = 0; i < len; i++) {
buff[fn](0, noAssert);
}
bench.end(len / 1e6);
}

View File

@@ -1,20 +0,0 @@
var common = require('../common.js');
var SlowBuffer = require('buffer').SlowBuffer;
var bench = common.createBenchmark(main, {
type: ['fast', 'slow'],
n: [1024]
});
var buf = new Buffer(1024);
var slowBuf = new SlowBuffer(1024);
function main(conf) {
var n = +conf.n;
var b = conf.type === 'fast' ? buf : slowBuf;
bench.start();
for (var i = 0; i < n * 1024; i++) {
b.slice(10, 256);
}
bench.end(n);
}

View File

@@ -15,9 +15,9 @@ var bench = common.createBenchmark(main, {
const INT8 = 0x7f;
const INT16 = 0x7fff;
const INT32 = 0x7fffffff;
const UINT8 = (INT8 * 2) + 1;
const UINT16 = (INT16 * 2) + 1;
const UINT32 = INT32;
const UINT8 = INT8 * 2;
const UINT16 = INT16 * 2;
const UINT32 = INT32 * 2;
var mod = {
writeInt8: INT8,
@@ -47,23 +47,17 @@ function main(conf) {
function benchInt(buff, fn, len, noAssert) {
var m = mod[fn];
var testFunction = new Function('buff', [
"for (var i = 0; i !== " + len + "; i++) {",
" buff." + fn + "(i & " + m + ", 0, " + JSON.stringify(noAssert) + ");",
"}"
].join("\n"));
bench.start();
testFunction(buff);
for (var i = 0; i < len; i++) {
buff[fn](i % m, 0, noAssert);
}
bench.end(len / 1e6);
}
function benchFloat(buff, fn, len, noAssert) {
var testFunction = new Function('buff', [
"for (var i = 0; i !== " + len + "; i++) {",
" buff." + fn + "(i, 0, " + JSON.stringify(noAssert) + ");",
"}"
].join("\n"));
bench.start();
testFunction(buff);
for (var i = 0; i < len; i++) {
buff[fn](i * 0.1, 0, noAssert);
}
bench.end(len / 1e6);
}

View File

@@ -21,7 +21,7 @@ function main(conf) {
var chunk = new Buffer(conf.size);
chunk.fill('8');
var args = ['-d', '10s', '-t', 8, '-c', conf.c];
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
var server = http.createServer(function(req, res) {
function send(left) {

View File

@@ -26,7 +26,8 @@ function main(conf) {
setTimeout(function() {
var path = '/' + conf.type + '/' + conf.length;
var args = ['-d', '10s', '-t', 8, '-c', conf.c];
var args = ['-r', '-t', 5, '-c', conf.c, '-k'];
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
bench.http(path, args, function() {
w1.destroy();

View File

@@ -45,7 +45,7 @@ function main(conf) {
}
var method = conf.method === 'write' ? write : end;
var args = ['-d', '10s', '-t', 8, '-c', conf.c];
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
var server = http.createServer(function(req, res) {
method(res);

View File

@@ -15,7 +15,7 @@ function main(conf) {
var server = require('../http_simple.js');
setTimeout(function() {
var path = '/' + conf.type + '/' + conf.length + '/' + conf.chunks;
var args = ['-d', '10s', '-t', 8, '-c', conf.c];
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
bench.http(path, args, function() {
server.close();

View File

@@ -1,72 +0,0 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// 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. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var fs = require('fs');
var path = require('path');
var common = require('../common.js');
var packageJson = '{"main": "index.js"}';
var tmpDirectory = path.join(__dirname, '..', 'tmp');
var benchmarkDirectory = path.join(tmpDirectory, 'nodejs-benchmark-module');
var bench = common.createBenchmark(main, {
thousands: [50]
});
function main(conf) {
rmrf(tmpDirectory);
try { fs.mkdirSync(tmpDirectory); } catch (e) {}
try { fs.mkdirSync(benchmarkDirectory); } catch (e) {}
var n = +conf.thousands * 1e3;
for (var i = 0; i <= n; i++) {
fs.mkdirSync(benchmarkDirectory + i);
fs.writeFileSync(benchmarkDirectory + i + '/package.json', '{"main": "index.js"}');
fs.writeFileSync(benchmarkDirectory + i + '/index.js', 'module.exports = "";');
}
measure(n);
}
function measure(n) {
bench.start();
for (var i = 0; i <= n; i++) {
require(benchmarkDirectory + i);
}
bench.end(n / 1e3);
}
function rmrf(location) {
if (fs.existsSync(location)) {
var things = fs.readdirSync(location);
things.forEach(function(thing) {
var cur = path.join(location, thing),
isDirectory = fs.statSync(cur).isDirectory();
if (isDirectory) {
rmrf(cur);
return;
}
fs.unlinkSync(cur);
});
fs.rmdirSync(location);
}
}

View File

@@ -51,7 +51,7 @@ function server() {
if (nread < 0)
fail(nread, 'read');
var writeReq = { async: false };
var writeReq = {};
err = clientHandle.writeBuffer(writeReq, buffer);
if (err)

View File

@@ -68,7 +68,7 @@ function server() {
write();
function write() {
var writeReq = { async: false, oncomplete: afterWrite };
var writeReq = { oncomplete: afterWrite };
var err;
switch (type) {
case 'buf':
@@ -82,13 +82,8 @@ function server() {
break;
}
if (err) {
if (err)
fail(err, 'write');
} else if (!writeReq.async) {
process.nextTick(function() {
afterWrite(null, clientHandle, writeReq);
});
}
}
function afterWrite(err, handle, req) {

View File

@@ -1,20 +1,16 @@
{
'variables': {
'werror': '', # Turn off -Werror in V8 build.
'visibility%': 'hidden', # V8's visibility setting
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
'want_separate_host_toolset%': 0, # V8 should not build target and host
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'visibility%': 'hidden', # V8's visibility setting
'target_arch%': 'ia32', # set v8's target architecture
'host_arch%': 'ia32', # set v8's host architecture
'want_separate_host_toolset': 0, # V8 should not build target and host
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'gcc_version%': 'unknown',
'clang%': 0,
'python%': 'python',
# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
# Enable V8's post-mortem debugging only on unix flavors.
'conditions': [
['OS == "win"', {
@@ -23,14 +19,7 @@
}, {
'os_posix': 1,
'v8_postmortem_support': 'true'
}],
['GENERATOR == "ninja" or OS== "mac"', {
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
}, {
'OBJ_DIR': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a',
}],
}]
],
},
@@ -38,9 +27,6 @@
'default_configuration': 'Release',
'configurations': {
'Debug': {
'variables': {
'v8_enable_handle_zapping%': 1,
},
'defines': [ 'DEBUG', '_DEBUG' ],
'cflags': [ '-g', '-O0' ],
'conditions': [
@@ -65,9 +51,6 @@
},
},
'Release': {
'variables': {
'v8_enable_handle_zapping%': 0,
},
'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
'conditions': [
['target_arch=="x64"', {
@@ -76,6 +59,9 @@
['OS=="solaris"', {
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}, {
# Doesn't work with the Solaris linker.
'ldflags': [ '-Wl,--gc-sections' ],
}],
['clang == 0 and gcc_version >= 40', {
'cflags': [ '-fno-tree-vrp' ], # Work around compiler bug.
@@ -135,21 +121,8 @@
},
'VCLinkerTool': {
'conditions': [
['target_arch=="ia32"', {
'TargetMachine' : 1, # /MACHINE:X86
'target_conditions': [
['_type=="executable"', {
'AdditionalOptions': [ '/SubSystem:Console,"5.01"' ],
}],
],
}],
['target_arch=="x64"', {
'TargetMachine' : 17, # /MACHINE:AMD64
'target_conditions': [
['_type=="executable"', {
'AdditionalOptions': [ '/SubSystem:Console,"5.02"' ],
}],
],
'TargetMachine' : 17 # /MACHINE:X64
}],
],
'GenerateDebugInformation': 'true',
@@ -157,6 +130,11 @@
'DataExecutionPrevention': 2, # enable DEP
'AllowIsolation': 'true',
'SuppressStartupBanner': 'true',
'target_conditions': [
['_type=="executable"', {
'SubSystem': 1, # console executable
}],
],
},
},
'msvs_disabled_warnings': [4351, 4355, 4800],
@@ -249,11 +227,6 @@
}],
['OS=="freebsd" and node_use_dtrace=="true"', {
'libraries': [ '-lelf' ],
}],
['OS=="freebsd"', {
'ldflags': [
'-Wl,--export-dynamic',
],
}]
],
}

379
configure vendored
View File

@@ -6,8 +6,6 @@ import re
import shlex
import subprocess
import sys
import shutil
import string
CC = os.environ.get('CC', 'cc')
@@ -15,10 +13,6 @@ 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()
@@ -60,17 +54,6 @@ parser.add_option('--no-ifaddrs',
dest='no_ifaddrs',
help='use on deprecated SunOS systems that do not support ifaddrs.h')
parser.add_option("--fully-static",
action="store_true",
dest="fully_static",
help="Generate an executable without external dynamic libraries. This "
"will not work on OSX when using default compilation environment")
parser.add_option("--openssl-no-asm",
action="store_true",
dest="openssl_no_asm",
help="Do not build optimized assembly for OpenSSL")
# deprecated
parser.add_option('--openssl-includes',
action='store',
@@ -221,11 +204,6 @@ parser.add_option('--tag',
dest='tag',
help='custom build tag')
parser.add_option('--v8-options',
action='store',
dest='v8_options',
help='v8 options to pass, see `node --v8-options` for examples.')
parser.add_option('--with-arm-float-abi',
action='store',
dest='arm_float_abi',
@@ -242,36 +220,21 @@ 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',
@@ -303,16 +266,6 @@ 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',
@@ -320,8 +273,6 @@ 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."""
@@ -386,13 +337,6 @@ def is_arch_armv7():
'__ARM_ARCH_7M__' in cc_macros_cache)
def is_arch_armv6():
"""Check for ARMv6 instructions"""
cc_macros_cache = cc_macros()
return ('__ARM_ARCH_6__' in cc_macros_cache or
'__ARM_ARCH_6M__' in cc_macros_cache)
def is_arm_neon():
"""Check for ARM NEON support"""
return '__ARM_NEON__' in cc_macros()
@@ -453,8 +397,7 @@ def host_arch_cc():
def host_arch_win():
"""Host architecture check using environ vars (better way to do this?)"""
observed_arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')
arch = os.environ.get('PROCESSOR_ARCHITEW6432', observed_arch)
arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')
matchup = {
'AMD64' : 'x64',
@@ -489,14 +432,7 @@ def configure_arm(o):
arm_float_abi = 'hard'
else:
arm_float_abi = 'default'
if is_arch_armv7():
o['variables']['arm_version'] = '7'
elif is_arch_armv6():
o['variables']['arm_version'] = '6'
else:
o['variables']['arm_version'] = 'default'
o['variables']['armv7'] = int(is_arch_armv7())
o['variables']['arm_fpu'] = 'vfpv3' # V8 3.18 no longer supports VFP2.
o['variables']['arm_neon'] = int(is_arm_neon())
o['variables']['arm_thumb'] = 0 # -marm
@@ -515,11 +451,6 @@ def configure_node(o):
o['variables']['host_arch'] = host_arch
o['variables']['target_arch'] = target_arch
if target_arch != host_arch and not options.without_snapshot:
o['variables']['want_separate_host_toolset'] = 1
else:
o['variables']['want_separate_host_toolset'] = 0
if target_arch == 'arm':
configure_arm(o)
@@ -533,15 +464,13 @@ def configure_node(o):
if not is_clang and cc_version < (4,0,0):
o['variables']['visibility'] = ''
if flavor in ('solaris', 'mac', 'linux', 'freebsd'):
if flavor in ('solaris', 'mac', 'linux'):
use_dtrace = not options.without_dtrace
# Don't enable by default on linux and freebsd
if flavor in ('linux', 'freebsd'):
use_dtrace = options.with_dtrace
# Don't enable by default on linux, it needs the sdt-devel package.
if flavor == 'linux':
if options.systemtap_includes:
o['include_dirs'] += [options.systemtap_includes]
use_dtrace = options.with_dtrace
o['variables']['node_use_dtrace'] = b(use_dtrace)
o['variables']['uv_use_dtrace'] = b(use_dtrace)
o['variables']['uv_parent_path'] = '/deps/uv/'
@@ -582,9 +511,6 @@ def configure_node(o):
else:
o['variables']['node_tag'] = ''
if options.v8_options:
o['variables']['node_v8_options'] = options.v8_options.replace('"', '\\"')
def configure_libz(o):
o['variables']['node_shared_zlib'] = b(options.shared_zlib)
@@ -634,9 +560,6 @@ def configure_libuv(o):
# assume shared libuv if one of these is set?
if options.shared_libuv_libpath:
o['libraries'] += ['-L%s' % options.shared_libuv_libpath]
else:
o['variables']['uv_library'] = 'static_library'
if options.shared_libuv_libname:
o['libraries'] += ['-l%s' % options.shared_libuv_libname]
elif options.shared_libuv:
@@ -667,18 +590,15 @@ def configure_v8(o):
def configure_openssl(o):
o['variables']['node_use_openssl'] = b(not options.without_ssl)
o['variables']['node_shared_openssl'] = b(options.shared_openssl)
o['variables']['openssl_no_asm'] = (
1 if options.openssl_no_asm else 0)
if options.without_ssl:
return
if options.ssl2:
# OpenSSL uses `#ifndef OPENSSL_NO_SSL2` checks so only define the
# macro when we want to _disable_ SSL2.
if not options.with_sslv2:
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', '')
@@ -697,14 +617,6 @@ def configure_openssl(o):
o['cflags'] += cflags.split()
def configure_fullystatic(o):
if options.fully_static:
o['libraries'] += ['-static']
if flavor == 'mac':
print("Generation of static executable will not work on OSX "
"when using default compilation environment")
def configure_winsdk(o):
if flavor != 'win':
return
@@ -720,259 +632,13 @@ def configure_winsdk(o):
print('ctrpp not found in WinSDK path--using pre-gen files '
'from tools/msvs/genfiles.')
def write(filename, data):
filename = os.path.join(root_dir, filename)
print 'creating ', filename
f = open(filename, 'w+')
f.write(data)
do_not_edit = '# Do not edit. Generated by the configure script.\n'
def glob_to_var(dir_base, dir_sub):
list = []
dir_all = os.path.join(dir_base, dir_sub)
files = os.walk(dir_all)
for ent in files:
(path, dirs, files) = ent
for file in files:
if file.endswith('.cpp') or file.endswith('.c') or file.endswith('.h'):
list.append('%s/%s' % (dir_sub, file))
break
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': {}
}
icu_config_name = 'icu_config.gypi'
def write_config(data, name):
return
# write an empty file to start with
write(icu_config_name, do_not_edit +
pprint.pformat(icu_config, indent=2) + '\n')
# 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
def configure_icu(o):
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'
sys.exit(1)
elif have_icu_path:
# Chromium .gyp mode: --with-icu-path
o['variables']['v8_enable_i18n_support'] = 1
# use the .gyp given
o['variables']['v8_enable_i18n_support'] = int(have_icu_path)
if have_icu_path:
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
elif with_intl == 'small-icu':
# 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
elif with_intl == 'system-icu':
# ICU from pkg-config.
o['variables']['v8_enable_i18n_support'] = 1
pkgicu = pkg_config('icu-i18n')
if not pkgicu:
print 'Error: could not load pkg-config data for "icu-i18n".'
print 'See above errors or the README.md.'
sys.exit(1)
(libs, cflags) = pkgicu
o['libraries'] += libs.split()
o['cflags'] += cflags.split()
# use the "system" .gyp
o['variables']['icu_gyp_path'] = 'tools/icu/icu-system.gyp'
return
else:
print 'Error: unknown value --with-intl=%s' % with_intl
sys.exit(1)
# 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
o['variables']['icu_path'] = icu_full_path
if not os.path.isdir(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
sys.exit(1)
icu_ver_major = None
matchVerExp = r'^\s*#define\s+U_ICU_VERSION_SHORT\s+"([^"]*)".*'
match_version = re.compile(matchVerExp)
for line in open(uvernum_h).readlines():
m = match_version.match(line)
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
sys.exit(1)
icu_endianness = sys.byteorder[0]; # TODO(srl295): EBCDIC should be 'e'
o['variables']['icu_ver_major'] = icu_ver_major
o['variables']['icu_endianness'] = icu_endianness
icu_data_file_l = 'icudt%s%s.dat' % (icu_ver_major, 'l')
icu_data_file = 'icudt%s%s.dat' % (icu_ver_major, icu_endianness)
# relative to configure
icu_data_path = os.path.join(icu_full_path,
'source/data/in',
icu_data_file_l)
# relative to dep..
icu_data_in = os.path.join('../../deps/icu/source/data/in', icu_data_file_l)
if not os.path.isfile(icu_data_path) and icu_endianness != 'l':
# use host endianness
icu_data_path = os.path.join(icu_full_path,
'source/data/in',
icu_data_file)
# relative to dep..
icu_data_in = os.path.join('icu/source/data/in',
icu_data_file)
# this is the input '.dat' file to use .. icudt*.dat
# may be little-endian if from a icu-project.org tarball
o['variables']['icu_data_in'] = icu_data_in
# 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.'
# .. and we're not about to build it from .gyp!
sys.exit(1)
# map from variable name to subdirs
icu_src = {
'stubdata': 'stubdata',
'common': 'common',
'i18n': 'i18n',
'io': 'io',
'tools': 'tools/toolutil',
'genccode': 'tools/genccode',
'genrb': 'tools/genrb',
'icupkg': 'tools/icupkg',
}
# this creates a variable icu_src_XXX for each of the subdirs
# with a list of the src files to use
for i in icu_src:
var = 'icu_src_%s' % i
path = '../../deps/icu/source/%s' % icu_src[i]
icu_config['variables'][var] = glob_to_var('tools/icu', path)
# write updated icu_config.gypi with a bunch of paths
write(icu_config_name, do_not_edit +
pprint.pformat(icu_config, indent=2) + '\n')
return # end of configure_intl
# determine the "flavor" (operating system) we're building for,
# leveraging gyp's GetFlavor function
@@ -997,8 +663,7 @@ configure_libuv(output)
configure_v8(output)
configure_openssl(output)
configure_winsdk(output)
configure_intl(output)
configure_fullystatic(output)
configure_icu(output)
# variables should be a root level element,
# move everything else to target_defaults
@@ -1010,7 +675,13 @@ output = {
}
pprint.pprint(output, indent=2)
write('config.gypi', do_not_edit +
def write(filename, data):
filename = os.path.join(root_dir, filename)
print 'creating ', filename
f = open(filename, 'w+')
f.write(data)
write('config.gypi', '# Do not edit. Generated by the configure script.\n' +
pprint.pformat(output, indent=2) + '\n')
config = {
@@ -1041,4 +712,4 @@ else:
gyp_args += args
sys.exit(subprocess.call(gyp_args))
subprocess.call(gyp_args)

View File

@@ -520,8 +520,6 @@ struct ares_txt_reply {
struct ares_txt_reply *next;
unsigned char *txt;
size_t length; /* length excludes null termination */
unsigned char record_start; /* 1 - if start of new record
* 0 - if a chunk in the same record */
};
struct ares_naptr_reply {

View File

@@ -133,6 +133,8 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen,
break;
}
++strptr;
/* Allocate storage for this TXT answer appending it to the list */
txt_curr = ares_malloc_data(ARES_DATATYPE_TXT_REPLY);
if (!txt_curr)
@@ -150,7 +152,6 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen,
}
txt_last = txt_curr;
txt_curr->record_start = strptr == aptr;
txt_curr->length = substr_len;
txt_curr->txt = malloc (substr_len + 1/* Including null byte */);
if (txt_curr->txt == NULL)
@@ -158,8 +159,6 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen,
status = ARES_ENOMEM;
break;
}
++strptr;
memcpy ((char *) txt_curr->txt, strptr, substr_len);
/* Make sure we NULL-terminate */

View File

@@ -1,32 +0,0 @@
{
"targets": [{
"target_name": "debugger-agent",
"type": "<(library)",
"include_dirs": [
"src",
"include",
"../v8/include",
"../uv/include",
# Private node.js folder and stuff needed to include from it
"../../src",
"../cares/include",
],
"direct_dependent_settings": {
"include_dirs": [
"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",
],
}],
}

View File

@@ -1,109 +0,0 @@
// Copyright Fedor Indutny and other Node contributors.
//
// 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, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// 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. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_
#define DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_
#include "uv.h"
#include "v8.h"
#include "v8-debug.h"
namespace node {
// Forward declaration
class Environment;
namespace debugger {
// Forward declaration
class AgentMessage;
class Agent {
public:
explicit Agent(node::Environment* env);
~Agent();
typedef void (*DispatchHandler)(node::Environment* env);
// Start the debugger agent thread
bool Start(int port, bool wait);
// Listen for debug events
void Enable();
// Stop the debugger agent
void Stop();
inline void set_dispatch_handler(DispatchHandler handler) {
dispatch_handler_ = handler;
}
inline node::Environment* parent_env() const { return parent_env_; }
inline node::Environment* child_env() const { return child_env_; }
protected:
void InitAdaptor(Environment* env);
// Worker body
void WorkerRun();
static void ThreadCb(Agent* agent);
static void ParentSignalCb(uv_async_t* signal);
static void ChildSignalCb(uv_async_t* signal);
static void MessageHandler(const v8::Debug::Message& message);
// V8 API
static Agent* Unwrap(const v8::FunctionCallbackInfo<v8::Value>& args);
static void NotifyListen(const v8::FunctionCallbackInfo<v8::Value>& args);
static void NotifyWait(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SendCommand(const v8::FunctionCallbackInfo<v8::Value>& args);
void EnqueueMessage(AgentMessage* message);
enum State {
kNone,
kRunning
};
// TODO(indutny): Verify that there are no races
State state_;
int port_;
bool wait_;
uv_sem_t start_sem_;
uv_mutex_t message_mutex_;
uv_async_t child_signal_;
uv_thread_t thread_;
node::Environment* parent_env_;
node::Environment* child_env_;
uv_loop_t child_loop_;
v8::Persistent<v8::Object> api_;
// QUEUE
void* messages_[2];
DispatchHandler dispatch_handler_;
};
} // namespace debugger
} // namespace node
#endif // DEPS_DEBUGGER_AGENT_INCLUDE_DEBUGGER_AGENT_H_

View File

@@ -1,191 +0,0 @@
var assert = require('assert');
var net = require('net');
var util = require('util');
var Buffer = require('buffer').Buffer;
var Transform = require('stream').Transform;
exports.start = function start() {
var agent = new Agent();
// Do not let `agent.listen()` request listening from cluster master
var cluster = require('cluster');
cluster.isWorker = false;
cluster.isMaster = true;
agent.on('error', function(err) {
process._rawDebug(err.stack || err);
});
agent.listen(process._debugAPI.port, function() {
var addr = this.address();
process._rawDebug('Debugger listening on port %d', addr.port);
process._debugAPI.notifyListen();
});
// Just to spin-off events
// TODO(indutny): Figure out why node.cc isn't doing this
setImmediate(function() {
});
process._debugAPI.onclose = function() {
// We don't care about it, but it prevents loop from cleaning up gently
// NOTE: removeAllListeners won't work, as it doesn't call `removeListener`
process.listeners('SIGWINCH').forEach(function(fn) {
process.removeListener('SIGWINCH', fn);
});
agent.close();
};
// Not used now, but anyway
return agent;
};
function Agent() {
net.Server.call(this, this.onConnection);
this.first = true;
this.binding = process._debugAPI;
var self = this;
this.binding.onmessage = function(msg) {
self.clients.forEach(function(client) {
client.send({}, msg);
});
};
this.clients = [];
assert(this.binding, 'Debugger agent running without bindings!');
}
util.inherits(Agent, net.Server);
Agent.prototype.onConnection = function onConnection(socket) {
var c = new Client(this, socket);
c.start();
this.clients.push(c);
var self = this;
c.once('close', function() {
var index = self.clients.indexOf(c);
assert(index !== -1);
self.clients.splice(index, 1);
});
};
Agent.prototype.notifyWait = function notifyWait() {
if (this.first)
this.binding.notifyWait();
this.first = false;
};
function Client(agent, socket) {
Transform.call(this);
this._readableState.objectMode = true;
this.agent = agent;
this.binding = this.agent.binding;
this.socket = socket;
// Parse incoming data
this.state = 'headers';
this.headers = {};
this.buffer = '';
socket.pipe(this);
this.on('data', this.onCommand);
var self = this;
this.socket.on('close', function() {
self.destroy();
});
}
util.inherits(Client, Transform);
Client.prototype.destroy = function destroy(msg) {
this.socket.destroy();
this.emit('close');
};
Client.prototype._transform = function _transform(data, enc, cb) {
cb();
this.buffer += data;
while (true) {
if (this.state === 'headers') {
// Not enough data
if (!/\r\n/.test(this.buffer))
break;
if (/^\r\n/.test(this.buffer)) {
this.buffer = this.buffer.slice(2);
this.state = 'body';
continue;
}
// Match:
// Header-name: header-value\r\n
var match = this.buffer.match(/^([^:\s\r\n]+)\s*:\s*([^\s\r\n]+)\r\n/);
if (!match)
return this.destroy('Expected header, but failed to parse it');
this.headers[match[1].toLowerCase()] = match[2];
this.buffer = this.buffer.slice(match[0].length);
} else {
var len = this.headers['content-length'];
if (len === undefined)
return this.destroy('Expected content-length');
len = len | 0;
if (Buffer.byteLength(this.buffer) < len)
break;
this.push(new Command(this.headers, this.buffer.slice(0, len)));
this.state = 'headers';
this.buffer = this.buffer.slice(len);
this.headers = {};
}
}
};
Client.prototype.send = function send(headers, data) {
if (!data)
data = '';
var out = [];
Object.keys(headers).forEach(function(key) {
out.push(key + ': ' + headers[key]);
});
out.push('Content-Length: ' + Buffer.byteLength(data), '');
this.socket.cork();
this.socket.write(out.join('\r\n') + '\r\n');
if (data.length > 0)
this.socket.write(data);
this.socket.uncork();
};
Client.prototype.start = function start() {
this.send({
Type: 'connect',
'V8-Version': process.versions.v8,
'Protocol-Version': 1,
'Embedding-Host': 'node ' + process.version
});
};
Client.prototype.onCommand = function onCommand(cmd) {
this.binding.sendCommand(cmd.body);
this.agent.notifyWait();
};
function Command(headers, body) {
this.headers = headers;
this.body = body;
}

View File

@@ -1,347 +0,0 @@
// Copyright Fedor Indutny and other Node contributors.
//
// 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, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// 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. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "agent.h"
#include "debugger-agent.h"
#include "node.h"
#include "node_internals.h" // ARRAY_SIZE
#include "env.h"
#include "env-inl.h"
#include "v8.h"
#include "v8-debug.h"
#include "util.h"
#include "util-inl.h"
#include "queue.h"
#include <string.h>
namespace node {
namespace debugger {
using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
using v8::Handle;
using v8::HandleScope;
using v8::Integer;
using v8::Isolate;
using v8::Local;
using v8::Locker;
using v8::Object;
using v8::String;
using v8::Value;
Agent::Agent(Environment* env) : state_(kNone),
port_(5858),
wait_(false),
parent_env_(env),
child_env_(NULL),
dispatch_handler_(NULL) {
int err;
err = uv_sem_init(&start_sem_, 0);
CHECK_EQ(err, 0);
err = uv_mutex_init(&message_mutex_);
CHECK_EQ(err, 0);
QUEUE_INIT(&messages_);
}
Agent::~Agent() {
Stop();
uv_sem_destroy(&start_sem_);
uv_mutex_destroy(&message_mutex_);
// Clean-up messages
while (!QUEUE_EMPTY(&messages_)) {
QUEUE* q = QUEUE_HEAD(&messages_);
QUEUE_REMOVE(q);
AgentMessage* msg = ContainerOf(&AgentMessage::member, q);
delete msg;
}
}
bool Agent::Start(int port, bool wait) {
int err;
if (state_ == kRunning)
return false;
err = uv_loop_init(&child_loop_);
if (err != 0)
goto loop_init_failed;
// Interruption signal handler
err = uv_async_init(&child_loop_, &child_signal_, ChildSignalCb);
if (err != 0)
goto async_init_failed;
uv_unref(reinterpret_cast<uv_handle_t*>(&child_signal_));
port_ = port;
wait_ = wait;
err = uv_thread_create(&thread_,
reinterpret_cast<uv_thread_cb>(ThreadCb),
this);
if (err != 0)
goto thread_create_failed;
uv_sem_wait(&start_sem_);
state_ = kRunning;
return true;
thread_create_failed:
uv_close(reinterpret_cast<uv_handle_t*>(&child_signal_), NULL);
async_init_failed:
err = uv_loop_close(&child_loop_);
CHECK_EQ(err, 0);
loop_init_failed:
return false;
}
void Agent::Enable() {
v8::Debug::SetMessageHandler(MessageHandler);
// Assign environment to the debugger's context
// NOTE: The debugger context is created after `SetMessageHandler()` call
parent_env()->AssignToContext(v8::Debug::GetDebugContext());
}
void Agent::Stop() {
int err;
if (state_ != kRunning) {
return;
}
v8::Debug::SetMessageHandler(NULL);
// Send empty message to terminate things
EnqueueMessage(new AgentMessage(NULL, 0));
// Signal worker thread to make it stop
err = uv_async_send(&child_signal_);
CHECK_EQ(err, 0);
err = uv_thread_join(&thread_);
CHECK_EQ(err, 0);
uv_close(reinterpret_cast<uv_handle_t*>(&child_signal_), NULL);
uv_run(&child_loop_, UV_RUN_NOWAIT);
err = uv_loop_close(&child_loop_);
CHECK_EQ(err, 0);
state_ = kNone;
}
void Agent::WorkerRun() {
static const char* argv[] = { "node", "--debug-agent" };
Isolate* isolate = Isolate::New();
{
Locker locker(isolate);
Isolate::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
Local<Context> context = Context::New(isolate);
Context::Scope context_scope(context);
Environment* env = CreateEnvironment(
isolate,
&child_loop_,
context,
ARRAY_SIZE(argv),
argv,
ARRAY_SIZE(argv),
argv);
child_env_ = env;
// Expose API
InitAdaptor(env);
LoadEnvironment(env);
CHECK_EQ(&child_loop_, env->event_loop());
uv_run(&child_loop_, UV_RUN_DEFAULT);
// Clean-up peristent
api_.Reset();
// Clean-up all running handles
env->CleanupHandles();
env->Dispose();
env = NULL;
}
isolate->Dispose();
}
void Agent::InitAdaptor(Environment* env) {
Isolate* isolate = env->isolate();
HandleScope scope(isolate);
// Create API adaptor
Local<FunctionTemplate> t = FunctionTemplate::New(isolate);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(String::NewFromUtf8(isolate, "DebugAPI"));
NODE_SET_PROTOTYPE_METHOD(t, "notifyListen", NotifyListen);
NODE_SET_PROTOTYPE_METHOD(t, "notifyWait", NotifyWait);
NODE_SET_PROTOTYPE_METHOD(t, "sendCommand", SendCommand);
Local<Object> api = t->GetFunction()->NewInstance();
api->SetAlignedPointerInInternalField(0, this);
api->Set(String::NewFromUtf8(isolate, "port"), Integer::New(isolate, port_));
env->process_object()->Set(String::NewFromUtf8(isolate, "_debugAPI"), api);
api_.Reset(env->isolate(), api);
}
Agent* Agent::Unwrap(const v8::FunctionCallbackInfo<v8::Value>& args) {
void* ptr = args.Holder()->GetAlignedPointerFromInternalField(0);
return reinterpret_cast<Agent*>(ptr);
}
void Agent::NotifyListen(const FunctionCallbackInfo<Value>& args) {
Agent* a = Unwrap(args);
// Notify other thread that we are ready to process events
uv_sem_post(&a->start_sem_);
}
void Agent::NotifyWait(const FunctionCallbackInfo<Value>& args) {
Agent* a = Unwrap(args);
a->wait_ = false;
int err = uv_async_send(&a->child_signal_);
CHECK_EQ(err, 0);
}
void Agent::SendCommand(const FunctionCallbackInfo<Value>& args) {
Agent* a = Unwrap(args);
Environment* env = a->child_env();
HandleScope scope(env->isolate());
String::Value v(args[0]);
v8::Debug::SendCommand(a->parent_env()->isolate(), *v, v.length());
if (a->dispatch_handler_ != NULL)
a->dispatch_handler_(a->parent_env());
}
void Agent::ThreadCb(Agent* agent) {
agent->WorkerRun();
}
void Agent::ChildSignalCb(uv_async_t* signal) {
Agent* a = ContainerOf(&Agent::child_signal_, signal);
Isolate* isolate = a->child_env()->isolate();
HandleScope scope(isolate);
Local<Object> api = PersistentToLocal(isolate, a->api_);
uv_mutex_lock(&a->message_mutex_);
while (!QUEUE_EMPTY(&a->messages_)) {
QUEUE* q = QUEUE_HEAD(&a->messages_);
AgentMessage* msg = ContainerOf(&AgentMessage::member, q);
// Time to close everything
if (msg->data() == NULL) {
QUEUE_REMOVE(q);
delete msg;
MakeCallback(isolate, api, "onclose", 0, NULL);
break;
}
// Waiting for client, do not send anything just yet
// TODO(indutny): move this to js-land
if (a->wait_)
break;
QUEUE_REMOVE(q);
Local<Value> argv[] = {
String::NewFromTwoByte(isolate,
msg->data(),
String::kNormalString,
msg->length())
};
// Emit message
MakeCallback(isolate,
api,
"onmessage",
ARRAY_SIZE(argv),
argv);
delete msg;
}
uv_mutex_unlock(&a->message_mutex_);
}
void Agent::EnqueueMessage(AgentMessage* message) {
uv_mutex_lock(&message_mutex_);
QUEUE_INSERT_TAIL(&messages_, &message->member);
uv_mutex_unlock(&message_mutex_);
uv_async_send(&child_signal_);
}
void Agent::MessageHandler(const v8::Debug::Message& message) {
Isolate* isolate = message.GetIsolate();
Environment* env = Environment::GetCurrent(isolate);
Agent* a = env->debugger_agent();
CHECK_NE(a, NULL);
CHECK_EQ(isolate, a->parent_env()->isolate());
HandleScope scope(isolate);
Local<String> json = message.GetJSON();
String::Value v(json);
AgentMessage* msg = new AgentMessage(*v, v.length());
a->EnqueueMessage(msg);
}
} // namespace debugger
} // namespace node

View File

@@ -1,64 +0,0 @@
// Copyright Fedor Indutny and other Node contributors.
//
// 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, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// 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. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef DEPS_DEBUGGER_AGENT_SRC_AGENT_H_
#define DEPS_DEBUGGER_AGENT_SRC_AGENT_H_
#include "v8.h"
#include "v8-debug.h"
#include "queue.h"
#include <assert.h>
#include <string.h>
namespace node {
namespace debugger {
class AgentMessage {
public:
AgentMessage(uint16_t* val, int length) : length_(length) {
if (val == NULL) {
data_ = val;
} else {
data_ = new uint16_t[length];
memcpy(data_, val, length * sizeof(*data_));
}
}
~AgentMessage() {
delete[] data_;
data_ = NULL;
}
inline const uint16_t* data() const { return data_; }
inline int length() const { return length_; }
QUEUE member;
private:
uint16_t* data_;
int length_;
};
} // namespace debugger
} // namespace node
#endif // DEPS_DEBUGGER_AGENT_SRC_AGENT_H_

View File

@@ -12,16 +12,3 @@ parsertrace_g
*.Makefile
*.so.*
*.a
# Visual Studio uglies
*.suo
*.sln
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
*.opensdf
*.ncrunchsolution*
*.sdf
*.vsp
*.psess

View File

@@ -45,6 +45,3 @@ Chris Dickinson <christopher.s.dickinson@gmail.com>
Uli Köhler <ukoehler@btronik.de>
Charlie Somerville <charlie@charliesomerville.com>
Fedor Indutny <fedor.indutny@gmail.com>
runner <runner.mei@gmail.com>
Alexis Campailla <alexis@janeasystems.com>
David Wragg <david@wragg.org>

View File

@@ -19,7 +19,7 @@
# IN THE SOFTWARE.
PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
SONAME ?= libhttp_parser.so.2.3
SONAME ?= libhttp_parser.so.2.2
CC?=gcc
AR?=ar

View File

@@ -280,9 +280,6 @@ enum state
, s_header_field_start
, s_header_field
, s_header_value_discard_ws
, s_header_value_discard_ws_almost_done
, s_header_value_discard_lws
, s_header_value_start
, s_header_value
, s_header_value_lws
@@ -1383,7 +1380,7 @@ size_t http_parser_execute (http_parser *parser,
}
if (ch == ':') {
parser->state = s_header_value_discard_ws;
parser->state = s_header_value_start;
CALLBACK_DATA(header_field);
break;
}
@@ -1404,28 +1401,28 @@ size_t http_parser_execute (http_parser *parser,
goto error;
}
case s_header_value_discard_ws:
if (ch == ' ' || ch == '\t') break;
if (ch == CR) {
parser->state = s_header_value_discard_ws_almost_done;
break;
}
if (ch == LF) {
parser->state = s_header_value_discard_lws;
break;
}
/* FALLTHROUGH */
case s_header_value_start:
{
if (ch == ' ' || ch == '\t') break;
MARK(header_value);
parser->state = s_header_value;
parser->index = 0;
if (ch == CR) {
parser->header_state = h_general;
parser->state = s_header_almost_done;
CALLBACK_DATA(header_value);
break;
}
if (ch == LF) {
parser->state = s_header_field_start;
CALLBACK_DATA(header_value);
break;
}
c = LOWER(ch);
switch (parser->header_state) {
@@ -1512,8 +1509,8 @@ size_t http_parser_execute (http_parser *parser,
t *= 10;
t += ch - '0';
/* Overflow? Test against a conservative limit for simplicity. */
if ((ULLONG_MAX - 10) / 10 < parser->content_length) {
/* Overflow? */
if (t < parser->content_length || t == ULLONG_MAX) {
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
goto error;
}
@@ -1573,17 +1570,7 @@ size_t http_parser_execute (http_parser *parser,
STRICT_CHECK(ch != LF);
parser->state = s_header_value_lws;
break;
}
case s_header_value_lws:
{
if (ch == ' ' || ch == '\t') {
parser->state = s_header_value_start;
goto reexecute_byte;
}
/* finished the header */
switch (parser->header_state) {
case h_connection_keep_alive:
parser->flags |= F_CONNECTION_KEEP_ALIVE;
@@ -1598,29 +1585,19 @@ size_t http_parser_execute (http_parser *parser,
break;
}
parser->state = s_header_field_start;
goto reexecute_byte;
}
case s_header_value_discard_ws_almost_done:
{
STRICT_CHECK(ch != LF);
parser->state = s_header_value_discard_lws;
break;
}
case s_header_value_discard_lws:
case s_header_value_lws:
{
if (ch == ' ' || ch == '\t') {
parser->state = s_header_value_discard_ws;
break;
} else {
/* header value was empty */
MARK(header_value);
if (ch == ' ' || ch == '\t')
parser->state = s_header_value_start;
else
{
parser->state = s_header_field_start;
CALLBACK_DATA_NOADVANCE(header_value);
goto reexecute_byte;
}
break;
}
case s_headers_almost_done:
@@ -1805,8 +1782,8 @@ size_t http_parser_execute (http_parser *parser,
t *= 16;
t += unhex_val;
/* Overflow? Test against a conservative limit for simplicity. */
if ((ULLONG_MAX - 16) / 16 < parser->content_length) {
/* Overflow? */
if (t < parser->content_length || t == ULLONG_MAX) {
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
goto error;
}

View File

@@ -26,7 +26,7 @@ extern "C" {
/* Also update SONAME in the Makefile whenever you change these. */
#define HTTP_PARSER_VERSION_MAJOR 2
#define HTTP_PARSER_VERSION_MINOR 3
#define HTTP_PARSER_VERSION_MINOR 2
#define HTTP_PARSER_VERSION_PATCH 0
#include <sys/types.h>

View File

@@ -608,14 +608,8 @@ const struct message requests[] =
" mno \r\n"
"\t \tqrs\r\n"
"Line2: \t line2\t\r\n"
"Line3:\r\n"
" line3\r\n"
"Line4: \r\n"
" \r\n"
"Connection:\r\n"
" close\r\n"
"\r\n"
,.should_keep_alive= FALSE
,.should_keep_alive= TRUE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 1
@@ -624,12 +618,9 @@ const struct message requests[] =
,.fragment= ""
,.request_path= "/"
,.request_url= "/"
,.num_headers= 5
,.headers= { { "Line1", "abc\tdef ghi\t\tjkl mno \t \tqrs" }
,.num_headers= 2
,.headers= { { "Line1", "abcdefghijklmno qrs" }
, { "Line2", "line2\t" }
, { "Line3", "line3" }
, { "Line4", "" }
, { "Connection", "close" },
}
,.body= ""
}
@@ -913,43 +904,6 @@ const struct message requests[] =
,.body= ""
}
#define LINE_FOLDING_IN_HEADER_WITH_LF 34
, {.name= "line folding in header value"
,.type= HTTP_REQUEST
,.raw= "GET / HTTP/1.1\n"
"Line1: abc\n"
"\tdef\n"
" ghi\n"
"\t\tjkl\n"
" mno \n"
"\t \tqrs\n"
"Line2: \t line2\t\n"
"Line3:\n"
" line3\n"
"Line4: \n"
" \n"
"Connection:\n"
" close\n"
"\n"
,.should_keep_alive= FALSE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 1
,.method= HTTP_GET
,.query_string= ""
,.fragment= ""
,.request_path= "/"
,.request_url= "/"
,.num_headers= 5
,.headers= { { "Line1", "abc\tdef ghi\t\tjkl mno \t \tqrs" }
, { "Line2", "line2\t" }
, { "Line3", "line3" }
, { "Line4", "" }
, { "Connection", "close" },
}
,.body= ""
}
, {.name= NULL } /* sentinel */
};
@@ -2984,7 +2938,7 @@ test_header_content_length_overflow_error (void)
"HTTP/1.1 200 OK\r\n" \
"Content-Length: " #size "\r\n" \
"\r\n"
const char a[] = X(1844674407370955160); /* 2^64 / 10 - 1 */
const char a[] = X(18446744073709551614); /* 2^64-2 */
const char b[] = X(18446744073709551615); /* 2^64-1 */
const char c[] = X(18446744073709551616); /* 2^64 */
#undef X
@@ -3002,7 +2956,7 @@ test_chunk_content_length_overflow_error (void)
"\r\n" \
#size "\r\n" \
"..."
const char a[] = X(FFFFFFFFFFFFFFE); /* 2^64 / 16 - 1 */
const char a[] = X(FFFFFFFFFFFFFFFE); /* 2^64-2 */
const char b[] = X(FFFFFFFFFFFFFFFF); /* 2^64-1 */
const char c[] = X(10000000000000000); /* 2^64 */
#undef X

2050
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', '-Wno-missing-field-initializers', '-Wno-sign-compare' ],
'cflags': [ '-fPIC' ],
'sources': [
'mdb_v8.c',
'mdb_v8_cfg.c',

10
deps/mdb_v8/v8dbg.h vendored
View File

@@ -39,10 +39,7 @@
* 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) (V8_FailureTagMask != -1 && \
V8_FailureTagMask != -1 && \
((ptr) & V8_FailureTagMask) == V8_FailureTag)
#define V8_IS_FAILURE(ptr) (((ptr) & V8_FailureTagMask) == V8_FailureTag)
#define V8_IS_HEAPOBJECT(ptr) \
(((ptr) & V8_HeapObjectTagMask) == V8_HeapObjectTag)
@@ -51,8 +48,6 @@
* 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.
@@ -82,7 +77,4 @@
#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 */

42
deps/npm/.mailmap vendored
View File

@@ -1,42 +0,0 @@
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>
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
Charlie Robbins <charlie.robbins@gmail.com>
Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
David Beitey <david@davidjb.com>
Domenic Denicola <domenic@domenicdenicola.com>
Einar Otto Stangvik <einaros@gmail.com>
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>
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>
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>
Ryan Emery <seebees@gmail.com>
Sam Mikes <smikes@cubane.com>
Takaya Kobayashi <jigsaw@live.jp>
Tony <zearin@gonk.net>
Visnu Pitiyanuvath <visnupx@gmail.com>
Will Elwood <w.elwood08@gmail.com>
Zeke Sikelianos <zeke@sikelianos.com>

3
deps/npm/.npmignore vendored
View File

@@ -7,7 +7,6 @@ npm-debug.log
/test/packages/npm-test-depends-on-spark/which-spark.log
/test/packages/test-package/random-data.txt
/test/root
node_modules/marked
node_modules/ronn
node_modules/tap
node_modules/.bin
@@ -25,5 +24,3 @@ html/*.png
/npm-*.tgz
*.pyc
/test/tap/builtin-config

2
deps/npm/.npmrc vendored
View File

@@ -1,2 +0,0 @@
save-prefix = ~
proprietary-attribs = false

7
deps/npm/.tern-project vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"libs": [
],
"plugins": {
"node": {}
}
}

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

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

234
deps/npm/AUTHORS vendored
View File

@@ -4,6 +4,8 @@ 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>
@@ -14,6 +16,7 @@ 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>
@@ -22,41 +25,35 @@ 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>
Tony <zearin@gonk.net>
Zearin <zearin@gonk.net>
Iain Sproat <iainsproat@gmail.com>
Trent Mick <trentm@gmail.com>
Felix Geisendörfer <felix@debuggable.com>
Jameson Little <t.jameson.little@gmail.com>
Conny Brunnkvist <conny@fuchsia.se>
Conny Brunnkvist <cbrunnkvist@gmail.com>
Will Elwood <w.elwood08@gmail.com>
Dean Landolt <dean@deanlandolt.com>
Oleg Efimov <efimovov@gmail.com>
Martin Cooper <mfncooper@gmail.com>
Jann Horn <jannhorn@googlemail.com>
Andrew Bradley <cspotcode@gmail.com>
Maciej Małecki <me@mmalecki.com>
Jameson Little <t.jameson.little@gmail.com>
cspotcode <cspotcode@gmail.com>
Maciej Małecki <maciej.malecki@notimplemented.org>
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>
Dave Pacheco <dap@joyent.com>
atomizer <danila.gerasimov@gmail.com>
Rod Vagg <rod@vagg.org>
Christian Howe <coderarity@gmail.com>
@@ -66,216 +63,55 @@ 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 <root@ip-10-195-202-5.ec2.internal>
Dalmais Maxence <github@maxired.fr>
Marcus Ekwall <marcus.ekwall@gmail.com>
Aaron Stacy <aaron.r.stacy@gmail.com>
Phillip Howell <phowell@cothm.org>
Domenic Denicola <domenic@domenicdenicola.com>
James Halliday <mail@substack.net>
Jeremy Cantrell <jmcantrell@gmail.com>
Trent Mick <trent.mick@joyent.com>
Ribettes <patlogan29@gmail.com>
Don Park <donpark@docuverse.com>
Einar Otto Stangvik <einaros@gmail.com>
Don Park <donpark@docuverse.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@mscdex.net>
Brian White <mscdex@gmail.com>
Jed Schmidt <tr@nslator.jp>
Ian Livingstone <ianl@cs.dal.ca>
Patrick Pfeiffer <patrick@buzzle.at>
Paul Miller <paul@paulmillr.com>
Ryan Emery <seebees@gmail.com>
seebees <seebees@gmail.com>
Carl Lange <carl@flax.ie>
Jan Lehnardt <jan@apache.org>
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>
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>
Matt Lunn <matt@mattlunn.me.uk>
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>
Vaz Allen <vaz@tryptid.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>
Luke Arduini <luke.arduini@me.com>
Nicholas Kinsey <pyro@feisty.io>
Paulo Cesar <pauloc062@gmail.com>
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>
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>
Younghoon Park <sola92@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>
timoweiss <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>
wmertens <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>

3060
deps/npm/CHANGELOG.md vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +0,0 @@
## Before you submit a new issue
* Check if there's a simple solution in the
[Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting)
wiki.
* [Search for similar
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).

48
deps/npm/LICENSE vendored
View File

@@ -1,11 +1,8 @@
Copyright (c) npm, Inc. and Contributors
Copyright (c) Isaac Z. Schlueter
All rights reserved.
npm is released under the Artistic License 2.0, subject to additional terms
that are listed below.
The text of the npm License follows and the text of the additional terms
follows the Artistic License 2.0 terms:
npm is released under the Artistic License 2.0.
The text of the License follows:
--------
@@ -217,39 +214,14 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------
The following additional terms shall apply to use of the npm software, the npm
website, the npm repository and any other services or products offered by npm,
Inc.:
"Node.js" and "node" trademark Joyent, Inc. npm is not officially
part of the Node.js project, and is neither owned by nor
officially affiliated with Joyent, Inc.
"Node.js" trademark Joyent, Inc. npm is not officially part of the Node.js
project, and is neither owned by nor affiliated with Joyent, Inc.
"npm" and "The npm Registry" are owned by npm, Inc. All rights reserved.
Modules published on the npm registry are not officially endorsed by 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 assertion expressed or implied
as to the quality, fitness for a specific purpose, or lack of malice in any
given npm package. Packages downloaded through the npm registry are
independently licensed and are not covered by this license.
Additional policies relating to, and restrictions on use of, npm products and
services are available on the npm website. All such policies and restrictions,
as updated from time to time, are hereby incorporated into this license
agreement. By using npm, you acknowledge your agreement to all such policies
and restrictions.
If you have a complaint about a package in the public npm registry, and cannot
resolve it with the package owner, please email support@npmjs.com and explain
the situation. See the [npm Dispute Resolution
policy](https://github.com/npm/policies/blob/master/disputes.md) for more
details.
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.
Packages published in the npm registry (other than the Software and
its included dependencies) are not part of npm itself, are the sole
property of their respective maintainers, and are not covered by
this license.
"npm Logo" created by Mathias Pettersson and Brian Hammond,
used with permission.

178
deps/npm/Makefile vendored
View File

@@ -1,13 +1,11 @@
# vim: set softtabstop=2 shiftwidth=2:
SHELL = bash
PUBLISHTAG = $(shell node scripts/publish-tag.js)
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md
html_docdeps = html/dochead.html \
html/docfoot.html \
html/docfoot-script.html \
scripts/doc-build.sh \
package.json
@@ -31,28 +29,6 @@ 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' ) \
@@ -75,8 +51,6 @@ 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
@@ -85,10 +59,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 ${NPMOPTS}
node cli.js install -g -f npm
install: all
node cli.js install -g -f ${NPMOPTS}
install: docclean all
node cli.js install -g -f
# backwards compat
dev: install
@@ -96,31 +70,27 @@ dev: install
link: uninstall
node cli.js link -f
clean: markedclean marked-manclean doc-clean uninstall
clean: ronnclean doc-clean uninstall
rm -rf npmrc
node cli.js cache clean
uninstall:
node cli.js rm npm -g -f
doc: $(mandocs) $(htmldocs) $(partdocs)
doc: $(mandocs) $(htmldocs)
markedclean:
rm -rf node_modules/marked node_modules/.bin/marked .building_marked
marked-manclean:
rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man
ronnclean:
rm -rf node_modules/ronn node_modules/.bin/ronn .building_ronn
docclean: doc-clean
doc-clean:
rm -rf \
.building_marked \
.building_marked-man \
.building_ronn \
html/doc \
html/api \
man
# use `npm install marked-man` for this to work.
# use `npm install ronn` for this to work.
man/man1/npm-README.1: README.md scripts/doc-build.sh package.json
@[ -d man/man1 ] || mkdir -p man/man1
scripts/doc-build.sh $< $@
@@ -143,82 +113,48 @@ 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 $< $@
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
html/doc/README.html: README.md $(html_docdeps)
@[ -d html/doc ] || mkdir -p html/doc
scripts/doc-build.sh $< $@
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
html/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
@[ -d html/doc/cli ] || mkdir -p html/doc/cli
scripts/doc-build.sh $< $@
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/%.html: html/partial/doc/files/%.html
@[ -d html/doc/files ] || mkdir -p html/doc/files
scripts/doc-build.sh $< $@
html/doc/api/%.html: html/partial/doc/api/%.html
html/doc/api/%.html: doc/api/%.md $(html_docdeps)
@[ -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
html/doc/files/npm-json.html: html/doc/files/package.json.html
cp $< $@
html/partial/doc/files/npm-global.html: html/partial/doc/files/npm-folders.html
html/doc/files/npm-global.html: html/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
html/doc/files/%.html: doc/files/%.md $(html_docdeps)
@[ -d html/doc/files ] || mkdir -p html/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
html/doc/misc/%.html: doc/misc/%.md $(html_docdeps)
@[ -d html/doc/misc ] || mkdir -p html/doc/misc
scripts/doc-build.sh $< $@
ronn: node_modules/.bin/ronn
marked: node_modules/.bin/marked
node_modules/.bin/marked:
node cli.js install marked --no-global
marked-man: node_modules/.bin/marked-man
node_modules/.bin/marked-man:
node cli.js install marked-man --no-global
node_modules/.bin/ronn:
node cli.js install ronn --no-global
doc: man
@@ -227,20 +163,52 @@ man: $(cli_docs) $(api_docs)
test: doc
node cli.js test
tag:
npm tag npm@$(PUBLISHTAG) latest
authors:
@bash scripts/update-authors.sh &&\
git add AUTHORS &&\
git commit -m "update AUTHORS" || true
publish: authors link doc
publish: link doc
@git push origin :v$(shell npm -v) 2>&1 || true
@npm unpublish npm@$(shell npm -v) 2>&1 || true
git clean -fd &&\
git push origin $(BRANCH) &&\
git push origin &&\
git push origin --tags &&\
npm publish --tag=$(PUBLISHTAG)
npm publish &&\
npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\
make doc-publish &&\
make zip-publish
docpublish: doc-publish
doc-publish: doc
# legacy urls
for f in $$(find html/doc/{cli,files,misc}/ -name '*.html'); do \
j=$$(basename $$f | sed 's|^npm-||g'); \
if ! [ -f html/doc/$$j ] && [ $$j != README.html ] && [ $$j != index.html ]; then \
perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/doc/$$j; \
fi; \
done
mkdir -p html/api
for f in $$(find html/doc/api/ -name '*.html'); do \
j=$$(basename $$f | sed 's|^npm-||g'); \
perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/api/$$j; \
done
rsync -vazu --stats --no-implied-dirs --delete \
html/doc/* \
node@npmjs.org:/home/node/npm-www/doc
rsync -vazu --stats --no-implied-dirs --delete \
html/static/webfonts/ \
node@npmjs.org:/home/node/npm-www/static/webfonts
rsync -vazu --stats --no-implied-dirs --delete \
html/static/style.css \
node@npmjs.org:/home/node/npm-www/static/
#cleanup
rm -rf html/api
for f in html/doc/*.html; do \
case $$f in \
html/doc/README.html) continue ;; \
html/doc/index.html) continue ;; \
*) rm $$f ;; \
esac; \
done
zip-publish: release
scp release/* node@nodejs.org:dist/npm/
release:
@bash scripts/release.sh
@@ -248,4 +216,4 @@ release:
sandwich:
@[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13)
.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release authors
.PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish release zip-publish

115
deps/npm/README.md vendored
View File

@@ -1,6 +1,6 @@
npm(1) -- a JavaScript package manager
npm(1) -- node package manager
==============================
[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm)
## SYNOPSIS
This is just enough info to get you up and running.
@@ -16,15 +16,15 @@ and prior, clone the git repo and dig through the old tags and branches.
## Super Easy Install
npm comes with [node](http://nodejs.org/download/) now.
npm comes with node now.
### Windows Computers
[Get the MSI](http://nodejs.org/download/). npm is in it.
Get the MSI. npm is in it.
### Apple Macintosh Computers
[Get the pkg](http://nodejs.org/download/). npm is in it.
Get the pkg. npm is in it.
### Other Sorts of Unices
@@ -36,11 +36,7 @@ paths, etc.) then read on.
## Fancy Install (Unix)
There's a pretty robust install script at
<https://www.npmjs.com/install.sh>. You can download that and run it.
Here's an example using curl:
curl -L https://www.npmjs.com/install.sh | sh
<https://npmjs.org/install.sh>. You can download that and run it.
### Slightly Fancier
@@ -62,15 +58,10 @@ 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.)
## Windows Install or Upgrade
## Fancy Windows Install
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>
You can download a zip file from <https://npmjs.org/dist/>, and unpack it
in the same folder where node.exe lives.
If that's not fancy enough for you, then you can fetch the code with
git, and mess with it directly.
@@ -79,6 +70,31 @@ 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.
@@ -134,7 +150,7 @@ use npm itself to do.
if (er) return commandFailed(er)
// command succeeded, and data might have some info
})
npm.registry.log.on("log", function (message) { .... })
npm.on("log", function (message) { .... })
})
The `load` function takes an object hash of the command-line configs.
@@ -153,61 +169,60 @@ help config` to learn about all the options you can set there.
## More Docs
Check out the [docs](https://docs.npmjs.com/),
especially the [faq](https://docs.npmjs.com/misc/faq).
Check out the [docs](https://npmjs.org/doc/),
especially the [faq](https://npmjs.org/doc/faq.html).
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://docs.npmjs.com/misc/developers)
you should [read this](https://npmjs.org/doc/developers.html)
## Legal Stuff
"npm" and "The npm Registry" are owned by npm, Inc.
"npm" and "the npm registry" are owned by Isaac Z. Schlueter.
All rights reserved. See the included LICENSE file for more details.
"Node.js" and "node" are trademarks owned by Joyent, Inc.
"Node.js" and "node" are trademarks owned by Joyent, Inc. npm is not
officially part of the Node.js project, and is neither owned by nor
officially affiliated with Joyent, Inc.
Modules published on the npm registry are not officially endorsed by
npm, Inc. or the Node.js project.
The packages in the npm registry are not part of npm itself, and are the
sole property of their respective maintainers. While every effort is
made to ensure accountability, there is absolutely no guarantee,
warrantee, or assertion made as to the quality, fitness for a specific
purpose, or lack of malice in any given npm package. Modules
published on the npm registry are not affiliated with or endorsed by
Joyent, Inc., Isaac Z. Schlueter, Ryan Dahl, 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, 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 npm registry, and cannot
resolve it with the package owner, please express your concerns to
Isaac Z. Schlueter at <i@izs.me>.
If you have a complaint about a package in the public npm registry,
and cannot [resolve it with the package
owner](https://docs.npmjs.com/misc/disputes), please email
<support@npmjs.com> and explain the situation.
### In plain english
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.
### In plainer english
npm is the property of npm, Inc.
This is mine; not my employer's, not Node's, not Joyent's, not Ryan
Dahl's.
If you publish something, it's yours, and you are solely accountable
for it.
for it. Not me, not Node, not Joyent, not Ryan Dahl.
If other people publish something, it's theirs.
If other people publish something, it's theirs. Not mine, not Node's,
not Joyent's, not Ryan Dahl's.
Users can publish Bad Stuff. It will be removed promptly if reported.
But there is no vetting process for published modules, and you use
them at your own risk. Please inspect the source.
Yes, you can publish something evil. It will be removed promptly if
reported, and we'll lose respect for you. But there is no vetting
process for published modules.
If you publish Bad Stuff, we may delete it from the registry, or even
ban your account in extreme cases. So don't do that.
If this concerns you, inspect the source before using packages.
## BUGS
When you find issues, please report them:
* web:
<https://github.com/npm/npm/issues>
<https://github.com/isaacs/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,6 +1,2 @@
#!/usr/bin/env sh
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
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"

View File

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

1
deps/npm/bin/npm vendored
View File

@@ -1,5 +1,4 @@
#!/bin/sh
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
basedir=`dirname "$0"`

View File

@@ -19,9 +19,10 @@ var log = require("npmlog")
log.pause() // will be unpaused when config is loaded.
log.info("it worked if it ends with", "ok")
var path = require("path")
var fs = require("graceful-fs")
, path = require("path")
, npm = require("../lib/npm.js")
, npmconf = require("../lib/config/core.js")
, npmconf = require("npmconf")
, errorHandler = require("../lib/utils/error-handler.js")
, configDefs = npmconf.defs
@@ -57,6 +58,16 @@ if (conf.versions) {
log.info("using", "npm@%s", npm.version)
log.info("using", "node@%s", process.version)
// make sure that this version of node works with this version of npm.
var semver = require("semver")
, nodeVer = process.version
, reqVer = npm.nodeVersionRequired
if (reqVer && !semver.satisfies(nodeVer, reqVer)) {
return errorHandler(new Error(
"npm doesn't work with node " + nodeVer
+ "\nRequired: node@" + reqVer), true)
}
process.on("uncaughtException", errorHandler)
if (conf.usage && npm.command !== "help") {

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` property.
to the `npm.bin` member.

View File

@@ -1,30 +0,0 @@
npm-cache(3) -- manage the npm cache programmatically
=====================================================
## SYNOPSIS
npm.commands.cache([args], callback)
// helpers
npm.commands.cache.clean([args], callback)
npm.commands.cache.add([args], callback)
npm.commands.cache.read(name, version, forceBypass, callback)
## DESCRIPTION
This acts much the same ways as the npm-cache(1) command line
functionality.
The callback is called with the package.json data of the thing that is
eventually added to or read from the cache.
The top level `npm.commands.cache(...)` functionality is a public
interface, and like all commands on the `npm.commands` object, it will
match the command line behavior exactly.
However, the cache folder structure and the cache helper functions are
considered **internal** API surface, and as such, may change in future
releases of npm, potentially without warning or significant version
incrementation.
Use at your own risk.

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 necessary not used, but it may in the future.
The silent parameter is not neccessary not used, but it may in the future.

View File

@@ -3,8 +3,8 @@ npm-link(3) -- Symlink a package folder
## SYNOPSIS
npm.commands.link(callback)
npm.commands.link(packages, callback)
npm.command.link(callback)
npm.command.link(packages, callback)
## DESCRIPTION

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 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 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 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 has the same dependency as a parent module, then the
This means that if a submodule a same dependency as a parent module, then the
dependency will only be output once.

View File

@@ -1,5 +1,5 @@
npm-restart(3) -- Restart a package
===================================
npm-restart(3) -- Start a package
=================================
## SYNOPSIS
@@ -7,33 +7,14 @@ npm-restart(3) -- Restart a package
## DESCRIPTION
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
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.
If no version is specified, then it restarts the "active" version.
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
npm can run tests on multiple packages. Just specify multiple packages
in the `packages` parameter.
## 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 start multiple packages. Just specify multiple packages in the
`packages` parameter.
npm can run tests on multiple packages. Just specify multiple packages
in the `packages` parameter.

28
deps/npm/doc/api/npm-submodule.md vendored Normal file
View File

@@ -0,0 +1,28 @@
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 from the config will be
parameter is missing or falsey (empty), the default froom 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,17 +2,10 @@ 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.
## SEE ALSO
* npm-update(1)
The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.

View File

@@ -1,10 +1,10 @@
npm(3) -- javascript package manager
====================================
npm(3) -- node package manager
==============================
## SYNOPSIS
var npm = require("npm")
npm.load([configObject, ]function (er, npm) {
npm.load([configObject], function (er, npm) {
// use the npm object, now that it's loaded.
npm.config.set(key, val)
@@ -25,12 +25,13 @@ 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 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.
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.
After that, each of the functions are accessible in the
commands object: `npm.commands.<cmd>`. See `npm-index(7)` for a list of
@@ -87,9 +88,9 @@ command.
## MAGIC
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.
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.
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

View File

@@ -1,63 +0,0 @@
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,26 +3,22 @@ npm-adduser(1) -- Add a registry user account
## SYNOPSIS
npm adduser [--registry=url] [--scope=@orgname] [--always-auth]
npm adduser
## DESCRIPTION
Create or verify a user named `<username>` in the specified registry, and
save the credentials to the `.npmrc` file. If no registry is specified,
the default registry will be used (see `npm-config(7)`).
Create or verify a user named `<username>` in the npm registry, and
save the credentials to the `.npmrc` file.
The username, password, and email are read in from prompts.
To reset your password, go to <https://www.npmjs.com/forgot>
You may use this command to change your email address, but not username
or password.
To change your email address, go to <https://www.npmjs.com/email-edit>
To reset your password, go to <https://npmjs.org/forgot>
You may use this command multiple times with the same user account to
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.
authorize on a new machine.
## CONFIGURATION
@@ -30,36 +26,7 @@ your existing record.
Default: http://registry.npmjs.org/
The base URL of the npm package registry. If `scope` is also specified,
this registry will only be used for packages with that scope. See `npm-scope(7)`.
### 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.
### 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.
The base URL of the npm package registry.
## SEE ALSO

View File

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

View File

@@ -37,14 +37,16 @@ npm stores cache data in the directory specified in `npm config get cache`.
For each package that is added to the cache, three pieces of information are
stored in `{cache}/{name}/{version}`:
* .../package/package.json:
The package.json file, as npm sees it.
* .../package/:
A folder containing the package contents as they appear in the tarball.
* .../package.json:
The package.json file, as npm sees it, with overlays applied and a _id attribute.
* .../package.tgz:
The tarball for that version.
Additionally, whenever a registry request is made, a `.cache.json` file
is placed at the corresponding URI, to store the ETag and the requested
data. This is stored in `{cache}/{hostname}/{path}/.cache.json`.
data.
Commands that make non-essential registry requests (such as `search` and
`view`, or the completion scripts) generally specify a minimum timeout.

View File

@@ -1,73 +0,0 @@
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

@@ -3,18 +3,17 @@ npm-docs(1) -- Docs for a package in a web browser maybe
## SYNOPSIS
npm docs [<pkgname> [<pkgname> ...]]
npm docs <pkgname>
npm docs (with no args in a package dir)
npm home [<pkgname> [<pkgname> ...]]
npm home <pkgname>
npm home (with no args in a package dir)
## DESCRIPTION
This command tries to guess at the likely location of a package's
documentation URL, and then tries to open it using the `--browser`
config param. You can pass multiple package names at once. If no
package name is provided, it will search for a `package.json` in
the current folder and use the `name` property.
config param. If no package name is provided, it will search for
a `package.json` in the current folder and use the `name` property.
## CONFIGURATION

View File

@@ -3,7 +3,7 @@ npm-explore(1) -- Browse an installed package
## SYNOPSIS
npm explore <name> [ -- <cmd>]
npm explore <name>[@<version>] [ -- <cmd>]
## DESCRIPTION
@@ -32,6 +32,7 @@ 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 [-f|--force|-y|--yes]
npm init
## DESCRIPTION
@@ -18,21 +18,8 @@ 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

@@ -7,10 +7,10 @@ npm-install(1) -- Install a package
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
npm install [@<scope>/]<name>@<tag>
npm install [@<scope>/]<name>@<version>
npm install [@<scope>/]<name>@<version range>
npm install <name> [--save|--save-dev|--save-optional]
npm install <name>@<tag>
npm install <name>@<version>
npm install <name>@<version range>
npm i (with any of the previous argument usage)
## DESCRIPTION
@@ -24,7 +24,7 @@ A `package` is:
* a) a folder containing a program described by a package.json file
* b) a gzipped tarball containing (a)
* c) a url that resolves to (b)
* d) a `<name>@<version>` that is published on the registry (see `npm-registry(7)`) with (c)
* d) a `<name>@<version>` that is published on the registry with (c)
* e) a `<name>@<tag>` that points to (d)
* f) a `<name>` that has a "latest" tag satisfying (e)
* g) a `<git remote url>` that resolves to (b)
@@ -43,10 +43,9 @@ 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 (or when the `NODE_ENV` environment variable
is set to `production`), npm will not install modules listed in
`devDependencies`.
By default, `npm install` will install all modules listed as
dependencies. With the `--production` flag,
npm will not install modules listed in `devDependencies`.
* `npm install <folder>`:
@@ -71,7 +70,7 @@ after packing it up into a tarball (b).
npm install https://github.com/indexzero/forever/tarball/v0.5.6
* `npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]`:
* `npm install <name> [--save|--save-dev|--save-optional]`:
Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
`npm-config(7)`.)
@@ -92,36 +91,18 @@ after packing it up into a tarball (b).
* `--save-optional`: Package will appear in your `optionalDependencies`.
When using any of the above options to save dependencies to your
package.json, there is an additional, optional flag:
* `--save-exact`: Saved dependencies will be configured with an
exact version rather than using npm's default semver range
operator.
`<scope>` is optional. The package will be downloaded from the registry
associated with the specified scope. If no registry is associated with
the given scope the default registry is assumed. See `npm-scope(7)`.
Note: if you do not include the @-symbol on your scope name, npm will
interpret this as a GitHub repository instead, see below. Scopes names
must also be followed by a slash.
Examples:
npm install sax --save
npm install githubname/reponame
npm install @myorg/privatepackage
npm install node-tap --save-dev
npm install dtrace-provider --save-optional
npm install readable-stream --save --save-exact
**Note**: If there is a file or folder named `<name>` in the current
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid.
* `npm install [@<scope>/]<name>@<tag>`:
* `npm install <name>@<tag>`:
Install the version of the package that is referenced by the specified tag.
If the tag does not exist in the registry data for that package, then this
@@ -130,19 +111,17 @@ after packing it up into a tarball (b).
Example:
npm install sax@latest
npm install @myorg/mypackage@latest
* `npm install [@<scope>/]<name>@<version>`:
* `npm install <name>@<version>`:
Install the specified version of the package. This will fail if the
version has not been published to the registry.
Install the specified version of the package. This will fail if the version
has not been published to the registry.
Example:
npm install sax@0.1.1
npm install @myorg/privatepackage@1.5.0
* `npm install [@<scope>/]<name>@<version range>`:
* `npm install <name>@<version range>`:
Install a version of the package matching the specified version range. This
will follow the same rules for resolving dependencies described in `package.json(5)`.
@@ -153,14 +132,13 @@ after packing it up into a tarball (b).
Example:
npm install sax@">=0.1.0 <0.2.0"
npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
* `npm install <git remote url>`:
Install a package by cloning a git remote url. The format of the git
url is:
<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>]
<protocol>://[<user>@]<hostname><separator><path>[#<commit-ish>]
`<protocol>` is one of `git`, `git+ssh`, `git+http`, or
`git+https`. If no `<commit-ish>` is specified, then `master` is
@@ -168,56 +146,9 @@ after packing it up into a tarball (b).
Examples:
git+ssh://git@github.com:npm/npm.git#v1.0.27
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
git+ssh://git@github.com:isaacs/npm.git#v1.0.27
git+https://isaacs@github.com/isaacs/npm.git
git://github.com/isaacs/npm.git#v1.0.27
You may combine multiple arguments, and even multiple types of arguments.
For example:
@@ -315,6 +246,7 @@ affects a real use-case, it will be investigated.
* npm-config(7)
* npmrc(5)
* npm-registry(7)
* npm-folders(5)
* npm-tag(1)
* npm-rm(1)
* npm-shrinkwrap(1)

View File

@@ -4,7 +4,7 @@ npm-link(1) -- Symlink a package folder
## SYNOPSIS
npm link (in package folder)
npm link [@<scope>/]<pkgname>
npm link <pkgname>
npm ln (with any of the previous argument usage)
## DESCRIPTION
@@ -12,8 +12,7 @@ npm-link(1) -- Symlink a package folder
Package linking is a two-step process.
First, `npm link` in a package folder will create a globally-installed
symbolic link from `prefix/package-name` to the current folder (see
`npm-config(7)` for the value of `prefix`).
symbolic link from `prefix/package-name` to the current folder.
Next, in some other location, `npm link package-name` will create a
symlink from the local `node_modules` folder to the global symlink.
@@ -21,14 +20,12 @@ symlink from the local `node_modules` folder to the global symlink.
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 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.
This is handy for installing your own stuff, so that you can work on it and
test it iteratively without having to continually rebuild.
This is
handy for installing your own stuff, so that you can work on it and test it
iteratively without having to continually rebuild.
For example:
@@ -38,8 +35,7 @@ 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/node-redis/. Note that the link should
be to the package name, not the directory name for that package.
~/projects/node-bloggy/node_modules/redis/
You may also shortcut the two steps in one. For example, to do the
above use-case in a shorter way:
@@ -50,16 +46,11 @@ above use-case in a shorter way:
The second line is the equivalent of doing:
(cd ../node-redis; npm link)
npm link node-redis
npm link redis
That is, it first creates a global link, and then links the global
installation target into your project's `node_modules` folder.
If your linked package is scoped (see `npm-scope(7)`) your link command must
include that scope, e.g.
npm link @myorg/privatepackage
## SEE ALSO
* npm-developers(7)

View File

@@ -1,50 +0,0 @@
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

@@ -3,10 +3,10 @@ npm-ls(1) -- List installed packages
## SYNOPSIS
npm list [[@<scope>/]<pkg> ...]
npm ls [[@<scope>/]<pkg> ...]
npm la [[@<scope>/]<pkg> ...]
npm ll [[@<scope>/]<pkg> ...]
npm list [<pkg> ...]
npm ls [<pkg> ...]
npm la [<pkg> ...]
npm ll [<pkg> ...]
## DESCRIPTION
@@ -61,26 +61,6 @@ Show parseable output instead of tree view.
List packages in the global install prefix instead of in the current
project.
### depth
* Type: Int
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

@@ -14,43 +14,6 @@ The resulting field 'wanted' shows the latest version according to the
version specified in the package.json, the field 'latest' the very latest
version of the package.
## CONFIGURATION
### json
* Default: false
* Type: Boolean
Show information in JSON format.
### long
* Default: false
* Type: Boolean
Show extended information.
### parseable
* Default: false
* Type: Boolean
Show parseable output instead of tree view.
### global
* Default: false
* Type: Boolean
Check packages in the global install prefix instead of in the current
project.
### depth
* Type: Int
Max depth for checking dependency tree.
## SEE ALSO
* npm-update(1)

View File

@@ -3,15 +3,11 @@ npm-prefix(1) -- Display prefix
## SYNOPSIS
npm prefix [-g]
npm prefix
## DESCRIPTION
Print the local prefix to standard out. This is the closest parent directory
to contain a package.json file unless `-g` is also specified.
If `-g` is specified, this will be the value of the global prefix. See
`npm-config(7)` for more detail.
Print the prefix to standard out.
## SEE ALSO

View File

@@ -4,18 +4,12 @@ npm-publish(1) -- Publish a package
## SYNOPSIS
npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
npm publish <folder> [--tag <tag>] [--access <public|restricted>]
npm publish <tarball>
npm publish <folder>
## DESCRIPTION
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
(see `package.json(5)`).
Publishes a package to the registry so that it can be installed by name.
* `<folder>`:
A folder containing a package.json file
@@ -24,28 +18,12 @@ specifying a different default registry or using a `npm-scope(7)` in the name
A url or file path to a gzipped tar archive containing a single folder
with a package.json file inside.
* `[--tag <tag>]`
Registers the published package with the given tag, such that `npm install
<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.
Once a package is published with a given name and version, that
specific name and version combination can never be used again, even if
it is removed with npm-unpublish(1).
the registry. Overwrites when the "--force" flag is set.
## SEE ALSO
* npm-registry(7)
* npm-scope(7)
* npm-adduser(1)
* npm-owner(1)
* npm-deprecate(1)

View File

@@ -1,34 +1,17 @@
npm-restart(1) -- Restart a package
===================================
npm-restart(1) -- Start a package
=================================
## SYNOPSIS
npm restart [-- <args>]
npm restart <name>
## DESCRIPTION
This restarts a package.
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 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
If no version is specified, then it restarts the "active" version.
## SEE ALSO
@@ -37,4 +20,3 @@ behavior will be accompanied by an increase in major version number
* npm-test(1)
* npm-start(1)
* npm-stop(1)
* npm-restart(3)

View File

@@ -3,38 +3,14 @@ npm-run-script(1) -- Run arbitrary package scripts
## SYNOPSIS
npm run-script [command] [-- <args>]
npm run [command] [-- <args>]
npm run-script <script> <name>
## DESCRIPTION
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.
This runs an arbitrary command from a package's "scripts" object.
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.
It is used by the test, start, restart, and stop commands, but can be
called directly, as well.
## SEE ALSO

View File

@@ -3,7 +3,7 @@ npm-search(1) -- Search for packages
## SYNOPSIS
npm search [--long] [search terms ...]
npm search [search terms ...]
npm s [search terms ...]
npm se [search terms ...]
@@ -15,18 +15,6 @@ If a term starts with `/`, then it's interpreted as a regular expression.
A trailing `/` will be ignored in this case. (Note that many regular
expression characters must be escaped or quoted in most shells.)
## CONFIGURATION
### long
* Default: false
* Type: Boolean
Display full package descriptions and other long text across multiple
lines. When disabled (default) search results are truncated to fit
neatly on a single line. Modules with extremely long names will
fall on multiple lines.
## SEE ALSO
* npm-registry(7)

View File

@@ -9,10 +9,10 @@ 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
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
@@ -53,13 +53,13 @@ and package C:
}
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
@@ -88,7 +88,7 @@ This generates npm-shrinkwrap.json, which will look something like this:
"version": "0.0.1",
"dependencies": {
"C": {
"version": "0.0.1"
"version": "0.1.0"
}
}
}
@@ -96,12 +96,12 @@ 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`
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
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.0.1, regardless the
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
files.
@@ -109,31 +109,31 @@ 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
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
@@ -142,13 +142,13 @@ 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
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.
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
@@ -163,6 +163,15 @@ shrinkwrap will implicitly be included in A's shrinkwrap.
### Caveats
Shrinkwrap files only lock down package versions, not actual package
contents. While discouraged, a package author can republish an
existing version of a package, causing shrinkwrapped packages using
that version to pick up different code than they were before. If you
want to avoid any risk that a byzantine author replaces a package
you're using with code that breaks your application, you could modify
the shrinkwrap file to use git URL references rather than version
numbers so that npm always fetches all packages from git.
If you wish to lock down the specific bytes included in a package, for
example to have 100% confidence in being able to reproduce a
deployment or build, then you ought to check your dependencies into

View File

@@ -3,7 +3,7 @@ npm-start(1) -- Start a package
## SYNOPSIS
npm start [-- <args>]
npm start <name>
## DESCRIPTION

View File

@@ -3,7 +3,7 @@ npm-stop(1) -- Stop a package
## SYNOPSIS
npm stop [-- <args>]
npm stop <name>
## DESCRIPTION

28
deps/npm/doc/cli/npm-submodule.md vendored Normal file
View File

@@ -0,0 +1,28 @@
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,8 +7,6 @@ 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.
@@ -25,29 +23,6 @@ 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)
@@ -56,5 +31,4 @@ that do not begin with a number or the letter `v`.
* npm-registry(7)
* npm-config(1)
* npm-config(7)
* npm-tag(3)
* npmrc(5)

View File

@@ -3,8 +3,8 @@ npm-test(1) -- Test a package
## SYNOPSIS
npm test [-- <args>]
npm tst [-- <args>]
npm test <name>
npm tst <name>
## DESCRIPTION

View File

@@ -3,39 +3,14 @@ npm-rm(1) -- Remove a package
## SYNOPSIS
npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
npm rm (with any of the previous argument usage)
npm rm <name>
npm uninstall <name>
## DESCRIPTION
This uninstalls a package, completely removing everything npm installed
on its behalf.
Example:
npm uninstall sax
In global mode (ie, with `-g` or `--global` appended to the command),
it uninstalls the current package context as a global package.
`npm uninstall` takes 3 exclusive, optional flags which save or update
the package version in your main package.json:
* `--save`: Package will be removed from your `dependencies`.
* `--save-dev`: Package will be removed from your `devDependencies`.
* `--save-optional`: Package will be removed from your `optionalDependencies`.
Scope is optional and follows the usual rules for `npm-scope(7)`.
Examples:
npm uninstall sax --save
npm uninstall @myorg/privatepackage --save
npm uninstall node-tap --save-dev
npm uninstall dtrace-provider --save-optional
## SEE ALSO
* npm-prune(1)

View File

@@ -3,7 +3,7 @@ npm-unpublish(1) -- Remove a package from the registry
## SYNOPSIS
npm unpublish [@<scope>/]<name>[@<version>]
npm unpublish <name>[@<version>]
## WARNING
@@ -23,12 +23,6 @@ entry and removing the tarball.
If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.
Even if a package version is unpublished, that specific name and
version combination can never be reused. In order to publish the
package again, a new version number must be used.
The scope is optional and follows the usual rules for `npm-scope(7)`.
## SEE ALSO
* npm-deprecate(1)

View File

@@ -8,147 +8,17 @@ npm-update(1) -- Update a package
## DESCRIPTION
This command will update all the packages listed to the latest version
(specified by the `tag` config), respecting semver.
(specified by the `tag` config).
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.
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_.
It will also install missing packages.
If the `-g` flag is specified, this command will update globally installed packages.
If no package name is specified, all packages in the specified location (global or local) will be updated.
## SEE ALSO
* npm-install(1)
* npm-outdated(1)
* npm-shrinkwrap(1)
* npm-registry(7)
* npm-folders(5)
* npm-ls(1)

View File

@@ -3,22 +3,20 @@ npm-version(1) -- Bump a package version
## SYNOPSIS
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
npm version [<newversion> | major | minor | patch]
## DESCRIPTION
Run this in a package directory to bump the version and write the new
data back to `package.json` and, if present, `npm-shrinkwrap.json`.
data back to the package.json file.
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.
The `newversion` argument should be a valid semver string, *or* a valid
second argument to semver.inc (one of "patch", "minor", or
"major"). 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. 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 run in a git repo, it will also create a version commit and tag, and
fail if the repo is not clean.
If supplied with `--message` (shorthand: `-m`) config option, npm will
use it as a commit message when creating a version commit. If the
@@ -40,18 +38,8 @@ in your git config for this to work properly. For example:
Enter passphrase:
## CONFIGURATION
### git-tag-version
* Default: true
* Type: Boolean
Commit and tag the version change.
## SEE ALSO
* npm-init(1)
* package.json(5)
* semver(7)
* config(7)

View File

@@ -3,8 +3,8 @@ npm-view(1) -- View registry info
## SYNOPSIS
npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
npm view <name>[@<version>] [<field>[.<subfield>]...]
npm v <name>[@<version>] [<field>[.<subfield>]...]
## DESCRIPTION
@@ -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 fields by separating them with a period.
You can view child field 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) -- javascript package manager
====================================
npm(1) -- node package manager
==============================
## SYNOPSIS
@@ -31,22 +31,6 @@ Use `npm install blerg` to install the latest version of "blerg". Check out
Use the `npm search` command to show everything that's available.
Use `npm ls` to show everything you've installed.
## DEPENDENCIES
If a package references to another package with a git URL, npm depends
on a preinstalled git.
If one of the packages npm tries to install is a native node module and
requires compiling of C++ Code, npm will use
[node-gyp](https://github.com/TooTallNate/node-gyp) for that task.
For a Unix system, [node-gyp](https://github.com/TooTallNate/node-gyp)
needs Python, make and a buildchain like GCC. On Windows,
Python and Microsoft Visual Studio C++ is needed. Python 3 is
not supported by [node-gyp](https://github.com/TooTallNate/node-gyp).
For more information visit
[the node-gyp repository](https://github.com/TooTallNate/node-gyp) and
the [node-gyp Wiki](https://github.com/TooTallNate/node-gyp/wiki).
## DIRECTORIES
See `npm-folders(5)` to learn about where npm puts stuff.
@@ -130,7 +114,7 @@ easily by doing `npm view npm contributors`.
If you would like to contribute, but don't know what to work on, check
the issues list or ask on the mailing list.
* <http://github.com/npm/npm/issues>
* <http://github.com/isaacs/npm/issues>
* <npm-@googlegroups.com>
## BUGS
@@ -138,7 +122,7 @@ the issues list or ask on the mailing list.
When you find issues, please report them:
* web:
<http://github.com/npm/npm/issues>
<http://github.com/isaacs/npm/issues>
* email:
<npm-@googlegroups.com>

View File

@@ -42,12 +42,6 @@ Global installs on Unix systems go to `{prefix}/lib/node_modules`.
Global installs on Windows go to `{prefix}/node_modules` (that is, no
`lib` folder.)
Scoped packages are installed the same way, except they are grouped together
in a sub-folder of the relevant `node_modules` folder with the name of that
scope prefix by the @ symbol, e.g. `npm install @myorg/package` would place
the package in `{prefix}/node_modules/@myorg/package`. See `scopes(7)` for
more details.
If you wish to `require()` a package, then install it locally.
### Executables

View File

@@ -13,11 +13,10 @@ For a list of available configuration options, see npm-config(7).
## FILES
The four relevant files are:
The three relevant files are:
* per-project config file (/path/to/my/project/.npmrc)
* per-user config file (~/.npmrc)
* global config file ($PREFIX/etc/npmrc)
* global config file ($PREFIX/npmrc)
* npm builtin config file (/path/to/npm/npmrc)
All npm config files are an ini-formatted list of `key = value`
@@ -30,23 +29,6 @@ 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"
### Per-project config file
When working locally in a project, a `.npmrc` file in the root of the
project (ie, a sibling of `node_modules` and `package.json`) will set
config values specific to this project.
Note that this only applies to the root of the project that you're
running npm in. It has no effect when your module is published. For
example, you can't publish a module that forces itself to install
globally, or in a different location.
### Per-user config file
`$HOME/.npmrc` (or the `userconfig` param, if set in the environment

View File

@@ -17,30 +17,18 @@ 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.
The name is what your thing is called. Some tips:
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. <https://www.npmjs.com/>
A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
`npm-scope(7)` for more detail.
already, before you get too attached to it. http://registry.npmjs.org/
## version
@@ -84,7 +72,7 @@ with your package.
It should look like this:
{ "url" : "https://github.com/owner/project/issues"
{ "url" : "http://github.com/owner/project/issues"
, "email" : "project@hostname.com"
}
@@ -98,8 +86,9 @@ 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.
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:
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:
{ "license" : "BSD-3-Clause" }
@@ -107,45 +96,8 @@ 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.
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)" }
It's also a good idea to include a LICENSE file at the top level in
your package.
## people fields: author, contributors
@@ -159,7 +111,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.
@@ -199,12 +151,12 @@ command name to local file name. On install, npm will symlink that file into
installs.
For example, myapp could have this:
For example, npm has this:
{ "bin" : { "myapp" : "./cli.js" } }
{ "bin" : { "npm" : "./cli.js" } }
So, when you install myapp, it'll create a symlink from the `cli.js` script to
`/usr/local/bin/myapp`.
So, when you install npm, it'll create a symlink from the `cli.js` script to
`/usr/local/bin/npm`.
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:
@@ -264,7 +216,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`
object. If you look at [npm's package.json](https://registry.npmjs.org/npm/latest),
hash. If you look at [npm's package.json](http://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.
@@ -276,10 +228,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 added as children of the `bin` path.
If you specify a "bin" directory, then all the files in that folder will
be used as the "bin" hash.
If you have a `bin` path already, then this has no effect.
If you have a "bin" hash already, then this has no effect.
### directories.man
@@ -298,39 +250,28 @@ 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" : "https://github.com/npm/npm.git"
, "url" : "http://github.com/isaacs/npm.git"
}
"repository" :
{ "type" : "svn"
, "url" : "https://v8.googlecode.com/svn/trunk/"
, "url" : "http://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" property is a dictionary containing script commands that are run
The "scripts" member is an object hash of 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.
@@ -338,9 +279,9 @@ See `npm-scripts(7)` to find out more about writing package scripts.
## config
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:
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:
{ "name" : "foo"
, "config" : { "port" : "8080" } }
@@ -354,13 +295,13 @@ configs.
## dependencies
Dependencies are specified in a simple object that maps a package name to a
Dependencies are specified with a simple hash of package name to
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` object.** See `devDependencies`, below.
`dependencies` hash.** See `devDependencies`, below.
See semver(7) for more details about specifying version ranges.
@@ -370,7 +311,6 @@ See semver(7) for more details about specifying version ranges.
* `<version`
* `<=version`
* `~version` "Approximately equivalent to version" See semver(7)
* `^version` "Compatible with version" See semver(7)
* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0
* `http://...` See 'URLs as Dependencies' below
* `*` Matches any version
@@ -379,8 +319,6 @@ See semver(7) for more details about specifying version ranges.
* `range1 || range2` Passes if either range1 or range2 are satisfied.
* `git...` See 'Git URLs as Dependencies' below
* `user/repo` See 'GitHub URLs' below
* `tag` A specific version tagged and published as `tag` See `npm-tag(1)`
* `path/path/path` See Local Paths below
For example, these are all valid:
@@ -395,8 +333,6 @@ For example, these are all valid:
, "elf" : "~1.2.3"
, "two" : "2.x"
, "thr" : "3.3.x"
, "lat" : "latest"
, "dyl" : "file:../dyl"
}
}
@@ -422,44 +358,17 @@ 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". Just as with git URLs, a `commit-ish` suffix can be
included. For example:
As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". For example:
{
"name": "foo",
"version": "0.0.0",
"dependencies": {
"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 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
to the public registry.
```json
{
"name": "foo",
"version": "0.0.0",
"dependencies": {
"express": "visionmedia/express"
}
}
```
## devDependencies
@@ -467,8 +376,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 map these additional items in a `devDependencies`
object.
In this case, it's best to list these additional items in a
`devDependencies` hash.
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
@@ -480,63 +389,25 @@ script to do this, and make the required package a devDependency.
For example:
{ "name": "ethopia-waza",
"description": "a delightfully fruity coffee varietal",
"version": "1.2.3",
"devDependencies": {
"coffee-script": "~1.6.3"
},
"scripts": {
"prepublish": "coffee -o lib/ -c src/waza.coffee"
},
"main": "lib/waza.js"
}
```json
{ "name": "ethopia-waza",
"description": "a delightfully fruity coffee varietal",
"version": "1.2.3",
"devDependencies": {
"coffee-script": "~1.6.3"
},
"scripts": {
"prepublish": "coffee -o lib/ -c src/waza.coffee"
},
"main": "lib/waza.js"
}
```
The `prepublish` script will be run before publishing, so that users
can consume the functionality without requiring them to compile it
themselves. In dev mode (ie, locally running `npm install`), it'll
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
host tool or library, while not necessarily doing a `require` of this host.
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",
"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. `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.
Assuming the host complies with [semver](http://semver.org/), only changes in
the host package's major version will break your plugin. Thus, if you've worked
with every 1.x version of the host package, use `"^1.0"` or `"1.x"` to express
this. If you depend on features introduced in 1.5.2, use `">= 1.5.2 < 2"`.
## bundledDependencies
Array of package names that will be bundled when publishing the package.
@@ -545,11 +416,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`
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.
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.
It is still your program's responsibility to handle the lack of the
dependency. For example, something like this:
@@ -596,17 +467,16 @@ 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` object,
versions of Node/npm other than those specified in the `engines` hash,
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 object is something overly restrictive, you can quite easily and
engines hash 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.
updating to new versions of Node. Consider this choice carefully. If
people abuse it, it will be removed in a future version of npm.
## os
@@ -652,11 +522,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` dictionary 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` hash 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 that you can download from the npm registry.
Note: this concerns npm's code not the specific packages at npmjs.org
## 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.
@@ -133,7 +133,7 @@ string message to the callback. Stack traces are handy.
## Logging
Logging is done using the [npmlog](https://github.com/npm/npmlog)
Logging is done using the [npmlog](https://github.com/isaacs/npmlog)
utility.
Please clean up logs when they are no longer helpful. In particular,
@@ -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, properties, or anything not specified in this section.
functions, methods, members, or anything not specified in this section.
Use `UpperCamelCase` for class names (things that you'd pass to "new").

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