Skip to content

Commit

Permalink
feat: add bun in binaries (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Oct 25, 2023
1 parent cbdd204 commit d7db2a3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
5 changes: 3 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
<p align="center">
<img src="https://raw.githubusercontent.com/tabrindle/envinfo/master/logo.png" align="center" width="700px"/>
<h3 align="center">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</h3>
<h3 align="center">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</h3>
<hr/>
</p>

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -256,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
Expand Down
2 changes: 2 additions & 0 deletions __tests__/__snapshots__/envinfo.test.js.snap
Expand Up @@ -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
"
`;
Expand All @@ -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
"
`;
Expand Down
7 changes: 7 additions & 0 deletions src/helpers/binaries.js
Expand Up @@ -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])
);
},
};
22 changes: 11 additions & 11 deletions 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',
Expand Down Expand Up @@ -82,37 +82,37 @@ 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'],
npmGlobalPackages: ['react-native-cli'],
},
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'],
Expand All @@ -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: {
Expand All @@ -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*',
},
Expand Down

0 comments on commit d7db2a3

Please sign in to comment.