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:
authorRuy Adorno <ruyadorno@hotmail.com>2021-04-07 18:03:41 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-04-22 22:06:29 +0300
commit4c1f16d2c29a7a56c19b97f2820e6305a6075083 (patch)
tree460fd0dfa65b168d3f35bac5e0ad363b14684a1d /node_modules/init-package-json
parent2aecec591df6866e27d0b17dc49cef8f7d738d77 (diff)
feat: add init workspaces
Add workspaces support to `npm init` - Fixes `npm exec` respecting `script-shell` option value - Refactored `lib/exec.js` into `libnpmexec` - Updates init-package-json@2.0.3 - Added ability to create a new workspace using the -w config PR-URL: https://github.com/npm/cli/pull/3095 Credit: @ruyadorno Close: #3095 Reviewed-by: @wraithgar
Diffstat (limited to 'node_modules/init-package-json')
-rw-r--r--node_modules/init-package-json/default-input.js6
-rw-r--r--node_modules/init-package-json/package.json12
2 files changed, 9 insertions, 9 deletions
diff --git a/node_modules/init-package-json/default-input.js b/node_modules/init-package-json/default-input.js
index 8e9fe0b57..d1f65841d 100644
--- a/node_modules/init-package-json/default-input.js
+++ b/node_modules/init-package-json/default-input.js
@@ -12,7 +12,7 @@ function isTestPkg (p) {
}
function niceName (n) {
- return n.replace(/^node-|[.-]js$/g, '').replace(' ', '-').toLowerCase()
+ return n.replace(/^node-|[.-]js$/g, '').replace(/\s+/g, ' ').replace(/ /g, '-').toLowerCase()
}
function readDeps (test, excluded) { return function (cb) {
@@ -45,7 +45,7 @@ function readDeps (test, excluded) { return function (cb) {
})
}}
-var name = package.name || basename
+var name = niceName(package.name || basename)
var spec
try {
spec = npa(name)
@@ -61,7 +61,7 @@ if (scope) {
name = scope + '/' + name
}
}
-exports.name = yes ? name : prompt('package name', niceName(name), function (data) {
+exports.name = yes ? name : prompt('package name', name, function (data) {
var its = validateName(data)
if (its.validForNewPackages) return data
var errors = (its.errors || []).concat(its.warnings || [])
diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json
index 91c6bfba8..584e313b4 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": "2.0.2",
+ "version": "2.0.3",
"main": "init-package-json.js",
"scripts": {
"test": "tap",
@@ -17,19 +17,19 @@
"description": "A node module to get your node module started",
"dependencies": {
"glob": "^7.1.1",
- "npm-package-arg": "^8.1.0",
+ "npm-package-arg": "^8.1.2",
"promzard": "^0.3.0",
"read": "~1.0.1",
- "read-package-json": "^3.0.0",
- "semver": "^7.3.2",
+ "read-package-json": "^3.0.1",
+ "semver": "^7.3.5",
"validate-npm-package-license": "^3.0.4",
"validate-npm-package-name": "^3.0.0"
},
"devDependencies": {
- "@npmcli/config": "^1.2.1",
+ "@npmcli/config": "^2.1.0",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
- "tap": "^14.10.8"
+ "tap": "^14.11.0"
},
"engines": {
"node": ">=10"