aboutsummaryrefslogtreecommitdiff
path: root/node_modules/v8flags
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/v8flags')
-rw-r--r--node_modules/v8flags/.npmignore4
-rw-r--r--node_modules/v8flags/LICENSE22
-rw-r--r--node_modules/v8flags/README.md49
-rw-r--r--node_modules/v8flags/index.js133
l---------node_modules/v8flags/node_modules/.bin/user-home1
-rw-r--r--node_modules/v8flags/package.json42
6 files changed, 0 insertions, 251 deletions
diff --git a/node_modules/v8flags/.npmignore b/node_modules/v8flags/.npmignore
deleted file mode 100644
index ae16e5f8f..000000000
--- a/node_modules/v8flags/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.yml
-LICENSE
-README.md
-test.js
diff --git a/node_modules/v8flags/LICENSE b/node_modules/v8flags/LICENSE
deleted file mode 100644
index a55f5b74b..000000000
--- a/node_modules/v8flags/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2014 Tyler Kellen
-
-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.
diff --git a/node_modules/v8flags/README.md b/node_modules/v8flags/README.md
deleted file mode 100644
index ca6065b22..000000000
--- a/node_modules/v8flags/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# v8flags [![Build Status](https://secure.travis-ci.org/js-cli/js-v8flags.png)](http://travis-ci.org/js-cli/js-v8flags) [![Build status](https://ci.appveyor.com/api/projects/status/9psgmwayx9kpol1a?svg=true)](https://ci.appveyor.com/project/js-cli/js-v8flags)
-> Get available v8 flags.
-
-[![NPM](https://nodei.co/npm/v8flags.png)](https://nodei.co/npm/v8flags/)
-
-## Example
-```js
-const v8flags = require('v8flags');
-
-v8flags(function (err, results) {
- console.log(results); // [ '--use_strict',
- // '--es5_readonly',
- // '--es52_globals',
- // '--harmony_typeof',
- // '--harmony_scoping',
- // '--harmony_modules',
- // '--harmony_proxies',
- // '--harmony_collections',
- // '--harmony',
- // ...
-});
-```
-
-## Release History
-
-* 2017-04-18 - v2.1.0 - hash username to support invalid path characters
-* 2017-03-31 - v2.0.12 - don't pollute global namespace
-* 2015-12-07 - v2.0.11 - cache to temp directory if home is present but unwritable
-* 2015-07-28 - v2.0.10 - don't throw for electron runtime, just call back with empty array
-* 2015-06-25 - v2.0.9 - call back with flags even if cache file can't be written
-* 2015-06-15 - v2.0.7 - revert to 2.0.5 behavior.
-* 2015-06-15 - v2.0.6 - store cache file in ~/.cache or ~/AppData/Local depending on platform
-* 2015-04-18 - v2.0.5 - attempt to require config file, if this throws for any reason, fopen w+ and re-create
-* 2015-04-16 - v2.0.4 - when concurrent processes are run and no config exists, don't append to the cached config.
-* 2015-03-31 - v2.0.3 - prefer to store config files in user home over tmp
-* 2015-01-18 - v2.0.2 - keep his dark tentacles contained
-* 2015-01-15 - v2.0.1 - store temp file in `os.tmpdir()`, drop support for node 0.8
-* 2015-01-15 - v2.0.0 - make the stupid thing async
-* 2014-12-22 - v1.0.8 - exclude `--help` flag
-* 2014-12-20 - v1.0.7 - pre-cache flags for every version of node from 0.8 to 0.11
-* 2014-12-09 - v1.0.6 - revert to 1.0.0 behavior
-* 2014-11-26 - v1.0.5 - get node executable from `process.execPath`
-* 2014-11-18 - v1.0.4 - wrap node executable path in quotes
-* 2014-11-17 - v1.0.3 - get node executable during npm install via `process.env.NODE`
-* 2014-11-17 - v1.0.2 - get node executable from `process.env._`
-* 2014-09-03 - v1.0.0 - first major version release
-* 2014-09-02 - v0.3.0 - keep -- in flag names
-* 2014-09-02 - v0.2.0 - cache flags
-* 2014-05-09 - v0.1.0 - initial release
diff --git a/node_modules/v8flags/index.js b/node_modules/v8flags/index.js
deleted file mode 100644
index 40404d005..000000000
--- a/node_modules/v8flags/index.js
+++ /dev/null
@@ -1,133 +0,0 @@
-// this entire module is depressing. i should have spent my time learning
-// how to patch v8 so that these options would just be available on the
-// process object.
-
-const os = require('os');
-const fs = require('fs');
-const path = require('path');
-const crypto = require('crypto');
-const execFile = require('child_process').execFile;
-const env = process.env;
-const user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME || '';
-const exclusions = ['--help'];
-
-const configfile = '.v8flags.'+process.versions.v8+'.'+crypto.createHash('md5').update(user).digest('hex')+'.json';
-
-const failureMessage = [
- 'Unable to cache a config file for v8flags to a your home directory',
- 'or a temporary folder. To fix this problem, please correct your',
- 'environment by setting HOME=/path/to/home or TEMP=/path/to/temp.',
- 'NOTE: the user running this must be able to access provided path.',
- 'If all else fails, please open an issue here:',
- 'http://github.com/tkellen/js-v8flags'
-].join('\n');
-
-function fail (err) {
- err.message += '\n\n' + failureMessage;
- return err;
-}
-
-function openConfig (cb) {
- var userHome = require('user-home');
- if (!userHome) {
- return tryOpenConfig(path.join(os.tmpdir(), configfile), cb);
- }
-
- tryOpenConfig(path.join(userHome, configfile), function (err, fd) {
- if (err) return tryOpenConfig(path.join(os.tmpdir(), configfile), cb);
- return cb(null, fd);
- });
-}
-
-function tryOpenConfig (configpath, cb) {
- try {
- // if the config file is valid, it should be json and therefore
- // node should be able to require it directly. if this doesn't
- // throw, we're done!
- var content = require(configpath);
- process.nextTick(function () {
- cb(null, content);
- });
- } catch (e) {
- // if requiring the config file failed, maybe it doesn't exist, or
- // perhaps it has become corrupted. instead of calling back with the
- // content of the file, call back with a file descriptor that we can
- // write the cached data to
- fs.open(configpath, 'w+', function (err, fd) {
- if (err) {
- return cb(err);
- }
- return cb(null, fd);
- });
- }
-}
-
-// i can't wait for the day this whole module is obsolete because these
-// options are available on the process object. this executes node with
-// `--v8-options` and parses the result, returning an array of command
-// line flags.
-function getFlags (cb) {
- execFile(process.execPath, ['--v8-options'], function (execErr, result) {
- if (execErr) {
- return cb(execErr);
- }
- var flags = result.match(/\s\s--(\w+)/gm).map(function (match) {
- return match.substring(2);
- }).filter(function (name) {
- return exclusions.indexOf(name) === -1;
- });
- return cb(null, flags);
- });
-}
-
-// write some json to a file descriptor. if this fails, call back
-// with both the error and the data that was meant to be written.
-function writeConfig (fd, flags, cb) {
- var buf = new Buffer(JSON.stringify(flags));
- return fs.write(fd, buf, 0, buf.length, 0 , function (writeErr) {
- fs.close(fd, function (closeErr) {
- var err = writeErr || closeErr;
- if (err) {
- return cb(fail(err), flags);
- }
- return cb(null, flags);
- });
- });
-}
-
-module.exports = function (cb) {
- // bail early if this is not node
- var isElectron = process.versions && process.versions.electron;
- if (isElectron) {
- return process.nextTick(function () {
- cb(null, []);
- });
- }
-
- // attempt to open/read cache file
- openConfig(function (openErr, result) {
- if (!openErr && typeof result !== 'number') {
- return cb(null, result);
- }
- // if the result is not an array, we need to go fetch
- // the flags by invoking node with `--v8-options`
- getFlags(function (flagsErr, flags) {
- // if there was an error fetching the flags, bail immediately
- if (flagsErr) {
- return cb(flagsErr);
- }
- // if there was a problem opening the config file for writing
- // throw an error but include the flags anyway so that users
- // can continue to execute (at the expense of having to fetch
- // flags on every run until they fix the underyling problem).
- if (openErr) {
- return cb(fail(openErr), flags);
- }
- // write the config file to disk so subsequent runs can read
- // flags out of a cache file.
- return writeConfig(result, flags, cb);
- });
- });
-};
-
-module.exports.configfile = configfile;
diff --git a/node_modules/v8flags/node_modules/.bin/user-home b/node_modules/v8flags/node_modules/.bin/user-home
deleted file mode 120000
index 8c92ed399..000000000
--- a/node_modules/v8flags/node_modules/.bin/user-home
+++ /dev/null
@@ -1 +0,0 @@
-../../../user-home/cli.js \ No newline at end of file
diff --git a/node_modules/v8flags/package.json b/node_modules/v8flags/package.json
deleted file mode 100644
index b711a7282..000000000
--- a/node_modules/v8flags/package.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "v8flags",
- "description": "Get available v8 flags.",
- "version": "2.1.1",
- "homepage": "https://github.com/tkellen/node-v8flags",
- "author": {
- "name": "Tyler Kellen",
- "url": "http://goingslowly.com/"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/tkellen/node-v8flags.git"
- },
- "bugs": {
- "url": "https://github.com/tkellen/node-v8flags/issues"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "https://github.com/tkellen/node-v8flags/blob/master/LICENSE"
- }
- ],
- "scripts": {
- "test": "_mocha -R spec test.js"
- },
- "main": "index.js",
- "engines": {
- "node": ">= 0.10.0"
- },
- "keywords": [
- "v8 flags",
- "harmony flags"
- ],
- "devDependencies": {
- "async": "^0.9.0",
- "chai": "~1.9.1",
- "mocha": "~1.21.4"
- },
- "dependencies": {
- "user-home": "^1.1.1"
- }
-}