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

-yarn +bun #18

Closed
wants to merge 4 commits into from
Closed
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
*.lockb binary diff=lockb
9 changes: 3 additions & 6 deletions .github/workflows/auto-regen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'yarn'
- uses: oven-sh/setup-bun@v1

- run: yarn --frozen-lockfile
- run: bun install --frozen-lockfile

- run: yarn regen-keymap
- run: bun regen-keymap

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,13 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- uses: oven-sh/setup-bun@v1

- run: yarn --frozen-lockfile
- run: bun install --frozen-lockfile

- run: yarn run-checks
- run: bun check

- run: yarn regen-keymap
- run: bun regen-keymap
Binary file added bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install.lockfile]
print = "yarn"
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
"main": "dist/index.js",
"bin": "dist/cli.js",
"scripts": {
"prebuild": "yarn clean",
"prebuild": "bun clean",
"build": "tsc",
"check": "bun lint && bun format:check",
"clean": "rimraf dist",
"fix": "yarn lint:fix && yarn format",
"format": "yarn format:check --write",
"fix": "bun lint:fix && bun format",
"format": "bun format:check --write",
"format:check": "prettier --check \"./**/*.{json,md,ts,yml}\" --ignore-path .gitignore",
Comment on lines +14 to 15
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

$ bun format:check

$ prettier --check "./**/*.{json,md,ts,yml}" --ignore-path .gitignore
Checking formatting...
All matched files use Prettier code style!


$ bun format

$ bun format:check --write
$ prettier --check \"./**/*.{json,md,ts,yml}\" --ignore-path .gitignore --write
bun: no matches found: "./**/*.{json,md,ts,yml}"
error: script "format:check" exited with code 1
error: script "format" exited with code 1

"lint": "eslint --ext .ts src",
"lint:fix": "yarn lint --fix",
"prepare": "yarn build",
"prepublishOnly": "yarn run-checks",
"regen-keymap": "node dist/cli.js",
"run-checks": "yarn lint && yarn format:check"
"lint:fix": "bun lint --fix",
"prepare": "bun run build",
"prepublishOnly": "bun check",
"regen-keymap": "bun src/cli.ts"
},
"dependencies": {
"tslib": "^2.6.2",
Expand All @@ -33,6 +33,6 @@
"eslint-plugin-simple-import-sort": "^10.0.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.1",
"typescript": "^5.2.2"
"typescript": "~5.2.2"
}
}
Loading
Loading