summaryrefslogtreecommitdiff
path: root/lib/constants.js
AgeCommit message (Collapse)Author
2018-10-21src,lib: move `natives` and `constants` to `internalBinding()`Anna Henningsen
Refs: https://github.com/nodejs/node/issues/22160 PR-URL: https://github.com/nodejs/node/pull/23663 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-22os: add os.{get,set}Priority()cjihrig
PR-URL: https://github.com/nodejs/node/pull/22407 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-05-07constants: freeze the constants objectBryan English
Constants ought to be constant. The primary goal of this commit is to make constants exposed in require('constants') immutable, as they were prior to node@7.0.0, and as the constants exposed on fs.constants, crypto.constants, etc. are. Since this is implemented by using Object.freeze, it also has the side effect of making the entire exports of require('constants') immutable, so no new constants can be defined on the object in userland. PR-URL: https://github.com/nodejs/node/pull/19813 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-09-08src: add support to pass flags to dlopenEzequiel Garcia
* add constants for dlopen flags, which are needed for dlopen's flag passing. * introduce an optional parameter for process.dlopen(), allowing to pass dlopen flags (using values from os.constants.dlopen). If no flags are passed, the default behavior is to load the library with RTLD_LAZY (perform lazy binding) and RTLD_LOCAL (symbols are available only locally). PR-URL: https://github.com/nodejs/node/pull/12794 Refs: https://github.com/nodejs/node/pull/4105 Refs: https://github.com/libuv/libuv/pull/1331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
2017-01-30lib: add static identifier codes for all deprecationsJames M Snell
Assigns a static identifier code to all runtime and documentation only deprecations. The identifier code is included in the emitted DeprecationWarning. Also adds a deprecations.md to the API docs to provide a central location where deprecation codes can be referenced and explained. PR-URL: https://github.com/nodejs/node/pull/10116 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Michal Zasso <targos@protonmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-11-29constants: errors -> errnoBryan English
lib/constants.js was incorrectly copying the constants from the binding, by copying from `contants.os.errors` instead of `constants.os.errno`. PR-URL: https://github.com/nodejs/node/pull/9349 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-05-17src: refactor require('constants')James M Snell
The require('constants') module is currently undocumented and mashes together unrelated constants. This refactors the require('constants') in favor of distinct os.constants, fs.constants, and crypto.constants that are specific to the modules for which they are relevant. The next step is to document those within the specific modules. PR-URL: https://github.com/nodejs/node/pull/6534 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2015-01-12Remove excessive copyright/license boilerplateisaacs
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
2014-11-22lib: turn on strict modeBen Noordhuis
Turn on strict mode for the files in the lib/ directory. It helps catch bugs and can have a positive effect on performance. PR-URL: https://github.com/node-forward/node/pull/64 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
2011-03-14Update copyright headersRyan Dahl
2010-12-01more lintRyan Dahl
2010-09-16Add require('constants')Ryan Dahl