Skip to content

Commit

Permalink
fix: migrate from copy-paste to clipboardy
Browse files Browse the repository at this point in the history
- copy-paste uses a module sync-exec for older versions of node which has a known vulnerability
- clipboardy also supports Android (Termux). Issue reported in CRA - facebook/create-react-app#3837
  • Loading branch information
tabrindle committed Jan 18, 2018
1 parent 640528e commit 87f8496
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"reporting"
],
"dependencies": {
"copy-paste": "^1.3.0",
"clipboardy": "^1.2.2",
"glob": "^7.1.2",
"minimist": "^1.2.0",
"os-name": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/envinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'use strict';

var helpers = require('./helpers');
var copypasta = require('copy-paste');
var copypasta = require('clipboardy');

module.exports.helpers = helpers;
module.exports.print = function print(options) {
Expand Down Expand Up @@ -107,7 +107,7 @@ module.exports.print = function print(options) {
log = log.join('\n');

if (options.clipboard) {
copypasta.copy(log);
copypasta.writeSync(log);
}
}

Expand Down
37 changes: 24 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ ansi-styles@^3.0.0, ansi-styles@^3.1.0:
dependencies:
color-convert "^1.9.0"

arch@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.0.tgz#3613aa46149064b3c1f0607919bf1d4786e82889"

argparse@^1.0.7:
version "1.0.9"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
Expand Down Expand Up @@ -171,6 +175,13 @@ cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"

clipboardy@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.2.tgz#2ce320b9ed9be1514f79878b53ff9765420903e2"
dependencies:
arch "^2.1.0"
execa "^0.8.0"

cliui@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
Expand Down Expand Up @@ -219,14 +230,6 @@ contains-path@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"

copy-paste@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/copy-paste/-/copy-paste-1.3.0.tgz#a7e6c4a1c28fdedf2b081e72b97df2ef95f471ed"
dependencies:
iconv-lite "^0.4.8"
optionalDependencies:
sync-exec "~0.6.x"

core-js@^2.4.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
Expand Down Expand Up @@ -448,6 +451,18 @@ execa@^0.7.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"

execa@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
dependencies:
cross-spawn "^5.0.1"
get-stream "^3.0.0"
is-stream "^1.1.0"
npm-run-path "^2.0.0"
p-finally "^1.0.0"
signal-exit "^3.0.0"
strip-eof "^1.0.0"

external-editor@^2.0.4:
version "2.0.5"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc"
Expand Down Expand Up @@ -592,7 +607,7 @@ hosted-git-info@^2.1.4:
version "2.5.0"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c"

iconv-lite@^0.4.17, iconv-lite@^0.4.8:
iconv-lite@^0.4.17:
version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"

Expand Down Expand Up @@ -1299,10 +1314,6 @@ symbol-observable@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"

sync-exec@~0.6.x:
version "0.6.2"
resolved "https://registry.yarnpkg.com/sync-exec/-/sync-exec-0.6.2.tgz#717d22cc53f0ce1def5594362f3a89a2ebb91105"

table@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
Expand Down

0 comments on commit 87f8496

Please sign in to comment.