diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-03-10 00:53:22 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-03-10 03:08:26 +0300 |
commit | 009ffab0dd2917afc4339ce4748a336c32d812f2 (patch) | |
tree | e67a89e3abfeedd00d4ed759e37b00a32a7826bb /node_modules/normalize-package-data | |
parent | d17296e7f24cd9b4b001a71283a65c55b3e87218 (diff) |
normalize-package-data@2.3.6
Diffstat (limited to 'node_modules/normalize-package-data')
23 files changed, 112 insertions, 79 deletions
diff --git a/node_modules/normalize-package-data/.npmignore b/node_modules/normalize-package-data/.npmignore index 096746c14..2ccbe4656 100644 --- a/node_modules/normalize-package-data/.npmignore +++ b/node_modules/normalize-package-data/.npmignore @@ -1 +1 @@ -/node_modules/
\ No newline at end of file +/node_modules/ diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS index 10860f72b..66282ba1d 100644 --- a/node_modules/normalize-package-data/AUTHORS +++ b/node_modules/normalize-package-data/AUTHORS @@ -1,4 +1,4 @@ # Names sorted by how much code was originally theirs. Isaac Z. Schlueter <i@izs.me> Meryn Stol <merynstol@gmail.com> -Robert Kowalski <rok@kowalski.gd>
\ No newline at end of file +Robert Kowalski <rok@kowalski.gd> diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE index 9cea2e3c9..6ed662cd5 100644 --- a/node_modules/normalize-package-data/LICENSE +++ b/node_modules/normalize-package-data/LICENSE @@ -1,4 +1,4 @@ -This package contains code originally written by Isaac Z. Schlueter. +This package contains code originally written by Isaac Z. Schlueter. Used with permission. Copyright (c) Meryn Stol ("Author") diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md index 526745ef6..377277797 100644 --- a/node_modules/normalize-package-data/README.md +++ b/node_modules/normalize-package-data/README.md @@ -1,6 +1,6 @@ # normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) -normalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. +normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. @@ -16,7 +16,7 @@ Basic usage is really simple. You call the function that normalize-package-data ```javascript normalizeData = require('normalize-package-data') -packageData = fs.readFileSync("package.json") +packageData = require("./package.json") normalizeData(packageData) // packageData is now normalized ``` @@ -27,8 +27,7 @@ You may activate strict validation by passing true as the second argument. ```javascript normalizeData = require('normalize-package-data') -packageData = fs.readFileSync("package.json") -warnFn = function(msg) { console.error(msg) } +packageData = require("./package.json") normalizeData(packageData, true) // packageData is now normalized ``` @@ -41,7 +40,7 @@ Optionally, you may pass a "warning" function. It gets called whenever the `norm ```javascript normalizeData = require('normalize-package-data') -packageData = fs.readFileSync("package.json") +packageData = require("./package.json") warnFn = function(msg) { console.error(msg) } normalizeData(packageData, warnFn) // packageData is now normalized. Any number of warnings may have been logged. @@ -78,7 +77,7 @@ If the supplied data has an invalid name or version vield, `normalizeData` will * If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. * If `homepage` field is not a string, it will be removed. * If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. -* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. ### Rules for name field @@ -86,7 +85,7 @@ If `name` field is given, the value of the name field must be a string. The stri * start with a period. * contain the following characters: `/@\s+%` -* contain and characters that would need to be encoded for use in urls. +* contain any characters that would need to be encoded for use in urls. * resemble the word `node_modules` or `favicon.ico` (case doesn't matter). ### Rules for version field diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js index 0f3aad5f5..4ac74ad7c 100644 --- a/node_modules/normalize-package-data/lib/make_warning.js +++ b/node_modules/normalize-package-data/lib/make_warning.js @@ -20,4 +20,4 @@ function makeTypoWarning (providedName, probableName, field) { probableName = field + "['" + probableName + "']" } return util.format(messages.typo, providedName, probableName) -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js index 7e68c69a9..bd1bfef12 100644 --- a/node_modules/normalize-package-data/lib/normalize.js +++ b/node_modules/normalize-package-data/lib/normalize.js @@ -9,7 +9,7 @@ var fieldsToFix = ['name','version','description','repository','modules','script ,'files','bin','man','bugs','keywords','readme','homepage','license'] var otherThingsToFix = ['dependencies','people', 'typos'] -var thingsToFix = fieldsToFix.map(function(fieldName) { +var thingsToFix = fieldsToFix.map(function(fieldName) { return ucFirst(fieldName) + "Field" }) // two ways to do this in CoffeeScript on only one line, sub-70 chars: @@ -22,8 +22,8 @@ function normalize (data, warn, strict) { if(!strict) strict = false if(!warn || data.private) warn = function(msg) { /* noop */ } - if (data.scripts && - data.scripts.install === "node-gyp rebuild" && + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) { data.gypfile = true } diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js index 08517f142..b07f1006d 100644 --- a/node_modules/normalize-package-data/lib/safe_format.js +++ b/node_modules/normalize-package-data/lib/safe_format.js @@ -6,4 +6,4 @@ module.exports = function() { if (!arg) throw new TypeError('Bad arguments.') }) return util.format.apply(null, arguments) -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json index 73590c0a2..7f9dd283b 100644 --- a/node_modules/normalize-package-data/lib/typos.json +++ b/node_modules/normalize-package-data/lib/typos.json @@ -1,5 +1,5 @@ { - "topLevel": { + "topLevel": { "dependancies": "dependencies" ,"dependecies": "dependencies" ,"depdenencies": "dependencies" diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json index f8c8aa908..df940bb07 100644 --- a/node_modules/normalize-package-data/package.json +++ b/node_modules/normalize-package-data/package.json @@ -1,30 +1,59 @@ { - "name": "normalize-package-data", - "version": "2.3.5", - "author": { - "name": "Meryn Stol", - "email": "merynstol@gmail.com" + "_args": [ + [ + { + "raw": "normalize-package-data@latest", + "scope": null, + "escapedName": "normalize-package-data", + "name": "normalize-package-data", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" + }, + "/Users/zkat/Documents/code/npm" + ] + ], + "_from": "normalize-package-data@latest", + "_id": "normalize-package-data@2.3.6", + "_inCache": true, + "_location": "/normalize-package-data", + "_nodeVersion": "7.7.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/normalize-package-data-2.3.6.tgz_1488928112411_0.01280554523691535" }, - "description": "Normalizes data that can be found in package.json files.", - "license": "BSD-2-Clause", - "repository": { - "type": "git", - "url": "git://github.com/npm/normalize-package-data.git" + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" }, - "main": "lib/normalize.js", - "scripts": { - "test": "tap test/*.js" + "_npmVersion": "4.1.2", + "_phantomChildren": {}, + "_requested": { + "raw": "normalize-package-data@latest", + "scope": null, + "escapedName": "normalize-package-data", + "name": "normalize-package-data", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "dependencies": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "_requiredBy": [ + "#USER", + "/", + "/npm-registry-client", + "/read-package-json" + ], + "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.6.tgz", + "_shasum": "498fa420c96401f787402ba21e600def9f981fff", + "_shrinkwrap": null, + "_spec": "normalize-package-data@latest", + "_where": "/Users/zkat/Documents/code/npm", + "author": { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" }, - "devDependencies": { - "async": "^1.5.0", - "tap": "^2.2.0", - "underscore": "^1.8.3" + "bugs": { + "url": "https://github.com/npm/normalize-package-data/issues" }, "contributors": [ { @@ -40,24 +69,27 @@ "email": "rok@kowalski.gd" } ], - "gitHead": "3dc7756af20b3b1b24c6d75302448ca3659e0a65", - "bugs": { - "url": "https://github.com/npm/normalize-package-data/issues" + "dependencies": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" }, - "homepage": "https://github.com/npm/normalize-package-data#readme", - "_id": "normalize-package-data@2.3.5", - "_shasum": "8d924f142960e1777e7ffe170543631cc7cb02df", - "_from": "normalize-package-data@>=2.3.5 <2.4.0", - "_npmVersion": "3.3.6", - "_nodeVersion": "5.0.0", - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" + "description": "Normalizes data that can be found in package.json files.", + "devDependencies": { + "async": "^1.5.0", + "tap": "^2.2.0", + "underscore": "^1.8.3" }, + "directories": {}, "dist": { - "shasum": "8d924f142960e1777e7ffe170543631cc7cb02df", - "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz" + "shasum": "498fa420c96401f787402ba21e600def9f981fff", + "tarball": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.6.tgz" }, + "gitHead": "f6c37066edd095c0e465f6e181c0cd79a02f6c3d", + "homepage": "https://github.com/npm/normalize-package-data#readme", + "license": "BSD-2-Clause", + "main": "lib/normalize.js", "maintainers": [ { "name": "iarna", @@ -80,7 +112,15 @@ "email": "kat@sykosomatic.org" } ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", - "readme": "ERROR: No README data found!" + "name": "normalize-package-data", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.3.6" } diff --git a/node_modules/normalize-package-data/test/consistency.js b/node_modules/normalize-package-data/test/consistency.js index 4082be25c..6bce17a16 100644 --- a/node_modules/normalize-package-data/test/consistency.js +++ b/node_modules/normalize-package-data/test/consistency.js @@ -13,7 +13,7 @@ tap.test("consistent normalization", function(t) { 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) { + warn = function(msg) { // t.equal("",msg) // uncomment to have some kind of logging of warnings } filename = __dirname + "/fixtures/" + entryName @@ -33,4 +33,4 @@ tap.test("consistent normalization", function(t) { t.end() }) }) // fs.readdir -}) // tap.test
\ No newline at end of file +}) // tap.test diff --git a/node_modules/normalize-package-data/test/dependencies.js b/node_modules/normalize-package-data/test/dependencies.js index 3e493ab02..5a5aff5d7 100644 --- a/node_modules/normalize-package-data/test/dependencies.js +++ b/node_modules/normalize-package-data/test/dependencies.js @@ -15,7 +15,7 @@ tap.test("warn if dependency contains anything else but a string", function(t) { 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) @@ -34,7 +34,7 @@ tap.test("warn if bundleDependencies array contains anything else but strings", 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") diff --git a/node_modules/normalize-package-data/test/fixtures/async.json b/node_modules/normalize-package-data/test/fixtures/async.json index 5e652a6c6..9fa85b53e 100644 --- a/node_modules/normalize-package-data/test/fixtures/async.json +++ b/node_modules/normalize-package-data/test/fixtures/async.json @@ -33,4 +33,4 @@ "scripts": { "test": "nodeunit test/test-async.js" } -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/bcrypt.json b/node_modules/normalize-package-data/test/fixtures/bcrypt.json index 56e6d81b3..2cf3ba9e5 100644 --- a/node_modules/normalize-package-data/test/fixtures/bcrypt.json +++ b/node_modules/normalize-package-data/test/fixtures/bcrypt.json @@ -53,4 +53,4 @@ "Sean McArthur <sean.monstar@gmail.com> (https://github.com/seanmonstar)", "Fanie Oosthuysen <fanie.oosthuysen@gmail.com> (https://github.com/weareu)" ] -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/coffee-script.json b/node_modules/normalize-package-data/test/fixtures/coffee-script.json index a0b60a9d3..6582289d1 100644 --- a/node_modules/normalize-package-data/test/fixtures/coffee-script.json +++ b/node_modules/normalize-package-data/test/fixtures/coffee-script.json @@ -32,4 +32,4 @@ "uglify-js": "~2.2", "jison": ">=0.2.0" } -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/http-server.json b/node_modules/normalize-package-data/test/fixtures/http-server.json index 90c28863a..2ea55eb9a 100644 --- a/node_modules/normalize-package-data/test/fixtures/http-server.json +++ b/node_modules/normalize-package-data/test/fixtures/http-server.json @@ -4,11 +4,11 @@ "version": "0.3.0", "author": "Nodejitsu <support@nodejitsu.com>", "description": "a simple zero-configuration command-line http server", - "contributors": [ + "contributors": [ { "name": "Marak Squires", "email": "marak@nodejitsu.com" - } + } ], "bin": { "http-server": "./bin/http-server" @@ -45,9 +45,9 @@ "bundledDependencies": [ "union", "ecstatic" - ], + ], "license": "MIT", "engines": { "node": ">=0.6" } -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/movefile.json b/node_modules/normalize-package-data/test/fixtures/movefile.json index 593387570..07af4acf4 100644 --- a/node_modules/normalize-package-data/test/fixtures/movefile.json +++ b/node_modules/normalize-package-data/test/fixtures/movefile.json @@ -18,4 +18,4 @@ "dependencies": { "node-gyp": "~0.9.1" } -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/no-description.json b/node_modules/normalize-package-data/test/fixtures/no-description.json index 9ea70b6bf..8c481e1af 100644 --- a/node_modules/normalize-package-data/test/fixtures/no-description.json +++ b/node_modules/normalize-package-data/test/fixtures/no-description.json @@ -1,4 +1,4 @@ { "name": "foo-bar-package", "version": "0.0.1" -}
\ No newline at end of file +} 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 index acc053825..b6786f430 100644 --- a/node_modules/normalize-package-data/test/fixtures/node-module_exist.json +++ b/node_modules/normalize-package-data/test/fixtures/node-module_exist.json @@ -23,4 +23,4 @@ "modules" ], "license": "MIT" -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/npm.json b/node_modules/normalize-package-data/test/fixtures/npm.json index 2262b3139..b4c704df9 100644 --- a/node_modules/normalize-package-data/test/fixtures/npm.json +++ b/node_modules/normalize-package-data/test/fixtures/npm.json @@ -132,4 +132,4 @@ "url": "https://github.com/isaacs/npm/raw/master/LICENSE" } ] -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/request.json b/node_modules/normalize-package-data/test/fixtures/request.json index 24189a551..4d58a95c2 100644 --- a/node_modules/normalize-package-data/test/fixtures/request.json +++ b/node_modules/normalize-package-data/test/fixtures/request.json @@ -36,4 +36,4 @@ "scripts": { "test": "node tests/run.js" } -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/fixtures/underscore.json b/node_modules/normalize-package-data/test/fixtures/underscore.json index bfc8b3d26..e27cfd8c6 100644 --- a/node_modules/normalize-package-data/test/fixtures/underscore.json +++ b/node_modules/normalize-package-data/test/fixtures/underscore.json @@ -14,4 +14,4 @@ "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true" }, "license" : "MIT" -}
\ No newline at end of file +} diff --git a/node_modules/normalize-package-data/test/normalize.js b/node_modules/normalize-package-data/test/normalize.js index 3926938b6..0cd4baf49 100644 --- a/node_modules/normalize-package-data/test/normalize.js +++ b/node_modules/normalize-package-data/test/normalize.js @@ -101,8 +101,6 @@ tap.test("urls required", function(t) { repository: "Hello." }, warn) - console.error(a) - var expect = [ warningMessages.missingDescription, warningMessages.missingRepository, @@ -129,8 +127,6 @@ tap.test("homepage field must start with a protocol.", function(t) { homepage: 'example.org' }, warn) - console.error(a) - var expect = [ warningMessages.missingDescription, warningMessages.missingRepository, @@ -152,8 +148,6 @@ tap.test("license field should be a valid SPDX expression", function(t) { license: 'Apache 2' }, warn) - console.error(a) - var expect = [ warningMessages.missingDescription, warningMessages.missingRepository, diff --git a/node_modules/normalize-package-data/test/typo.js b/node_modules/normalize-package-data/test/typo.js index 0cd3eb49d..9c2fd70a4 100644 --- a/node_modules/normalize-package-data/test/typo.js +++ b/node_modules/normalize-package-data/test/typo.js @@ -10,7 +10,7 @@ test('typos', function(t) { function warn(m) { warnings.push(m) } - + var typoMessage = safeFormat.bind(undefined, warningMessages.typo) var expect = |