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>2019-12-10 03:04:53 +0300
committerisaacs <i@izs.me>2019-12-10 03:30:43 +0300
commit1743cb339767e86431dcd565c7bdb0aed67b293d (patch)
treef10e0f5297c9aa79087a52e0292390c4b2459599
parentfb4ecd7d2810b0b4897daaf081a5e2f3f483b310 (diff)
read-package-json@2.1.1
-rw-r--r--node_modules/read-package-json/CHANGELOG.md10
-rw-r--r--node_modules/read-package-json/package.json22
-rw-r--r--node_modules/read-package-json/read-json.js9
-rw-r--r--node_modules/slash/index.js11
-rw-r--r--node_modules/slash/package.json65
-rw-r--r--node_modules/slash/readme.md44
-rw-r--r--package-lock.json13
-rw-r--r--package.json2
8 files changed, 31 insertions, 145 deletions
diff --git a/node_modules/read-package-json/CHANGELOG.md b/node_modules/read-package-json/CHANGELOG.md
index b21f94d72..e6f26e59d 100644
--- a/node_modules/read-package-json/CHANGELOG.md
+++ b/node_modules/read-package-json/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="2.1.1"></a>
+## [2.1.1](https://github.com/npm/read-package-json/compare/v2.1.0...v2.1.1) (2019-12-09)
+
+
+### Bug Fixes
+
+* normalize and sanitize pkg bin entries ([b8cb5fa](https://github.com/npm/read-package-json/commit/b8cb5fa))
+
+
+
<a name="2.1.0"></a>
# [2.1.0](https://github.com/npm/read-package-json/compare/v2.0.13...v2.1.0) (2019-08-13)
diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json
index 5c5974988..7920e4358 100644
--- a/node_modules/read-package-json/package.json
+++ b/node_modules/read-package-json/package.json
@@ -1,19 +1,19 @@
{
- "_from": "read-package-json@2.1.0",
- "_id": "read-package-json@2.1.0",
+ "_from": "read-package-json@2.1.1",
+ "_id": "read-package-json@2.1.1",
"_inBundle": false,
- "_integrity": "sha512-KLhu8M1ZZNkMcrq1+0UJbR8Dii8KZUqB0Sha4mOx/bknfKI/fyrQVrG/YIt2UOtG667sD8+ee4EXMM91W9dC+A==",
+ "_integrity": "sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==",
"_location": "/read-package-json",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "read-package-json@2.1.0",
+ "raw": "read-package-json@2.1.1",
"name": "read-package-json",
"escapedName": "read-package-json",
- "rawSpec": "2.1.0",
+ "rawSpec": "2.1.1",
"saveSpec": null,
- "fetchSpec": "2.1.0"
+ "fetchSpec": "2.1.1"
},
"_requiredBy": [
"#USER",
@@ -24,9 +24,9 @@
"/read-installed",
"/read-package-tree"
],
- "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.0.tgz",
- "_shasum": "e3d42e6c35ea5ae820d9a03ab0c7291217fc51d5",
- "_spec": "read-package-json@2.1.0",
+ "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.1.tgz",
+ "_shasum": "16aa66c59e7d4dad6288f179dd9295fd59bb98f1",
+ "_spec": "read-package-json@2.1.1",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
@@ -42,7 +42,7 @@
"graceful-fs": "^4.1.2",
"json-parse-better-errors": "^1.0.1",
"normalize-package-data": "^2.0.0",
- "slash": "^1.0.0"
+ "npm-normalize-package-bin": "^1.0.0"
},
"deprecated": false,
"description": "The thing npm uses to read package.json files with semantics and defaults and validation",
@@ -72,5 +72,5 @@
"release": "standard-version -s",
"test": "tap --nyc-arg=--all --coverage test/*.js"
},
- "version": "2.1.0"
+ "version": "2.1.1"
}
diff --git a/node_modules/read-package-json/read-json.js b/node_modules/read-package-json/read-json.js
index 9f8f81bd1..03da84762 100644
--- a/node_modules/read-package-json/read-json.js
+++ b/node_modules/read-package-json/read-json.js
@@ -11,7 +11,7 @@ var glob = require('glob')
var normalizeData = require('normalize-package-data')
var safeJSON = require('json-parse-better-errors')
var util = require('util')
-var slash = require('slash')
+var normalizePackageBin = require('npm-normalize-package-bin')
module.exports = readJson
@@ -301,7 +301,7 @@ function mans_ (file, data, mans, cb) {
}
function bins (file, data, cb) {
- if (Array.isArray(data.bin)) return bins_(file, data, data.bin, cb)
+ data = normalizePackageBin(data)
var m = data.directories && data.directories.bin
if (data.bin || !m) return cb(null, data)
@@ -318,11 +318,11 @@ function bins_ (file, data, bins, cb) {
data.bin = bins.reduce(function (acc, mf) {
if (mf && mf.charAt(0) !== '.') {
var f = path.basename(mf)
- acc[f] = slash(path.join(m, mf))
+ acc[f] = path.join(m, mf)
}
return acc
}, {})
- return cb(null, data)
+ return cb(null, normalizePackageBin(data))
}
function bundleDependencies (file, data, cb) {
@@ -403,6 +403,7 @@ function checkBinReferences_ (file, data, warn, cb) {
keys.forEach(function (key) {
var dirName = path.dirname(file)
var relName = data.bin[key]
+ /* istanbul ignore if - impossible, bins have been normalized */
if (typeof relName !== 'string') {
var msg = 'Bin filename for ' + key +
' is not a string: ' + util.inspect(relName)
diff --git a/node_modules/slash/index.js b/node_modules/slash/index.js
deleted file mode 100644
index b946a0841..000000000
--- a/node_modules/slash/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-module.exports = function (str) {
- var isExtendedLengthPath = /^\\\\\?\\/.test(str);
- var hasNonAscii = /[^\x00-\x80]+/.test(str);
-
- if (isExtendedLengthPath || hasNonAscii) {
- return str;
- }
-
- return str.replace(/\\/g, '/');
-};
diff --git a/node_modules/slash/package.json b/node_modules/slash/package.json
deleted file mode 100644
index bedd26809..000000000
--- a/node_modules/slash/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "slash@^1.0.0",
- "_id": "slash@1.0.0",
- "_inBundle": false,
- "_integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
- "_location": "/slash",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "slash@^1.0.0",
- "name": "slash",
- "escapedName": "slash",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/read-package-json"
- ],
- "_resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
- "_shasum": "c41f2f6c39fc16d1cd17ad4b5d896114ae470d55",
- "_spec": "slash@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/read-package-json",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "http://sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/slash/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Convert Windows backslash paths to slash paths",
- "devDependencies": {
- "mocha": "*"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/slash#readme",
- "keywords": [
- "path",
- "seperator",
- "sep",
- "slash",
- "backslash",
- "windows",
- "win"
- ],
- "license": "MIT",
- "name": "slash",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/slash.git"
- },
- "scripts": {
- "test": "mocha"
- },
- "version": "1.0.0"
-}
diff --git a/node_modules/slash/readme.md b/node_modules/slash/readme.md
deleted file mode 100644
index 15672f010..000000000
--- a/node_modules/slash/readme.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash)
-
-> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar`
-
-[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters.
-
-This was created since the `path` methods in Node outputs `\\` paths on Windows.
-
-
-## Install
-
-```sh
-$ npm install --save slash
-```
-
-
-## Usage
-
-```js
-var path = require('path');
-var slash = require('slash');
-
-var str = path.join('foo', 'bar');
-// Unix => foo/bar
-// Windows => foo\\bar
-
-slash(str);
-// Unix => foo/bar
-// Windows => foo/bar
-```
-
-
-## API
-
-### slash(path)
-
-Type: `string`
-
-Accepts a Windows backslash path and returns a slash path.
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/package-lock.json b/package-lock.json
index 97818c335..26c3fbf10 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4877,15 +4877,15 @@
}
},
"read-package-json": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.0.tgz",
- "integrity": "sha512-KLhu8M1ZZNkMcrq1+0UJbR8Dii8KZUqB0Sha4mOx/bknfKI/fyrQVrG/YIt2UOtG667sD8+ee4EXMM91W9dC+A==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.1.tgz",
+ "integrity": "sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==",
"requires": {
"glob": "^7.1.1",
"graceful-fs": "^4.1.2",
"json-parse-better-errors": "^1.0.1",
"normalize-package-data": "^2.0.0",
- "slash": "^1.0.0"
+ "npm-normalize-package-bin": "^1.0.0"
}
},
"read-package-tree": {
@@ -5172,11 +5172,6 @@
"integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=",
"dev": true
},
- "slash": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
- "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU="
- },
"slice-ansi": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz",
diff --git a/package.json b/package.json
index 36e3ba6c0..f6df362d9 100644
--- a/package.json
+++ b/package.json
@@ -119,7 +119,7 @@
"read": "~1.0.7",
"read-cmd-shim": "^1.0.5",
"read-installed": "~4.0.3",
- "read-package-json": "^2.1.0",
+ "read-package-json": "^2.1.1",
"read-package-tree": "^5.3.1",
"readable-stream": "^3.4.0",
"readdir-scoped-modules": "^1.1.0",