mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
Merge remote-tracking branch 'forward/v0.12'
Conflicts: src/node_version.h vcbuild.bat
This commit is contained in:
commit
0d8cbdff51
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -45,6 +45,7 @@ ipch/
|
|||
/test/addons/doc-*/
|
||||
email.md
|
||||
deps/v8-*
|
||||
deps/icu
|
||||
./node_modules
|
||||
.svn/
|
||||
|
||||
|
|
@ -67,3 +68,4 @@ deps/zlib/zlib.target.mk
|
|||
|
||||
# test artifacts
|
||||
tools/faketime
|
||||
icu_config.gypi
|
||||
|
|
|
|||
169
ChangeLog
169
ChangeLog
|
|
@ -1,3 +1,172 @@
|
|||
2014.09.24, Version 0.11.14 (Unstable)
|
||||
|
||||
* 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
|
||||
|
|
|
|||
68
Makefile
68
Makefile
|
|
@ -7,7 +7,13 @@ DESTDIR ?=
|
|||
SIGN ?=
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
NODE ?= ./node
|
||||
# Determine EXEEXT
|
||||
EXEEXT := $(shell $(PYTHON) -c \
|
||||
"import sys; print('.exe' if sys.platform == 'win32' else '')")
|
||||
|
||||
NODE ?= ./node$(EXEEXT)
|
||||
NODE_EXE = node$(EXEEXT)
|
||||
NODE_G_EXE = node_g$(EXEEXT)
|
||||
|
||||
# Default to verbose builds.
|
||||
# To do quiet/pretty builds, run `make V=` to set V to an empty string,
|
||||
|
|
@ -23,31 +29,31 @@ endif
|
|||
# BUILDTYPE=Debug builds both release and debug builds. If you want to compile
|
||||
# just the debug build, run `make -C out BUILDTYPE=Debug` instead.
|
||||
ifeq ($(BUILDTYPE),Release)
|
||||
all: out/Makefile node
|
||||
all: out/Makefile $(NODE_EXE)
|
||||
else
|
||||
all: out/Makefile node node_g
|
||||
all: out/Makefile $(NODE_EXE) $(NODE_G_EXE)
|
||||
endif
|
||||
|
||||
# The .PHONY is needed to ensure that we recursively use the out/Makefile
|
||||
# to check for changes.
|
||||
.PHONY: node node_g
|
||||
.PHONY: $(NODE_EXE) $(NODE_G_EXE)
|
||||
|
||||
ifeq ($(USE_NINJA),1)
|
||||
node: config.gypi
|
||||
$(NODE_EXE): config.gypi
|
||||
$(NINJA) -C out/Release/
|
||||
ln -fs out/Release/node node
|
||||
ln -fs out/Release/$(NODE_EXE) $@
|
||||
|
||||
node_g: config.gypi
|
||||
$(NODE_G_EXE): config.gypi
|
||||
$(NINJA) -C out/Debug/
|
||||
ln -fs out/Debug/node $@
|
||||
ln -fs out/Debug/$(NODE_EXE) $@
|
||||
else
|
||||
node: config.gypi out/Makefile
|
||||
$(NODE_EXE): config.gypi out/Makefile
|
||||
$(MAKE) -C out BUILDTYPE=Release V=$(V)
|
||||
ln -fs out/Release/node node
|
||||
ln -fs out/Release/$(NODE_EXE) $@
|
||||
|
||||
node_g: config.gypi out/Makefile
|
||||
$(NODE_G_EXE): config.gypi out/Makefile
|
||||
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
|
||||
ln -fs out/Debug/node $@
|
||||
ln -fs out/Debug/$(NODE_EXE) $@
|
||||
endif
|
||||
|
||||
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
|
||||
|
|
@ -72,7 +78,7 @@ uninstall:
|
|||
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
|
||||
|
||||
clean:
|
||||
-rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
|
||||
-rm -rf out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) blog.html email.md
|
||||
-find out/ -name '*.o' -o -name '*.a' | xargs rm -rf
|
||||
-rm -rf node_modules
|
||||
|
||||
|
|
@ -80,7 +86,7 @@ distclean:
|
|||
-rm -rf out
|
||||
-rm -f config.gypi
|
||||
-rm -f config.mk
|
||||
-rm -rf node node_g blog.html email.md
|
||||
-rm -rf $(NODE_EXE) $(NODE_G_EXE) blog.html email.md
|
||||
-rm -rf node_modules
|
||||
|
||||
test: all
|
||||
|
|
@ -95,8 +101,8 @@ test-valgrind: all
|
|||
$(PYTHON) tools/test.py --mode=release --valgrind simple message
|
||||
|
||||
test/gc/node_modules/weak/build/Release/weakref.node:
|
||||
@if [ ! -f node ]; then make all; fi
|
||||
./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
|
||||
@if [ ! -f $(NODE_EXE) ]; then make all; fi
|
||||
./$(NODE_EXE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
|
||||
--directory="$(shell pwd)/test/gc/node_modules/weak" \
|
||||
--nodedir="$(shell pwd)"
|
||||
|
||||
|
|
@ -146,11 +152,11 @@ test-internet: all
|
|||
test-debugger: all
|
||||
$(PYTHON) tools/test.py debugger
|
||||
|
||||
test-npm: node
|
||||
./node deps/npm/test/run.js
|
||||
test-npm: $(NODE_EXE)
|
||||
./$(NODE_EXE) deps/npm/test/run.js
|
||||
|
||||
test-npm-publish: node
|
||||
npm_package_config_publishtest=true ./node deps/npm/test/run.js
|
||||
test-npm-publish: $(NODE_EXE)
|
||||
npm_package_config_publishtest=true ./$(NODE_EXE) deps/npm/test/run.js
|
||||
|
||||
test-addons: test-build
|
||||
$(PYTHON) tools/test.py --mode=release addons
|
||||
|
|
@ -174,7 +180,7 @@ website_files = \
|
|||
out/doc/sh_main.js \
|
||||
out/doc/sh_javascript.min.js
|
||||
|
||||
doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html node
|
||||
doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ out/doc/changelog.html $(NODE_EXE)
|
||||
|
||||
$(apidoc_dirs):
|
||||
mkdir -p $@
|
||||
|
|
@ -182,24 +188,24 @@ $(apidoc_dirs):
|
|||
out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
|
||||
cp $< $@
|
||||
|
||||
out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh node
|
||||
out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh $(NODE_EXE)
|
||||
bash tools/build-changelog.sh
|
||||
|
||||
out/doc/%: doc/%
|
||||
cp -r $< $@
|
||||
|
||||
out/doc/api/%.json: doc/api/%.markdown node
|
||||
out/Release/node tools/doc/generate.js --format=json $< > $@
|
||||
out/doc/api/%.json: doc/api/%.markdown $(NODE_EXE)
|
||||
out/Release/$(NODE_EXE) tools/doc/generate.js --format=json $< > $@
|
||||
|
||||
out/doc/api/%.html: doc/api/%.markdown node
|
||||
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
|
||||
out/doc/api/%.html: doc/api/%.markdown $(NODE_EXE)
|
||||
out/Release/$(NODE_EXE) 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' > $@
|
||||
cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
|
||||
|
||||
blog.html: email.md
|
||||
cat $< | ./node tools/doc/node_modules/.bin/marked > $@
|
||||
cat $< | ./$(NODE_EXE) tools/doc/node_modules/.bin/marked > $@
|
||||
|
||||
website-upload: doc
|
||||
rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
|
||||
|
|
@ -300,7 +306,7 @@ $(PKG): release-only
|
|||
--out $(PKG)
|
||||
SIGN="$(INT_SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh
|
||||
|
||||
$(TARBALL): release-only node doc
|
||||
$(TARBALL): release-only $(NODE_EXE) doc
|
||||
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
|
||||
mkdir -p $(TARNAME)/doc/api
|
||||
cp doc/node.1 $(TARNAME)/doc/node.1
|
||||
|
|
@ -387,9 +393,9 @@ bench-http-simple:
|
|||
benchmark/http_simple_bench.sh
|
||||
|
||||
bench-idle:
|
||||
./node benchmark/idle_server.js &
|
||||
./$(NODE_EXE) benchmark/idle_server.js &
|
||||
sleep 1
|
||||
./node benchmark/idle_clients.js &
|
||||
./$(NODE_EXE) benchmark/idle_clients.js &
|
||||
|
||||
jslintfix:
|
||||
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/fixjsstyle.py --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
|
||||
|
|
@ -406,7 +412,7 @@ 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))
|
||||
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:
|
||||
@$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)
|
||||
|
|
|
|||
500
Makefile.build
Normal file
500
Makefile.build
Normal file
|
|
@ -0,0 +1,500 @@
|
|||
# Copyright 2012 the V8 project authors. 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.
|
||||
|
||||
|
||||
# Variable default definitions. Override them by exporting them in your shell.
|
||||
CXX ?= g++
|
||||
LINK ?= g++
|
||||
OUTDIR ?= out
|
||||
TESTJOBS ?=
|
||||
# TODO(bnoordhuis) Make i18n support configurable.
|
||||
GYPFLAGS ?= -Dv8_enable_i18n_support=0
|
||||
TESTFLAGS ?=
|
||||
ANDROID_NDK_ROOT ?=
|
||||
ANDROID_NDK_HOST_ARCH ?=
|
||||
ANDROID_TOOLCHAIN ?=
|
||||
ANDROID_V8 ?= /data/local/tmp/v8
|
||||
NACL_SDK_ROOT ?=
|
||||
|
||||
# Special build flags. Use them like this: "make library=shared"
|
||||
|
||||
# library=shared || component=shared_library
|
||||
ifeq ($(library), shared)
|
||||
GYPFLAGS += -Dcomponent=shared_library
|
||||
endif
|
||||
ifdef component
|
||||
GYPFLAGS += -Dcomponent=$(component)
|
||||
endif
|
||||
# console=readline
|
||||
ifdef console
|
||||
GYPFLAGS += -Dconsole=$(console)
|
||||
endif
|
||||
# disassembler=on
|
||||
ifeq ($(disassembler), on)
|
||||
GYPFLAGS += -Dv8_enable_disassembler=1
|
||||
endif
|
||||
# objectprint=on
|
||||
ifeq ($(objectprint), on)
|
||||
GYPFLAGS += -Dv8_object_print=1
|
||||
endif
|
||||
# verifyheap=on
|
||||
ifeq ($(verifyheap), on)
|
||||
GYPFLAGS += -Dv8_enable_verify_heap=1
|
||||
endif
|
||||
# backtrace=off
|
||||
ifeq ($(backtrace), off)
|
||||
GYPFLAGS += -Dv8_enable_backtrace=0
|
||||
else
|
||||
GYPFLAGS += -Dv8_enable_backtrace=1
|
||||
endif
|
||||
# verifypredictable=on
|
||||
ifeq ($(verifypredictable), on)
|
||||
GYPFLAGS += -Dv8_enable_verify_predictable=1
|
||||
endif
|
||||
# snapshot=off
|
||||
ifeq ($(snapshot), off)
|
||||
GYPFLAGS += -Dv8_use_snapshot='false'
|
||||
endif
|
||||
# extrachecks=on/off
|
||||
ifeq ($(extrachecks), on)
|
||||
GYPFLAGS += -Dv8_enable_extra_checks=1 -Dv8_enable_handle_zapping=1
|
||||
endif
|
||||
ifeq ($(extrachecks), off)
|
||||
GYPFLAGS += -Dv8_enable_extra_checks=0 -Dv8_enable_handle_zapping=0
|
||||
endif
|
||||
# gdbjit=on/off
|
||||
ifeq ($(gdbjit), on)
|
||||
GYPFLAGS += -Dv8_enable_gdbjit=1
|
||||
endif
|
||||
ifeq ($(gdbjit), off)
|
||||
GYPFLAGS += -Dv8_enable_gdbjit=0
|
||||
endif
|
||||
# vtunejit=on
|
||||
ifeq ($(vtunejit), on)
|
||||
GYPFLAGS += -Dv8_enable_vtunejit=1
|
||||
endif
|
||||
# optdebug=on
|
||||
ifeq ($(optdebug), on)
|
||||
GYPFLAGS += -Dv8_optimized_debug=2
|
||||
endif
|
||||
# unalignedaccess=on
|
||||
ifeq ($(unalignedaccess), on)
|
||||
GYPFLAGS += -Dv8_can_use_unaligned_accesses=true
|
||||
endif
|
||||
# randomseed=12345, disable random seed via randomseed=0
|
||||
ifdef randomseed
|
||||
GYPFLAGS += -Dv8_random_seed=$(randomseed)
|
||||
endif
|
||||
# soname_version=1.2.3
|
||||
ifdef soname_version
|
||||
GYPFLAGS += -Dsoname_version=$(soname_version)
|
||||
endif
|
||||
# werror=no
|
||||
ifeq ($(werror), no)
|
||||
GYPFLAGS += -Dwerror=''
|
||||
endif
|
||||
# presubmit=no
|
||||
ifeq ($(presubmit), no)
|
||||
TESTFLAGS += --no-presubmit
|
||||
endif
|
||||
# strictaliasing=off (workaround for GCC-4.5)
|
||||
ifeq ($(strictaliasing), off)
|
||||
GYPFLAGS += -Dv8_no_strict_aliasing=1
|
||||
endif
|
||||
# regexp=interpreted
|
||||
ifeq ($(regexp), interpreted)
|
||||
GYPFLAGS += -Dv8_interpreted_regexp=1
|
||||
endif
|
||||
# i18nsupport=off
|
||||
ifeq ($(i18nsupport), off)
|
||||
GYPFLAGS += -Dv8_enable_i18n_support=0
|
||||
TESTFLAGS += --noi18n
|
||||
endif
|
||||
# deprecation_warnings=on
|
||||
ifeq ($(deprecationwarnings), on)
|
||||
GYPFLAGS += -Dv8_deprecation_warnings=1
|
||||
endif
|
||||
# asan=/path/to/clang++
|
||||
ifneq ($(strip $(asan)),)
|
||||
GYPFLAGS += -Dasan=1
|
||||
export CXX=$(asan)
|
||||
export CXX_host=$(asan)
|
||||
export LINK=$(asan)
|
||||
export ASAN_SYMBOLIZER_PATH="$(dir $(asan))llvm-symbolizer"
|
||||
endif
|
||||
|
||||
# arm specific flags.
|
||||
# arm_version=<number | "default">
|
||||
ifneq ($(strip $(arm_version)),)
|
||||
GYPFLAGS += -Darm_version=$(arm_version)
|
||||
else
|
||||
# Deprecated (use arm_version instead): armv7=false/true
|
||||
ifeq ($(armv7), false)
|
||||
GYPFLAGS += -Darm_version=6
|
||||
else
|
||||
ifeq ($(armv7), true)
|
||||
GYPFLAGS += -Darm_version=7
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# hardfp=on/off. Deprecated, use armfloatabi
|
||||
ifeq ($(hardfp),on)
|
||||
GYPFLAGS += -Darm_float_abi=hard
|
||||
else
|
||||
ifeq ($(hardfp),off)
|
||||
GYPFLAGS += -Darm_float_abi=softfp
|
||||
endif
|
||||
endif
|
||||
# fpu: armfpu=xxx
|
||||
# xxx: vfp, vfpv3-d16, vfpv3, neon.
|
||||
ifeq ($(armfpu),)
|
||||
GYPFLAGS += -Darm_fpu=default
|
||||
else
|
||||
GYPFLAGS += -Darm_fpu=$(armfpu)
|
||||
endif
|
||||
# float abi: armfloatabi=softfp/hard
|
||||
ifeq ($(armfloatabi),)
|
||||
ifeq ($(hardfp),)
|
||||
GYPFLAGS += -Darm_float_abi=default
|
||||
endif
|
||||
else
|
||||
GYPFLAGS += -Darm_float_abi=$(armfloatabi)
|
||||
endif
|
||||
# armthumb=on/off
|
||||
ifeq ($(armthumb), off)
|
||||
GYPFLAGS += -Darm_thumb=0
|
||||
else
|
||||
ifeq ($(armthumb), on)
|
||||
GYPFLAGS += -Darm_thumb=1
|
||||
endif
|
||||
endif
|
||||
# arm_test_noprobe=on
|
||||
# With this flag set, by default v8 will only use features implied
|
||||
# by the compiler (no probe). This is done by modifying the default
|
||||
# values of enable_armv7, enable_vfp3, enable_32dregs and enable_neon.
|
||||
# Modifying these flags when launching v8 will enable the probing for
|
||||
# the specified values.
|
||||
ifeq ($(arm_test_noprobe), on)
|
||||
GYPFLAGS += -Darm_test_noprobe=on
|
||||
endif
|
||||
|
||||
# ----------------- available targets: --------------------
|
||||
# - "builddeps": pulls in external dependencies for building
|
||||
# - "dependencies": pulls in all external dependencies
|
||||
# - "grokdump": rebuilds heap constants lists used by grokdump
|
||||
# - any arch listed in ARCHES (see below)
|
||||
# - any mode listed in MODES
|
||||
# - every combination <arch>.<mode>, e.g. "ia32.release"
|
||||
# - "native": current host's architecture, release mode
|
||||
# - any of the above with .check appended, e.g. "ia32.release.check"
|
||||
# - "android": cross-compile for Android/ARM
|
||||
# - "nacl" : cross-compile for Native Client (ia32 and x64)
|
||||
# - default (no target specified): build all DEFAULT_ARCHES and MODES
|
||||
# - "check": build all targets and run all tests
|
||||
# - "<arch>.clean" for any <arch> in ARCHES
|
||||
# - "clean": clean all ARCHES
|
||||
|
||||
# ----------------- internal stuff ------------------------
|
||||
|
||||
# Architectures and modes to be compiled. Consider these to be internal
|
||||
# variables, don't override them (use the targets instead).
|
||||
ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64el x87
|
||||
DEFAULT_ARCHES = ia32 x64 arm
|
||||
MODES = release debug optdebug
|
||||
DEFAULT_MODES = release debug
|
||||
ANDROID_ARCHES = android_ia32 android_arm android_arm64 android_mipsel android_x87
|
||||
NACL_ARCHES = nacl_ia32 nacl_x64
|
||||
|
||||
# List of files that trigger Makefile regeneration:
|
||||
GYPFILES = \
|
||||
common.gypi \
|
||||
deps/cares/cares.gyp \
|
||||
deps/debugger-agent/debugger-agent.gyp \
|
||||
deps/http_parser/http_parser.gyp \
|
||||
deps/openssl/openssl.gyp \
|
||||
deps/uv/uv.gyp \
|
||||
deps/v8/tools/gyp/v8.gyp \
|
||||
deps/zlib/zlib.gyp \
|
||||
node.gyp \
|
||||
|
||||
# If vtunejit=on, the v8vtune.gyp will be appended.
|
||||
ifeq ($(vtunejit), on)
|
||||
GYPFILES += src/third_party/vtune/v8vtune.gyp
|
||||
endif
|
||||
# Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
|
||||
BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
|
||||
ANDROID_BUILDS = $(foreach mode,$(MODES), \
|
||||
$(addsuffix .$(mode),$(ANDROID_ARCHES)))
|
||||
NACL_BUILDS = $(foreach mode,$(MODES), \
|
||||
$(addsuffix .$(mode),$(NACL_ARCHES)))
|
||||
# Generates corresponding test targets, e.g. "ia32.release.check".
|
||||
CHECKS = $(addsuffix .check,$(BUILDS))
|
||||
QUICKCHECKS = $(addsuffix .quickcheck,$(BUILDS))
|
||||
ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS))
|
||||
NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS))
|
||||
# File where previously used GYPFLAGS are stored.
|
||||
ENVFILE = $(OUTDIR)/environment
|
||||
|
||||
.PHONY: all check clean builddeps dependencies $(ENVFILE).new native \
|
||||
qc quickcheck $(QUICKCHECKS) \
|
||||
$(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \
|
||||
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
|
||||
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
|
||||
$(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \
|
||||
$(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \
|
||||
must-set-NACL_SDK_ROOT
|
||||
|
||||
# Target definitions. "all" is the default.
|
||||
all: $(DEFAULT_MODES)
|
||||
|
||||
# Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
|
||||
# having been created before.
|
||||
buildbot:
|
||||
$(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
|
||||
builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
|
||||
|
||||
# Compile targets. MODES and ARCHES are convenience targets.
|
||||
.SECONDEXPANSION:
|
||||
$(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
|
||||
|
||||
$(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
|
||||
|
||||
# Defines how to build a particular target (e.g. ia32.release).
|
||||
$(BUILDS): $(OUTDIR)/Makefile.$$@
|
||||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
|
||||
CXX="$(CXX)" LINK="$(LINK)" \
|
||||
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
|
||||
python -c "print \
|
||||
raw_input().replace('opt', '').capitalize()") \
|
||||
builddir="$(shell pwd)/$(OUTDIR)/$@"
|
||||
|
||||
native: $(OUTDIR)/Makefile.native
|
||||
@$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
|
||||
CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
|
||||
builddir="$(shell pwd)/$(OUTDIR)/$@"
|
||||
|
||||
$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
|
||||
|
||||
$(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
|
||||
@$(MAKE) -f Makefile.android $@ \
|
||||
ARCH="$(basename $@)" \
|
||||
MODE="$(subst .,,$(suffix $@))" \
|
||||
OUTDIR="$(OUTDIR)" \
|
||||
GYPFLAGS="$(GYPFLAGS)"
|
||||
|
||||
$(NACL_ARCHES): $(addprefix $$@.,$(MODES))
|
||||
|
||||
$(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \
|
||||
Makefile.nacl must-set-NACL_SDK_ROOT
|
||||
@$(MAKE) -f Makefile.nacl $@ \
|
||||
ARCH="$(basename $@)" \
|
||||
MODE="$(subst .,,$(suffix $@))" \
|
||||
OUTDIR="$(OUTDIR)" \
|
||||
GYPFLAGS="$(GYPFLAGS)"
|
||||
|
||||
# Test targets.
|
||||
check: all
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
|
||||
$(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check,$(MODES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(CHECKS): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .quickcheck,$(MODES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
|
||||
$(addsuffix .quickcheck,$(ARCHES)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
|
||||
$(QUICKCHECKS): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS) --quickcheck
|
||||
|
||||
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
||||
@tools/android-sync.sh $(basename $@) $(OUTDIR) \
|
||||
$(shell pwd) $(ANDROID_V8)
|
||||
|
||||
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 \
|
||||
--command-prefix="tools/android-run.py" $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check, $(ANDROID_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
|
||||
$(addsuffix .check, $(NACL_BUILDS)): $$(basename $$@)
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 --nopresubmit --noi18n \
|
||||
--command-prefix="tools/nacl-run.py"
|
||||
|
||||
$(addsuffix .check, $(NACL_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
|
||||
native.check: native
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
||||
--arch-and-mode=. $(TESTFLAGS)
|
||||
|
||||
SUPERFASTTESTMODES = ia32.release
|
||||
FASTTESTMODES = $(SUPERFASTTESTMODES),x64.release,ia32.optdebug,x64.optdebug,arm.optdebug,arm64.release
|
||||
FASTCOMPILEMODES = $(FASTTESTMODES),arm64.optdebug
|
||||
|
||||
COMMA = ,
|
||||
EMPTY =
|
||||
SPACE = $(EMPTY) $(EMPTY)
|
||||
quickcheck: $(subst $(COMMA),$(SPACE),$(FASTCOMPILEMODES))
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(SUPERFASTTESTMODES) $(TESTFLAGS) --quickcheck \
|
||||
--download-data mozilla webkit
|
||||
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
|
||||
qc: quickcheck
|
||||
|
||||
# Clean targets. You can clean each architecture individually, or everything.
|
||||
$(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)):
|
||||
rm -f $(OUTDIR)/Makefile.$(basename $@)*
|
||||
rm -rf $(OUTDIR)/$(basename $@).release
|
||||
rm -rf $(OUTDIR)/$(basename $@).debug
|
||||
rm -rf $(OUTDIR)/$(basename $@).optdebug
|
||||
find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
|
||||
|
||||
native.clean:
|
||||
rm -f $(OUTDIR)/Makefile.native
|
||||
rm -rf $(OUTDIR)/native
|
||||
find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete
|
||||
|
||||
clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean gtags.clean
|
||||
|
||||
# GYP file generation targets.
|
||||
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS))
|
||||
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
|
||||
$(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
|
||||
cut -f 2 -d " " | cut -f 1 -d "-" ))
|
||||
$(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
|
||||
$(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
|
||||
GYP_GENERATORS=make \
|
||||
tools/gyp/gyp --generator-output="$(OUTDIR)" node.gyp \
|
||||
-Icommon.gypi --depth=. \
|
||||
-Dtarget_arch=$(V8_TARGET_ARCH) \
|
||||
-Dv8_target_arch=$(V8_TARGET_ARCH) \
|
||||
$(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
|
||||
-Dtarget_arch=$(V8_TARGET_ARCH),) \
|
||||
$(if $(findstring optdebug,$@),-Dv8_optimized_debug=2,) \
|
||||
-S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS)
|
||||
|
||||
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
|
||||
GYP_GENERATORS=make \
|
||||
tools/gyp/gyp --generator-output="$(OUTDIR)" node.gyp \
|
||||
-Icommon.gypi --depth=. -S.native $(GYPFLAGS)
|
||||
|
||||
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
|
||||
ifndef ANDROID_NDK_ROOT
|
||||
ifndef ANDROID_TOOLCHAIN
|
||||
$(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Note that NACL_SDK_ROOT must be set to point to an appropriate
|
||||
# Native Client SDK before using this makefile. You can download
|
||||
# an SDK here:
|
||||
# https://developers.google.com/native-client/sdk/download
|
||||
# The path indicated by NACL_SDK_ROOT will typically end with
|
||||
# a folder for a pepper version such as "pepper_25" that should
|
||||
# have "tools" and "toolchain" subdirectories.
|
||||
must-set-NACL_SDK_ROOT:
|
||||
ifndef NACL_SDK_ROOT
|
||||
$(error NACL_SDK_ROOT must be set)
|
||||
endif
|
||||
|
||||
# Replaces the old with the new environment file if they're different, which
|
||||
# will trigger GYP to regenerate Makefiles.
|
||||
$(ENVFILE): $(ENVFILE).new
|
||||
@if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) > /dev/null; \
|
||||
then rm $(ENVFILE).new; \
|
||||
else mv $(ENVFILE).new $(ENVFILE); fi
|
||||
|
||||
# Stores current GYPFLAGS in a file.
|
||||
$(ENVFILE).new:
|
||||
@mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \
|
||||
echo "CXX=$(CXX)" >> $(ENVFILE).new
|
||||
|
||||
# Heap constants for grokdump.
|
||||
DUMP_FILE = tools/v8heapconst.py
|
||||
grokdump: ia32.release
|
||||
@cat $(DUMP_FILE).tmpl > $(DUMP_FILE)
|
||||
@$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE)
|
||||
|
||||
# Support for the GNU GLOBAL Source Code Tag System.
|
||||
gtags.files: $(GYPFILES) $(ENVFILE)
|
||||
@find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@
|
||||
|
||||
# We need to manually set the stack limit here, to work around bugs in
|
||||
# gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems.
|
||||
GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null)
|
||||
@bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<'
|
||||
|
||||
gtags.clean:
|
||||
rm -f gtags.files GPATH GRTAGS GSYMS GTAGS
|
||||
|
||||
# Dependencies. "builddeps" are dependencies required solely for building,
|
||||
# "dependencies" includes also dependencies required for development.
|
||||
# Remember to keep these in sync with the DEPS file.
|
||||
builddeps:
|
||||
svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
|
||||
--revision 1831
|
||||
if svn info third_party/icu 2>&1 | grep -q icu46 ; then \
|
||||
svn switch --force \
|
||||
https://src.chromium.org/chrome/trunk/deps/third_party/icu52 \
|
||||
third_party/icu --revision 277999 ; \
|
||||
else \
|
||||
svn checkout --force \
|
||||
https://src.chromium.org/chrome/trunk/deps/third_party/icu52 \
|
||||
third_party/icu --revision 277999 ; \
|
||||
fi
|
||||
svn checkout --force http://googletest.googlecode.com/svn/trunk \
|
||||
testing/gtest --revision 692
|
||||
svn checkout --force http://googlemock.googlecode.com/svn/trunk \
|
||||
testing/gmock --revision 485
|
||||
|
||||
dependencies: builddeps
|
||||
# The spec is a copy of the hooks in v8's DEPS file.
|
||||
gclient sync -r fb782d4369d5ae04f17a2fceef7de5a63e50f07b --spec="solutions = [{u'managed': False, u'name': u'buildtools', u'url': u'https://chromium.googlesource.com/chromium/buildtools.git', u'custom_deps': {}, u'custom_hooks': [{u'name': u'clang_format_win',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platform=win32',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools/win/clang-format.exe.sha1']},{u'name': u'clang_format_mac',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platform=darwin',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools/mac/clang-format.sha1']},{u'name': u'clang_format_linux',u'pattern': u'.',u'action': [u'download_from_google_storage',u'--no_resume',u'--platform=linux*',u'--no_auth',u'--bucket',u'chromium-clang-format',u'-s',u'buildtools/linux64/clang-format.sha1']}],u'deps_file': u'.DEPS.git', u'safesync_url': u''}]"
|
||||
51
README.md
51
README.md
|
|
@ -5,8 +5,8 @@ Evented I/O for V8 javascript.
|
|||
|
||||
Prerequisites (Unix only):
|
||||
|
||||
* GCC 4.2 or newer
|
||||
* G++ 4.2 or newer
|
||||
* `gcc` and `g++` 4.8 or newer, or
|
||||
* `clang` and `clang++` 3.3 or newer
|
||||
* Python 2.6 or 2.7
|
||||
* GNU Make 3.81 or newer
|
||||
* libexecinfo (FreeBSD and OpenBSD only)
|
||||
|
|
@ -19,17 +19,6 @@ make
|
|||
make install
|
||||
```
|
||||
|
||||
With libicu i18n support:
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
|
|
@ -43,15 +32,18 @@ make install
|
|||
Prerequisites (Windows only):
|
||||
|
||||
* Python 2.6 or 2.7
|
||||
* Visual Studio 2010 or 2012
|
||||
* Visual Studio 2013 for Windows Desktop, or
|
||||
* Visual Studio Express 2013 for Windows Desktop
|
||||
|
||||
Windows:
|
||||
|
||||
```sh
|
||||
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 to install to.
|
||||
and OS X installers will prompt you for the location in which to install.
|
||||
The tarballs are self-contained; you can extract them to a local directory
|
||||
with:
|
||||
|
||||
|
|
@ -92,6 +84,35 @@ make doc
|
|||
man doc/node.1
|
||||
```
|
||||
|
||||
### To build `Intl` (ECMA-402) support:
|
||||
|
||||
*Note:* more docs, including how to reduce disk footprint, are on
|
||||
[the wiki](https://github.com/joyent/node/wiki/Intl).
|
||||
|
||||
#### Use existing installed ICU (Unix/Macintosh only):
|
||||
|
||||
```sh
|
||||
pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
|
||||
```
|
||||
|
||||
#### Build ICU from source:
|
||||
|
||||
First: Unpack latest ICU
|
||||
[icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
|
||||
as `deps/icu` (You'll have: `deps/icu/source/...`)
|
||||
|
||||
Unix/Macintosh:
|
||||
|
||||
```sh
|
||||
./configure --with-intl=full-icu
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```sh
|
||||
vcbuild full-icu
|
||||
```
|
||||
|
||||
Resources for Newcomers
|
||||
---
|
||||
- [The Wiki](https://github.com/joyent/node/wiki)
|
||||
|
|
|
|||
72
benchmark/misc/module-loader.js
Normal file
72
benchmark/misc/module-loader.js
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// 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);
|
||||
}
|
||||
}
|
||||
39
common.gypi
39
common.gypi
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
'variables': {
|
||||
'asan%': 0,
|
||||
'werror': '', # Turn off -Werror in V8 build.
|
||||
'visibility%': 'hidden', # V8's visibility setting
|
||||
'target_arch%': 'ia32', # set v8's target architecture
|
||||
|
|
@ -12,6 +13,12 @@
|
|||
'clang%': 0,
|
||||
'python%': 'python',
|
||||
|
||||
'node_tag%': '',
|
||||
'uv_library%': 'static_library',
|
||||
|
||||
# Default to -O0 for debug builds.
|
||||
'v8_optimized_debug%': 0,
|
||||
|
||||
# Enable disassembler for `--print-code` v8 options
|
||||
'v8_enable_disassembler': 1,
|
||||
|
||||
|
|
@ -26,10 +33,10 @@
|
|||
}],
|
||||
['GENERATOR == "ninja" or OS== "mac"', {
|
||||
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
|
||||
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.<(target_arch).a',
|
||||
'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.<(target_arch).a',
|
||||
'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a',
|
||||
}],
|
||||
],
|
||||
},
|
||||
|
|
@ -77,12 +84,6 @@
|
|||
# pull in V8's postmortem metadata
|
||||
'ldflags': [ '-Wl,-z,allextract' ]
|
||||
}],
|
||||
['clang == 0 and gcc_version >= 40', {
|
||||
'cflags': [ '-fno-tree-vrp' ], # Work around compiler bug.
|
||||
}],
|
||||
['clang == 0 and gcc_version <= 44', {
|
||||
'cflags': [ '-fno-tree-sink' ], # Work around compiler bug.
|
||||
}],
|
||||
['OS!="mac" and OS!="win"', {
|
||||
'cflags': [ '-fno-omit-frame-pointer' ],
|
||||
}],
|
||||
|
|
@ -153,6 +154,16 @@
|
|||
},
|
||||
'msvs_disabled_warnings': [4351, 4355, 4800],
|
||||
'conditions': [
|
||||
['asan != 0', {
|
||||
'cflags+': [
|
||||
'-fno-omit-frame-pointer',
|
||||
'-fsanitize=address',
|
||||
'-w', # http://crbug.com/162783
|
||||
],
|
||||
'cflags_cc+': [ '-gline-tables-only' ],
|
||||
'cflags!': [ '-fomit-frame-pointer' ],
|
||||
'ldflags': [ '-fsanitize=address' ],
|
||||
}],
|
||||
['OS == "win"', {
|
||||
'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
|
||||
'defines': [
|
||||
|
|
@ -173,7 +184,7 @@
|
|||
}],
|
||||
[ 'OS in "linux freebsd openbsd solaris android"', {
|
||||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
|
||||
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
|
||||
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++0x' ],
|
||||
'ldflags': [ '-rdynamic' ],
|
||||
'target_conditions': [
|
||||
['_type=="static_library"', {
|
||||
|
|
@ -185,6 +196,10 @@
|
|||
'cflags': [ '-m32' ],
|
||||
'ldflags': [ '-m32' ],
|
||||
}],
|
||||
[ 'target_arch=="x32"', {
|
||||
'cflags': [ '-mx32' ],
|
||||
'ldflags': [ '-mx32' ],
|
||||
}],
|
||||
[ 'target_arch=="x64"', {
|
||||
'cflags': [ '-m64' ],
|
||||
'ldflags': [ '-m64' ],
|
||||
|
|
@ -237,6 +252,12 @@
|
|||
['target_arch=="x64"', {
|
||||
'xcode_settings': {'ARCHS': ['x86_64']},
|
||||
}],
|
||||
['clang==1', {
|
||||
'xcode_settings': {
|
||||
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x
|
||||
},
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['OS=="freebsd" and node_use_dtrace=="true"', {
|
||||
|
|
|
|||
171
configure
vendored
171
configure
vendored
|
|
@ -31,7 +31,7 @@ parser.add_option('--debug',
|
|||
parser.add_option('--dest-cpu',
|
||||
action='store',
|
||||
dest='dest_cpu',
|
||||
help='CPU architecture to build for. Valid values are: arm, ia32, x64')
|
||||
help='CPU architecture to build for. Valid values are: arm, ia32, x32, x64')
|
||||
|
||||
parser.add_option('--dest-os',
|
||||
action='store',
|
||||
|
|
@ -241,6 +241,11 @@ parser.add_option('--with-icu-path',
|
|||
dest='with_icu_path',
|
||||
help='Path to icu.gyp (ICU i18n, Chromium version only.)')
|
||||
|
||||
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-perfctr',
|
||||
action='store_true',
|
||||
dest='with_perfctr',
|
||||
|
|
@ -686,13 +691,159 @@ 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)
|
||||
|
||||
def configure_icu(o):
|
||||
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):
|
||||
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')
|
||||
|
||||
# small ICU is off by default.
|
||||
# always set icu_small, node.gyp depends on it being defined.
|
||||
o['variables']['icu_small'] = b(False)
|
||||
|
||||
with_intl = options.with_intl
|
||||
have_icu_path = bool(options.with_icu_path)
|
||||
o['variables']['v8_enable_i18n_support'] = int(have_icu_path)
|
||||
if have_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']['icu_gyp_path'] = options.with_icu_path
|
||||
return
|
||||
# --with-intl=<with_intl>
|
||||
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)
|
||||
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.
|
||||
|
||||
# ICU mode. (icu-generic.gyp)
|
||||
byteorder = sys.byteorder
|
||||
o['variables']['icu_gyp_path'] = 'tools/icu/icu-generic.gyp'
|
||||
# ICU source dir relative to root
|
||||
icu_full_path = os.path.join(root_dir, 'deps/icu')
|
||||
o['variables']['icu_path'] = icu_full_path
|
||||
if not os.path.isdir(icu_full_path):
|
||||
print 'Error: ICU path is not a directory: %s' % (icu_full_path)
|
||||
sys.exit(1)
|
||||
# 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
|
||||
|
|
@ -717,7 +868,7 @@ configure_libuv(output)
|
|||
configure_v8(output)
|
||||
configure_openssl(output)
|
||||
configure_winsdk(output)
|
||||
configure_icu(output)
|
||||
configure_intl(output)
|
||||
configure_fullystatic(output)
|
||||
|
||||
# variables should be a root level element,
|
||||
|
|
@ -730,13 +881,7 @@ output = {
|
|||
}
|
||||
pprint.pprint(output, indent=2)
|
||||
|
||||
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' +
|
||||
write('config.gypi', do_not_edit +
|
||||
pprint.pformat(output, indent=2) + '\n')
|
||||
|
||||
config = {
|
||||
|
|
@ -760,7 +905,7 @@ if options.use_ninja:
|
|||
gyp_args += ['-f', 'ninja-' + flavor]
|
||||
elif options.use_xcode:
|
||||
gyp_args += ['-f', 'xcode']
|
||||
elif flavor == 'win':
|
||||
elif flavor == 'win' and sys.platform != 'msys':
|
||||
gyp_args += ['-f', 'msvs', '-G', 'msvs_version=auto']
|
||||
else:
|
||||
gyp_args += ['-f', 'make-' + flavor]
|
||||
|
|
|
|||
24
deps/debugger-agent/debugger-agent.gyp
vendored
Normal file
24
deps/debugger-agent/debugger-agent.gyp
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"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",
|
||||
],
|
||||
},
|
||||
"sources": [
|
||||
"src/agent.cc",
|
||||
],
|
||||
}],
|
||||
}
|
||||
109
deps/debugger-agent/include/debugger-agent.h
vendored
Normal file
109
deps/debugger-agent/include/debugger-agent.h
vendored
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
// 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_
|
||||
191
deps/debugger-agent/lib/_debugger_agent.js
vendored
Normal file
191
deps/debugger-agent/lib/_debugger_agent.js
vendored
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
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;
|
||||
}
|
||||
347
deps/debugger-agent/src/agent.cc
vendored
Normal file
347
deps/debugger-agent/src/agent.cc
vendored
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
// 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
|
||||
64
deps/debugger-agent/src/agent.h
vendored
Normal file
64
deps/debugger-agent/src/agent.h
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
// 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_
|
||||
8
deps/npm/.travis.yml
vendored
8
deps/npm/.travis.yml
vendored
|
|
@ -1,5 +1,11 @@
|
|||
language: node_js
|
||||
script: "npm run-script tap"
|
||||
node_js:
|
||||
- "0.11"
|
||||
- "0.10"
|
||||
env:
|
||||
- DEPLOY_VERSION=testing
|
||||
before_install:
|
||||
- "npm config set spin false"
|
||||
- "npm install -g npm@^2"
|
||||
- "sudo mkdir -p /var/run/couchdb"
|
||||
script: "npm run-script tap"
|
||||
|
|
|
|||
256
deps/npm/CHANGELOG.md
vendored
256
deps/npm/CHANGELOG.md
vendored
|
|
@ -1,3 +1,69 @@
|
|||
### v2.0.0 (2014-09-12):
|
||||
|
||||
BREAKING CHANGES:
|
||||
|
||||
* [`4378a17`](https://github.com/npm/npm/commit/4378a17db340404a725ffe2eb75c9936f1612670)
|
||||
`semver@4.0.0`: prerelease versions no longer show up in ranges; `^0.x.y`
|
||||
behaves the way it did in `semver@2` rather than `semver@3`; docs have been
|
||||
reorganized for comprehensibility ([@isaacs](https://github.com/isaacs))
|
||||
* [`c6ddb64`](https://github.com/npm/npm/commit/c6ddb6462fe32bf3a27b2c4a62a032a92e982429)
|
||||
npm now assumes that node is newer than 0.6
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
Other changes:
|
||||
|
||||
* [`ea515c3`](https://github.com/npm/npm/commit/ea515c3b858bf493a7b87fa4cdc2110a0d9cef7f)
|
||||
[#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all
|
||||
callbacks have finished before proceeding
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`0b0a59d`](https://github.com/npm/npm/commit/0b0a59d504f20f424294b1590ace73a7464f0378)
|
||||
[#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just
|
||||
before the CLI exits ([@isaacs](https://github.com/isaacs))
|
||||
* [`a11c88b`](https://github.com/npm/npm/commit/a11c88bdb1488b87d8dcac69df9a55a7a91184b6)
|
||||
[#6175](https://github.com/npm/npm/issues/6175) pack scoped packages
|
||||
correctly ([@othiym23](https://github.com/othiym23))
|
||||
* [`e4e48e0`](https://github.com/npm/npm/commit/e4e48e037d4e95fdb6acec80b04c5c6eaee59970)
|
||||
[#6121](https://github.com/npm/npm/issues/6121) `read-installed@3.1.2`: don't
|
||||
mark linked dev dependencies as extraneous
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`d673e41`](https://github.com/npm/npm/commit/d673e4185d43362c2b2a91acbca8c057e7303c7b)
|
||||
`cmd-shim@2.0.1`: depend on `graceful-fs` directly
|
||||
([@ForbesLindesay](https://github.com/ForbesLindesay))
|
||||
* [`9d54d45`](https://github.com/npm/npm/commit/9d54d45e602d595bdab7eae09b9fa1dc46370147)
|
||||
`npm-registry-couchapp@2.5.3`: make tests more reliable on Travis
|
||||
([@iarna](https://github.com/iarna))
|
||||
* [`673d738`](https://github.com/npm/npm/commit/673d738c6142c3d043dcee0b7aa02c9831a2e0ca)
|
||||
ensure permissions are set correctly in cache when running as root
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`6e6a5fb`](https://github.com/npm/npm/commit/6e6a5fb74af10fd345411df4e121e554e2e3f33e)
|
||||
prepare for upgrade to `node-semver@4.0.0`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`ab8dd87`](https://github.com/npm/npm/commit/ab8dd87b943262f5996744e8d4cc30cc9358b7d7)
|
||||
swap out `ronn` for `marked-man@0.1.3` ([@isaacs](https://github.com/isaacs))
|
||||
* [`803da54`](https://github.com/npm/npm/commit/803da5404d5a0b7c9defa3fe7fa0f2d16a2b19d3)
|
||||
`npm-registry-client@3.2.0`: prepare for `node-semver@4.0.0` and include more
|
||||
error information ([@isaacs](https://github.com/isaacs))
|
||||
* [`4af0e71`](https://github.com/npm/npm/commit/4af0e7134f5757c3d456d83e8349224a4ba12660)
|
||||
make default error display less scary ([@isaacs](https://github.com/isaacs))
|
||||
* [`4fd9e79`](https://github.com/npm/npm/commit/4fd9e7901a15abff7a3dd478d99ce239b9580bca)
|
||||
`npm-registry-client@3.2.1`: handle errors returned by the registry much,
|
||||
much better ([@othiym23](https://github.com/othiym23))
|
||||
* [`ca791e2`](https://github.com/npm/npm/commit/ca791e27e97e51c1dd491bff6622ac90b54c3e23)
|
||||
restore a long (always?) missing pass for deduping
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`ca0ef0e`](https://github.com/npm/npm/commit/ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2)
|
||||
correctly interpret relative paths for local dependencies
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`5eb8db2`](https://github.com/npm/npm/commit/5eb8db2c370eeb4cd34f6e8dc6a935e4ea325621)
|
||||
`npm-package-arg@2.1.2`: support git+file:// URLs for local bare repos
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`860a185`](https://github.com/npm/npm/commit/860a185c43646aca84cb93d1c05e2266045c316b)
|
||||
tweak docs to no longer advocate checking in `node_modules`
|
||||
([@hunterloftis](https://github.com/hunterloftis))
|
||||
* [`80e9033`](https://github.com/npm/npm/commit/80e9033c40e373775e35c674faa6c1948661782b)
|
||||
add links to nodejs.org downloads to docs
|
||||
([@meetar](https://github.com/meetar))
|
||||
|
||||
### v1.4.28 (2014-09-12):
|
||||
|
||||
* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14)
|
||||
|
|
@ -8,16 +74,101 @@
|
|||
callbacks have finished before proceeding
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v2.0.0-beta.3 (2014-09-04):
|
||||
|
||||
* [`fa79413`](https://github.com/npm/npm/commit/fa794138bec8edb7b88639db25ee9c010d2f4c2b)
|
||||
[#6119](https://github.com/npm/npm/issues/6119) fall back to registry installs
|
||||
if package.json is missing in a local directory ([@iarna](https://github.com/iarna))
|
||||
* [`16073e2`](https://github.com/npm/npm/commit/16073e2d8ae035961c4c189b602d4aacc6d6b387)
|
||||
`npm-package-arg@2.1.0`: support file URIs as local specs
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`9164acb`](https://github.com/npm/npm/commit/9164acbdee28956fa816ce5e473c559395ae4ec2)
|
||||
`github-url-from-username-repo@1.0.2`: don't match strings that are already
|
||||
URIs ([@othiym23](https://github.com/othiym23))
|
||||
* [`4067d6b`](https://github.com/npm/npm/commit/4067d6bf303a69be13f3af4b19cf4fee1b0d3e12)
|
||||
[#5629](https://github.com/npm/npm/issues/5629) support saving of local packages
|
||||
in `package.json` ([@dylang](https://github.com/dylang))
|
||||
* [`1b2ffdf`](https://github.com/npm/npm/commit/1b2ffdf359a8c897a78f91fc5a5d535c97aaec97)
|
||||
[#6097](https://github.com/npm/npm/issues/6097) document scoped packages
|
||||
([@seldo](https://github.com/seldo))
|
||||
* [`0a67d53`](https://github.com/npm/npm/commit/0a67d536067c4808a594d81288d34c0f7e97e105)
|
||||
[#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly
|
||||
set headers on proxy requests ([@isaacs](https://github.com/isaacs))
|
||||
* [`9bac6b8`](https://github.com/npm/npm/commit/9bac6b860b674d24251bb7b8ba412fdb26cbc836)
|
||||
`npmconf@2.0.8`: disallow semver ranges in tag configuration
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`d2d4d7c`](https://github.com/npm/npm/commit/d2d4d7cd3c32f91a87ffa11fe464d524029011c3)
|
||||
[#6082](https://github.com/npm/npm/issues/6082) don't allow tagging with a
|
||||
semver range as the tag name ([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.27 (2014-09-04):
|
||||
|
||||
* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e)
|
||||
[#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly set
|
||||
[#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set
|
||||
headers on proxy requests ([@isaacs](https://github.com/isaacs))
|
||||
* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5)
|
||||
[#6055](https://github.com/npm/npm/issues/6055) `npmconf@1.1.8`: restore
|
||||
[#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore
|
||||
case-insensitivity of environmental config
|
||||
([@iarna](https://github.com/iarna))
|
||||
|
||||
### v2.0.0-beta.2 (2014-08-29):
|
||||
|
||||
SPECIAL LABOR DAY WEEKEND RELEASE PARTY WOOO
|
||||
|
||||
* [`ed207e8`](https://github.com/npm/npm/commit/ed207e88019de3150037048df6267024566e1093)
|
||||
`npm-registry-client@3.1.7`: Clean up auth logic and improve logging around
|
||||
auth decisions. Also error on trying to change a user document without
|
||||
writing to it. ([@othiym23](https://github.com/othiym23))
|
||||
* [`66c7423`](https://github.com/npm/npm/commit/66c7423b7fb07a326b83c83727879410d43c439f)
|
||||
`npmconf@2.0.7`: support -C as an alias for --prefix
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`0dc6a07`](https://github.com/npm/npm/commit/0dc6a07c778071c94c2251429c7d107e88a45095)
|
||||
[#6059](https://github.com/npm/npm/issues/6059) run commands in prefix, not
|
||||
cwd ([@isaacs](https://github.com/isaacs))
|
||||
* [`65d2179`](https://github.com/npm/npm/commit/65d2179af96737eb9038eaa24a293a62184aaa13)
|
||||
`github-url-from-username-repo@1.0.1`: part 3 handle slashes in branch names
|
||||
([@robertkowalski](https://github.com/robertkowalski))
|
||||
* [`e8d75d0`](https://github.com/npm/npm/commit/e8d75d0d9f148ce2b3e8f7671fa281945bac363d)
|
||||
[#6057](https://github.com/npm/npm/issues/6057) `read-installed@3.1.1`:
|
||||
properly handle extraneous dev dependencies of required dependencies
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`0602f70`](https://github.com/npm/npm/commit/0602f708f070d524ad41573afd4c57171cab21ad)
|
||||
[#6064](https://github.com/npm/npm/issues/6064) ls: do not show deps of
|
||||
extraneous deps ([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v2.0.0-beta.1 (2014-08-28):
|
||||
|
||||
* [`78a1fc1`](https://github.com/npm/npm/commit/78a1fc12307a0cbdbc944775ed831b876ee65855)
|
||||
`github-url-from-git@1.4.0`: add support for git+https and git+ssh
|
||||
([@stefanbuck](https://github.com/stefanbuck))
|
||||
* [`bf247ed`](https://github.com/npm/npm/commit/bf247edf5429c6b3ec4d4cb798fa0eb0a9c19fc1)
|
||||
`columnify@1.2.1` ([@othiym23](https://github.com/othiym23))
|
||||
* [`4bbe682`](https://github.com/npm/npm/commit/4bbe682a6d4eabcd23f892932308c9f228bf4de3)
|
||||
`cmd-shim@2.0.0`: upgrade to graceful-fs 3
|
||||
([@ForbesLindesay](https://github.com/ForbesLindesay))
|
||||
* [`ae1d590`](https://github.com/npm/npm/commit/ae1d590bdfc2476a4ed446e760fea88686e3ae05)
|
||||
`npm-package-arg@2.0.4`: accept slashes in branch names
|
||||
([@thealphanerd](https://github.com/thealphanerd))
|
||||
* [`b2f51ae`](https://github.com/npm/npm/commit/b2f51aecadf585711e145b6516f99e7c05f53614)
|
||||
`semver@3.0.1`: semver.clean() is cleaner
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`1d041a8`](https://github.com/npm/npm/commit/1d041a8a5ebd5bf6cecafab2072d4ec07823adab)
|
||||
`github-url-from-username-repo@1.0.0`: accept slashes in branch names
|
||||
([@robertkowalski](https://github.com/robertkowalski))
|
||||
* [`02c85d5`](https://github.com/npm/npm/commit/02c85d592c4058e5d9eafb0be36b6743ae631998)
|
||||
`async-some@1.0.1` ([@othiym23](https://github.com/othiym23))
|
||||
* [`5af493e`](https://github.com/npm/npm/commit/5af493efa8a463cd1acc4a9a394699e2c0793b9c)
|
||||
ensure lifecycle spawn errors caught properly
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`60fe012`](https://github.com/npm/npm/commit/60fe012fac9570d6c72554cdf34a6fa95bf0f0a6)
|
||||
`npmconf@2.0.6`: init.version defaults to 1.0.0
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`b4c717b`](https://github.com/npm/npm/commit/b4c717bbf58fb6a0d64ad229036c79a184297ee2)
|
||||
`npm-registry-client@3.1.4`: properly encode % in passwords
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`7b55f44`](https://github.com/npm/npm/commit/7b55f44420252baeb3f30da437d22956315c31c9)
|
||||
doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.26 (2014-08-28):
|
||||
|
||||
* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d)
|
||||
|
|
@ -40,6 +191,51 @@
|
|||
* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8)
|
||||
doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v2.0.0-beta.0 (2014-08-21):
|
||||
|
||||
* [`685f8be`](https://github.com/npm/npm/commit/685f8be1f2770cc75fd0e519a8d7aac72735a270)
|
||||
`npm-registry-client@3.1.3`: Print the notification header returned by the
|
||||
registry, and make sure status codes are printed without gratuitous quotes
|
||||
around them. ([@isaacs](https://github.com/isaacs) /
|
||||
[@othiym23](https://github.com/othiym23))
|
||||
* [`a8cb676`](https://github.com/npm/npm/commit/a8cb676aef0561eaf04487d2719672b097392c85)
|
||||
[#5900](https://github.com/npm/npm/issues/5900) remove `npm` from its own
|
||||
`engines` field in `package.json`. None of us remember why it was there.
|
||||
([@timoxley](https://github.com/timoxley))
|
||||
* [`6c47201`](https://github.com/npm/npm/commit/6c47201a7d071e8bf091b36933daf4199cc98e80)
|
||||
[#5752](https://github.com/npm/npm/issues/5752),
|
||||
[#6013](https://github.com/npm/npm/issues/6013) save git URLs correctly in
|
||||
`_resolved` fields ([@isaacs](https://github.com/isaacs))
|
||||
* [`e4e1223`](https://github.com/npm/npm/commit/e4e1223a91c37688ba3378e1fc9d5ae045654d00)
|
||||
[#5936](https://github.com/npm/npm/issues/5936) document the use of tags in
|
||||
`package.json` ([@KenanY](https://github.com/KenanY))
|
||||
* [`c92b8d4`](https://github.com/npm/npm/commit/c92b8d4db7bde2a501da5b7d612684de1d629a42)
|
||||
[#6004](https://github.com/npm/npm/issues/6004) manually installed scoped
|
||||
packages are tracked correctly ([@dead](https://github.com/dead)-horse)
|
||||
* [`21ca0aa`](https://github.com/npm/npm/commit/21ca0aaacbcfe2b89b0a439d914da0cae62de550)
|
||||
[#5945](https://github.com/npm/npm/issues/5945) link scoped packages
|
||||
correctly ([@dead](https://github.com/dead)-horse)
|
||||
* [`16bead7`](https://github.com/npm/npm/commit/16bead7f2c82aec35b83ff0ec04df051ba456764)
|
||||
[#5958](https://github.com/npm/npm/issues/5958) ensure that file streams work
|
||||
in all versions of node ([@dead](https://github.com/dead)-horse)
|
||||
* [`dbf0cab`](https://github.com/npm/npm/commit/dbf0cab29d0db43ac95e4b5a1fbdea1e0af75f10)
|
||||
you can now pass quoted args to `npm run-script`
|
||||
([@bcoe](https://github.com/bcoe))
|
||||
* [`0583874`](https://github.com/npm/npm/commit/05838743f01ccb8d2432b3858d66847002fb62df)
|
||||
`tar@1.0.1`: Add test for removing an extract target immediately after
|
||||
unpacking.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`cdf3b04`](https://github.com/npm/npm/commit/cdf3b0428bc0b0183fb41dcde9e34e8f42c5e3a7)
|
||||
`lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, and
|
||||
`retries` options. Part 2 of race condition leading to `ENOENT`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
errors.
|
||||
* [`22d72a8`](https://github.com/npm/npm/commit/22d72a87a9e1a9ab56d9585397f63551887d9125)
|
||||
`fstream@1.0.2`: Fix a double-finish call which can result in excess FS
|
||||
operations after the `close` event. Part 1 of race condition leading to
|
||||
`ENOENT` errors.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.25 (2014-08-21):
|
||||
|
||||
* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e)
|
||||
|
|
@ -61,6 +257,48 @@
|
|||
leading to `ENOENT` errors.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v2.0.0-alpha.7 (2014-08-14):
|
||||
|
||||
* [`f23f1d8`](https://github.com/npm/npm/commit/f23f1d8e8f86ec1b7ab8dad68250bccaa67d61b1)
|
||||
doc: update version doc to include `pre-*` increment args
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`b6bb746`](https://github.com/npm/npm/commit/b6bb7461824d4dc1c0936f46bd7929b5cd597986)
|
||||
build: add 'make tag' to tag current release as latest
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`27c4bb6`](https://github.com/npm/npm/commit/27c4bb606e46e5eaf604b19fe8477bc6567f8b2e)
|
||||
build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs))
|
||||
* [`cff66c3`](https://github.com/npm/npm/commit/cff66c3bf2850880058ebe2a26655dafd002495e)
|
||||
build: add script to output `v1.4-next` publish tag
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`22abec8`](https://github.com/npm/npm/commit/22abec8833474879ac49b9604c103bc845dad779)
|
||||
build: remove outdated `docpublish` make target
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`1be4de5`](https://github.com/npm/npm/commit/1be4de51c3976db8564f72b00d50384c921f0917)
|
||||
build: remove `unpublish` step from `make publish`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`e429e20`](https://github.com/npm/npm/commit/e429e2011f4d78e398f2461bca3e5a9a146fbd0c)
|
||||
doc: add new changelog ([@othiym23](https://github.com/othiym23))
|
||||
* [`9243d20`](https://github.com/npm/npm/commit/9243d207896ea307082256604c10817f7c318d68)
|
||||
lifecycle: test lifecycle path modification
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`021770b`](https://github.com/npm/npm/commit/021770b9cb07451509f0a44afff6c106311d8cf6)
|
||||
lifecycle: BREAKING CHANGE do not add the directory containing node executable
|
||||
([@chulkilee](https://github.com/chulkilee))
|
||||
* [`1d5c41d`](https://github.com/npm/npm/commit/1d5c41dd0d757bce8b87f10c4135f04ece55aeb9)
|
||||
install: rename .gitignore when unpacking foreign tarballs
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`9aac267`](https://github.com/npm/npm/commit/9aac2670a73423544d92b27cc301990a16a9563b)
|
||||
cache: detect non-gzipped tar files more reliably
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`3f24755`](https://github.com/npm/npm/commit/3f24755c8fce3c7ab11ed1dc632cc40d7ef42f62)
|
||||
`readdir-scoped-modules@1.0.0` ([@isaacs](https://github.com/isaacs))
|
||||
* [`151cd2f`](https://github.com/npm/npm/commit/151cd2ff87b8ac2fc9ea366bc9b7f766dc5b9684)
|
||||
`read-installed@3.1.0` ([@isaacs](https://github.com/isaacs))
|
||||
* [`f5a9434`](https://github.com/npm/npm/commit/f5a94343a8ebe4a8cd987320b55137aef53fb3fd)
|
||||
test: fix Travis timeouts ([@dylang](https://github.com/dylang))
|
||||
* [`126cafc`](https://github.com/npm/npm/commit/126cafcc6706814c88af3042f2ffff408747bff4)
|
||||
`npm-registry-couchapp@2.5.0` ([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.4.24 (2014-08-14):
|
||||
|
||||
* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb)
|
||||
|
|
@ -89,7 +327,15 @@
|
|||
cache: detect non-gzipped tar files more reliably
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v2.0.0-alpha-6 (2014-07-31):
|
||||
### v2.0.0-alpha.6 (2014-08-07):
|
||||
|
||||
BREAKING CHANGE:
|
||||
|
||||
* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to
|
||||
version 3: `^0.x.y` is now functionally the same as `=0.x.y`.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
Other changes:
|
||||
|
||||
* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into
|
||||
npm-registry-client ([@othiym23](https://github.com/othiym23))
|
||||
|
|
@ -97,8 +343,6 @@
|
|||
([@isaacs](https://github.com/isaacs))
|
||||
* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary
|
||||
mkdirps ([@isaacs](https://github.com/isaacs))
|
||||
* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to version 3
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute
|
||||
perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows))
|
||||
* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1`
|
||||
|
|
@ -270,7 +514,7 @@ Other changes:
|
|||
([@othiym23](https://github.com/othiym23))
|
||||
* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ))
|
||||
* Use core.longpaths on win32 git - fixes
|
||||
[#5525](https://github.com/npm/npm/issues/5525) (Bradley Meck)
|
||||
[#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck))
|
||||
* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs))
|
||||
* Consolidate color sniffing in config/log loading process
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
|
|
|||
16
deps/npm/Makefile
vendored
16
deps/npm/Makefile
vendored
|
|
@ -72,7 +72,7 @@ dev: install
|
|||
link: uninstall
|
||||
node cli.js link -f
|
||||
|
||||
clean: markedclean ronnclean doc-clean uninstall
|
||||
clean: markedclean marked-manclean doc-clean uninstall
|
||||
rm -rf npmrc
|
||||
node cli.js cache clean
|
||||
|
||||
|
|
@ -84,19 +84,19 @@ doc: $(mandocs) $(htmldocs)
|
|||
markedclean:
|
||||
rm -rf node_modules/marked node_modules/.bin/marked .building_marked
|
||||
|
||||
ronnclean:
|
||||
rm -rf node_modules/ronn node_modules/.bin/ronn .building_ronn
|
||||
marked-manclean:
|
||||
rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man
|
||||
|
||||
docclean: doc-clean
|
||||
doc-clean:
|
||||
rm -rf \
|
||||
.building_marked \
|
||||
.building_ronn \
|
||||
.building_marked-man \
|
||||
html/doc \
|
||||
html/api \
|
||||
man
|
||||
|
||||
# use `npm install ronn` for this to work.
|
||||
# use `npm install marked-man` 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 $< $@
|
||||
|
|
@ -161,10 +161,10 @@ marked: node_modules/.bin/marked
|
|||
node_modules/.bin/marked:
|
||||
node cli.js install marked --no-global
|
||||
|
||||
ronn: node_modules/.bin/ronn
|
||||
marked-man: node_modules/.bin/marked-man
|
||||
|
||||
node_modules/.bin/ronn:
|
||||
node cli.js install ronn --no-global
|
||||
node_modules/.bin/marked-man:
|
||||
node cli.js install marked-man --no-global
|
||||
|
||||
doc: man
|
||||
|
||||
|
|
|
|||
6
deps/npm/README.md
vendored
6
deps/npm/README.md
vendored
|
|
@ -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 now.
|
||||
npm comes with [node](http://nodejs.org/download/) now.
|
||||
|
||||
### Windows Computers
|
||||
|
||||
Get the MSI. npm is in it.
|
||||
[Get the MSI](http://nodejs.org/download/). npm is in it.
|
||||
|
||||
### Apple Macintosh Computers
|
||||
|
||||
Get the pkg. npm is in it.
|
||||
[Get the pkg](http://nodejs.org/download/). npm is in it.
|
||||
|
||||
### Other Sorts of Unices
|
||||
|
||||
|
|
|
|||
13
deps/npm/bin/npm-cli.js
vendored
13
deps/npm/bin/npm-cli.js
vendored
|
|
@ -19,8 +19,7 @@ var log = require("npmlog")
|
|||
log.pause() // will be unpaused when config is loaded.
|
||||
log.info("it worked if it ends with", "ok")
|
||||
|
||||
var fs = require("graceful-fs")
|
||||
, path = require("path")
|
||||
var path = require("path")
|
||||
, npm = require("../lib/npm.js")
|
||||
, npmconf = require("npmconf")
|
||||
, errorHandler = require("../lib/utils/error-handler.js")
|
||||
|
|
@ -58,16 +57,6 @@ 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") {
|
||||
|
|
|
|||
27
deps/npm/doc/cli/npm-adduser.md
vendored
27
deps/npm/doc/cli/npm-adduser.md
vendored
|
|
@ -3,30 +3,47 @@ npm-adduser(1) -- Add a registry user account
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm adduser
|
||||
npm adduser [--registry=url] [--scope=@orgname]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
Create or verify a user named `<username>` in the npm registry, and
|
||||
save the credentials to the `.npmrc` file.
|
||||
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)`).
|
||||
|
||||
The username, password, and email are read in from prompts.
|
||||
|
||||
You may use this command to change your email address, but not username
|
||||
or password.
|
||||
|
||||
To reset your password, go to <https://npmjs.org/forgot>
|
||||
To reset your password, go to <https://www.npmjs.org/forgot>
|
||||
|
||||
You may use this command multiple times with the same user account to
|
||||
authorize on a new machine.
|
||||
|
||||
`npm login` is an alias to `adduser` and behaves exactly the same way.
|
||||
|
||||
## CONFIGURATION
|
||||
|
||||
### registry
|
||||
|
||||
Default: http://registry.npmjs.org/
|
||||
|
||||
The base URL of the npm package registry.
|
||||
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.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
|
|
|
|||
45
deps/npm/doc/cli/npm-install.md
vendored
45
deps/npm/doc/cli/npm-install.md
vendored
|
|
@ -7,10 +7,10 @@ npm-install(1) -- Install a package
|
|||
npm install <tarball file>
|
||||
npm install <tarball url>
|
||||
npm install <folder>
|
||||
npm install <name> [--save|--save-dev|--save-optional] [--save-exact]
|
||||
npm install <name>@<tag>
|
||||
npm install <name>@<version>
|
||||
npm install <name>@<version range>
|
||||
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 i (with any of the previous argument usage)
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -70,7 +70,7 @@ after packing it up into a tarball (b).
|
|||
|
||||
npm install https://github.com/indexzero/forever/tarball/v0.5.6
|
||||
|
||||
* `npm install <name> [--save|--save-dev|--save-optional]`:
|
||||
* `npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]`:
|
||||
|
||||
Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
|
||||
`npm-config(7)`.)
|
||||
|
|
@ -98,9 +98,19 @@ after packing it up into a tarball (b).
|
|||
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
|
||||
|
|
@ -110,7 +120,7 @@ after packing it up into a tarball (b).
|
|||
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 <name>@<tag>`:
|
||||
* `npm install [@<scope>/]<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
|
||||
|
|
@ -119,17 +129,19 @@ after packing it up into a tarball (b).
|
|||
Example:
|
||||
|
||||
npm install sax@latest
|
||||
npm install @myorg/mypackage@latest
|
||||
|
||||
* `npm install <name>@<version>`:
|
||||
* `npm install [@<scope>/]<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 <name>@<version range>`:
|
||||
* `npm install [@<scope>/]<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)`.
|
||||
|
|
@ -140,6 +152,19 @@ 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 <githubname>/<githubrepo>`:
|
||||
|
||||
Install the package at `https://github.com/githubname/githubrepo" by
|
||||
attempting to clone it using `git`.
|
||||
|
||||
Example:
|
||||
|
||||
npm install mygithubuser/myproject
|
||||
|
||||
To reference a package in a git repo that is not on GitHub, see git
|
||||
remote urls below.
|
||||
|
||||
* `npm install <git remote url>`:
|
||||
|
||||
|
|
|
|||
18
deps/npm/doc/cli/npm-link.md
vendored
18
deps/npm/doc/cli/npm-link.md
vendored
|
|
@ -4,7 +4,7 @@ npm-link(1) -- Symlink a package folder
|
|||
## SYNOPSIS
|
||||
|
||||
npm link (in package folder)
|
||||
npm link <pkgname>
|
||||
npm link [@<scope>/]<pkgname>
|
||||
npm ln (with any of the previous argument usage)
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -12,7 +12,8 @@ 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.
|
||||
symbolic link from `prefix/package-name` to the current folder (see
|
||||
`npm-config(7)` for the value of `prefix`).
|
||||
|
||||
Next, in some other location, `npm link package-name` will create a
|
||||
symlink from the local `node_modules` folder to the global symlink.
|
||||
|
|
@ -20,12 +21,14 @@ 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 by 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:
|
||||
|
||||
|
|
@ -51,6 +54,11 @@ The second line is the equivalent of doing:
|
|||
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)
|
||||
|
|
|
|||
8
deps/npm/doc/cli/npm-ls.md
vendored
8
deps/npm/doc/cli/npm-ls.md
vendored
|
|
@ -3,10 +3,10 @@ npm-ls(1) -- List installed packages
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm list [<pkg> ...]
|
||||
npm ls [<pkg> ...]
|
||||
npm la [<pkg> ...]
|
||||
npm ll [<pkg> ...]
|
||||
npm list [[@<scope>/]<pkg> ...]
|
||||
npm ls [[@<scope>/]<pkg> ...]
|
||||
npm la [[@<scope>/]<pkg> ...]
|
||||
npm ll [[@<scope>/]<pkg> ...]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
8
deps/npm/doc/cli/npm-prefix.md
vendored
8
deps/npm/doc/cli/npm-prefix.md
vendored
|
|
@ -3,11 +3,15 @@ npm-prefix(1) -- Display prefix
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm prefix
|
||||
npm prefix [-g]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
Print the prefix to standard out.
|
||||
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.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
|
|
|
|||
6
deps/npm/doc/cli/npm-publish.md
vendored
6
deps/npm/doc/cli/npm-publish.md
vendored
|
|
@ -11,6 +11,10 @@ npm-publish(1) -- Publish a package
|
|||
|
||||
Publishes a package to the registry so that it can be installed by name.
|
||||
|
||||
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)`).
|
||||
|
||||
* `<folder>`:
|
||||
A folder containing a package.json file
|
||||
|
||||
|
|
@ -24,7 +28,7 @@ Publishes a package to the registry so that it can be installed by name.
|
|||
and `npm install` installs the `latest` tag.
|
||||
|
||||
Fails if the package name and version combination already exists in
|
||||
the registry.
|
||||
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
|
||||
|
|
|
|||
2
deps/npm/doc/cli/npm-restart.md
vendored
2
deps/npm/doc/cli/npm-restart.md
vendored
|
|
@ -3,7 +3,7 @@ npm-restart(1) -- Start a package
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm restart <name>
|
||||
npm restart [-- <args>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
4
deps/npm/doc/cli/npm-run-script.md
vendored
4
deps/npm/doc/cli/npm-run-script.md
vendored
|
|
@ -3,8 +3,8 @@ npm-run-script(1) -- Run arbitrary package scripts
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm run-script [<pkg>] [command]
|
||||
npm run [<pkg>] [command]
|
||||
npm run-script [command] [-- <args>]
|
||||
npm run [command] [-- <args>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
2
deps/npm/doc/cli/npm-start.md
vendored
2
deps/npm/doc/cli/npm-start.md
vendored
|
|
@ -3,7 +3,7 @@ npm-start(1) -- Start a package
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm start <name>
|
||||
npm start [-- <args>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
2
deps/npm/doc/cli/npm-stop.md
vendored
2
deps/npm/doc/cli/npm-stop.md
vendored
|
|
@ -3,7 +3,7 @@ npm-stop(1) -- Stop a package
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm stop <name>
|
||||
npm stop [-- <args>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
4
deps/npm/doc/cli/npm-test.md
vendored
4
deps/npm/doc/cli/npm-test.md
vendored
|
|
@ -3,8 +3,8 @@ npm-test(1) -- Test a package
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm test <name>
|
||||
npm tst <name>
|
||||
npm test [-- <args>]
|
||||
npm tst [-- <args>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
5
deps/npm/doc/cli/npm-uninstall.md
vendored
5
deps/npm/doc/cli/npm-uninstall.md
vendored
|
|
@ -3,7 +3,7 @@ npm-rm(1) -- Remove a package
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm uninstall <name> [--save|--save-dev|--save-optional]
|
||||
npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
|
||||
npm rm (with any of the previous argument usage)
|
||||
|
||||
## DESCRIPTION
|
||||
|
|
@ -27,9 +27,12 @@ the package version in your main package.json:
|
|||
|
||||
* `--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
|
||||
|
||||
|
|
|
|||
4
deps/npm/doc/cli/npm-unpublish.md
vendored
4
deps/npm/doc/cli/npm-unpublish.md
vendored
|
|
@ -3,7 +3,7 @@ npm-unpublish(1) -- Remove a package from the registry
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm unpublish <name>[@<version>]
|
||||
npm unpublish [@<scope>/]<name>[@<version>]
|
||||
|
||||
## WARNING
|
||||
|
||||
|
|
@ -27,6 +27,8 @@ 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)
|
||||
|
|
|
|||
7
deps/npm/doc/cli/npm-update.md
vendored
7
deps/npm/doc/cli/npm-update.md
vendored
|
|
@ -12,8 +12,11 @@ This command will update all the packages listed to the latest version
|
|||
|
||||
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.
|
||||
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
|
||||
|
||||
|
|
|
|||
4
deps/npm/doc/cli/npm-view.md
vendored
4
deps/npm/doc/cli/npm-view.md
vendored
|
|
@ -3,8 +3,8 @@ npm-view(1) -- View registry info
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
npm view <name>[@<version>] [<field>[.<subfield>]...]
|
||||
npm v <name>[@<version>] [<field>[.<subfield>]...]
|
||||
npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
|
||||
npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
|
|||
6
deps/npm/doc/files/npm-folders.md
vendored
6
deps/npm/doc/files/npm-folders.md
vendored
|
|
@ -42,6 +42,12 @@ 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
|
||||
|
|
|
|||
22
deps/npm/doc/files/package.json.md
vendored
22
deps/npm/doc/files/package.json.md
vendored
|
|
@ -30,6 +30,9 @@ The name is what your thing is called. Some tips:
|
|||
* You may want to check the npm registry to see if there's something by that name
|
||||
already, before you get too attached to it. http://registry.npmjs.org/
|
||||
|
||||
A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
|
||||
`npm-scope(7)` for more detail.
|
||||
|
||||
## version
|
||||
|
||||
The *most* important things in your package.json are the name and version fields.
|
||||
|
|
@ -320,6 +323,8 @@ 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:
|
||||
|
||||
|
|
@ -334,6 +339,8 @@ For example, these are all valid:
|
|||
, "elf" : "~1.2.3"
|
||||
, "two" : "2.x"
|
||||
, "thr" : "3.3.x"
|
||||
, "lat" : "latest"
|
||||
, "dyl" : "~/projects/dyl"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -369,6 +376,21 @@ As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-proj
|
|||
}
|
||||
}
|
||||
|
||||
## Local Paths
|
||||
|
||||
As of version 2.0.0 you can provide a path to a local directory that
|
||||
contains a package. Local paths can be in the form:
|
||||
|
||||
../foo/bar
|
||||
~/foo/bar
|
||||
./foo/bar
|
||||
/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.
|
||||
|
||||
## devDependencies
|
||||
|
||||
If someone is planning on downloading and using your module in their
|
||||
|
|
|
|||
35
deps/npm/doc/misc/npm-config.md
vendored
35
deps/npm/doc/misc/npm-config.md
vendored
|
|
@ -50,6 +50,7 @@ The following shorthands are parsed on the command-line:
|
|||
* `-dd`, `--verbose`: `--loglevel verbose`
|
||||
* `-ddd`: `--loglevel silly`
|
||||
* `-g`: `--global`
|
||||
* `-C`: `--prefix`
|
||||
* `-l`: `--long`
|
||||
* `-m`: `--message`
|
||||
* `-p`, `--porcelain`: `--parseable`
|
||||
|
|
@ -253,12 +254,6 @@ set.
|
|||
|
||||
The command to run for `npm edit` or `npm config edit`.
|
||||
|
||||
### email
|
||||
|
||||
The email of the logged-in user.
|
||||
|
||||
Set by the `npm adduser` command. Should not be set explicitly.
|
||||
|
||||
### engine-strict
|
||||
|
||||
* Default: false
|
||||
|
|
@ -417,6 +412,14 @@ The value `npm init` should use by default for the package author's homepage.
|
|||
|
||||
The value `npm init` should use by default for the package license.
|
||||
|
||||
### init.version
|
||||
|
||||
* Default: "0.0.0"
|
||||
* Type: semver
|
||||
|
||||
The value that `npm init` should use by default for the package
|
||||
version number, if not already set in package.json.
|
||||
|
||||
### json
|
||||
|
||||
* Default: false
|
||||
|
|
@ -463,7 +466,7 @@ to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
|
|||
|
||||
* Default: "http"
|
||||
* Type: String
|
||||
* Values: "silent", "win", "error", "warn", "http", "info", "verbose", "silly"
|
||||
* Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
|
||||
|
||||
What level of logs to report. On failure, *all* logs are written to
|
||||
`npm-debug.log` in the current working directory.
|
||||
|
|
@ -671,6 +674,17 @@ set to `^1.2.3` which allows minor upgrades for that package, but after
|
|||
`npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows
|
||||
patch upgrades.
|
||||
|
||||
### scope
|
||||
|
||||
* Default: ""
|
||||
* Type: String
|
||||
|
||||
Associate an operation with a scope for a scoped registry. Useful when logging
|
||||
in to a private registry for the first time:
|
||||
`npm login --scope=@organization --registry=registry.organization.com`, which
|
||||
will cause `@organization` to be mapped to the registry for future installation
|
||||
of packages specified according to the pattern `@organization/package`.
|
||||
|
||||
### searchopts
|
||||
|
||||
* Default: ""
|
||||
|
|
@ -794,13 +808,6 @@ instead of complete help when doing `npm-help(1)`.
|
|||
|
||||
The UID to set to when running package scripts as root.
|
||||
|
||||
### username
|
||||
|
||||
* Default: null
|
||||
* Type: String
|
||||
|
||||
The username on the npm registry. Set with `npm adduser`
|
||||
|
||||
### userconfig
|
||||
|
||||
* Default: ~/.npmrc
|
||||
|
|
|
|||
20
deps/npm/doc/misc/npm-faq.md
vendored
20
deps/npm/doc/misc/npm-faq.md
vendored
|
|
@ -75,18 +75,20 @@ npm will not help you do something that is known to be a bad idea.
|
|||
|
||||
## Should I check my `node_modules` folder into git?
|
||||
|
||||
Mikeal Rogers answered this question very well:
|
||||
Usually, no. Allow npm to resolve dependencies for your packages.
|
||||
|
||||
<http://www.futurealoof.com/posts/nodemodules-in-git.html>
|
||||
For packages you **deploy**, such as websites and apps,
|
||||
you should use npm shrinkwrap to lock down your full dependency tree:
|
||||
|
||||
tl;dr
|
||||
https://www.npmjs.org/doc/cli/npm-shrinkwrap.html
|
||||
|
||||
* Check `node_modules` into git for things you **deploy**, such as
|
||||
websites and apps.
|
||||
* Do not check `node_modules` into git for libraries and modules
|
||||
intended to be reused.
|
||||
* Use npm to manage dependencies in your dev environment, but not in
|
||||
your deployment scripts.
|
||||
If you are paranoid about depending on the npm ecosystem,
|
||||
you should run a private npm mirror or a private cache.
|
||||
|
||||
If you want 100% confidence in being able to reproduce the specific bytes
|
||||
included in a deployment, you should use an additional mechanism that can
|
||||
verify contents rather than versions. For example,
|
||||
Amazon machine images, DigitalOcean snapshots, Heroku slugs, or simple tarballs.
|
||||
|
||||
## Is it 'npm' or 'NPM' or 'Npm'?
|
||||
|
||||
|
|
|
|||
4
deps/npm/doc/misc/npm-index.md
vendored
4
deps/npm/doc/misc/npm-index.md
vendored
|
|
@ -409,6 +409,10 @@ Index of all npm documentation
|
|||
|
||||
The JavaScript Package Registry
|
||||
|
||||
### npm-scope(7)
|
||||
|
||||
Scoped packages
|
||||
|
||||
### npm-scripts(7)
|
||||
|
||||
How npm handles the "scripts" field
|
||||
|
|
|
|||
15
deps/npm/doc/misc/npm-registry.md
vendored
15
deps/npm/doc/misc/npm-registry.md
vendored
|
|
@ -12,15 +12,14 @@ write APIs as well, to allow for publishing packages and managing user
|
|||
account information.
|
||||
|
||||
The official public npm registry is at <http://registry.npmjs.org/>. It
|
||||
is powered by a CouchDB database at
|
||||
<http://isaacs.iriscouch.com/registry>. The code for the couchapp is
|
||||
available at <http://github.com/npm/npmjs.org>. npm user accounts
|
||||
are CouchDB users, stored in the <http://isaacs.iriscouch.com/_users>
|
||||
database.
|
||||
is powered by a CouchDB database, of which there is a public mirror at
|
||||
<http://skimdb.npmjs.com/registry>. The code for the couchapp is
|
||||
available at <http://github.com/npm/npm-registry-couchapp>.
|
||||
|
||||
The registry URL is supplied by the `registry` config parameter. See
|
||||
`npm-config(1)`, `npmrc(5)`, and `npm-config(7)` for more on managing
|
||||
npm's configuration.
|
||||
The registry URL used is determined by the scope of the package (see
|
||||
`npm-scope(7)`). If no scope is specified, the default registry is used, which is
|
||||
supplied by the `registry` config parameter. See `npm-config(1)`,
|
||||
`npmrc(5)`, and `npm-config(7)` for more on managing npm's configuration.
|
||||
|
||||
## Can I run my own private registry?
|
||||
|
||||
|
|
|
|||
84
deps/npm/doc/misc/npm-scope.md
vendored
Normal file
84
deps/npm/doc/misc/npm-scope.md
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
npm-scope(7) -- Scoped packages
|
||||
===============================
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
All npm packages have a name. Some package names also have a scope. A scope
|
||||
follows the usual rules for package names (url-safe characters, no leading dots
|
||||
or underscores). When used in package names, preceded by an @-symbol and
|
||||
followed by a slash, e.g.
|
||||
|
||||
@somescope/somepackagename
|
||||
|
||||
Scopes are a way of grouping related packages together, and also affect a few
|
||||
things about the way npm treats the package.
|
||||
|
||||
**As of 2014-09-03, scoped packages are not supported by the public npm registry**.
|
||||
However, the npm client is backwards-compatible with un-scoped registries, so
|
||||
it can be used to work with scoped and un-scoped registries at the same time.
|
||||
|
||||
## Installing scoped packages
|
||||
|
||||
Scoped packages are installed to a sub-folder of the regular installation
|
||||
folder, e.g. if your other packages are installed in `node_modules/packagename`,
|
||||
scoped modules will be in `node_modules/@myorg/packagename`. The scope folder
|
||||
(`@myorg`) is simply the name of the scope preceded by an @-symbol, and can
|
||||
contain any number of scoped packages.
|
||||
|
||||
A scoped package is install by referencing it by name, preceded by an @-symbol,
|
||||
in `npm install`:
|
||||
|
||||
npm install @myorg/mypackage
|
||||
|
||||
Or in `package.json`:
|
||||
|
||||
"dependencies": {
|
||||
"@myorg/mypackage": "^1.3.0"
|
||||
}
|
||||
|
||||
Note that if the @-symbol is omitted in either case npm will instead attempt to
|
||||
install from GitHub; see `npm-install(1)`.
|
||||
|
||||
## Requiring scoped packages
|
||||
|
||||
Because scoped packages are installed into a scope folder, you have to
|
||||
include the name of the scope when requiring them in your code, e.g.
|
||||
|
||||
require('@myorg/mypackage')
|
||||
|
||||
There is nothing special about the way Node treats scope folders, this is
|
||||
just specifying to require the module `mypackage` in the folder called `@myorg`.
|
||||
|
||||
## Publishing scoped packages
|
||||
|
||||
Scoped packages can be published to any registry that supports them.
|
||||
*As of 2014-09-03, the public npm registry does not support scoped packages*,
|
||||
so attempting to publish a scoped package to the registry will fail unless
|
||||
you have associated that scope with a different registry, see below.
|
||||
|
||||
## Associating a scope with a registry
|
||||
|
||||
Scopes can be associated with a separate registry. This allows you to
|
||||
seamlessly use a mix of packages from the public npm registry and one or more
|
||||
private registries, such as npm Enterprise.
|
||||
|
||||
You can associate a scope with a registry at login, e.g.
|
||||
|
||||
npm login --registry=http://reg.example.com --scope=@myco
|
||||
|
||||
Scopes have a many-to-one relationship with registries: one registry can
|
||||
host multiple scopes, but a scope only ever points to one registry.
|
||||
|
||||
You can also associate a scope with a registry using `npm config`:
|
||||
|
||||
npm config set @myco:registry http://reg.example.com
|
||||
|
||||
Once a scope is associated with a registry, any `npm install` for a package
|
||||
with that scope will request packages from that registry instead. Any
|
||||
`npm publish` for a package name that contains the scope will be published to
|
||||
that registry instead.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
* npm-install(1)
|
||||
* npm-publish(1)
|
||||
5
deps/npm/doc/misc/npm-scripts.md
vendored
5
deps/npm/doc/misc/npm-scripts.md
vendored
|
|
@ -33,8 +33,9 @@ following scripts:
|
|||
Run by the `npm restart` command. Note: `npm restart` will run the
|
||||
stop and start scripts if no `restart` script is provided.
|
||||
|
||||
Additionally, arbitrary scripts can be run by doing
|
||||
`npm run-script <pkg> <stage>`.
|
||||
Additionally, arbitrary scripts can be executed by running `npm run-script
|
||||
<pkg> <stage>`. *Pre* and *post* commands with matching names will be run for
|
||||
those as well (e.g. `premyscript`, `myscript`, `postmyscript`).
|
||||
|
||||
## NOTE: INSTALL SCRIPTS ARE AN ANTIPATTERN
|
||||
|
||||
|
|
|
|||
203
deps/npm/doc/misc/semver.md
vendored
203
deps/npm/doc/misc/semver.md
vendored
|
|
@ -41,53 +41,170 @@ A leading `"="` or `"v"` character is stripped off and ignored.
|
|||
|
||||
## Ranges
|
||||
|
||||
The following range styles are supported:
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3` A specific version. When nothing else will do. Must be a full
|
||||
version number, with major, minor, and patch versions specified.
|
||||
Note that build metadata is still ignored, so `1.2.3+build2012` will
|
||||
satisfy this range.
|
||||
* `>1.2.3` Greater than a specific version.
|
||||
* `<1.2.3` Less than a specific version. If there is no prerelease
|
||||
tag on the version range, then no prerelease version will be allowed
|
||||
either, even though these are technically "less than".
|
||||
* `>=1.2.3` Greater than or equal to. Note that prerelease versions
|
||||
are NOT equal to their "normal" equivalents, so `1.2.3-beta` will
|
||||
not satisfy this range, but `2.3.0-beta` will.
|
||||
* `<=1.2.3` Less than or equal to. In this case, prerelease versions
|
||||
ARE allowed, so `1.2.3-beta` would satisfy.
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
* `~1.2.3` := `>=1.2.3-0 <1.3.0-0` "Reasonably close to `1.2.3`". When
|
||||
using tilde operators, prerelease versions are supported as well,
|
||||
but a prerelease of the next significant digit will NOT be
|
||||
satisfactory, so `1.3.0-beta` will not satisfy `~1.2.3`.
|
||||
* `^1.2.3` := `>=1.2.3-0 <2.0.0-0` "Compatible with `1.2.3`". When
|
||||
using caret operators, anything from the specified version (including
|
||||
prerelease) will be supported up to, but not including, the next
|
||||
major version (or its prereleases). `1.5.1` will satisfy `^1.2.3`,
|
||||
while `1.2.2` and `2.0.0-beta` will not.
|
||||
* `^0.1.3` := `>=0.1.3-0 <0.2.0-0` "Compatible with `0.1.3`". `0.x.x` versions are
|
||||
special: the first non-zero component indicates potentially breaking changes,
|
||||
meaning the caret operator matches any version with the same first non-zero
|
||||
component starting at the specified version.
|
||||
* `^0.0.2` := `=0.0.2` "Only the version `0.0.2` is considered compatible"
|
||||
* `~1.2` := `>=1.2.0-0 <1.3.0-0` "Any version starting with `1.2`"
|
||||
* `^1.2` := `>=1.2.0-0 <2.0.0-0` "Any version compatible with `1.2`"
|
||||
* `1.2.x` := `>=1.2.0-0 <1.3.0-0` "Any version starting with `1.2`"
|
||||
* `1.2.*` Same as `1.2.x`.
|
||||
* `1.2` Same as `1.2.x`.
|
||||
* `~1` := `>=1.0.0-0 <2.0.0-0` "Any version starting with `1`"
|
||||
* `^1` := `>=1.0.0-0 <2.0.0-0` "Any version compatible with `1`"
|
||||
* `1.x` := `>=1.0.0-0 <2.0.0-0` "Any version starting with `1`"
|
||||
* `1.*` Same as `1.x`.
|
||||
* `1` Same as `1.x`.
|
||||
* `*` Any version whatsoever.
|
||||
* `x` Same as `*`.
|
||||
* `""` (just an empty string) Same as `*`.
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
Ranges can be joined with either a space (which implies "and") or a
|
||||
`||` (which implies "or").
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
Note: this is the same as the `~>` operator in rubygems.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero digit in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
## Functions
|
||||
|
||||
|
|
|
|||
12
deps/npm/html/doc/README.html
vendored
12
deps/npm/html/doc/README.html
vendored
|
|
@ -19,11 +19,11 @@
|
|||
<p>To install an old <strong>and unsupported</strong> version of npm that works on node 0.3
|
||||
and prior, clone the git repo and dig through the old tags and branches.</p>
|
||||
<h2 id="super-easy-install">Super Easy Install</h2>
|
||||
<p>npm comes with node now.</p>
|
||||
<p>npm comes with <a href="http://nodejs.org/download/">node</a> now.</p>
|
||||
<h3 id="windows-computers">Windows Computers</h3>
|
||||
<p>Get the MSI. npm is in it.</p>
|
||||
<p><a href="http://nodejs.org/download/">Get the MSI</a>. npm is in it.</p>
|
||||
<h3 id="apple-macintosh-computers">Apple Macintosh Computers</h3>
|
||||
<p>Get the pkg. npm is in it.</p>
|
||||
<p><a href="http://nodejs.org/download/">Get the pkg</a>. npm is in it.</p>
|
||||
<h3 id="other-sorts-of-unices">Other Sorts of Unices</h3>
|
||||
<p>Run <code>make install</code>. npm will be installed with node.</p>
|
||||
<p>If you want a more fancy pants install (a different version, customized
|
||||
|
|
@ -141,7 +141,7 @@ specific purpose, or lack of malice in any given npm package.</p>
|
|||
<p>If you have a complaint about a package in the public npm registry,
|
||||
and cannot <a href="https://www.npmjs.org/doc/misc/npm-disputes.html">resolve it with the package
|
||||
owner</a>, please email
|
||||
<a href="mailto:support@npmjs.com">support@npmjs.com</a> and explain the situation.</p>
|
||||
<a href="mailto:support@npmjs.com">support@npmjs.com</a> and explain the situation.</p>
|
||||
<p>Any data published to The npm Registry (including user account
|
||||
information) may be removed or modified at the sole discretion of the
|
||||
npm server administrators.</p>
|
||||
|
|
@ -161,7 +161,7 @@ ban your account in extreme cases. So don't do that.</p>
|
|||
<li>web:
|
||||
<a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a></li>
|
||||
<li>email:
|
||||
<a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li>
|
||||
<a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com</a></li>
|
||||
</ul>
|
||||
<p>Be sure to include <em>all</em> of the output from the npm command that didn't work
|
||||
as expected. The <code>npm-debug.log</code> file is also helpful to provide.</p>
|
||||
|
|
@ -186,5 +186,5 @@ will no doubt tell you to put the output in a gist or email.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer"><a href="../doc/README.html">README</a> — npm@1.4.28</p>
|
||||
<p id="footer"><a href="../doc/README.html">README</a> — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-bin.html
vendored
2
deps/npm/html/doc/api/npm-bin.html
vendored
|
|
@ -28,5 +28,5 @@ to the <code>npm.bin</code> member.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-bin — npm@1.4.28</p>
|
||||
<p id="footer">npm-bin — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-bugs.html
vendored
2
deps/npm/html/doc/api/npm-bugs.html
vendored
|
|
@ -33,5 +33,5 @@ friendly for programmatic use.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-bugs — npm@1.4.28</p>
|
||||
<p id="footer">npm-bugs — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-cache.html
vendored
2
deps/npm/html/doc/api/npm-cache.html
vendored
|
|
@ -42,5 +42,5 @@ incrementation.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-cache — npm@1.4.28</p>
|
||||
<p id="footer">npm-cache — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-commands.html
vendored
2
deps/npm/html/doc/api/npm-commands.html
vendored
|
|
@ -36,5 +36,5 @@ usage, or <code>man 3 npm-<command></code> for programmatic usage.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-commands — npm@1.4.28</p>
|
||||
<p id="footer">npm-commands — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-config.html
vendored
2
deps/npm/html/doc/api/npm-config.html
vendored
|
|
@ -57,5 +57,5 @@ functions instead.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-config — npm@1.4.28</p>
|
||||
<p id="footer">npm-config — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-deprecate.html
vendored
2
deps/npm/html/doc/api/npm-deprecate.html
vendored
|
|
@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-deprecate — npm@1.4.28</p>
|
||||
<p id="footer">npm-deprecate — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-docs.html
vendored
2
deps/npm/html/doc/api/npm-docs.html
vendored
|
|
@ -33,5 +33,5 @@ friendly for programmatic use.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-docs — npm@1.4.28</p>
|
||||
<p id="footer">npm-docs — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-edit.html
vendored
2
deps/npm/html/doc/api/npm-edit.html
vendored
|
|
@ -36,5 +36,5 @@ and how this is used.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-edit — npm@1.4.28</p>
|
||||
<p id="footer">npm-edit — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-explore.html
vendored
2
deps/npm/html/doc/api/npm-explore.html
vendored
|
|
@ -31,5 +31,5 @@ sure to use <code>npm rebuild <pkg></code> if you make any changes.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-explore — npm@1.4.28</p>
|
||||
<p id="footer">npm-explore — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-help-search.html
vendored
2
deps/npm/html/doc/api/npm-help-search.html
vendored
|
|
@ -44,5 +44,5 @@ Name of the file that matched</li>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-help-search — npm@1.4.28</p>
|
||||
<p id="footer">npm-help-search — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-init.html
vendored
2
deps/npm/html/doc/api/npm-init.html
vendored
|
|
@ -39,5 +39,5 @@ then go ahead and use this programmatically.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-init — npm@1.4.28</p>
|
||||
<p id="footer">npm-init — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-install.html
vendored
2
deps/npm/html/doc/api/npm-install.html
vendored
|
|
@ -32,5 +32,5 @@ installed or when an error has been encountered.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-install — npm@1.4.28</p>
|
||||
<p id="footer">npm-install — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-link.html
vendored
2
deps/npm/html/doc/api/npm-link.html
vendored
|
|
@ -42,5 +42,5 @@ the package in the current working directory</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-link — npm@1.4.28</p>
|
||||
<p id="footer">npm-link — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-load.html
vendored
2
deps/npm/html/doc/api/npm-load.html
vendored
|
|
@ -37,5 +37,5 @@ config object.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-load — npm@1.4.28</p>
|
||||
<p id="footer">npm-load — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-ls.html
vendored
2
deps/npm/html/doc/api/npm-ls.html
vendored
|
|
@ -63,5 +63,5 @@ dependency will only be output once.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-ls — npm@1.4.28</p>
|
||||
<p id="footer">npm-ls — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-outdated.html
vendored
2
deps/npm/html/doc/api/npm-outdated.html
vendored
|
|
@ -28,5 +28,5 @@ currently outdated.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-outdated — npm@1.4.28</p>
|
||||
<p id="footer">npm-outdated — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-owner.html
vendored
2
deps/npm/html/doc/api/npm-owner.html
vendored
|
|
@ -47,5 +47,5 @@ that is not implemented at this time.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-owner — npm@1.4.28</p>
|
||||
<p id="footer">npm-owner — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-pack.html
vendored
2
deps/npm/html/doc/api/npm-pack.html
vendored
|
|
@ -33,5 +33,5 @@ overwritten the second time.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-pack — npm@1.4.28</p>
|
||||
<p id="footer">npm-pack — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-prefix.html
vendored
2
deps/npm/html/doc/api/npm-prefix.html
vendored
|
|
@ -29,5 +29,5 @@
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-prefix — npm@1.4.28</p>
|
||||
<p id="footer">npm-prefix — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-prune.html
vendored
2
deps/npm/html/doc/api/npm-prune.html
vendored
|
|
@ -30,5 +30,5 @@ package's dependencies list.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-prune — npm@1.4.28</p>
|
||||
<p id="footer">npm-prune — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-publish.html
vendored
2
deps/npm/html/doc/api/npm-publish.html
vendored
|
|
@ -46,5 +46,5 @@ the registry. Overwrites when the "force" environment variable is set
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-publish — npm@1.4.28</p>
|
||||
<p id="footer">npm-publish — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-rebuild.html
vendored
2
deps/npm/html/doc/api/npm-rebuild.html
vendored
|
|
@ -30,5 +30,5 @@ the new binary. If no 'packages' parameter is specify, every package wil
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-rebuild — npm@1.4.28</p>
|
||||
<p id="footer">npm-rebuild — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-repo.html
vendored
2
deps/npm/html/doc/api/npm-repo.html
vendored
|
|
@ -33,5 +33,5 @@ friendly for programmatic use.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-repo — npm@1.4.28</p>
|
||||
<p id="footer">npm-repo — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-restart.html
vendored
2
deps/npm/html/doc/api/npm-restart.html
vendored
|
|
@ -36,5 +36,5 @@ in the <code>packages</code> parameter.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-restart — npm@1.4.28</p>
|
||||
<p id="footer">npm-restart — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-root.html
vendored
2
deps/npm/html/doc/api/npm-root.html
vendored
|
|
@ -29,5 +29,5 @@
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-root — npm@1.4.28</p>
|
||||
<p id="footer">npm-root — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-run-script.html
vendored
2
deps/npm/html/doc/api/npm-run-script.html
vendored
|
|
@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-run-script — npm@1.4.28</p>
|
||||
<p id="footer">npm-run-script — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-search.html
vendored
2
deps/npm/html/doc/api/npm-search.html
vendored
|
|
@ -53,5 +53,5 @@ like).</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-search — npm@1.4.28</p>
|
||||
<p id="footer">npm-search — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-shrinkwrap.html
vendored
2
deps/npm/html/doc/api/npm-shrinkwrap.html
vendored
|
|
@ -33,5 +33,5 @@ been saved.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-shrinkwrap — npm@1.4.28</p>
|
||||
<p id="footer">npm-shrinkwrap — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-start.html
vendored
2
deps/npm/html/doc/api/npm-start.html
vendored
|
|
@ -28,5 +28,5 @@ in the <code>packages</code> parameter.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-start — npm@1.4.28</p>
|
||||
<p id="footer">npm-start — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-stop.html
vendored
2
deps/npm/html/doc/api/npm-stop.html
vendored
|
|
@ -28,5 +28,5 @@ in the <code>packages</code> parameter.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-stop — npm@1.4.28</p>
|
||||
<p id="footer">npm-stop — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-submodule.html
vendored
2
deps/npm/html/doc/api/npm-submodule.html
vendored
|
|
@ -42,5 +42,5 @@ dependencies into the submodule folder.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-submodule — npm@1.4.28</p>
|
||||
<p id="footer">npm-submodule — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-tag.html
vendored
2
deps/npm/html/doc/api/npm-tag.html
vendored
|
|
@ -36,5 +36,5 @@ used. For more information about how to set this config, check
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-tag — npm@1.4.28</p>
|
||||
<p id="footer">npm-tag — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-test.html
vendored
2
deps/npm/html/doc/api/npm-test.html
vendored
|
|
@ -30,5 +30,5 @@ in the <code>packages</code> parameter.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-test — npm@1.4.28</p>
|
||||
<p id="footer">npm-test — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-uninstall.html
vendored
2
deps/npm/html/doc/api/npm-uninstall.html
vendored
|
|
@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-uninstall — npm@1.4.28</p>
|
||||
<p id="footer">npm-uninstall — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-unpublish.html
vendored
2
deps/npm/html/doc/api/npm-unpublish.html
vendored
|
|
@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-unpublish — npm@1.4.28</p>
|
||||
<p id="footer">npm-unpublish — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-update.html
vendored
2
deps/npm/html/doc/api/npm-update.html
vendored
|
|
@ -27,5 +27,5 @@
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-update — npm@1.4.28</p>
|
||||
<p id="footer">npm-update — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-version.html
vendored
2
deps/npm/html/doc/api/npm-version.html
vendored
|
|
@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-version — npm@1.4.28</p>
|
||||
<p id="footer">npm-version — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-view.html
vendored
2
deps/npm/html/doc/api/npm-view.html
vendored
|
|
@ -81,5 +81,5 @@ the field name.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-view — npm@1.4.28</p>
|
||||
<p id="footer">npm-view — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/api/npm-whoami.html
vendored
2
deps/npm/html/doc/api/npm-whoami.html
vendored
|
|
@ -29,5 +29,5 @@
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-whoami — npm@1.4.28</p>
|
||||
<p id="footer">npm-whoami — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
4
deps/npm/html/doc/api/npm.html
vendored
4
deps/npm/html/doc/api/npm.html
vendored
|
|
@ -23,7 +23,7 @@ npm.load([configObject, ]function (er, npm) {
|
|||
npm.commands.install(["package"], cb)
|
||||
})
|
||||
</code></pre><h2 id="version">VERSION</h2>
|
||||
<p>1.4.28</p>
|
||||
<p>2.0.0</p>
|
||||
<h2 id="description">DESCRIPTION</h2>
|
||||
<p>This is the API documentation for npm.
|
||||
To find documentation of the command line
|
||||
|
|
@ -110,5 +110,5 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm — npm@1.4.28</p>
|
||||
<p id="footer">npm — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
23
deps/npm/html/doc/cli/npm-adduser.html
vendored
23
deps/npm/html/doc/cli/npm-adduser.html
vendored
|
|
@ -11,20 +11,31 @@
|
|||
|
||||
<h1><a href="../cli/npm-adduser.html">npm-adduser</a></h1> <p>Add a registry user account</p>
|
||||
<h2 id="synopsis">SYNOPSIS</h2>
|
||||
<pre><code>npm adduser
|
||||
<pre><code>npm adduser [--registry=url] [--scope=@orgname]
|
||||
</code></pre><h2 id="description">DESCRIPTION</h2>
|
||||
<p>Create or verify a user named <code><username></code> in the npm registry, and
|
||||
save the credentials to the <code>.npmrc</code> file.</p>
|
||||
<p>Create or verify a user named <code><username></code> in the specified registry, and
|
||||
save the credentials to the <code>.npmrc</code> file. If no registry is specified,
|
||||
the default registry will be used (see <code><a href="../misc/npm-config.html">npm-config(7)</a></code>).</p>
|
||||
<p>The username, password, and email are read in from prompts.</p>
|
||||
<p>You may use this command to change your email address, but not username
|
||||
or password.</p>
|
||||
<p>To reset your password, go to <a href="https://npmjs.org/forgot">https://npmjs.org/forgot</a></p>
|
||||
<p>To reset your password, go to <a href="https://www.npmjs.org/forgot">https://www.npmjs.org/forgot</a></p>
|
||||
<p>You may use this command multiple times with the same user account to
|
||||
authorize on a new machine.</p>
|
||||
<p><code>npm login</code> is an alias to <code>adduser</code> and behaves exactly the same way.</p>
|
||||
<h2 id="configuration">CONFIGURATION</h2>
|
||||
<h3 id="registry">registry</h3>
|
||||
<p>Default: <a href="http://registry.npmjs.org/">http://registry.npmjs.org/</a></p>
|
||||
<p>The base URL of the npm package registry.</p>
|
||||
<p>The base URL of the npm package registry. If <code>scope</code> is also specified,
|
||||
this registry will only be used for packages with that scope. See <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>.</p>
|
||||
<h3 id="scope">scope</h3>
|
||||
<p>Default: none</p>
|
||||
<p>If specified, the user and login credentials given will be associated
|
||||
with the specified scope. See <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>. You can use both at the same time,
|
||||
e.g.</p>
|
||||
<pre><code>npm adduser --registry=http://myregistry.example.com --scope=@myco
|
||||
</code></pre><p>This will set a registry for the given scope and login or create a user for
|
||||
that registry at the same time.</p>
|
||||
<h2 id="see-also">SEE ALSO</h2>
|
||||
<ul>
|
||||
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
|
||||
|
|
@ -46,5 +57,5 @@ authorize on a new machine.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-adduser — npm@1.4.28</p>
|
||||
<p id="footer">npm-adduser — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-bin.html
vendored
2
deps/npm/html/doc/cli/npm-bin.html
vendored
|
|
@ -35,5 +35,5 @@
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-bin — npm@1.4.28</p>
|
||||
<p id="footer">npm-bin — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-bugs.html
vendored
2
deps/npm/html/doc/cli/npm-bugs.html
vendored
|
|
@ -54,5 +54,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-bugs — npm@1.4.28</p>
|
||||
<p id="footer">npm-bugs — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-build.html
vendored
2
deps/npm/html/doc/cli/npm-build.html
vendored
|
|
@ -38,5 +38,5 @@ A folder containing a <code>package.json</code> file in its root.</li>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-build — npm@1.4.28</p>
|
||||
<p id="footer">npm-build — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-bundle.html
vendored
2
deps/npm/html/doc/cli/npm-bundle.html
vendored
|
|
@ -31,5 +31,5 @@ install packages into the local space.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-bundle — npm@1.4.28</p>
|
||||
<p id="footer">npm-bundle — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-cache.html
vendored
2
deps/npm/html/doc/cli/npm-cache.html
vendored
|
|
@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-cache — npm@1.4.28</p>
|
||||
<p id="footer">npm-cache — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-completion.html
vendored
2
deps/npm/html/doc/cli/npm-completion.html
vendored
|
|
@ -42,5 +42,5 @@ completions based on the arguments.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-completion — npm@1.4.28</p>
|
||||
<p id="footer">npm-completion — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-config.html
vendored
2
deps/npm/html/doc/cli/npm-config.html
vendored
|
|
@ -66,5 +66,5 @@ global config.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-config — npm@1.4.28</p>
|
||||
<p id="footer">npm-config — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-dedupe.html
vendored
2
deps/npm/html/doc/cli/npm-dedupe.html
vendored
|
|
@ -63,5 +63,5 @@ versions.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-dedupe — npm@1.4.28</p>
|
||||
<p id="footer">npm-dedupe — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-deprecate.html
vendored
2
deps/npm/html/doc/cli/npm-deprecate.html
vendored
|
|
@ -38,5 +38,5 @@ something like this:</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-deprecate — npm@1.4.28</p>
|
||||
<p id="footer">npm-deprecate — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-docs.html
vendored
2
deps/npm/html/doc/cli/npm-docs.html
vendored
|
|
@ -56,5 +56,5 @@ the current folder and use the <code>name</code> property.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-docs — npm@1.4.28</p>
|
||||
<p id="footer">npm-docs — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-edit.html
vendored
2
deps/npm/html/doc/cli/npm-edit.html
vendored
|
|
@ -49,5 +49,5 @@ or <code>"notepad"</code> on Windows.</li>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-edit — npm@1.4.28</p>
|
||||
<p id="footer">npm-edit — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-explore.html
vendored
2
deps/npm/html/doc/cli/npm-explore.html
vendored
|
|
@ -50,5 +50,5 @@ Windows</li>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-explore — npm@1.4.28</p>
|
||||
<p id="footer">npm-explore — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-help-search.html
vendored
2
deps/npm/html/doc/cli/npm-help-search.html
vendored
|
|
@ -46,5 +46,5 @@ where the terms were found in the documentation.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-help-search — npm@1.4.28</p>
|
||||
<p id="footer">npm-help-search — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-help.html
vendored
2
deps/npm/html/doc/cli/npm-help.html
vendored
|
|
@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-help — npm@1.4.28</p>
|
||||
<p id="footer">npm-help — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
2
deps/npm/html/doc/cli/npm-init.html
vendored
2
deps/npm/html/doc/cli/npm-init.html
vendored
|
|
@ -38,5 +38,5 @@ without a really good reason to do so.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-init — npm@1.4.28</p>
|
||||
<p id="footer">npm-init — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
41
deps/npm/html/doc/cli/npm-install.html
vendored
41
deps/npm/html/doc/cli/npm-install.html
vendored
|
|
@ -15,10 +15,10 @@
|
|||
npm install <tarball file>
|
||||
npm install <tarball url>
|
||||
npm install <folder>
|
||||
npm install <name> [--save|--save-dev|--save-optional] [--save-exact]
|
||||
npm install <name>@<tag>
|
||||
npm install <name>@<version>
|
||||
npm install <name>@<version range>
|
||||
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 i (with any of the previous argument usage)
|
||||
</code></pre><h2 id="description">DESCRIPTION</h2>
|
||||
<p>This command installs a package, and any packages that it depends on. If the
|
||||
|
|
@ -64,7 +64,7 @@ after packing it up into a tarball (b).</p>
|
|||
<p> Example:</p>
|
||||
<pre><code> npm install https://github.com/indexzero/forever/tarball/v0.5.6
|
||||
</code></pre></li>
|
||||
<li><p><code>npm install <name> [--save|--save-dev|--save-optional]</code>:</p>
|
||||
<li><p><code>npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]</code>:</p>
|
||||
<p> Do a <code><name>@<tag></code> install, where <code><tag></code> is the "tag" config. (See
|
||||
<code><a href="../misc/npm-config.html">npm-config(7)</a></code>.)</p>
|
||||
<p> In most cases, this will install the latest version
|
||||
|
|
@ -85,8 +85,16 @@ package.json, there is an additional, optional flag:</p>
|
|||
<li><p><code>--save-exact</code>: Saved dependencies will be configured with an
|
||||
exact version rather than using npm's default semver range
|
||||
operator.</p>
|
||||
<p><code><scope></code> 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 <code><a href="../misc/npm-scope.html">npm-scope(7)</a></code>.</p>
|
||||
<p>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.</p>
|
||||
<p>Examples:</p>
|
||||
<pre><code>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
|
||||
|
|
@ -98,27 +106,38 @@ npm install readable-stream --save --save-exact
|
|||
working directory, then it will try to install that, and only try to
|
||||
fetch the package by name if it is not valid.
|
||||
</code></pre><ul>
|
||||
<li><p><code>npm install <name>@<tag></code>:</p>
|
||||
<li><p><code>npm install [@<scope>/]<name>@<tag></code>:</p>
|
||||
<p> 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
|
||||
will fail.</p>
|
||||
<p> Example:</p>
|
||||
<pre><code> npm install sax@latest
|
||||
npm install @myorg/mypackage@latest
|
||||
</code></pre></li>
|
||||
<li><p><code>npm install <name>@<version></code>:</p>
|
||||
<p> Install the specified version of the package. This will fail if the version
|
||||
has not been published to the registry.</p>
|
||||
<li><p><code>npm install [@<scope>/]<name>@<version></code>:</p>
|
||||
<p> Install the specified version of the package. This will fail if the
|
||||
version has not been published to the registry.</p>
|
||||
<p> Example:</p>
|
||||
<pre><code> npm install sax@0.1.1
|
||||
npm install @myorg/privatepackage@1.5.0
|
||||
</code></pre></li>
|
||||
<li><p><code>npm install <name>@<version range></code>:</p>
|
||||
<li><p><code>npm install [@<scope>/]<name>@<version range></code>:</p>
|
||||
<p> Install a version of the package matching the specified version range. This
|
||||
will follow the same rules for resolving dependencies described in <code><a href="../files/package.json.html">package.json(5)</a></code>.</p>
|
||||
<p> Note that most version ranges must be put in quotes so that your shell will
|
||||
treat it as a single argument.</p>
|
||||
<p> Example:</p>
|
||||
<pre><code> npm install sax@">=0.1.0 <0.2.0"
|
||||
npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
|
||||
</code></pre></li>
|
||||
<li><p><code>npm install <githubname>/<githubrepo></code>:</p>
|
||||
<p> Install the package at <code>https://github.com/githubname/githubrepo" by
|
||||
attempting to clone it using</code>git`.</p>
|
||||
<p> Example:</p>
|
||||
<pre><code> npm install mygithubuser/myproject
|
||||
</code></pre><p> To reference a package in a git repo that is not on GitHub, see git
|
||||
remote urls below.</p>
|
||||
</li>
|
||||
<li><p><code>npm install <git remote url></code>:</p>
|
||||
<p> Install a package by cloning a git remote url. The format of the git
|
||||
url is:</p>
|
||||
|
|
@ -220,5 +239,5 @@ affects a real use-case, it will be investigated.</p>
|
|||
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
|
||||
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
|
||||
</table>
|
||||
<p id="footer">npm-install — npm@1.4.28</p>
|
||||
<p id="footer">npm-install — npm@2.0.0</p>
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user