aboutsummaryrefslogtreecommitdiff
path: root/node_modules/normalize-package-data
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:10:37 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:11:17 +0200
commit7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch)
tree70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/normalize-package-data
parentaca1143cb9eed16cf37f04e475e4257418dd18ac (diff)
downloadwallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz
fix build issues and add typedoc
Diffstat (limited to 'node_modules/normalize-package-data')
-rw-r--r--node_modules/normalize-package-data/.npmignore1
-rw-r--r--node_modules/normalize-package-data/.travis.yml3
-rw-r--r--node_modules/normalize-package-data/package.json9
-rw-r--r--node_modules/normalize-package-data/test/basic.js34
-rw-r--r--node_modules/normalize-package-data/test/consistency.js36
-rw-r--r--node_modules/normalize-package-data/test/dependencies.js44
-rw-r--r--node_modules/normalize-package-data/test/fixtures/async.json36
-rw-r--r--node_modules/normalize-package-data/test/fixtures/badscripts.json5
-rw-r--r--node_modules/normalize-package-data/test/fixtures/bcrypt.json56
-rw-r--r--node_modules/normalize-package-data/test/fixtures/coffee-script.json35
-rw-r--r--node_modules/normalize-package-data/test/fixtures/http-server.json53
-rw-r--r--node_modules/normalize-package-data/test/fixtures/movefile.json21
-rw-r--r--node_modules/normalize-package-data/test/fixtures/no-description.json4
-rw-r--r--node_modules/normalize-package-data/test/fixtures/node-module_exist.json26
-rw-r--r--node_modules/normalize-package-data/test/fixtures/npm.json135
-rw-r--r--node_modules/normalize-package-data/test/fixtures/read-package-json.json28
-rw-r--r--node_modules/normalize-package-data/test/fixtures/request.json39
-rw-r--r--node_modules/normalize-package-data/test/fixtures/underscore.json17
-rw-r--r--node_modules/normalize-package-data/test/github-urls.js44
-rw-r--r--node_modules/normalize-package-data/test/mixedcase-names.js32
-rw-r--r--node_modules/normalize-package-data/test/normalize.js240
-rw-r--r--node_modules/normalize-package-data/test/scoped.js59
-rw-r--r--node_modules/normalize-package-data/test/scripts.js24
-rw-r--r--node_modules/normalize-package-data/test/strict.js54
-rw-r--r--node_modules/normalize-package-data/test/typo.js133
25 files changed, 7 insertions, 1161 deletions
diff --git a/node_modules/normalize-package-data/.npmignore b/node_modules/normalize-package-data/.npmignore
deleted file mode 100644
index 2ccbe4656..000000000
--- a/node_modules/normalize-package-data/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules/
diff --git a/node_modules/normalize-package-data/.travis.yml b/node_modules/normalize-package-data/.travis.yml
deleted file mode 100644
index 6e5919de3..000000000
--- a/node_modules/normalize-package-data/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json
index 7552cd66f..b63ea1c5d 100644
--- a/node_modules/normalize-package-data/package.json
+++ b/node_modules/normalize-package-data/package.json
@@ -1,6 +1,6 @@
{
"name": "normalize-package-data",
- "version": "2.3.6",
+ "version": "2.3.8",
"author": "Meryn Stol <merynstol@gmail.com>",
"description": "Normalizes data that can be found in package.json files.",
"license": "BSD-2-Clause",
@@ -22,5 +22,10 @@
"async": "^1.5.0",
"tap": "^2.2.0",
"underscore": "^1.8.3"
- }
+ },
+ "files": [
+ "lib/*.js",
+ "lib/*.json",
+ "AUTHORS"
+ ]
}
diff --git a/node_modules/normalize-package-data/test/basic.js b/node_modules/normalize-package-data/test/basic.js
deleted file mode 100644
index 12c403ec7..000000000
--- a/node_modules/normalize-package-data/test/basic.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var path = require("path")
-var fs = require("fs")
-
-tap.test("basic test", function (t) {
- var p = path.resolve(__dirname, "./fixtures/read-package-json.json")
- fs.readFile (p, function (err, contents) {
- if (err) throw err;
- var originalData = JSON.parse(contents.toString())
- var data = JSON.parse(contents.toString())
- normalize(data)
- t.ok(data)
- verifyFields(t, data, originalData)
- t.end()
- })
-})
-
-function verifyFields (t, normalized, original) {
- t.equal(normalized.version, original.version, "Version field stays same")
- t.equal(normalized._id, normalized.name + "@" + normalized.version, "It gets good id.")
- t.equal(normalized.name, original.name, "Name stays the same.")
- t.type(normalized.author, "object", "author field becomes object")
- t.deepEqual(normalized.scripts, original.scripts, "scripts field (object) stays same")
- t.equal(normalized.main, original.main)
- // optional deps are folded in.
- t.deepEqual(normalized.optionalDependencies,
- original.optionalDependencies)
- t.has(normalized.dependencies, original.optionalDependencies, "opt depedencies are copied into dependencies")
- t.has(normalized.dependencies, original.dependencies, "regular depedencies stay in place")
- t.deepEqual(normalized.devDependencies, original.devDependencies)
- t.type(normalized.bugs, "object", "bugs should become object")
- t.equal(normalized.bugs.url, "https://github.com/isaacs/read-package-json/issues")
-}
diff --git a/node_modules/normalize-package-data/test/consistency.js b/node_modules/normalize-package-data/test/consistency.js
deleted file mode 100644
index 6bce17a16..000000000
--- a/node_modules/normalize-package-data/test/consistency.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var path = require("path")
-var fs = require("fs")
-var _ = require("underscore")
-var async = require("async")
-
-var data, clonedData
-var warn
-
-tap.test("consistent normalization", function(t) {
- path.resolve(__dirname, "./fixtures/read-package-json.json")
- fs.readdir (__dirname + "/fixtures", function (err, entries) {
- // entries = ['coffee-script.json'] // uncomment to limit to a specific file
- verifyConsistency = function(entryName, next) {
- warn = function(msg) {
- // t.equal("",msg) // uncomment to have some kind of logging of warnings
- }
- filename = __dirname + "/fixtures/" + entryName
- fs.readFile(filename, function(err, contents) {
- if (err) return next(err)
- data = JSON.parse(contents.toString())
- normalize(data, warn)
- clonedData = _.clone(data)
- normalize(data, warn)
- t.deepEqual(clonedData, data,
- "Normalization of " + entryName + " is consistent.")
- next(null)
- }) // fs.readFile
- } // verifyConsistency
- async.forEach(entries, verifyConsistency, function(err) {
- if (err) throw err
- t.end()
- })
- }) // fs.readdir
-}) // tap.test
diff --git a/node_modules/normalize-package-data/test/dependencies.js b/node_modules/normalize-package-data/test/dependencies.js
deleted file mode 100644
index 5a5aff5d7..000000000
--- a/node_modules/normalize-package-data/test/dependencies.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-
-var warningMessages = require("../lib/warning_messages.json")
-var safeFormat = require("../lib/safe_format")
-
-tap.test("warn if dependency contains anything else but a string", function(t) {
- var a
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize(a={
- dependencies: { "a": 123},
- devDependencies: { "b": 456},
- optionalDependencies: { "c": 789}
- }, warn)
-
- var wanted1 = safeFormat(warningMessages.nonStringDependency, "a", 123)
- var wanted2 = safeFormat(warningMessages.nonStringDependency, "b", 456)
- var wanted3 = safeFormat(warningMessages.nonStringDependency, "c", 789)
- t.ok(~warnings.indexOf(wanted1), wanted1)
- t.ok(~warnings.indexOf(wanted2), wanted2)
- t.ok(~warnings.indexOf(wanted3), wanted3)
- t.end()
-})
-
-tap.test("warn if bundleDependencies array contains anything else but strings", function(t) {
- var a
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize(a={
- bundleDependencies: ["abc", 123, {foo:"bar"}]
- }, warn)
-
- var wanted1 = safeFormat(warningMessages.nonStringBundleDependency, 123)
- var wanted2 = safeFormat(warningMessages.nonStringBundleDependency, {foo:"bar"})
- var wanted2 = safeFormat(warningMessages.nonDependencyBundleDependency, "abc")
- t.ok(~warnings.indexOf(wanted1), wanted1)
- t.ok(~warnings.indexOf(wanted2), wanted2)
- t.end()
-})
diff --git a/node_modules/normalize-package-data/test/fixtures/async.json b/node_modules/normalize-package-data/test/fixtures/async.json
deleted file mode 100644
index 9fa85b53e..000000000
--- a/node_modules/normalize-package-data/test/fixtures/async.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "async",
- "description": "Higher-order functions and common patterns for asynchronous code",
- "main": "./lib/async",
- "author": "Caolan McMahon",
- "version": "0.2.6",
- "repository" : {
- "type" : "git",
- "url" : "http://github.com/caolan/async.git"
- },
- "bugs" : {
- "url" : "http://github.com/caolan/async/issues"
- },
- "licenses" : [
- {
- "type" : "MIT",
- "url" : "http://github.com/caolan/async/raw/master/LICENSE"
- }
- ],
- "devDependencies": {
- "nodeunit": ">0.0.0",
- "uglify-js": "1.2.x",
- "nodelint": ">0.0.0"
- },
- "jam": {
- "main": "lib/async.js",
- "include": [
- "lib/async.js",
- "README.md",
- "LICENSE"
- ]
- },
- "scripts": {
- "test": "nodeunit test/test-async.js"
- }
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/badscripts.json b/node_modules/normalize-package-data/test/fixtures/badscripts.json
deleted file mode 100644
index 25feb4c8f..000000000
--- a/node_modules/normalize-package-data/test/fixtures/badscripts.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "bad-scripts-package",
- "version": "0.0.1",
- "scripts": "foo"
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/bcrypt.json b/node_modules/normalize-package-data/test/fixtures/bcrypt.json
deleted file mode 100644
index 2cf3ba9e5..000000000
--- a/node_modules/normalize-package-data/test/fixtures/bcrypt.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "bcrypt",
- "description": "A bcrypt library for NodeJS.",
- "keywords": [
- "bcrypt",
- "password",
- "auth",
- "authentication",
- "encryption",
- "crypt",
- "crypto"
- ],
- "main": "./bcrypt",
- "version": "0.7.5",
- "author": "Nick Campbell (http://github.com/ncb000gt)",
- "engines": {
- "node": ">= 0.6.0"
- },
- "repository": {
- "type": "git",
- "url": "http://github.com/ncb000gt/node.bcrypt.js.git"
- },
- "licenses": [
- {
- "type": "MIT"
- }
- ],
- "bugs": {
- "url": "http://github.com/ncb000gt/node.bcrypt.js/issues"
- },
- "scripts": {
- "test": "node-gyp configure build && nodeunit test"
- },
- "dependencies": {
- "bindings": "1.0.0"
- },
- "devDependencies": {
- "nodeunit": ">=0.6.4"
- },
- "contributors": [
- "Antonio Salazar Cardozo <savedfastcool@gmail.com> (https://github.com/Shadowfiend)",
- "Van Nguyen <the.gol.effect@gmail.com> (https://github.com/thegoleffect)",
- "David Trejo <david@dtrejo.com> (https://github.com/dtrejo)",
- "Ben Glow <glen.low@pixelglow.com> (https://github.com/pixelglow)",
- "NewITFarmer.com <> (https://github.com/newitfarmer)",
- "Alfred Westerveld <alfredwesterveld@gmail.com> (https://github.com/alfredwesterveld)",
- "Vincent Côté-Roy <vincentcr@gmail.com> (https://github.com/vincentcr)",
- "Lloyd Hilaiel <lloyd@hilaiel.com> (https://github.com/lloyd)",
- "Roman Shtylman <shtylman@gmail.com> (https://github.com/shtylman)",
- "Vadim Graboys <dimva13@gmail.com> (https://github.com/vadimg)",
- "Ben Noorduis <> (https://github.com/bnoordhuis)",
- "Nate Rajlich <nathan@tootallnate.net> (https://github.com/tootallnate)",
- "Sean McArthur <sean.monstar@gmail.com> (https://github.com/seanmonstar)",
- "Fanie Oosthuysen <fanie.oosthuysen@gmail.com> (https://github.com/weareu)"
- ]
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/coffee-script.json b/node_modules/normalize-package-data/test/fixtures/coffee-script.json
deleted file mode 100644
index 6582289d1..000000000
--- a/node_modules/normalize-package-data/test/fixtures/coffee-script.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "coffee-script",
- "description": "Unfancy JavaScript",
- "keywords": ["javascript", "language", "coffeescript", "compiler"],
- "author": "Jeremy Ashkenas",
- "version": "1.6.2",
- "licenses": [{
- "type": "MIT",
- "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
- }],
- "engines": {
- "node": ">=0.8.0"
- },
- "directories" : {
- "lib" : "./lib/coffee-script"
- },
- "main" : "./lib/coffee-script/coffee-script",
- "bin": {
- "coffee": "./bin/coffee",
- "cake": "./bin/cake"
- },
- "scripts": {
- "test": "node ./bin/cake test"
- },
- "homepage": "http://coffeescript.org",
- "bugs": "https://github.com/jashkenas/coffee-script/issues",
- "repository": {
- "type": "git",
- "url": "git://github.com/jashkenas/coffee-script.git"
- },
- "devDependencies": {
- "uglify-js": "~2.2",
- "jison": ">=0.2.0"
- }
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/http-server.json b/node_modules/normalize-package-data/test/fixtures/http-server.json
deleted file mode 100644
index 2ea55eb9a..000000000
--- a/node_modules/normalize-package-data/test/fixtures/http-server.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "name": "http-server",
- "preferGlobal": true,
- "version": "0.3.0",
- "author": "Nodejitsu <support@nodejitsu.com>",
- "description": "a simple zero-configuration command-line http server",
- "contributors": [
- {
- "name": "Marak Squires",
- "email": "marak@nodejitsu.com"
- }
- ],
- "bin": {
- "http-server": "./bin/http-server"
- },
- "scripts": {
- "start": "node ./bin/http-server",
- "test": "vows --spec --isolate",
- "predeploy": "echo This will be run before deploying the app",
- "postdeploy": "echo This will be run after deploying the app"
- },
- "main": "./lib/http-server",
- "repository": {
- "type": "git",
- "url": "https://github.com/nodejitsu/http-server.git"
- },
- "keywords": [
- "cli",
- "http",
- "server"
- ],
- "dependencies" : {
- "colors" : "*",
- "flatiron" : "0.1.x",
- "optimist" : "0.2.x",
- "union" : "0.1.x",
- "ecstatic" : "0.1.x",
- "plates" : "https://github.com/flatiron/plates/tarball/master"
- },
- "analyze": false,
- "devDependencies": {
- "vows" : "0.5.x",
- "request" : "2.1.x"
- },
- "bundledDependencies": [
- "union",
- "ecstatic"
- ],
- "license": "MIT",
- "engines": {
- "node": ">=0.6"
- }
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/movefile.json b/node_modules/normalize-package-data/test/fixtures/movefile.json
deleted file mode 100644
index 07af4acf4..000000000
--- a/node_modules/normalize-package-data/test/fixtures/movefile.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "movefile",
- "description": "rename implementation working over devices",
- "version": "0.2.0",
- "author": "yazgazan <yazgazan@gmail.com>",
- "main": "./build/Release/movefile",
- "keywords": ["move", "file", "rename"],
- "repository": "git://github.com/yazgazan/movefile.git",
- "directories": {
- "lib": "./build/Release/"
- },
- "scripts": {
- "install": "./node_modules/node-gyp/bin/node-gyp.js configure && ./node_modules/node-gyp/bin/node-gyp.js build"
- },
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "node-gyp": "~0.9.1"
- }
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/no-description.json b/node_modules/normalize-package-data/test/fixtures/no-description.json
deleted file mode 100644
index 8c481e1af..000000000
--- a/node_modules/normalize-package-data/test/fixtures/no-description.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "foo-bar-package",
- "version": "0.0.1"
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/node-module_exist.json b/node_modules/normalize-package-data/test/fixtures/node-module_exist.json
deleted file mode 100644
index b6786f430..000000000
--- a/node_modules/normalize-package-data/test/fixtures/node-module_exist.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "node-module_exist",
- "description": "Find if a NodeJS module is available to require or not",
- "version": "0.0.1",
- "main": "module_exist.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git@gist.github.com:3135914.git"
- },
- "homepage": "https://github.com/FGRibreau",
- "author": {
- "name": "Francois-Guillaume Ribreau",
- "url": "http://fgribreau.com.com/"
- },
- "devDependencies": {
- "nodeunit": "~0.7.4"
- },
- "keywords": [
- "core",
- "modules"
- ],
- "license": "MIT"
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/npm.json b/node_modules/normalize-package-data/test/fixtures/npm.json
deleted file mode 100644
index b4c704df9..000000000
--- a/node_modules/normalize-package-data/test/fixtures/npm.json
+++ /dev/null
@@ -1,135 +0,0 @@
-{
- "version": "1.2.17",
- "name": "npm",
- "publishConfig": {
- "proprietary-attribs": false
- },
- "description": "A package manager for node",
- "keywords": [
- "package manager",
- "modules",
- "install",
- "package.json"
- ],
- "preferGlobal": true,
- "config": {
- "publishtest": false
- },
- "homepage": "https://npmjs.org/doc/",
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
- "repository": {
- "type": "git",
- "url": "https://github.com/isaacs/npm"
- },
- "bugs": {
- "email": "npm-@googlegroups.com",
- "url": "http://github.com/isaacs/npm/issues"
- },
- "directories": {
- "doc": "./doc",
- "man": "./man",
- "lib": "./lib",
- "bin": "./bin"
- },
- "main": "./lib/npm.js",
- "bin": "./bin/npm-cli.js",
- "dependencies": {
- "semver": "~1.1.2",
- "ini": "~1.1.0",
- "slide": "1",
- "abbrev": "~1.0.4",
- "graceful-fs": "~1.2.0",
- "minimatch": "~0.2.11",
- "nopt": "~2.1.1",
- "rimraf": "2",
- "request": "~2.9",
- "which": "1",
- "tar": "~0.1.17",
- "fstream": "~0.1.22",
- "block-stream": "*",
- "inherits": "1",
- "mkdirp": "~0.3.3",
- "read": "~1.0.4",
- "lru-cache": "~2.3.0",
- "node-gyp": "~0.9.3",
- "fstream-npm": "~0.1.3",
- "uid-number": "0",
- "archy": "0",
- "chownr": "0",
- "npmlog": "0",
- "ansi": "~0.1.2",
- "npm-registry-client": "~0.2.18",
- "read-package-json": "~0.3.0",
- "read-installed": "0",
- "glob": "~3.1.21",
- "init-package-json": "0.0.6",
- "osenv": "0",
- "lockfile": "~0.3.0",
- "retry": "~0.6.0",
- "once": "~1.1.1",
- "npmconf": "0",
- "opener": "~1.3.0",
- "chmodr": "~0.1.0",
- "cmd-shim": "~1.1.0"
- },
- "bundleDependencies": [
- "semver",
- "ini",
- "slide",
- "abbrev",
- "graceful-fs",
- "minimatch",
- "nopt",
- "rimraf",
- "request",
- "which",
- "tar",
- "fstream",
- "block-stream",
- "inherits",
- "mkdirp",
- "read",
- "lru-cache",
- "node-gyp",
- "fstream-npm",
- "uid-number",
- "archy",
- "chownr",
- "npmlog",
- "ansi",
- "npm-registry-client",
- "read-package-json",
- "read-installed",
- "glob",
- "init-package-json",
- "osenv",
- "lockfile",
- "retry",
- "once",
- "npmconf",
- "opener",
- "chmodr",
- "cmd-shim"
- ],
- "devDependencies": {
- "ronn": "~0.3.6",
- "tap": "~0.4.0"
- },
- "engines": {
- "node": ">=0.6",
- "npm": "1"
- },
- "scripts": {
- "test": "node ./test/run.js && tap test/tap/*.js",
- "tap": "tap test/tap/*.js",
- "prepublish": "node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
- "dumpconf": "env | grep npm | sort | uniq",
- "echo": "node bin/npm-cli.js"
- },
- "licenses": [
- {
- "type": "MIT +no-false-attribs",
- "url": "https://github.com/isaacs/npm/raw/master/LICENSE"
- }
- ]
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/read-package-json.json b/node_modules/normalize-package-data/test/fixtures/read-package-json.json
deleted file mode 100644
index 7d0dae1d5..000000000
--- a/node_modules/normalize-package-data/test/fixtures/read-package-json.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "read-package-json",
- "version": "0.1.1",
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/read-package-json.git"
- },
- "license": "MIT",
- "main": "read-json.js",
- "scripts": {
- "test": "tap test/*.js"
- },
- "dependencies": {
- "glob": "~3.1.9",
- "lru-cache": "~1.1.0",
- "semver": "~1.0.14",
- "slide": "~1.1.3"
- },
- "devDependencies": {
- "tap": "~0.2.5"
- },
- "optionalDependencies": {
- "npmlog": "0",
- "graceful-fs": "~1.1.8"
- }
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/request.json b/node_modules/normalize-package-data/test/fixtures/request.json
deleted file mode 100644
index 4d58a95c2..000000000
--- a/node_modules/normalize-package-data/test/fixtures/request.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "request",
- "description": "Simplified HTTP request client.",
- "tags": [
- "http",
- "simple",
- "util",
- "utility"
- ],
- "version": "2.16.7",
- "author": "Mikeal Rogers <mikeal.rogers@gmail.com>",
- "repository": {
- "type": "git",
- "url": "http://github.com/mikeal/request.git"
- },
- "bugs": {
- "url": "http://github.com/mikeal/request/issues"
- },
- "engines": [
- "node >= 0.8.0"
- ],
- "main": "index.js",
- "dependencies": {
- "form-data": "~0.0.3",
- "mime": "~1.2.7",
- "hawk": "~0.10.2",
- "node-uuid": "~1.4.0",
- "cookie-jar": "~0.2.0",
- "aws-sign": "~0.2.0",
- "oauth-sign": "~0.2.0",
- "forever-agent": "~0.2.0",
- "tunnel-agent": "~0.2.0",
- "json-stringify-safe": "~3.0.0",
- "qs": "~0.5.4"
- },
- "scripts": {
- "test": "node tests/run.js"
- }
-}
diff --git a/node_modules/normalize-package-data/test/fixtures/underscore.json b/node_modules/normalize-package-data/test/fixtures/underscore.json
deleted file mode 100644
index e27cfd8c6..000000000
--- a/node_modules/normalize-package-data/test/fixtures/underscore.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name" : "underscore",
- "description" : "JavaScript's functional programming helper library.",
- "homepage" : "http://underscorejs.org",
- "keywords" : ["util", "functional", "server", "client", "browser"],
- "author" : "Jeremy Ashkenas <jeremy@documentcloud.org>",
- "repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"},
- "main" : "underscore.js",
- "version" : "1.4.4",
- "devDependencies": {
- "phantomjs": "1.9.0-1"
- },
- "scripts": {
- "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true"
- },
- "license" : "MIT"
-}
diff --git a/node_modules/normalize-package-data/test/github-urls.js b/node_modules/normalize-package-data/test/github-urls.js
deleted file mode 100644
index da78160a0..000000000
--- a/node_modules/normalize-package-data/test/github-urls.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var fs = require("fs")
-var async = require("async")
-
-var data
-var warn
-
-tap.test("consistent normalization", function(t) {
- var entries = [
- 'read-package-json.json',
- 'http-server.json',
- "movefile.json",
- "node-module_exist.json"
- ]
- var verifyConsistency = function(entryName, next) {
- warn = function(msg) {
- // t.equal("",msg) // uncomment to have some kind of logging of warnings
- }
- var filename = __dirname + "/fixtures/" + entryName
- fs.readFile(filename, function(err, contents) {
- if (err) return next(err)
- data = JSON.parse(contents.toString())
- normalize(data, warn)
- if(data.name == "node-module_exist") {
- t.same(data.bugs.url, "https://gist.github.com/3135914")
- }
- if(data.name == "read-package-json") {
- t.same(data.bugs.url, "https://github.com/isaacs/read-package-json/issues")
- }
- if(data.name == "http-server") {
- t.same(data.bugs.url, "https://github.com/nodejitsu/http-server/issues")
- }
- if(data.name == "movefile") {
- t.same(data.bugs.url, "https://github.com/yazgazan/movefile/issues")
- }
- next(null)
- }) // fs.readFile
- } // verifyConsistency
- async.forEach(entries, verifyConsistency, function(err) {
- if (err) throw err
- t.end()
- })
-}) // tap.test
diff --git a/node_modules/normalize-package-data/test/mixedcase-names.js b/node_modules/normalize-package-data/test/mixedcase-names.js
deleted file mode 100644
index a62b69938..000000000
--- a/node_modules/normalize-package-data/test/mixedcase-names.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var test = require('tap').test
-
-var normalize = require('../')
-var fixer = normalize.fixer
-
-test('mixedcase', function (t) {
- t.doesNotThrow(function () {
- fixer.fixNameField({name: 'foo'}, true)
- })
-
- t.doesNotThrow(function () {
- fixer.fixNameField({name: 'foo'}, false)
- })
-
- t.doesNotThrow(function () {
- fixer.fixNameField({name: 'foo'})
- })
-
- t.throws(function () {
- fixer.fixNameField({name: 'Foo'}, true)
- }, new Error('Invalid name: "Foo"'), 'should throw an error')
-
- t.throws(function () {
- fixer.fixNameField({name: 'Foo'}, {strict: true})
- }, new Error('Invalid name: "Foo"'), 'should throw an error')
-
- t.doesNotThrow(function () {
- fixer.fixNameField({name: 'Foo'}, {strict: true, allowLegacyCase: true})
- })
-
- t.end()
-})
diff --git a/node_modules/normalize-package-data/test/normalize.js b/node_modules/normalize-package-data/test/normalize.js
deleted file mode 100644
index 0cd4baf49..000000000
--- a/node_modules/normalize-package-data/test/normalize.js
+++ /dev/null
@@ -1,240 +0,0 @@
-var tap = require("tap")
-var fs = require("fs")
-var path = require("path")
-
-var normalize = require("../lib/normalize")
-var warningMessages = require("../lib/warning_messages.json")
-var safeFormat = require("../lib/safe_format")
-
-var rpjPath = path.resolve(__dirname,"./fixtures/read-package-json.json")
-
-tap.test("normalize some package data", function(t) {
- var packageData = require(rpjPath)
- var warnings = []
- normalize(packageData, function(warning) {
- warnings.push(warning)
- })
- // there's no readme data in this particular object
- t.equal( warnings.length, 1, "There's exactly one warning.")
- fs.readFile(rpjPath, function(err, data) {
- if(err) throw err
- // Various changes have been made
- t.notEqual(packageData, JSON.parse(data), "Output is different from input.")
- t.end()
- })
-})
-
-tap.test("runs without passing warning function", function(t) {
- var packageData = require(rpjPath)
- fs.readFile(rpjPath, function(err, data) {
- if(err) throw err
- normalize(JSON.parse(data))
- t.ok(true, "If you read this, this means I'm still alive.")
- t.end()
- })
-})
-
-tap.test("empty object", function(t) {
- var packageData = {}
- var expect =
- { name: '',
- version: '',
- readme: 'ERROR: No README data found!',
- _id: '@' }
-
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
- normalize(packageData, warn)
- t.same(packageData, expect)
- t.same(warnings, [
- warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.missingLicense
- ])
- t.end()
-})
-
-tap.test("core module name", function(t) {
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
- var a
- normalize(a={
- name: "http",
- readme: "read yourself how about",
- homepage: 123,
- bugs: "what is this i don't even",
- repository: "Hello."
- }, warn)
-
- var expect = [
- safeFormat(warningMessages.conflictingName, 'http'),
- warningMessages.nonEmailUrlBugsString,
- warningMessages.emptyNormalizedBugs,
- warningMessages.nonUrlHomepage,
- warningMessages.missingLicense
- ]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("urls required", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize({
- bugs: {
- url: "/1",
- email: "not an email address"
- }
- }, warn)
- var a
- normalize(a={
- readme: "read yourself how about",
- homepage: 123,
- bugs: "what is this i don't even",
- repository: "Hello."
- }, warn)
-
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.nonUrlBugsUrlField,
- warningMessages.nonEmailBugsEmailField,
- warningMessages.emptyNormalizedBugs,
- warningMessages.missingReadme,
- warningMessages.missingLicense,
- warningMessages.nonEmailUrlBugsString,
- warningMessages.emptyNormalizedBugs,
- warningMessages.nonUrlHomepage,
- warningMessages.missingLicense]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("homepage field must start with a protocol.", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- var a
- normalize(a={
- homepage: 'example.org'
- }, warn)
-
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.missingProtocolHomepage,
- warningMessages.missingLicense]
- t.same(warnings, expect)
- t.same(a.homepage, 'http://example.org')
- t.end()
-})
-
-tap.test("license field should be a valid SPDX expression", function(t) {
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- var a
- normalize(a={
- license: 'Apache 2'
- }, warn)
-
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.invalidLicense]
- t.same(warnings, expect)
- t.end()
-})
-
-tap.test("gist bugs url", function(t) {
- var d = {
- repository: "git@gist.github.com:123456.git"
- }
- normalize(d)
- t.same(d.repository, { type: 'git', url: 'git+ssh://git@gist.github.com/123456.git' })
- t.same(d.bugs, { url: 'https://gist.github.com/123456' })
- t.end();
-});
-
-tap.test("singularize repositories", function(t) {
- var d = {repositories:["git@gist.github.com:123456.git"]}
- normalize(d)
- t.same(d.repository, { type: 'git', url: 'git+ssh://git@gist.github.com/123456.git' })
- t.end()
-});
-
-tap.test("treat visionmedia/express as github repo", function(t) {
- var d = {repository: {type: "git", url: "visionmedia/express"}}
- normalize(d)
- t.same(d.repository, { type: "git", url: "git+https://github.com/visionmedia/express.git" })
- t.end()
-});
-
-tap.test("treat isaacs/node-graceful-fs as github repo", function(t) {
- var d = {repository: {type: "git", url: "isaacs/node-graceful-fs"}}
- normalize(d)
- t.same(d.repository, { type: "git", url: "git+https://github.com/isaacs/node-graceful-fs.git" })
- t.end()
-});
-
-tap.test("homepage field will set to github url if repository is a github repo", function(t) {
- var a
- normalize(a={
- repository: { type: "git", url: "https://github.com/isaacs/node-graceful-fs" }
- })
- t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs#readme')
- t.end()
-})
-
-tap.test("homepage field will set to github gist url if repository is a gist", function(t) {
- var a
- normalize(a={
- repository: { type: "git", url: "git@gist.github.com:123456.git" }
- })
- t.same(a.homepage, 'https://gist.github.com/123456')
- t.end()
-})
-
-tap.test("homepage field will set to github gist url if repository is a shorthand reference", function(t) {
- var a
- normalize(a={
- repository: { type: "git", url: "sindresorhus/chalk" }
- })
- t.same(a.homepage, 'https://github.com/sindresorhus/chalk#readme')
- t.end()
-})
-
-tap.test("don't mangle github shortcuts in dependencies", function(t) {
- var d = {dependencies: {"node-graceful-fs": "isaacs/node-graceful-fs"}}
- normalize(d)
- t.same(d.dependencies, {"node-graceful-fs": "github:isaacs/node-graceful-fs" })
- t.end()
-});
-
-tap.test("deprecation warning for array in dependencies fields", function(t) {
- var a
- var warnings = []
- function warn(w) {
- warnings.push(w)
- }
- normalize(a={
- dependencies: [],
- devDependencies: [],
- optionalDependencies: []
- }, warn)
- t.ok(~warnings.indexOf(safeFormat(warningMessages.deprecatedArrayDependencies, 'dependencies')), "deprecation warning")
- t.ok(~warnings.indexOf(safeFormat(warningMessages.deprecatedArrayDependencies, 'devDependencies')), "deprecation warning")
- t.ok(~warnings.indexOf(safeFormat(warningMessages.deprecatedArrayDependencies, 'optionalDependencies')), "deprecation warning")
- t.end()
-})
diff --git a/node_modules/normalize-package-data/test/scoped.js b/node_modules/normalize-package-data/test/scoped.js
deleted file mode 100644
index 82d2a543f..000000000
--- a/node_modules/normalize-package-data/test/scoped.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var test = require("tap").test
-
-var fixNameField = require("../lib/fixer.js").fixNameField
-var fixBinField = require("../lib/fixer.js").fixBinField
-
-test("a simple scoped module has a valid name", function (t) {
- var data = {name : "@org/package"}
- fixNameField(data, false)
- t.equal(data.name, "@org/package", "name was unchanged")
-
- t.end()
-})
-
-test("'org@package' is not a valid name", function (t) {
- t.throws(function () {
- fixNameField({name : "org@package"}, false)
- }, "blows up as expected")
-
- t.end()
-})
-
-test("'org=package' is not a valid name", function (t) {
- t.throws(function () {
- fixNameField({name : "org=package"}, false)
- }, "blows up as expected")
-
- t.end()
-})
-
-test("'@org=sub/package' is not a valid name", function (t) {
- t.throws(function () {
- fixNameField({name : "@org=sub/package"}, false)
- }, "blows up as expected")
-
- t.end()
-})
-
-test("'@org/' is not a valid name", function (t) {
- t.throws(function () {
- fixNameField({name : "@org/"}, false)
- }, "blows up as expected")
-
- t.end()
-})
-
-test("'@/package' is not a valid name", function (t) {
- t.throws(function () {
- fixNameField({name : "@/package"}, false)
- }, "blows up as expected")
-
- t.end()
-})
-
-test("name='@org/package', bin='bin.js' is bin={package:'bin.js'}", function (t) {
- var obj = {name : "@org/package", bin: "bin.js"}
- fixBinField(obj)
- t.isDeeply(obj.bin, {package: 'bin.js'})
- t.end()
-})
diff --git a/node_modules/normalize-package-data/test/scripts.js b/node_modules/normalize-package-data/test/scripts.js
deleted file mode 100644
index 473596eef..000000000
--- a/node_modules/normalize-package-data/test/scripts.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var tap = require("tap")
-var normalize = require("../lib/normalize")
-var path = require("path")
-var fs = require("fs")
-
-tap.test("bad scripts", function (t) {
- var p = path.resolve(__dirname, "./fixtures/badscripts.json")
- fs.readFile (p, function (err, contents) {
- if (err) throw err
- var originalData = JSON.parse(contents.toString())
- var data = JSON.parse(contents.toString())
- normalize(data)
- t.ok(data)
- verifyFields(t, data, originalData)
- t.end()
- })
-})
-
-function verifyFields (t, normalized, original) {
- t.equal(normalized.version, original.version, "Version field stays same")
- t.equal(normalized.name, original.name, "Name stays the same.")
- // scripts is not an object, so it should be deleted
- t.notOk(normalized.scripts)
-}
diff --git a/node_modules/normalize-package-data/test/strict.js b/node_modules/normalize-package-data/test/strict.js
deleted file mode 100644
index 40e09dcf2..000000000
--- a/node_modules/normalize-package-data/test/strict.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var test = require("tap").test
-
-var normalize = require("../")
-
-test("strict", function(t) {
- var threw
-
- try {
- threw = false
- normalize({name: "X"}, true)
- } catch (er) {
- threw = true
- t.equal(er.message, 'Invalid name: "X"')
- } finally {
- t.equal(threw, true)
- }
-
- try {
- threw = false
- normalize({name:" x "}, true)
- } catch (er) {
- threw = true
- t.equal(er.message, 'Invalid name: " x "')
- } finally {
- t.equal(threw, true)
- }
-
- try {
- threw = false
- normalize({name:"x",version:"01.02.03"}, true)
- } catch (er) {
- threw = true
- t.equal(er.message, 'Invalid version: "01.02.03"')
- } finally {
- t.equal(threw, true)
- }
-
- // these should not throw
- var slob = {name:" X ",version:"01.02.03",dependencies:{
- y:">01.02.03",
- z:"! 99 $$ASFJ(Aawenf90awenf as;naw.3j3qnraw || an elephant"
- }}
- normalize(slob, false)
- t.same(slob,
- { name: 'X',
- version: '1.2.3',
- dependencies:
- { y: '>01.02.03',
- z: '! 99 $$ASFJ(Aawenf90awenf as;naw.3j3qnraw || an elephant' },
- readme: 'ERROR: No README data found!',
- _id: 'X@1.2.3' })
-
- t.end()
-})
diff --git a/node_modules/normalize-package-data/test/typo.js b/node_modules/normalize-package-data/test/typo.js
deleted file mode 100644
index 9c2fd70a4..000000000
--- a/node_modules/normalize-package-data/test/typo.js
+++ /dev/null
@@ -1,133 +0,0 @@
-var test = require('tap').test
-
-var normalize = require('../')
-var typos = require('../lib/typos.json')
-var warningMessages = require("../lib/warning_messages.json")
-var safeFormat = require("../lib/safe_format")
-
-test('typos', function(t) {
- var warnings = []
- function warn(m) {
- warnings.push(m)
- }
-
- var typoMessage = safeFormat.bind(undefined, warningMessages.typo)
-
- var expect =
- [ warningMessages.missingRepository,
- warningMessages.missingLicense,
- typoMessage('dependancies', 'dependencies'),
- typoMessage('dependecies', 'dependencies'),
- typoMessage('depdenencies', 'dependencies'),
- typoMessage('devEependencies', 'devDependencies'),
- typoMessage('depends', 'dependencies'),
- typoMessage('dev-dependencies', 'devDependencies'),
- typoMessage('devDependences', 'devDependencies'),
- typoMessage('devDepenencies', 'devDependencies'),
- typoMessage('devdependencies', 'devDependencies'),
- typoMessage('repostitory', 'repository'),
- typoMessage('repo', 'repository'),
- typoMessage('prefereGlobal', 'preferGlobal'),
- typoMessage('hompage', 'homepage'),
- typoMessage('hampage', 'homepage'),
- typoMessage('autohr', 'author'),
- typoMessage('autor', 'author'),
- typoMessage('contributers', 'contributors'),
- typoMessage('publicationConfig', 'publishConfig') ]
-
- normalize({"dependancies": "dependencies"
- ,"dependecies": "dependencies"
- ,"depdenencies": "dependencies"
- ,"devEependencies": "devDependencies"
- ,"depends": "dependencies"
- ,"dev-dependencies": "devDependencies"
- ,"devDependences": "devDependencies"
- ,"devDepenencies": "devDependencies"
- ,"devdependencies": "devDependencies"
- ,"repostitory": "repository"
- ,"repo": "repository"
- ,"prefereGlobal": "preferGlobal"
- ,"hompage": "homepage"
- ,"hampage": "homepage"
- ,"autohr": "author"
- ,"autor": "author"
- ,"contributers": "contributors"
- ,"publicationConfig": "publishConfig"
- ,readme:"asdf"
- ,name:"name"
- ,version:"1.2.5"}, warn)
-
- t.same(warnings, expect)
-
- warnings.length = 0
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- typoMessage("bugs['web']", "bugs['url']"),
- typoMessage("bugs['name']", "bugs['url']"),
- warningMessages.nonUrlBugsUrlField,
- warningMessages.emptyNormalizedBugs,
- warningMessages.missingReadme,
- warningMessages.missingLicense]
-
- normalize({name:"name"
- ,version:"1.2.5"
- ,bugs:{web:"url",name:"url"}}, warn)
-
- t.same(warnings, expect)
-
- warnings.length = 0
- var expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.missingLicense,
- typoMessage('script', 'scripts') ]
-
- normalize({name:"name"
- ,version:"1.2.5"
- ,script:{server:"start",tests:"test"}}, warn)
-
- t.same(warnings, expect)
-
- warnings.length = 0
- expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- typoMessage("scripts['server']", "scripts['start']"),
- typoMessage("scripts['tests']", "scripts['test']"),
- warningMessages.missingReadme,
- warningMessages.missingLicense]
-
- normalize({name:"name"
- ,version:"1.2.5"
- ,scripts:{server:"start",tests:"test"}}, warn)
-
- t.same(warnings, expect)
-
- warnings.length = 0
- expect =
- [ warningMessages.missingDescription,
- warningMessages.missingRepository,
- warningMessages.missingReadme,
- warningMessages.missingLicense]
-
- normalize({name:"name"
- ,version:"1.2.5"
- ,scripts:{server:"start",tests:"test"
- ,start:"start",test:"test"}}, warn)
-
- t.same(warnings, expect)
-
- warnings.length = 0
- expect = []
-
- normalize({private: true
- ,name:"name"
- ,version:"1.2.5"
- ,scripts:{server:"start",tests:"test"}}, warn)
-
- t.same(warnings, expect)
-
- t.end();
-})