Skip to content

Commit

Permalink
Do not install bun on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Sep 12, 2023
1 parent 15775ad commit 375ced6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 108 deletions.
106 changes: 0 additions & 106 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"lint:lockfile": "lockfile-lint",
"lint:markdown": "markdownlint \"**/*.md\" --ignore node_modules --ignore build --config .markdownlint.js",
"lint:src": "eslint --cache --cache-location node_modules/.cache/.eslintcache --ignore-path .gitignore --report-unused-disable-directives .",
"prepare": "husky install",
"prepare": "husky install && test/bun-setup.sh",
"prepublishOnly": "npm run build",
"prettier": "prettier .",
"test": "mocha test test/package-managers/*",
Expand Down Expand Up @@ -116,7 +116,6 @@
"@types/update-notifier": "^6.0.4",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bun": "^1.0.0",
"c8": "^7.14.0",
"chai": "^4.3.7",
"chai-as-promised": "^7.1.1",
Expand Down
10 changes: 10 additions & 0 deletions test/bun-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Install bun if not installed, except on Windows where it is not yet supported.
# Must be run in a prepare script instead of devDependencies to install conditionally based on OS.
if [[ "$OSTYPE" != "win32" ]]; then
bun -v &> /dev/null
BUN_EXISTS="$?"

[ $BUN_EXISTS -ne 0 ] && curl -fsSL https://bun.sh/install | bash

exit 0
fi

0 comments on commit 375ced6

Please sign in to comment.