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:
authorRebecca Turner <me@re-becca.org>2017-04-22 04:21:11 +0300
committerRebecca Turner <me@re-becca.org>2017-04-22 05:00:12 +0300
commit4d833af942113c7baa1bb946fbe5d0e339f3fb0d (patch)
treeacee6df4dd1bda8b0261da466b916856834f33ce /node_modules
parent28bde7f60a748bcfc1ae3374106dec606cd1f0fc (diff)
init-package-json@1.10.1
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/init-package-json/default-input.js35
-rw-r--r--node_modules/init-package-json/package.json32
2 files changed, 37 insertions, 30 deletions
diff --git a/node_modules/init-package-json/default-input.js b/node_modules/init-package-json/default-input.js
index f24fa5d32..06a3de477 100644
--- a/node_modules/init-package-json/default-input.js
+++ b/node_modules/init-package-json/default-input.js
@@ -15,10 +15,6 @@ function niceName (n) {
return n.replace(/^node-|[.-]js$/g, '').toLowerCase()
}
-function conf (name) {
- return config.get(name) || config.get(name.split('.').join('-'))
-}
-
function readDeps (test, excluded) { return function (cb) {
fs.readdir('node_modules', function (er, dir) {
if (er) return cb()
@@ -39,7 +35,7 @@ function readDeps (test, excluded) { return function (cb) {
if (p._requiredBy) {
if (!p._requiredBy.some(function (req) { return req === '#USER' })) return next()
}
- deps[d] = conf('save.exact') ? p.version : conf('save.prefix') + p.version
+ deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version
return next()
})
})
@@ -51,7 +47,7 @@ function readDeps (test, excluded) { return function (cb) {
var name = package.name || basename
var spec = npa(name)
-var scope = conf('scope')
+var scope = config.get('scope')
if (scope) {
if (scope.charAt(0) !== '@') scope = '@' + scope
if (spec.scope) {
@@ -69,7 +65,10 @@ exports.name = yes ? name : prompt('package name', niceName(name), function (da
return er
})
-var version = package.version || conf('init.version') || '1.0.0'
+var version = package.version ||
+ config.get('init.version') ||
+ config.get('init-version') ||
+ '1.0.0'
exports.version = yes ?
version :
prompt('version', version, function (version) {
@@ -213,15 +212,23 @@ if (!package.keywords) {
}
if (!package.author) {
- var a = conf('init.author.name')
- exports.author = a ? {
- "name": a,
- "email": conf('init.author.email'),
- "url": conf('init.author.url')
- } : yes ? '' : prompt('author')
+ 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')
+ }
+ : yes ? '' : prompt('author')
}
-var license = package.license || conf('init.license') || 'ISC'
+var license = package.license ||
+ config.get('init.license') ||
+ config.get('init-license') ||
+ 'ISC'
exports.license = yes ? license : prompt('license', license, function (data) {
var its = validateLicense(data)
if (its.validForNewPackages) return data
diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json
index fd144a3f2..c46ee60e3 100644
--- a/node_modules/init-package-json/package.json
+++ b/node_modules/init-package-json/package.json
@@ -2,25 +2,25 @@
"_args": [
[
{
- "raw": "init-package-json@1.10.0",
+ "raw": "init-package-json@1.10.1",
"scope": null,
"escapedName": "init-package-json",
"name": "init-package-json",
- "rawSpec": "1.10.0",
- "spec": "1.10.0",
+ "rawSpec": "1.10.1",
+ "spec": "1.10.1",
"type": "version"
},
"/Users/rebecca/code/npm"
]
],
- "_from": "init-package-json@1.10.0",
- "_id": "init-package-json@1.10.0",
+ "_from": "init-package-json@1.10.1",
+ "_id": "init-package-json@1.10.1",
"_inCache": true,
"_location": "/init-package-json",
"_nodeVersion": "4.6.1",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/init-package-json-1.10.0.tgz_1492732545609_0.08608654444105923"
+ "tmp": "tmp/init-package-json-1.10.1.tgz_1492823965061_0.8588907306548208"
},
"_npmUser": {
"name": "iarna",
@@ -31,22 +31,22 @@
"read": "1.0.7"
},
"_requested": {
- "raw": "init-package-json@1.10.0",
+ "raw": "init-package-json@1.10.1",
"scope": null,
"escapedName": "init-package-json",
"name": "init-package-json",
- "rawSpec": "1.10.0",
- "spec": "1.10.0",
+ "rawSpec": "1.10.1",
+ "spec": "1.10.1",
"type": "version"
},
"_requiredBy": [
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.0.tgz",
- "_shasum": "e8fc7c407a29bbf6d9aab522d103b9fbbafba5b6",
+ "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.1.tgz",
+ "_shasum": "cd873a167796befb99612b28762a0b6393fd8f6a",
"_shrinkwrap": null,
- "_spec": "init-package-json@1.10.0",
+ "_spec": "init-package-json@1.10.1",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -75,14 +75,14 @@
},
"directories": {},
"dist": {
- "shasum": "e8fc7c407a29bbf6d9aab522d103b9fbbafba5b6",
- "tarball": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.0.tgz"
+ "shasum": "cd873a167796befb99612b28762a0b6393fd8f6a",
+ "tarball": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.1.tgz"
},
"files": [
"default-input.js",
"init-package-json.js"
],
- "gitHead": "08d1575cf2c2adae894980fca7df021fb44565f9",
+ "gitHead": "b1501e048e2d6ae58d8e3b15967967f22f85122e",
"homepage": "https://github.com/npm/init-package-json#readme",
"keywords": [
"init",
@@ -125,5 +125,5 @@
"scripts": {
"test": "tap test/*.js"
},
- "version": "1.10.0"
+ "version": "1.10.1"
}