Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bun in binaries #240

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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