diff options
-rw-r--r-- | node_modules/init-package-json/default-input.js | 20 | ||||
-rw-r--r-- | node_modules/init-package-json/node_modules/promzard/package.json | 3 | ||||
-rw-r--r-- | node_modules/init-package-json/package.json | 10 | ||||
-rw-r--r-- | node_modules/init-package-json/test/npm-defaults.js | 8 | ||||
-rw-r--r-- | package.json | 2 |
5 files changed, 25 insertions, 18 deletions
diff --git a/node_modules/init-package-json/default-input.js b/node_modules/init-package-json/default-input.js index 9f459f019..068bb00a8 100644 --- a/node_modules/init-package-json/default-input.js +++ b/node_modules/init-package-json/default-input.js @@ -42,8 +42,8 @@ var name = package.name || basename exports.name = yes ? name : prompt('name', name) var version = package.version || - config.get('init-version') || config.get('init.version') || + config.get('init-version') || '1.0.0' exports.version = yes ? version : prompt('version', version) @@ -180,21 +180,21 @@ if (!package.keywords) { } if (!package.author) { - exports.author = config.get('init-author-name') || - config.get('init.author.name') + exports.author = config.get('init.author.name') || + config.get('init-author-name') ? { - "name" : config.get('init-author-name') || - config.get('init.author.name'), - "email" : config.get('init-author-email') || - config.get('init.author.email'), - "url" : config.get('init-author-url') || - config.get('init.author.url') + "name" : config.get('init.author.name') || + config.get('init-author-name'), + "email" : config.get('init.author.email') || + config.get('init-author-email'), + "url" : config.get('init.author.url') || + config.get('init-author-url') } : prompt('author') } var license = package.license || - config.get('init-license') || config.get('init.license') || + config.get('init-license') || 'ISC' exports.license = yes ? license : prompt('license', license) diff --git a/node_modules/init-package-json/node_modules/promzard/package.json b/node_modules/init-package-json/node_modules/promzard/package.json index f66857539..c15c77224 100644 --- a/node_modules/init-package-json/node_modules/promzard/package.json +++ b/node_modules/init-package-json/node_modules/promzard/package.json @@ -44,6 +44,5 @@ "tarball": "http://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz", - "readme": "ERROR: No README data found!" + "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz" } diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json index b70a5ef2f..de90de620 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": "1.1.2", + "version": "1.1.3", "main": "init-package-json.js", "scripts": { "test": "tap test/*.js" @@ -40,12 +40,12 @@ ], "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": "3c72949ef6a776e0ce963fb13560a1b810f371c8", + "gitHead": "b766900b2d615ddc43c452e251b8c5543538e832", "bugs": { "url": "https://github.com/isaacs/init-package-json/issues" }, "homepage": "https://github.com/isaacs/init-package-json", - "_id": "init-package-json@1.1.2", - "_shasum": "bc6c02d1da87253141600972f0d6bdcdd016990e", - "_from": "init-package-json@>=1.1.2 <1.2.0" + "_id": "init-package-json@1.1.3", + "_shasum": "1d633c151a4909891afc8ee13cace8b336c0c9c2", + "_from": "init-package-json@>=1.1.3 <1.2.0" } diff --git a/node_modules/init-package-json/test/npm-defaults.js b/node_modules/init-package-json/test/npm-defaults.js index cc46a8e28..f65f64631 100644 --- a/node_modules/init-package-json/test/npm-defaults.js +++ b/node_modules/init-package-json/test/npm-defaults.js @@ -32,6 +32,14 @@ test("npm configuration values pulled from environment", function (t) { npm.load({}, function (err) { t.ifError(err, "npm loaded successfully") + // clear out dotted names from test environment + npm.config.del("init.author.name") + npm.config.del("init.author.email") + npm.config.del("init.author.url") + // the following have npm defaults, and need to be explicitly overridden + npm.config.set("init.license", "") + npm.config.set("init.version", "") + process.chdir(resolve(__dirname)) init(__dirname, __dirname, npm.config, function (er, data) { t.ifError(err, "init ran successfully") diff --git a/package.json b/package.json index 5b9a4d7b7..d629d12e9 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "inflight": "~1.0.4", "inherits": "~2.0.1", "ini": "~1.3.2", - "init-package-json": "~1.1.2", + "init-package-json": "~1.1.3", "lockfile": "~1.0.0", "lru-cache": "~2.5.0", "minimatch": "~2.0.1", |