From 37c46e9042f86bd460e5cb7dd1c20dbff356244a Mon Sep 17 00:00:00 2001 From: LangLangbart <92653266+LangLangBart@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:00:30 +0200 Subject: [PATCH 1/3] feat: add bun in binaries --- __tests__/__snapshots__/envinfo.test.js.snap | 2 ++ src/helpers/binaries.js | 7 +++++++ src/presets.js | 22 ++++++++++---------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/__tests__/__snapshots__/envinfo.test.js.snap b/__tests__/__snapshots__/envinfo.test.js.snap index 4e6af84..4cf4100 100644 --- a/__tests__/__snapshots__/envinfo.test.js.snap +++ b/__tests__/__snapshots__/envinfo.test.js.snap @@ -7,6 +7,7 @@ exports[`Running the cli interface returns expected formatted yaml value 1`] = ` Yarn: 10.0.0 - /usr/local/bin/yarn npm: 10.0.0 - /usr/local/bin/npm pnpm: 10.0.0 - /usr/local/bin/pnpm + bun: 10.0.0 - /usr/local/bin/bun Watchman: 10.0.0 - /usr/local/bin/watchman " `; @@ -18,6 +19,7 @@ exports[`Running the cli interface returns expected unformatted yaml value 1`] = Yarn: 10.0.0 - /usr/local/bin/yarn npm: 10.0.0 - /usr/local/bin/npm pnpm: 10.0.0 - /usr/local/bin/pnpm + bun: 10.0.0 - /usr/local/bin/bun Watchman: 10.0.0 - /usr/local/bin/watchman " `; diff --git a/src/helpers/binaries.js b/src/helpers/binaries.js index f90492a..57fc7b9 100644 --- a/src/helpers/binaries.js +++ b/src/helpers/binaries.js @@ -46,4 +46,11 @@ module.exports = { utils.which('pnpm').then(utils.condensePath), ]).then(v => utils.determineFound('pnpm', v[0], v[1])); }, + + getbunInfo: () => { + utils.log('trace', 'getbunInfo'); + return Promise.all([utils.run('bun -v'), utils.which('bun').then(utils.condensePath)]).then(v => + utils.determineFound('bun', v[0], v[1]) + ); + }, }; diff --git a/src/presets.js b/src/presets.js index d342057..ce43488 100644 --- a/src/presets.js +++ b/src/presets.js @@ -1,7 +1,7 @@ module.exports = { defaults: { System: ['OS', 'CPU', 'Memory', 'Container', 'Shell'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'Watchman'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun', 'Watchman'], Managers: [ 'Apt', 'Cargo', @@ -82,12 +82,12 @@ module.exports = { }, jest: { System: ['OS', 'CPU'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun'], npmPackages: ['jest'], }, 'react-native': { System: ['OS', 'CPU'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'Watchman'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun', 'Watchman'], SDKs: ['iOS SDK', 'Android SDK', 'Windows SDK'], IDEs: ['Android Studio', 'Xcode', 'Visual Studio'], npmPackages: ['react', 'react-native'], @@ -95,24 +95,24 @@ module.exports = { }, nyc: { System: ['OS', 'CPU', 'Memory'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun'], npmPackages: '/**/{*babel*,@babel/*/,*istanbul*,nyc,source-map-support,typescript,ts-node}', }, webpack: { System: ['OS', 'CPU'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun'], npmPackages: '*webpack*', npmGlobalPackages: ['webpack', 'webpack-cli'], }, 'styled-components': { System: ['OS', 'CPU'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun'], Browsers: ['Chrome', 'Firefox', 'Safari'], npmPackages: '*styled-components*', }, 'create-react-app': { System: ['OS', 'CPU'], - Binaries: ['Node', 'npm', 'Yarn', 'pnpm'], + Binaries: ['Node', 'npm', 'Yarn', 'pnpm', 'bun'], Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'], npmPackages: ['react', 'react-dom', 'react-scripts'], npmGlobalPackages: ['create-react-app'], @@ -123,14 +123,14 @@ module.exports = { }, apollo: { System: ['OS'], - Binaries: ['Node', 'npm', 'Yarn', 'pnpm'], + Binaries: ['Node', 'npm', 'Yarn', 'pnpm', 'bun'], Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'], npmPackages: '{*apollo*,@apollo/*}', npmGlobalPackages: '{*apollo*,@apollo/*}', }, 'react-native-web': { System: ['OS', 'CPU'], - Binaries: ['Node', 'npm', 'Yarn', 'pnpm'], + Binaries: ['Node', 'npm', 'Yarn', 'pnpm', 'bun'], Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'], npmPackages: ['react', 'react-native-web'], options: { @@ -139,13 +139,13 @@ module.exports = { }, babel: { System: ['OS'], - Binaries: ['Node', 'npm', 'Yarn', 'pnpm'], + Binaries: ['Node', 'npm', 'Yarn', 'pnpm', 'bun'], Monorepos: ['Yarn Workspaces', 'Lerna'], npmPackages: '{*babel*,@babel/*,eslint,webpack,create-react-app,react-native,lerna,jest}', }, playwright: { System: ['OS', 'Memory', 'Container'], - Binaries: ['Node', 'Yarn', 'npm', 'pnpm'], + Binaries: ['Node', 'Yarn', 'npm', 'pnpm', 'bun'], Languages: ['Bash'], npmPackages: 'playwright*', }, From 7256d4d17147cea24fba4a8a7326e10822d9992f Mon Sep 17 00:00:00 2001 From: LangLangbart <92653266+LangLangBart@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:10:23 +0200 Subject: [PATCH 2/3] docs: update README CLI Usage example --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e9e56b1..03f0ef9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

-

envinfo generates a report of the common details needed when troubleshooting software issues, such as your operating system, binary versions, browsers, installed languages, and more

+

envinfo generates a report of the common details needed when troubleshooting software issues, such as your operating system, binary versions, browsers, installed languages, and more


@@ -54,6 +54,8 @@ npm install envinfo || yarn add envinfo Node: 8.16.0 - ~/.nvm/versions/node/v8.16.0/bin/node Yarn: 1.15.2 - ~/.yarn/bin/yarn npm: 6.9.0 - ~/.nvm/versions/node/v8.16.0/bin/npm + pnpm: 8.7.6 - /usr/local/bin/pnpm + bun: 1.0.2 - /usr/local/bin/bun Watchman: 4.9.0 - /usr/local/bin/watchman Managers: Cargo: 1.31.0 - ~/.cargo/bin/cargo From 5edef9c79a6aa4d0ec4dc89721f8a677b985eed4 Mon Sep 17 00:00:00 2001 From: LangLangbart <92653266+LangLangBart@users.noreply.github.com> Date: Wed, 25 Oct 2023 01:46:09 +0200 Subject: [PATCH 3/3] fix: remove mcandre/specs from README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 03f0ef9..9811aa1 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,6 @@ envinfo is used in the ISSUE_TEMPLATE of: ## Alternatives - type `command -v` until you smash your computer -- [specs](https://github.com/mcandre/specs) - an excellent ruby gem that runs `command -v` for you on :all-the-things: Great for raw info. - [screenfetch](https://github.com/KittyKatt/screenFetch) - fetch system and terminal information, and display a pretty ascii logo - [Solidarity](https://github.com/infinitered/solidarity) - a project based environment checker - write your own