Skip to content

Commit ecf7f5e

Browse files
chore: migrate to bun
we nixxing frfr
1 parent 898f89a commit ecf7f5e

File tree

9 files changed

+3498
-20488
lines changed

9 files changed

+3498
-20488
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@ jobs:
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
20-
- name: Setup Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: 18
24-
cache: yarn
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v2
2522
- name: Install dependencies
26-
run: yarn --immutable
23+
run: bun install --frozen-lockfile
2724
- name: Run Eslint
28-
run: yarn run lint
25+
run: bun run lint
2926

3027
typecheck:
3128
name: Typecheck
@@ -34,16 +31,13 @@ jobs:
3431
steps:
3532
- name: Checkout
3633
uses: actions/checkout@v4
37-
- name: Setup Node.js
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: 18
41-
cache: yarn
34+
- name: Setup Bun
35+
uses: oven-sh/setup-bun@v2
4236
- name: Install dependencies
43-
run: yarn --immutable
37+
run: bun install --frozen-lockfile
4438
- name: Typecheck
4539
continue-on-error: true
46-
run: yarn run typecheck
40+
run: bun run typecheck
4741

4842
build:
4943
name: Build
@@ -58,15 +52,12 @@ jobs:
5852
with:
5953
path: .nuxt
6054
key: nuxt-cache
61-
- name: Setup Node.js
62-
uses: actions/setup-node@v4
63-
with:
64-
node-version: 18
65-
cache: yarn
55+
- name: Setup Bun
56+
uses: oven-sh/setup-bun@v2
6657
- name: Install dependencies
67-
run: yarn --immutable
58+
run: bun install --frozen-lockfile
6859
- name: Build
69-
run: yarn run generate
60+
run: bun run generate
7061
- name: Upload artifact
7162
if: ${{ github.event_name == 'push' || contains(github.ref, '/heads/master') }}
7263
uses: actions/upload-pages-artifact@v3

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 0 additions & 948 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

bun.lock

Lines changed: 3428 additions & 0 deletions
Large diffs are not rendered by default.

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOs/nixpkgs/nixpkgs-unstable";
4+
};
5+
outputs = {nixpkgs, ...}: let
6+
inherit (nixpkgs) lib;
7+
8+
systems = lib.intersectLists lib.systems.flakeExposed lib.platforms.linux;
9+
forAllSystems = lib.genAttrs systems;
10+
nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
11+
in {
12+
devShells = forAllSystems (system: let
13+
pkgs = nixpkgsFor.${system};
14+
in {
15+
default = pkgs.mkShell {
16+
packages = with pkgs; [bun nix-ld];
17+
18+
shellHook = ''
19+
bun install
20+
'';
21+
};
22+
});
23+
};
24+
}

nuxt.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from 'node:process'
2+
13
const NAME = 'Horu'
24
const DESCRIPTION = 'Horu\'s personal website'
35

@@ -54,4 +56,7 @@ export default defineNuxtConfig({
5456
shortcuts: [{ name: 'Blogs', url: '/blogs' }],
5557
},
5658
},
59+
hooks: {
60+
'build:before': () => console.error(`bun version ${process.versions.bun}`),
61+
},
5762
})

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"name": "horu.me",
33
"type": "module",
4-
"packageManager": "[email protected]",
54
"license": "MIT",
65
"scripts": {
7-
"postinstall": "yarn run prepare",
6+
"postinstall": "bun run prepare",
87
"prepare": "nuxt prepare",
98
"dev": "nuxt dev",
109
"build": "nuxt build",
@@ -16,7 +15,7 @@
1615
"@antfu/eslint-config": "^5.2.1",
1716
"@fontsource-variable/inter": "^5.2.6",
1817
"@iconify/json": "^2.2.378",
19-
"@nuxt/content": "^3.6.3",
18+
"@nuxt/content": "https://pkg.pr.new/@nuxt/content@3517",
2019
"@nuxt/eslint": "^1.9.0",
2120
"@nuxtjs/color-mode": "^3.5.2",
2221
"@types/eslint": "^9.6.1",

0 commit comments

Comments
 (0)