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:22:27 +0400
committerisaacs <i@izs.me>2014-06-06 10:22:27 +0400
commit57ac974e9bc88bc546a1a6b39810c28ad2423319 (patch)
tree56ede59195673a21d108b498cac2e668289a081b
parentc535eddf307110eb60eee4f6add706a29b165a68 (diff)
Update glob and things depending on glob
-rw-r--r--node_modules/glob/.travis.yml3
-rw-r--r--node_modules/glob/glob.js14
-rw-r--r--node_modules/glob/package.json33
-rw-r--r--node_modules/glob/test/bash-results.json3
-rw-r--r--node_modules/glob/test/empty-set.js20
-rw-r--r--node_modules/glob/test/error-callback.js20
-rw-r--r--node_modules/glob/test/nocase-nomagic.js19
-rw-r--r--node_modules/glob/test/stat.js2
-rw-r--r--node_modules/init-package-json/package.json33
-rw-r--r--node_modules/node-gyp/package.json2
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/package.json25
-rw-r--r--node_modules/read-package-json/package.json10
-rw-r--r--package.json6
13 files changed, 138 insertions, 52 deletions
diff --git a/node_modules/glob/.travis.yml b/node_modules/glob/.travis.yml
index baa0031d5..fca8ef019 100644
--- a/node_modules/glob/.travis.yml
+++ b/node_modules/glob/.travis.yml
@@ -1,3 +1,4 @@
language: node_js
node_js:
- - 0.8
+ - 0.10
+ - 0.11
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js
index f646c4483..b55ac8c09 100644
--- a/node_modules/glob/glob.js
+++ b/node_modules/glob/glob.js
@@ -44,6 +44,7 @@ var fs = require("fs")
, path = require("path")
, isDir = {}
, assert = require("assert").ok
+, once = require("once")
function glob (pattern, options, cb) {
if (typeof options === "function") cb = options, options = {}
@@ -91,6 +92,7 @@ function Glob (pattern, options, cb) {
}
if (typeof cb === "function") {
+ cb = once(cb)
this.on("error", cb)
this.on("end", function (matches) {
cb(null, matches)
@@ -149,6 +151,10 @@ function Glob (pattern, options, cb) {
this.stat = !!options.stat
this.debug = !!options.debug || !!options.globDebug
+
+ if (/\bglob\b/.test(process.env.NODE_DEBUG || ''))
+ this.debug = true
+
if (this.debug)
this.log = console.error
@@ -176,6 +182,10 @@ function Glob (pattern, options, cb) {
// Keep them as a list so we can fill in when nonull is set.
this.matches = new Array(n)
+ if (this.minimatch.set.length === 0) {
+ return process.nextTick(this._finish.bind(this))
+ }
+
this.minimatch.set.forEach(iterator.bind(this))
function iterator (pattern, i, set) {
this._process(pattern, 0, i, function (er) {
@@ -429,9 +439,9 @@ Glob.prototype._process = function (pattern, depth, index, cb_) {
if (prefix === null) read = "."
else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
if (!prefix || !isAbsolute(prefix)) {
- prefix = path.join("/", prefix)
+ prefix = "/" + prefix
}
- read = prefix = path.resolve(prefix)
+ read = prefix
// if (process.platform === "win32")
// read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json
index 795af8cbe..2e0b69603 100644
--- a/node_modules/glob/package.json
+++ b/node_modules/glob/package.json
@@ -6,7 +6,7 @@
},
"name": "glob",
"description": "a little globber",
- "version": "3.2.10",
+ "version": "4.0.2",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -17,7 +17,8 @@
},
"dependencies": {
"inherits": "2",
- "minimatch": "^0.3.0"
+ "minimatch": "^0.3.0",
+ "once": "^1.3.0"
},
"devDependencies": {
"tap": "~0.4.0",
@@ -29,14 +30,30 @@
"test-regen": "TEST_REGEN=1 node test/00-setup.js"
},
"license": "BSD",
- "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n",
- "readmeFilename": "README.md",
- "gitHead": "4e00805b5529af626bf0512d6810c27a96ca2a12",
+ "gitHead": "4e85a5bcb2f28f82fa9836b6b2baba8af8e31e96",
"bugs": {
"url": "https://github.com/isaacs/node-glob/issues"
},
"homepage": "https://github.com/isaacs/node-glob",
- "_id": "glob@3.2.10",
- "_shasum": "e229a4d843fdabca3dd8cdc96c456e29c6e79f13",
- "_from": "glob@latest"
+ "_id": "glob@4.0.2",
+ "_shasum": "d57dbdf54984dd7635c8247d1f2ebde2e81f4ee1",
+ "_from": "glob@latest",
+ "_npmVersion": "1.4.13",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "d57dbdf54984dd7635c8247d1f2ebde2e81f4ee1",
+ "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.2.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/glob/test/bash-results.json b/node_modules/glob/test/bash-results.json
index 8051c7238..726d332e7 100644
--- a/node_modules/glob/test/bash-results.json
+++ b/node_modules/glob/test/bash-results.json
@@ -286,6 +286,7 @@
"./node_modules/inherits",
"./node_modules/minimatch",
"./node_modules/mkdirp",
+ "./node_modules/once",
"./node_modules/rimraf",
"./node_modules/tap",
"./test/00-setup.js",
@@ -293,6 +294,8 @@
"./test/bash-comparison.js",
"./test/bash-results.json",
"./test/cwd-test.js",
+ "./test/empty-set.js",
+ "./test/error-callback.js",
"./test/globstar-match.js",
"./test/mark.js",
"./test/new-glob-optional-options.js",
diff --git a/node_modules/glob/test/empty-set.js b/node_modules/glob/test/empty-set.js
new file mode 100644
index 000000000..3b627b0ab
--- /dev/null
+++ b/node_modules/glob/test/empty-set.js
@@ -0,0 +1,20 @@
+var test = require('tap').test
+var glob = require("../glob.js")
+
+// Patterns that cannot match anything
+var patterns = [
+ '# comment',
+ ' ',
+ '\n',
+ 'just doesnt happen to match anything so this is a control'
+]
+
+patterns.forEach(function (p) {
+ test(JSON.stringify(p), function (t) {
+ glob(p, function (e, f) {
+ t.equal(e, null, 'no error')
+ t.same(f, [], 'no returned values')
+ t.end()
+ })
+ })
+})
diff --git a/node_modules/glob/test/error-callback.js b/node_modules/glob/test/error-callback.js
new file mode 100644
index 000000000..0b64aadf3
--- /dev/null
+++ b/node_modules/glob/test/error-callback.js
@@ -0,0 +1,20 @@
+var fs = require('fs')
+var test = require('tap').test
+var glob = require('../')
+
+test('mock fs', function(t) {
+ fs.readdir = function(path, cb) {
+ process.nextTick(function() {
+ cb(new Error('mock fs.readdir error'))
+ })
+ }
+ t.pass('mocked')
+ t.end()
+})
+
+test('error callback', function(t) {
+ glob('*', function(err, res) {
+ t.ok(err, 'expecting mock error')
+ t.end()
+ })
+})
diff --git a/node_modules/glob/test/nocase-nomagic.js b/node_modules/glob/test/nocase-nomagic.js
index 2503f2310..162aaa1a6 100644
--- a/node_modules/glob/test/nocase-nomagic.js
+++ b/node_modules/glob/test/nocase-nomagic.js
@@ -11,10 +11,10 @@ test('mock fs', function(t) {
function fakeStat(path) {
var ret
switch (path.toLowerCase()) {
- case '/tmp': case '/tmp/':
+ case '/tmp': case '/tmp/': case 'c:\\tmp': case 'c:\\tmp\\':
ret = { isDirectory: function() { return true } }
break
- case '/tmp/a':
+ case '/tmp/a': case 'c:\\tmp\\a':
ret = { isDirectory: function() { return false } }
break
}
@@ -39,10 +39,10 @@ test('mock fs', function(t) {
function fakeReaddir(path) {
var ret
switch (path.toLowerCase()) {
- case '/tmp': case '/tmp/':
+ case '/tmp': case '/tmp/': case 'c:\\tmp': case 'c:\\tmp\\':
ret = [ 'a', 'A' ]
break
- case '/':
+ case '/': case 'c:\\':
ret = ['tmp', 'tMp', 'tMP', 'TMP']
}
return ret
@@ -76,6 +76,11 @@ test('nocase, nomagic', function(t) {
'/tMp/a',
'/tmp/A',
'/tmp/a' ]
+ if(process.platform.match(/^win/)) {
+ want = want.map(function(p) {
+ return 'C:' + p
+ })
+ }
glob('/tmp/a', { nocase: true }, function(er, res) {
if (er)
throw er
@@ -100,6 +105,12 @@ test('nocase, with some magic', function(t) {
'/tMp/a',
'/tmp/A',
'/tmp/a' ]
+ if(process.platform.match(/^win/)) {
+ want = want.map(function(p) {
+ return 'C:' + p
+ })
+ }
+
glob('/tmp/*', { nocase: true }, function(er, res) {
if (er)
throw er
diff --git a/node_modules/glob/test/stat.js b/node_modules/glob/test/stat.js
index 62917114b..f555b39b1 100644
--- a/node_modules/glob/test/stat.js
+++ b/node_modules/glob/test/stat.js
@@ -20,7 +20,7 @@ test('stat all the things', function(t) {
t.same(eof, matches)
var cache = Object.keys(this.statCache)
t.same(cache.map(function (f) {
- return path.relative(__dirname, f)
+ return path.relative(__dirname, f).replace(/\\/g, '/')
}).sort(), matches)
cache.forEach(function(c) {
diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json
index 84d3814f8..a03182a12 100644
--- a/node_modules/init-package-json/package.json
+++ b/node_modules/init-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "init-package-json",
- "version": "0.0.17",
+ "version": "0.1.0",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
@@ -17,11 +17,11 @@
"license": "ISC",
"description": "A node module to get your node module started",
"dependencies": {
+ "glob": "^4.0.2",
"promzard": "~0.2.0",
"read": "~1.0.1",
"read-package-json": "1",
- "semver": "2.x",
- "glob": "~3.2.7"
+ "semver": "2.x"
},
"devDependencies": {
"tap": "~0.2.5",
@@ -37,29 +37,14 @@
"prompt",
"start"
],
- "gitHead": "cbc53fbedd4246d62ec99ea3a61a113a07d21629",
+ "readme": "# init-package-json\n\nA node module to get your node module started.\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "378bf828106a56e340d3017258ae372a12f0efe7",
"bugs": {
"url": "https://github.com/isaacs/init-package-json/issues"
},
"homepage": "https://github.com/isaacs/init-package-json",
- "_id": "init-package-json@0.0.17",
- "_shasum": "395f2cb8d1c5af93ba6ec19dafa64717047f90c3",
- "_from": "init-package-json@latest",
- "_npmVersion": "1.4.10",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "dist": {
- "shasum": "395f2cb8d1c5af93ba6ec19dafa64717047f90c3",
- "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-0.0.17.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-0.0.17.tgz"
+ "_id": "init-package-json@0.1.0",
+ "_shasum": "249c982759a102556f294f2592c14a2dad855f52",
+ "_from": "init-package-json@latest"
}
diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json
index 223e87b4b..01be42b4d 100644
--- a/node_modules/node-gyp/package.json
+++ b/node_modules/node-gyp/package.json
@@ -27,7 +27,7 @@
},
"main": "./lib/node-gyp.js",
"dependencies": {
- "glob": "3",
+ "glob": "3 || 4",
"graceful-fs": "2",
"fstream": "0",
"minimatch": "0",
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 9e4b0376b..d368d4af5 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
@@ -38,8 +38,6 @@
"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 ",
- "readmeFilename": "README.md",
"gitHead": "f4d4268894a23d6f37a335d4ae28bd90b14e4ef9",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
@@ -47,5 +45,26 @@
"homepage": "https://github.com/meryn/normalize-package-data",
"_id": "normalize-package-data@0.3.0",
"_shasum": "70ea9e5b6caf69faa9d83e42f71489642372d815",
- "_from": "normalize-package-data@^0.3.0"
+ "_from": "normalize-package-data@^0.3.0",
+ "_npmVersion": "1.4.14",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "meryn",
+ "email": "merynstol@gmail.com"
+ },
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "70ea9e5b6caf69faa9d83e42f71489642372d815",
+ "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.3.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.3.0.tgz"
}
diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json
index 8b67916aa..7fd7a5c67 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.2.0",
+ "version": "1.2.1",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -16,7 +16,7 @@
"test": "tap test/*.js"
},
"dependencies": {
- "glob": "~3.2.1",
+ "glob": "^4.0.2",
"lru-cache": "2",
"normalize-package-data": "^0.3.0",
"graceful-fs": "2"
@@ -30,12 +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",
+ "gitHead": "b2830635c9b4ffdf2ac395042bc2b1306b275626",
"bugs": {
"url": "https://github.com/isaacs/read-package-json/issues"
},
"homepage": "https://github.com/isaacs/read-package-json",
- "_id": "read-package-json@1.2.0",
- "_shasum": "4d0d359de5da8f0eb6301c056b9b2c5f2736acd8",
+ "_id": "read-package-json@1.2.1",
+ "_shasum": "effef856f6ebf000f47b113326c656b5c76f7e64",
"_from": "read-package-json@latest"
}
diff --git a/package.json b/package.json
index dd274430a..7664f615f 100644
--- a/package.json
+++ b/package.json
@@ -48,11 +48,11 @@
"fstream-npm": "~0.1.7",
"github-url-from-git": "1.1.1",
"github-url-from-username-repo": "~0.2.0",
- "glob": "~3.2.10",
+ "glob": "~4.0.2",
"graceful-fs": "~2.0.2",
"inflight": "~1.0.1",
"ini": "~1.2.0",
- "init-package-json": "0.0.17",
+ "init-package-json": "~0.1.0",
"lockfile": "~0.4.0",
"lru-cache": "~2.5.0",
"minimatch": "~0.3.0",
@@ -71,7 +71,7 @@
"path-is-inside": "~1.0.0",
"read": "~1.0.4",
"read-installed": "~2.0.4",
- "read-package-json": "~1.2.0",
+ "read-package-json": "~1.2.1",
"request": "~2.30.0",
"retry": "~0.6.0",
"rimraf": "~2.2.5",