Skip to content

Commit

Permalink
refactor!: migrate to bun (#302)
Browse files Browse the repository at this point in the history
Co-authored-by: nikkeyl <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl authored Dec 22, 2024
1 parent 0694139 commit 4be3e6b
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 9,506 deletions.
1 change: 0 additions & 1 deletion .ecrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"exclude": [
"CHANGELOG.md",
"config.yml",
"pnpm-lock.yaml",
"README.md",
"specs/utils/create-properties-group.spec.ts",
"src/config/properties/order.ts"
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Extract Commit Message (Push)
if: ${{ github.event_name }} == 'push'
Expand All @@ -41,4 +35,4 @@ jobs:
- name: Lint
run: |
COMMIT_MESSAGE=$(cat commit_message.txt)
echo "$COMMIT_MESSAGE" | pnpm commitlint
echo "$COMMIT_MESSAGE" | bun commitlint
14 changes: 4 additions & 10 deletions .github/workflows/editorconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Lint
run: pnpm editorconfig-checker
run: bun editorconfig-checker
14 changes: 4 additions & 10 deletions .github/workflows/eslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Lint
run: pnpm eslint 'src/**/*.ts'
run: bun eslint 'src/**/*.ts'
14 changes: 4 additions & 10 deletions .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Lint
run: pnpm prettier . --check
run: bun prettier . --check
19 changes: 9 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,22 @@ jobs:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
- name: Set Up Node
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: lts/*
node-version: latest

- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Build
run: pnpm rollup -c rollup.config.ts --configPlugin typescript
run: bun rollup -c rollup.config.ts --configPlugin typescript

- name: Create Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: pnpm semantic-release
run: bun semantic-release
14 changes: 4 additions & 10 deletions .github/workflows/remark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Lint
run: pnpm remark . --quiet --frail
run: bun remark . --quiet --frail
14 changes: 4 additions & 10 deletions .github/workflows/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up PNPM
uses: pnpm/action-setup@v4

- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: lts/*
- name: Set Up Bun
uses: oven-sh/setup-bun@v2

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Specs
run: pnpm vitest
run: bun test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Directories
node_modules

# Files
bun.lockb
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm --no-install commitlint --edit
bun commitlint --edit
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm git-pull-run --pattern 'package.json' --command 'pnpm i'
bun git-pull-run --pattern 'package.json' --command 'bun i'
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm lint-staged
bun lint-staged
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Files
*.md
pnpm-lock.yaml

# *rc
.ecrc
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
"stylelint-rem-over-px",
"stylelint"
],
"packageManager": "pnpm@9.7.0",
"engines": {
"node": ">=20.0.0",
"pnpm": ">=9.0.0"
"bun": ">=1.0.0"
},
"type": "module",
"imports": {
Expand All @@ -57,7 +55,7 @@
"index.js"
],
"scripts": {
"init": "pnpm i && husky"
"init": "bun i && husky"
},
"peerDependencies": {
"stylelint": "^15.0.0 || ^16.0.0"
Expand Down Expand Up @@ -88,6 +86,7 @@
"@rollup/plugin-typescript": "^12.1.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/bun": "^1.1.14",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^2.1.6",
Expand All @@ -106,16 +105,13 @@
"globals": "^15.13.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"remark": "15.0.1",
"remark-cli": "^12.0.1",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-markdown-style-guide": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"rollup": "^4.28.0",
"rollup-plugin-esbuild": "^6.1.1",
"semantic-release": "^24.2.0",
"typescript": "^5.7.2",
"vitest": "^2.1.6"
"semantic-release": "^24.2.0"
}
}
Loading

0 comments on commit 4be3e6b

Please sign in to comment.