Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2014-06-06 10:10:18 +0400
committerisaacs <i@izs.me>2014-06-06 10:10:21 +0400
commitc535eddf307110eb60eee4f6add706a29b165a68 (patch)
treeaedc8206ff65477fe7238239b6880a961d7ab780 /node_modules/read-package-json
parent38267dc2cd63fddb037ca9fb474f3e387da4cb99 (diff)
github-url-from-username-repo and read-package-json updates
Prefer https:// git urls instead of git://
Diffstat (limited to 'node_modules/read-package-json')
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js4
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/package.json11
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js8
-rw-r--r--node_modules/read-package-json/package.json9
4 files changed, 17 insertions, 15 deletions
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js b/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js
index 2bcc2290d..cc560f30e 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js
@@ -139,7 +139,7 @@ var fixer = module.exports = {
// "/" is not allowed as packagename for publishing, but for git-urls
// normalize shorthand-urls
if (githubUserRepo(data[deps][d])) {
- data[deps][d] = githubUserRepo(data[deps][d])
+ data[deps][d] = 'git+' + githubUserRepo(data[deps][d])
}
}, this)
}, this)
@@ -379,4 +379,4 @@ function bugsTypos(bugs, warn) {
delete bugs[k]
}
})
-} \ No newline at end of file
+}
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/package.json b/node_modules/read-package-json/node_modules/normalize-package-data/package.json
index 449cfb7df..9e4b0376b 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/package.json
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/package.json
@@ -1,6 +1,6 @@
{
"name": "normalize-package-data",
- "version": "0.2.13",
+ "version": "0.3.0",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
@@ -16,7 +16,7 @@
},
"dependencies": {
"github-url-from-git": "~1.1.1",
- "github-url-from-username-repo": "^0.1.0",
+ "github-url-from-username-repo": "^0.2.0",
"semver": "2"
},
"devDependencies": {
@@ -40,11 +40,12 @@
],
"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 ",
"readmeFilename": "README.md",
+ "gitHead": "f4d4268894a23d6f37a335d4ae28bd90b14e4ef9",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
},
"homepage": "https://github.com/meryn/normalize-package-data",
- "_id": "normalize-package-data@0.2.13",
- "_shasum": "50f9fd9e77b1c8411cd231db2962e73963de774d",
- "_from": "normalize-package-data@^0.2.13"
+ "_id": "normalize-package-data@0.3.0",
+ "_shasum": "70ea9e5b6caf69faa9d83e42f71489642372d815",
+ "_from": "normalize-package-data@^0.3.0"
}
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js b/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js
index dd26c5d01..b35eed765 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js
@@ -158,21 +158,21 @@ tap.test("singularize repositories", function(t) {
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://github.com/visionmedia/express" })
+ t.same(d.repository, { type: "git", url: "https://github.com/visionmedia/express" })
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://github.com/isaacs/node-graceful-fs" })
+ t.same(d.repository, { type: "git", url: "https://github.com/isaacs/node-graceful-fs" })
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: "git://github.com/isaacs/node-graceful-fs" }
+ repository: { type: "git", url: "https://github.com/isaacs/node-graceful-fs" }
})
t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs')
t.end()
@@ -199,7 +199,7 @@ tap.test("homepage field will set to github gist url if repository is a shorthan
tap.test("treat isaacs/node-graceful-fs as github repo in dependencies", function(t) {
var d = {dependencies: {"node-graceful-fs": "isaacs/node-graceful-fs"}}
normalize(d)
- t.same(d.dependencies, {"node-graceful-fs": "git://github.com/isaacs/node-graceful-fs" })
+ t.same(d.dependencies, {"node-graceful-fs": "git+https://github.com/isaacs/node-graceful-fs" })
t.end()
});
diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json
index fdfe963f6..8b67916aa 100644
--- a/node_modules/read-package-json/package.json
+++ b/node_modules/read-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "read-package-json",
- "version": "1.1.9",
+ "version": "1.2.0",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -18,7 +18,7 @@
"dependencies": {
"glob": "~3.2.1",
"lru-cache": "2",
- "normalize-package-data": "^0.2.13",
+ "normalize-package-data": "^0.3.0",
"graceful-fs": "2"
},
"devDependencies": {
@@ -30,11 +30,12 @@
"license": "ISC",
"readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\n// readJson(filename, [logFunction=noop], [strict=false], cb)\nreadJson('/path/to/package.json', console.error, false, function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n});\n```\n\n## readJson(file, [logFn = noop], [strict = false], cb)\n\n* `file` {String} The path to the package.json file\n* `logFn` {Function} Function to handle logging. Defaults to a noop.\n* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and\n other strict requirements.\n* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
"readmeFilename": "README.md",
+ "gitHead": "163c0d2ed2e731e987e1af5af3de9bf3a92d9829",
"bugs": {
"url": "https://github.com/isaacs/read-package-json/issues"
},
"homepage": "https://github.com/isaacs/read-package-json",
- "_id": "read-package-json@1.1.9",
- "_shasum": "9c319185e5f8461661c01f8d4e5e80b468aa18ee",
+ "_id": "read-package-json@1.2.0",
+ "_shasum": "4d0d359de5da8f0eb6301c056b9b2c5f2736acd8",
"_from": "read-package-json@latest"
}