src: enable v8 deprecation warnings and fix them
[platform/upstream/nodejs.git] / README.md
1
2 Node.js
3 =====
4
5 [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/nodejs/node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
7 This repository began as a GitHub fork of
8 [joyent/node](https://github.com/joyent/node).
9
10 Node.js contributions, releases, and contributorship are under an
11 [open governance model](./GOVERNANCE.md).
12 We intend to land, with increasing regularity, releases which are
13 compatible with the npm ecosystem that has been built to date for
14 Node.js.
15
16 ## Download
17
18 Binaries, installers, and source tarballs are available at
19 <https://nodejs.org>.
20
21 **Releases** are available at <https://nodejs.org/dist/>, listed under
22 their version string. The <https://nodejs.org/dist/latest/> symlink
23 will point to the latest release directory.
24
25 **Nightly** builds are available at
26 <https://nodejs.org/download/nightly/>, listed under their version
27 string which includes their date (in UTC time) and the commit SHA at
28 the HEAD of the release.
29
30 **API documentation** is available in each release and nightly
31 directory under _docs_. <https://nodejs.org/api/> points to the latest version.
32
33 ### Verifying Binaries
34
35 Release and nightly download directories all contain a *SHASUM256.txt*
36 file that lists the SHA checksums for each file available for
37 download. To check that a downloaded file matches the checksum, run
38 it through `sha256sum` with a command such as:
39
40 ```
41 $ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -
42 ```
43
44 _(Where "node-vx.y.z.tar.gz" is the name of the file you have
45 downloaded)_
46
47 Additionally, releases (not nightlies) have GPG signed copies of
48 SHASUM256.txt files available as SHASUM256.txt.asc. You can use `gpg`
49 to verify that the file has not been tampered with.
50
51 To verify a SHASUM256.txt.asc, you will first need to import all of
52 the GPG keys of individuals authorized to create releases. They are
53 listed at the bottom of this README under [Release Team](#release-team).
54 Use a command such as this to import the keys:
55
56 ```
57 $ gpg --keyserver pool.sks-keyservers.net \
58   --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D
59 ```
60
61 _(See the bottom of this README for a full script to import active
62 release keys)_
63
64 You can then use `gpg --verify SHASUMS256.txt.asc` to verify that the
65 file has been signed by an authorized member of the Node.js team.
66
67 Once verified, use the SHASUMS256.txt.asc file to get the checksum for
68 the binary verification command above.
69
70 ## Build
71
72 ### Unix / Macintosh
73
74 Prerequisites:
75
76 * `gcc` and `g++` 4.8 or newer, or
77 * `clang` and `clang++` 3.4 or newer
78 * Python 2.6 or 2.7
79 * GNU Make 3.81 or newer
80 * libexecinfo (FreeBSD and OpenBSD only)
81
82 ```text
83 $ ./configure
84 $ make
85 $ [sudo] make install
86 ```
87
88 If your Python binary is in a non-standard location or has a
89 non-standard name, run the following instead:
90
91 ```text
92 $ export PYTHON=/path/to/python
93 $ $PYTHON ./configure
94 $ make
95 $ [sudo] make install
96 ```
97
98 To run the tests:
99
100 ```text
101 $ make test
102 ```
103
104 To build the documentation:
105
106 ```text
107 $ make doc
108 ```
109
110 To read the documentation:
111
112 ```text
113 $ man doc/node.1
114 ```
115
116 To test if Node.js was built correctly:
117
118 ```
119 $ node -e "console.log('Hello from node.js ' + process.version)"
120 ```
121
122 ### Windows
123
124 Prerequisites:
125
126 * [Python 2.6 or 2.7](https://www.python.org/downloads/)
127 * Visual Studio 2013 for Windows Desktop, or
128 * Visual Studio Express 2013 for Windows Desktop
129 * Basic Unix tools required for some tests,
130   [Git for Windows](http://git-scm.com/download/win) includes Git Bash
131   and tools which can be included in the global `PATH`.
132
133 ```text
134 > vcbuild nosign
135 ```
136
137 To run the tests:
138
139 ```text
140 > vcbuild test
141 ```
142
143 To test if Node.js was built correctly:
144
145 ```
146 $ node -e "console.log('Hello from node.js ' + process.version)"
147 ```
148
149 ### Android / Android based devices, aka. Firefox OS
150
151 Be sure you have downloaded and extracted [Android NDK]
152 (https://developer.android.com/tools/sdk/ndk/index.html)
153 before in a folder. Then run:
154
155 ```
156 $ ./android-configure /path/to/your/android-ndk
157 $ make
158 ```
159
160 ### `Intl` (ECMA-402) support:
161
162 [Intl](https://github.com/joyent/node/wiki/Intl) support is not
163 enabled by default.
164
165 #### "small" (English only) support
166
167 This option will build with "small" (English only) support, but
168 the full `Intl` (ECMA-402) APIs.  With `--download=all` it will
169 download the ICU library as needed.
170
171 Unix / Macintosh:
172
173 ```text
174 $ ./configure --with-intl=small-icu --download=all
175 ```
176
177 Windows:
178
179 ```text
180 > vcbuild small-icu download-all
181 ```
182
183 The `small-icu` mode builds with English-only data. You can add full
184 data at runtime.
185
186 *Note:* more docs are on
187 [the joyent/node wiki](https://github.com/joyent/node/wiki/Intl).
188
189 #### Build with full ICU support (all locales supported by ICU):
190
191 With the `--download=all`, this may download ICU if you don't have an
192 ICU in `deps/icu`.
193
194 Unix / Macintosh:
195
196 ```text
197 $ ./configure --with-intl=full-icu --download=all
198 ```
199
200 Windows:
201
202 ```text
203 > vcbuild full-icu download-all
204 ```
205
206 #### Build with no Intl support `:-(`
207
208 The `Intl` object will not be available. This is the default at
209 present, so this option is not normally needed.
210
211 Unix / Macintosh:
212
213 ```text
214 $ ./configure --with-intl=none
215 ```
216
217 Windows:
218
219 ```text
220 > vcbuild intl-none
221 ```
222
223 #### Use existing installed ICU (Unix / Macintosh only):
224
225 ```text
226 $ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
227 ```
228
229 #### Build with a specific ICU:
230
231 You can find other ICU releases at
232 [the ICU homepage](http://icu-project.org/download).
233 Download the file named something like `icu4c-**##.#**-src.tgz` (or
234 `.zip`).
235
236 Unix / Macintosh
237
238 ```text
239 # from an already-unpacked ICU:
240 $ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu
241
242 # from a local ICU tarball
243 $ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu.tgz
244
245 # from a tarball URL
246 $ ./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz
247 ```
248
249 Windows
250
251 First unpack latest ICU to `deps/icu`
252 [icu4c-**##.#**-src.tgz](http://icu-project.org/download) (or `.zip`)
253 as `deps/icu` (You'll have: `deps/icu/source/...`)
254
255 ```text
256 > vcbuild full-icu
257 ```
258
259 # Building Node.js with FIPS-compliant OpenSSL
260
261 NOTE: Windows is not yet supported
262
263 It is possible to build Node.js with
264 [OpenSSL FIPS module](https://www.openssl.org/docs/fips/fipsnotes.html).
265
266 **Note** that building in this way does **not** allow you to
267 claim that the runtime is FIPS 140-2 validated.  Instead you
268 can indicate that the runtime uses a validated module.  See
269 the [security policy]
270 (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
271 page 60 for more details.  In addition, the validation for
272 the underlying module is only valid if it is deployed in
273 accordance with its [security policy]
274 (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf).
275 If you need FIPS validated cryptography it is recommended that you
276 read both the [security policy]
277 (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf)
278 and [user guide] (https://openssl.org/docs/fips/UserGuide-2.0.pdf).
279
280 Instructions:
281
282 1. Obtain a copy of openssl-fips-x.x.x.tar.gz.
283    To comply with the security policy you must ensure the path
284    through which you get the file complies with the requirements
285    for a "secure intallation" as described in section 6.6 in
286    the [user guide] (https://openssl.org/docs/fips/UserGuide-2.0.pdf).
287    For evaluation/experimentation you can simply download and verify
288    `openssl-fips-x.x.x.tar.gz` from https://www.openssl.org/source/
289 2. Extract source to `openssl-fips` folder and `cd openssl-fips`
290 3. `./config`
291 4. `make`
292 5. `make install`
293    (NOTE: to comply with the security policy you must use the exact
294    commands in steps 3-5 without any additional options as per
295    Appendix A in the [security policy]
296    (http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf).
297    The only exception is that `./config no-asm` can be
298    used in place of `./config` )
299 6. Get into Node.js checkout folder
300 7. `./configure --openssl-fips=/path/to/openssl-fips/installdir`
301    For example on ubuntu 12 the installation directory was
302    /usr/local/ssl/fips-2.0
303 8. Build Node.js with `make -j`
304 9. Verify with `node -p "process.versions.openssl"` (`1.0.2a-fips`)
305
306 ## Resources for Newcomers
307
308 * [CONTRIBUTING.md](./CONTRIBUTING.md)
309 * [GOVERNANCE.md](./GOVERNANCE.md)
310 * IRC:
311   [#io.js on Freenode.net](http://webchat.freenode.net?channels=io.js&uio=d4)
312 * [nodejs/node on Gitter](https://gitter.im/nodejs/node)
313
314 ## Security
315
316 All security bugs in node.js are taken seriously and should be reported by
317 emailing security@nodejs.org. This will be delivered to a subset of the project
318 team who handle security issues. Please don't disclose security bugs
319 public until they have been handled by the security team.
320
321 Your email will be acknowledged within 24 hours, and you’ll receive a more
322 detailed response to your email within 48 hours indicating the next steps in
323 handling your report.
324
325 ## Current Project Team Members
326
327 The Node.js project team comprises a group of core collaborators and a sub-group
328 that forms the _Technical Steering Committee_ (TSC) which governs the project. For more
329 information about the governance of the Node.js project, see
330 [GOVERNANCE.md](./GOVERNANCE.md).
331
332 ### TSC (Technical Steering Committee)
333
334 * [bnoordhuis](https://github.com/bnoordhuis) - **Ben Noordhuis** &lt;info@bnoordhuis.nl&gt;
335 * [chrisdickinson](https://github.com/chrisdickinson) - **Chris Dickinson** &lt;christopher.s.dickinson@gmail.com&gt;
336 * [cjihrig](https://github.com/cjihrig) - **Colin Ihrig** &lt;cjihrig@gmail.com&gt;
337 * [fishrock123](https://github.com/fishrock123) - **Jeremiah Senkpiel** &lt;fishrock123@rocketmail.com&gt;
338 * [indutny](https://github.com/indutny) - **Fedor Indutny** &lt;fedor.indutny@gmail.com&gt;
339 * [jasnell](https://github.com/jasnell) - **James M Snell** &lt;jasnell@gmail.com&gt;
340 * [mhdawson](https://github.com/mhdawson) - **Michael Dawson** &lt;michael_dawson@ca.ibm.com&gt;
341 * [misterdjules](https://github.com/misterdjules) - **Julien Gilli** &lt;jgilli@nodejs.org&gt;
342 * [mscdex](https://github.com/mscdex) - **Brian White** &lt;mscdex@mscdex.net&gt;
343 * [orangemocha](https://github.com/orangemocha) - **Alexis Campailla** &lt;orangemocha@nodejs.org&gt;
344 * [piscisaureus](https://github.com/piscisaureus) - **Bert Belder** &lt;bertbelder@gmail.com&gt;
345 * [rvagg](https://github.com/rvagg) - **Rod Vagg** &lt;rod@vagg.org&gt;
346 * [shigeki](https://github.com/shigeki) - **Shigeki Ohtsu** &lt;ohtsu@iij.ad.jp&gt;
347 * [srl295](https://github.com/srl295) - **Steven R Loomis** &lt;srloomis@us.ibm.com&gt;
348 * [trevnorris](https://github.com/trevnorris) - **Trevor Norris** &lt;trev.norris@gmail.com&gt;
349
350 ### Collaborators
351
352 * [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** &lt;brendan.ashworth@me.com&gt;
353 * [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** &lt;chalkerx@gmail.com&gt;
354 * [domenic](https://github.com/domenic) - **Domenic Denicola** &lt;d@domenic.me&gt;
355 * [evanlucas](https://github.com/evanlucas) - **Evan Lucas** &lt;evanlucas@me.com&gt;
356 * [geek](https://github.com/geek) - **Wyatt Preul** &lt;wpreul@gmail.com&gt;
357 * [isaacs](https://github.com/isaacs) - **Isaac Z. Schlueter** &lt;i@izs.me&gt;
358 * [jbergstroem](https://github.com/jbergstroem) - **Johan Bergström** &lt;bugs@bergstroem.nu&gt;
359 * [joaocgreis](https://github.com/joaocgreis) - **João Reis** &lt;reis@janeasystems.com&gt;
360 * [julianduque](https://github.com/julianduque) - **Julian Duque** &lt;julianduquej@gmail.com&gt;
361 * [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** &lt;lxe@lxe.co&gt;
362 * [micnic](https://github.com/micnic) - **Nicu Micleușanu** &lt;micnic90@gmail.com&gt;
363 * [mikeal](https://github.com/mikeal) - **Mikeal Rogers** &lt;mikeal.rogers@gmail.com&gt;
364 * [monsanto](https://github.com/monsanto) - **Christopher Monsanto** &lt;chris@monsan.to&gt;
365 * [ofrobots](https://github.com/ofrobots) - **Ali Ijaz Sheikh** &lt;ofrobots@google.com&gt;
366 * [Olegas](https://github.com/Olegas) - **Oleg Elifantiev** &lt;oleg@elifantiev.ru&gt;
367 * [petkaantonov](https://github.com/petkaantonov) - **Petka Antonov** &lt;petka_antonov@hotmail.com&gt;
368 * [qard](https://github.com/qard) - **Stephen Belanger** &lt;admin@stephenbelanger.com&gt;
369 * [rlidwka](https://github.com/rlidwka) - **Alex Kocharin** &lt;alex@kocharin.ru&gt;
370 * [robertkowalski](https://github.com/robertkowalski) - **Robert Kowalski** &lt;rok@kowalski.gd&gt;
371 * [sam-github](https://github.com/sam-github) - **Sam Roberts** &lt;vieuxtech@gmail.com&gt;
372 * [seishun](https://github.com/seishun) - **Nikolai Vavilov** &lt;vvnicholas@gmail.com&gt;
373 * [silverwind](https://github.com/silverwind) - **Roman Reiss** &lt;me@silverwind.io&gt;
374 * [targos](https://github.com/targos) - **Michaël Zasso** &lt;mic.besace@gmail.com&gt;
375 * [tellnes](https://github.com/tellnes) - **Christian Tellnes** &lt;christian@tellnes.no&gt;
376 * [thefourtheye](https://github.com/thefourtheye) - **Sakthipriyan Vairamani** &lt;thechargingvolcano@gmail.com&gt;
377 * [thlorenz](https://github.com/thlorenz) - **Thorsten Lorenz** &lt;thlorenz@gmx.de&gt;
378 * [Trott](https://github.com/Trott) - **Rich Trott** &lt;rtrott@gmail.com&gt;
379 * [vkurchatkin](https://github.com/vkurchatkin) - **Vladimir Kurchatkin** &lt;vladimir.kurchatkin@gmail.com&gt;
380 * [yosuke-furukawa](https://github.com/yosuke-furukawa) - **Yosuke Furukawa** &lt;yosuke.furukawa@gmail.com&gt;
381
382 Collaborators & TSC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in
383 maintaining the Node.js project.
384
385 ### Release Team
386
387 Releases of Node.js and io.js will be signed with one of the following GPG keys:
388
389 * **Chris Dickinson** &lt;christopher.s.dickinson@gmail.com&gt;: `9554F04D7259F04124DE6B476D5A82AC7E37093B`
390 * **Colin Ihrig** &lt;cjihrig@gmail.com&gt; `94AE36675C464D64BAFA68DD7434390BDBE9B9C5`
391 * **Sam Roberts** &lt;octetcloud@keybase.io&gt; `0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93`
392 * **Jeremiah Senkpiel** &lt;fishrock@keybase.io&gt; `FD3A5288F042B6850C66B31F09FE44734EB7990E`
393 * **James M Snell** &lt;jasnell@keybase.io&gt; `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1`
394 * **Rod Vagg** &lt;rod@vagg.org&gt; `DD8F2338BAE7501E3DD5AC78C273792F7D83545D`
395
396 The full set of trusted release keys can be imported by running:
397
398 ```
399 gpg --keyserver pool.sks-keyservers.net --recv-keys 9554F04D7259F04124DE6B476D5A82AC7E37093B
400 gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5
401 gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93
402 gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E
403 gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
404 gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D
405 ```
406
407 See the section above on [Verifying Binaries](#verifying-binaries) for
408 details on what to do with these keys to verify a downloaded file is official.
409
410 Previous releases of Node.js have been signed with one of the following GPG
411 keys:
412
413 * Julien Gilli &lt;jgilli@fastmail.fm&gt; `114F43EE0176B71C7BC219DD50A3051F888C628D`
414 * Timothy J Fontaine &lt;tjfontaine@gmail.com&gt; `7937DFD2AB06298B2293C3187D33FF9D0246406D`
415 * Isaac Z. Schlueter &lt;i@izs.me&gt; `93C7E9E91B49E432C2F75674B0A78B0A6C481CF6`