From da736d8259331a8ef13bf4bbb10bbb8a5c0e5299 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 13 Aug 2019 12:29:07 +0200 Subject: remove node/v8 from source tree --- .../node/deps/npm/node_modules/aproba/CHANGELOG.md | 4 - deps/node/deps/npm/node_modules/aproba/LICENSE | 14 --- deps/node/deps/npm/node_modules/aproba/README.md | 94 ------------------ deps/node/deps/npm/node_modules/aproba/index.js | 105 --------------------- .../node/deps/npm/node_modules/aproba/package.json | 65 ------------- 5 files changed, 282 deletions(-) delete mode 100644 deps/node/deps/npm/node_modules/aproba/CHANGELOG.md delete mode 100644 deps/node/deps/npm/node_modules/aproba/LICENSE delete mode 100644 deps/node/deps/npm/node_modules/aproba/README.md delete mode 100644 deps/node/deps/npm/node_modules/aproba/index.js delete mode 100644 deps/node/deps/npm/node_modules/aproba/package.json (limited to 'deps/node/deps/npm/node_modules/aproba') diff --git a/deps/node/deps/npm/node_modules/aproba/CHANGELOG.md b/deps/node/deps/npm/node_modules/aproba/CHANGELOG.md deleted file mode 100644 index bab30ecb..00000000 --- a/deps/node/deps/npm/node_modules/aproba/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -2.0.0 - * Drop support for 0.10 and 0.12. They haven't been in travis but still, - since we _know_ we'll break with them now it's only polite to do a - major bump. diff --git a/deps/node/deps/npm/node_modules/aproba/LICENSE b/deps/node/deps/npm/node_modules/aproba/LICENSE deleted file mode 100644 index f4be44d8..00000000 --- a/deps/node/deps/npm/node_modules/aproba/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/deps/node/deps/npm/node_modules/aproba/README.md b/deps/node/deps/npm/node_modules/aproba/README.md deleted file mode 100644 index 0bfc594c..00000000 --- a/deps/node/deps/npm/node_modules/aproba/README.md +++ /dev/null @@ -1,94 +0,0 @@ -aproba -====== - -A ridiculously light-weight function argument validator - -``` -var validate = require("aproba") - -function myfunc(a, b, c) { - // `a` must be a string, `b` a number, `c` a function - validate('SNF', arguments) // [a,b,c] is also valid -} - -myfunc('test', 23, function () {}) // ok -myfunc(123, 23, function () {}) // type error -myfunc('test', 23) // missing arg error -myfunc('test', 23, function () {}, true) // too many args error - -``` - -Valid types are: - -| type | description -| :--: | :---------- -| * | matches any type -| A | `Array.isArray` OR an `arguments` object -| S | typeof == string -| N | typeof == number -| F | typeof == function -| O | typeof == object and not type A and not type E -| B | typeof == boolean -| E | `instanceof Error` OR `null` **(special: see below)** -| Z | == `null` - -Validation failures throw one of three exception types, distinguished by a -`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. - -If you pass in an invalid type then it will throw with a code of -`EUNKNOWNTYPE`. - -If an **error** argument is found and is not null then the remaining -arguments are optional. That is, if you say `ESO` then that's like using a -non-magical `E` in: `E|ESO|ZSO`. - -### But I have optional arguments?! - -You can provide more than one signature by separating them with pipes `|`. -If any signature matches the arguments then they'll be considered valid. - -So for example, say you wanted to write a signature for -`fs.createWriteStream`. The docs for it describe it thusly: - -``` -fs.createWriteStream(path[, options]) -``` - -This would be a signature of `SO|S`. That is, a string and and object, or -just a string. - -Now, if you read the full `fs` docs, you'll see that actually path can ALSO -be a buffer. And options can be a string, that is: -``` -path | -options | -``` - -To reproduce this you have to fully enumerate all of the possible -combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The -awkwardness is a feature: It reminds you of the complexity you're adding to -your API when you do this sort of thing. - - -### Browser support - -This has no dependencies and should work in browsers, though you'll have -noisier stack traces. - -### Why this exists - -I wanted a very simple argument validator. It needed to do two things: - -1. Be more concise and easier to use than assertions - -2. Not encourage an infinite bikeshed of DSLs - -This is why types are specified by a single character and there's no such -thing as an optional argument. - -This is not intended to validate user data. This is specifically about -asserting the interface of your functions. - -If you need greater validation, I encourage you to write them by hand or -look elsewhere. - diff --git a/deps/node/deps/npm/node_modules/aproba/index.js b/deps/node/deps/npm/node_modules/aproba/index.js deleted file mode 100644 index fd947481..00000000 --- a/deps/node/deps/npm/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/deps/node/deps/npm/node_modules/aproba/package.json b/deps/node/deps/npm/node_modules/aproba/package.json deleted file mode 100644 index 42a7798b..00000000 --- a/deps/node/deps/npm/node_modules/aproba/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "aproba@2.0.0", - "_id": "aproba@2.0.0", - "_inBundle": false, - "_integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "_location": "/aproba", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aproba@2.0.0", - "name": "aproba", - "escapedName": "aproba", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "#USER", - "/", - "/npm-profile" - ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "_shasum": "52520b8ae5b569215b354efc0caa3fe1e45a8adc", - "_spec": "aproba@2.0.0", - "_where": "/Users/aeschright/code/cli", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org" - }, - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/iarna/aproba", - "keywords": [ - "argument", - "validate" - ], - "license": "ISC", - "main": "index.js", - "name": "aproba", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/aproba.git" - }, - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "version": "2.0.0" -} -- cgit v1.2.3