From fc52160d0223226fffe4166f42fdfd3b899b3c1e Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 21 May 2015 17:13:12 -0400 Subject: init-package-json@1.6.0 Fixes #4700 and #5044 --- node_modules/init-package-json/default-input.js | 11 +++++- .../node_modules/promzard/package.json | 2 +- .../node_modules/spdx-correct/package.json | 2 +- .../validate-npm-package-license/package.json | 2 +- node_modules/init-package-json/package.json | 42 +++++++++++++++++----- 5 files changed, 46 insertions(+), 13 deletions(-) (limited to 'node_modules/init-package-json') diff --git a/node_modules/init-package-json/default-input.js b/node_modules/init-package-json/default-input.js index fc65f2e05..886291dce 100644 --- a/node_modules/init-package-json/default-input.js +++ b/node_modules/init-package-json/default-input.js @@ -4,6 +4,7 @@ var path = require('path') var validateLicense = require('validate-npm-package-license') var validateName = require('validate-npm-package-name') var npa = require('npm-package-arg') +var semver = require('semver') // more popular packages should go here, maybe? function isTestPkg (p) { @@ -65,7 +66,15 @@ var version = package.version || config.get('init.version') || config.get('init-version') || '1.0.0' -exports.version = yes ? version : prompt('version', version) +exports.version = yes ? + version : + prompt('version', version, function (version) { + if (semver.valid(version)) return version + var er = new Error('Invalid version: "' + version + '"') + er.notValid = true + er.again = true + return er + }) if (!package.description) { exports.description = yes ? '' : prompt('description') 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 1407e97be..1007cdde4 100644 --- a/node_modules/init-package-json/node_modules/promzard/package.json +++ b/node_modules/init-package-json/node_modules/promzard/package.json @@ -8,7 +8,7 @@ "description": "prompting wizardly", "version": "0.3.0", "repository": { - "url": "git://github.com/isaacs/promzard.git" + "url": "git://github.com/isaacs/promzard" }, "dependencies": { "read": "1" diff --git a/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json b/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json index e3d291b60..79b09062a 100644 --- a/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json +++ b/node_modules/init-package-json/node_modules/validate-npm-package-license/node_modules/spdx-correct/package.json @@ -31,7 +31,7 @@ "main": "spdx-correct.js", "repository": { "type": "git", - "url": "git+https://github.com/kemitchell/spdx-correct.git" + "url": "https://github.com/kemitchell/spdx-correct" }, "scripts": { "lint": "jshint spdx-correct.js test && jscs spdx-correct.js test", diff --git a/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json b/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json index 4aaad362a..4483ede9e 100644 --- a/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json +++ b/node_modules/init-package-json/node_modules/validate-npm-package-license/package.json @@ -28,7 +28,7 @@ "main": "index.js", "repository": { "type": "git", - "url": "git+https://github.com/kemitchell/npm-valid-package-license.git" + "url": "https://github.com/kemitchell/npm-valid-package-license" }, "scripts": { "precommit": "npm run test", diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json index 4ac14cb67..62d01c59d 100644 --- a/node_modules/init-package-json/package.json +++ b/node_modules/init-package-json/package.json @@ -1,13 +1,13 @@ { "name": "init-package-json", - "version": "1.5.0", + "version": "1.6.0", "main": "init-package-json.js", "scripts": { "test": "tap test/*.js" }, "repository": { "type": "git", - "url": "git://github.com/isaacs/init-package-json.git" + "url": "git://github.com/isaacs/init-package-json" }, "author": { "name": "Isaac Z. Schlueter", @@ -41,14 +41,38 @@ "prompt", "start" ], - "readme": "# init-package-json\n\nA node module to get your node module started.\n\n[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json)\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": "17721cb55112690da3dc41b21d58354e89836067", + "gitHead": "b747e9f71eb65b22bb9139e5252bf8efb23571e1", "bugs": { "url": "https://github.com/isaacs/init-package-json/issues" }, - "homepage": "https://github.com/isaacs/init-package-json#readme", - "_id": "init-package-json@1.5.0", - "_shasum": "85b701b81463593d61da8bb66b46e352f4f2e298", - "_from": "init-package-json@>=1.5.0 <1.6.0" + "homepage": "https://github.com/isaacs/init-package-json", + "_id": "init-package-json@1.6.0", + "_shasum": "8c4c2561abca1ad30d88f5594ddb4159211a36ff", + "_from": "init-package-json@1.6.0", + "_npmVersion": "2.7.6", + "_nodeVersion": "1.6.2", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "8c4c2561abca1ad30d88f5594ddb4159211a36ff", + "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.6.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.6.0.tgz" } -- cgit v1.2.3