diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-08-29 04:38:38 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-08-29 04:42:28 +0400 |
commit | 1d041a8a5ebd5bf6cecafab2072d4ec07823adab (patch) | |
tree | fbdc696bd8c550a8cdcb3235e13b344aa81b7e98 /node_modules/normalize-package-data | |
parent | 02c85d592c4058e5d9eafb0be36b6743ae631998 (diff) |
github-url-from-username-repo@~1.0.0
Also includes:
* normalize-package-data@1.0.1
* npm-registry-client@3.1.5
* read-package-json@~1.2.7
Treeish names containing slashes now work. Also pulled dezalgo up to a
top-level dependency, which necessitated adding it to the
bundledDependencies list.
Diffstat (limited to 'node_modules/normalize-package-data')
9 files changed, 11 insertions, 163 deletions
diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md index 9b9adcc2d..bdcc8b04d 100644 --- a/node_modules/normalize-package-data/README.md +++ b/node_modules/normalize-package-data/README.md @@ -68,7 +68,7 @@ If the supplied data has an invalid name or version vield, `normalizeData` will * If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. * If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. * The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. -* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. * If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. * If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git://github.com/[owner-name]/[repo-name] * If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. @@ -98,4 +98,4 @@ This package contains code based on read-package-json written by Isaac Z. Schlue ## License normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). -Copyright (c) 2013 Meryn Stol
\ No newline at end of file +Copyright (c) 2013 Meryn Stol diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/.npmignore b/node_modules/normalize-package-data/node_modules/github-url-from-git/.npmignore deleted file mode 100644 index 3c3629e64..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/History.md b/node_modules/normalize-package-data/node_modules/github-url-from-git/History.md deleted file mode 100644 index fcb296bc6..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -1.1.1 / 2013-04-23 -================== - - * package.json: Move test stuff to devDeps - -1.1.0 / 2013-04-19 -================== - - * Add support for gist urls diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/Makefile b/node_modules/normalize-package-data/node_modules/github-url-from-git/Makefile deleted file mode 100644 index 37f330e81..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @./node_modules/.bin/mocha test.js --reporter spec --require should - -.PHONY: test diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/Readme.md b/node_modules/normalize-package-data/node_modules/github-url-from-git/Readme.md deleted file mode 100644 index d027e8ec6..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/Readme.md +++ /dev/null @@ -1,41 +0,0 @@ - -# github-url-from-git - -```js -describe('parse(url)', function(){ - it('should support git://*', function(){ - var url = 'git://github.com/jamesor/mongoose-versioner'; - parse(url).should.equal('https://github.com/jamesor/mongoose-versioner'); - }) - - it('should support git://*.git', function(){ - var url = 'git://github.com/treygriffith/cellar.git'; - parse(url).should.equal('https://github.com/treygriffith/cellar'); - }) - - it('should support https://*', function(){ - var url = 'https://github.com/Empeeric/i18n-node'; - parse(url).should.equal('https://github.com/Empeeric/i18n-node'); - }) - - it('should support https://*.git', function(){ - var url = 'https://jpillora@github.com/banchee/tranquil.git'; - parse(url).should.equal('https://github.com/banchee/tranquil'); - }) - - it('should return undefined on failure', function(){ - var url = 'git://github.com/justgord/.git'; - assert(null == parse(url)); - }) - - it('should parse git@gist urls', function() { - var url = 'git@gist.github.com:3135914.git'; - parse(url).should.equal('https://gist.github.com/3135914') - }) - - it('should parse https://gist urls', function() { - var url = 'https://gist.github.com/3135914.git'; - parse(url).should.equal('https://gist.github.com/3135914') - }) -}) -``` diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/index.js b/node_modules/normalize-package-data/node_modules/github-url-from-git/index.js deleted file mode 100644 index 9ccc215f0..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/index.js +++ /dev/null @@ -1,12 +0,0 @@ -var re = /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/ - -module.exports = function(url){ - try { - var m = re.exec(url.replace(/\.git$/, '')); - var host = m[1]; - var path = m[2]; - return 'https://' + host + '/' + path; - } catch (err) { - // ignore - } -}; diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/package.json b/node_modules/normalize-package-data/node_modules/github-url-from-git/package.json deleted file mode 100644 index 593508212..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "github-url-from-git", - "version": "1.1.1", - "description": "Parse a github git url and return the github repo url", - "main": "index.js", - "scripts": { - "test": "mocha test.js --reporter spec --require should" - }, - "repository": "", - "keywords": [ - "github", - "git", - "url", - "parser" - ], - "author": "", - "license": "MIT", - "devDependencies": { - "better-assert": "~1.0.0", - "mocha": "~1.9.0", - "should": "~1.2.2" - }, - "_id": "github-url-from-git@1.1.1", - "dist": { - "shasum": "1f89623453123ef9623956e264c60bf4c3cf5ccf", - "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.1.1.tgz" - }, - "_from": "github-url-from-git@>=1.1.1-0 <1.2.0-0", - "_npmVersion": "1.2.14", - "_npmUser": { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "directories": {}, - "_shasum": "1f89623453123ef9623956e264c60bf4c3cf5ccf", - "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.1.1.tgz" -} diff --git a/node_modules/normalize-package-data/node_modules/github-url-from-git/test.js b/node_modules/normalize-package-data/node_modules/github-url-from-git/test.js deleted file mode 100644 index e472302a0..000000000 --- a/node_modules/normalize-package-data/node_modules/github-url-from-git/test.js +++ /dev/null @@ -1,40 +0,0 @@ - -var parse = require('./'); -var assert = require('better-assert'); - -describe('parse(url)', function(){ - it('should support git://*', function(){ - var url = 'git://github.com/jamesor/mongoose-versioner'; - parse(url).should.equal('https://github.com/jamesor/mongoose-versioner'); - }) - - it('should support git://*.git', function(){ - var url = 'git://github.com/treygriffith/cellar.git'; - parse(url).should.equal('https://github.com/treygriffith/cellar'); - }) - - it('should support https://*', function(){ - var url = 'https://github.com/Empeeric/i18n-node'; - parse(url).should.equal('https://github.com/Empeeric/i18n-node'); - }) - - it('should support https://*.git', function(){ - var url = 'https://jpillora@github.com/banchee/tranquil.git'; - parse(url).should.equal('https://github.com/banchee/tranquil'); - }) - - it('should return undefined on failure', function(){ - var url = 'git://github.com/justgord/.git'; - assert(null == parse(url)); - }) - - it('should parse git@gist urls', function() { - var url = 'git@gist.github.com:3135914.git'; - parse(url).should.equal('https://gist.github.com/3135914') - }) - - it('should parse https://gist urls', function() { - var url = 'https://gist.github.com/3135914.git'; - parse(url).should.equal('https://gist.github.com/3135914') - }) -}) diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json index 672f0b57f..2c7b0440e 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": "0.4.2", + "version": "1.0.1", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -15,14 +15,14 @@ "test": "tap test/*.js" }, "dependencies": { - "github-url-from-git": "~1.1.1", - "github-url-from-username-repo": "^0.2.0", + "github-url-from-git": "^1.3.0", + "github-url-from-username-repo": "^1.0.0", "semver": "2 || 3" }, "devDependencies": { "tap": "~0.2.5", "underscore": "~1.4.4", - "async": "~0.2.7" + "async": "~0.9.0" }, "contributors": [ { @@ -38,14 +38,14 @@ "email": "rok@kowalski.gd" } ], - "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-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.\n\nnormalize-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.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* 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.\n* If `homepage` field is not a string, it will be removed.\n* 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`.\n* 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.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ", + "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-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.\n\nnormalize-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.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* 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.\n* If `homepage` field is not a string, it will be removed.\n* 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`.\n* 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.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol \n", "readmeFilename": "README.md", - "gitHead": "09ff709e33e611bb4e6ad5aa2b33e52e77b3fa36", + "gitHead": "d260644f514672cc84f1cc471024679cccc4fd65", "bugs": { "url": "https://github.com/meryn/normalize-package-data/issues" }, "homepage": "https://github.com/meryn/normalize-package-data", - "_id": "normalize-package-data@0.4.2", - "_shasum": "166dc052a74e2f5ac1d3d23903ab3f2e2b7dd8e6", - "_from": "normalize-package-data@latest" + "_id": "normalize-package-data@1.0.1", + "_shasum": "2a4b5200c82cc47bb91c8c9cf47d645499d200bf", + "_from": "normalize-package-data@>=1.0.1-0 <2.0.0-0" } |