From 22391ca425ff17ba92e18bf7647262a50506e2ce Mon Sep 17 00:00:00 2001 From: Trevor Brindle Date: Fri, 27 Apr 2018 15:13:02 -0400 Subject: [PATCH 1/2] fix: update envinfo + implementation, update issue_template # Conflicts: # packages/create-react-app/package.json --- .github/ISSUE_TEMPLATE.md | 17 ++++++------ packages/create-react-app/createReactApp.js | 29 +++++++++++++++------ packages/create-react-app/package.json | 2 +- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4ef50efcac3..9558bda809f 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -85,19 +85,18 @@ ### Environment + To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required. + This enables the maintainers quickly reproduce the issue and give feedback. -1. `node -v`: -2. `npm -v`: -3. `yarn --version` (if you use Yarn): -4. `npm ls react-scripts` (if you haven’t ejected): + Run the following command in your react app's folder in terminal. + Note: The result is copied to your clipboard directly. -Then, specify: + `npx create-react-app --info` -1. Operating system: -2. Browser and version (if relevant): + Paste the output of the command in the section below. +--> +(paste the output of the command here) ### Steps to Reproduce diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 957501c8e17..d6fbcfd1f94 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -121,15 +121,28 @@ const program = new commander.Command(packageJson.name) }) .parse(process.argv); +if (program.info) { + console.log(chalk.bold('\nEnvironment Info:')); + return envinfo + .run( + { + System: ['OS', 'CPU'], + Binaries: ['Node', 'npm', 'Yarn'], + Browsers: ['Chrome', 'Firefox', 'Safari'], + npmPackages: ['react', 'react-dom', 'react-scripts'], + npmGlobalPackages: ['create-react-app'], + }, + { + clipboard: true, + duplicates: true, + showNotFound: true, + } + ) + .then(console.log) + .then(() => console.log(chalk.green('Copied To Clipboard!\n'))); +} + if (typeof projectName === 'undefined') { - if (program.info) { - envinfo.print({ - packages: ['react', 'react-dom', 'react-scripts'], - noNativeIDE: true, - duplicates: true, - }); - process.exit(0); - } console.error('Please specify the project directory:'); console.log( ` ${chalk.cyan(program.name())} ${chalk.green('')}` diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json index 86bd258f736..791311e032f 100644 --- a/packages/create-react-app/package.json +++ b/packages/create-react-app/package.json @@ -24,7 +24,7 @@ "chalk": "^1.1.3", "commander": "^2.9.0", "cross-spawn": "^4.0.0", - "envinfo": "3.4.2", + "envinfo": "5.2.0", "fs-extra": "^5.0.0", "hyperquest": "^2.1.2", "react-dev-utils": "^5.0.0", From a87280f590fc20dbee5c6452d64132930f3ad4a9 Mon Sep 17 00:00:00 2001 From: Trevor Brindle Date: Mon, 30 Apr 2018 10:09:26 -0400 Subject: [PATCH 2/2] =?UTF-8?q?update=20envinfo=20to=205.4.0,=20add=20IE?= =?UTF-8?q?=20and=20Edge=20to=20=E2=80=94info=20command,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE.md | 2 +- packages/create-react-app/createReactApp.js | 2 +- packages/create-react-app/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 9558bda809f..d2612759e2f 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -88,7 +88,7 @@ To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required. This enables the maintainers quickly reproduce the issue and give feedback. - Run the following command in your react app's folder in terminal. + Run the following command in your React app's folder in terminal. Note: The result is copied to your clipboard directly. `npx create-react-app --info` diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index d6fbcfd1f94..b37086f0418 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -128,7 +128,7 @@ if (program.info) { { System: ['OS', 'CPU'], Binaries: ['Node', 'npm', 'Yarn'], - Browsers: ['Chrome', 'Firefox', 'Safari'], + Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'], npmPackages: ['react', 'react-dom', 'react-scripts'], npmGlobalPackages: ['create-react-app'], }, diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json index 791311e032f..27f7fc74089 100644 --- a/packages/create-react-app/package.json +++ b/packages/create-react-app/package.json @@ -24,7 +24,7 @@ "chalk": "^1.1.3", "commander": "^2.9.0", "cross-spawn": "^4.0.0", - "envinfo": "5.2.0", + "envinfo": "5.4.0", "fs-extra": "^5.0.0", "hyperquest": "^2.1.2", "react-dev-utils": "^5.0.0",