From 2b6357616bfec0d5fcd3d523dbd223298fe5acf7 Mon Sep 17 00:00:00 2001 From: s3igo <85787242+s3igo@users.noreply.github.com> Date: Sun, 22 Dec 2024 21:16:56 +0900 Subject: [PATCH 1/7] =?UTF-8?q?ci(renovate):=20`@types/node`=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E5=88=B6=E7=B4=84?= =?UTF-8?q?=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sync-toolchain.yml | 15 +++++++++++++-- renovate.json | 27 ++++++++++++++++++++------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sync-toolchain.yml b/.github/workflows/sync-toolchain.yml index b549abaa..b0e15fab 100644 --- a/.github/workflows/sync-toolchain.yml +++ b/.github/workflows/sync-toolchain.yml @@ -3,6 +3,7 @@ name: Sync toolchain versions on: pull_request: paths: + - '.github/workflows/sync-toolchain.yml' - 'flake.lock' jobs: @@ -18,11 +19,21 @@ jobs: with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: Put Node.js version - run: nix run nixpkgs#nodejs-slim --inputs-from . -- --version > .node-version + run: | + NODE_VERSION=$(nix run nixpkgs#nodejs-slim --inputs-from . -- --version) + echo $NODE_VERSION > .node-version + nix run nixpkgs#dasel --inputs-from . -- put \ + --file renovate.json \ + --value ${NODE_VERSION:1} \ + 'packageRules.all().property(matchPackageNames?).filter(equal(type(),array)).first().filter(equal(.,@types/node)).parent().parent().allowedVersions' + nix run nixpkgs#bun --inputs-from . -- biome check --write renovate.json - name: Put Bun version run: | BUN_VERSION=$(nix run nixpkgs#bun --inputs-from . -- --version) - nix run nixpkgs#dasel -- put -f wrangler.toml -v $BUN_VERSION '.vars.BUN_VERSION' + nix run nixpkgs#dasel --inputs-from . -- put \ + --file wrangler.toml \ + --value $BUN_VERSION \ + 'vars.BUN_VERSION' - name: Commit changes uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5 with: diff --git a/renovate.json b/renovate.json index f93a4dec..c943823e 100644 --- a/renovate.json +++ b/renovate.json @@ -10,16 +10,29 @@ "enabledManagers": ["nix", "bun", "github-actions"], "timezone": "Asia/Tokyo", "labels": ["deps[bot]"], - "nix": { "enabled": true }, - "lockFileMaintenance": { "enabled": true, "extends": ["schedule:weekly"] }, + "nix": { + "enabled": true + }, + "lockFileMaintenance": { + "enabled": true, + "extends": ["schedule:weekly"] + }, "packageRules": [ - { "matchUpdateTypes": "major", "addLabels": ["deps.major[bot]"] }, - { "matchUpdateTypes": "minor", "addLabels": ["deps.minor[bot]"] }, - { "matchUpdateTypes": "patch", "addLabels": ["deps.patch[bot]"] }, { - "matchManagers": ["bun"], + "matchUpdateTypes": "major", + "addLabels": ["deps.major[bot]"] + }, + { + "matchUpdateTypes": "minor", + "addLabels": ["deps.minor[bot]"] + }, + { + "matchUpdateTypes": "patch", + "addLabels": ["deps.patch[bot]"] + }, + { "matchPackageNames": ["@types/node"], - "versioning": "node" + "allowedVersions": "^20" } ] } From 01567a6e9aa5e6084cff820a2f731919a82e6a5b Mon Sep 17 00:00:00 2001 From: s3igo <85787242+s3igo@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:05:21 +0900 Subject: [PATCH 2/7] =?UTF-8?q?chore(build):=20wrangler.toml=E3=81=ABschem?= =?UTF-8?q?a=E3=82=92=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wrangler.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/wrangler.toml b/wrangler.toml index 3683f407..149fa2a3 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,3 +1,4 @@ +'$schema' = 'https://www.unpkg.com/wrangler/config-schema.json' compatibility_date = '2023-02-15' name = 'blog' pages_build_output_dir = './dist' From 14092e0bbf875065b6ccc0241c5dfcb241b0c4d9 Mon Sep 17 00:00:00 2001 From: s3igo <85787242+s3igo@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:25:23 +0900 Subject: [PATCH 3/7] =?UTF-8?q?fix(ci):=20=E3=83=84=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=81=E3=82=A7=E3=83=BC=E3=83=B3=E5=90=8C=E6=9C=9F=E3=81=AE?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sync-toolchain.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-toolchain.yml b/.github/workflows/sync-toolchain.yml index b0e15fab..2fede2a7 100644 --- a/.github/workflows/sync-toolchain.yml +++ b/.github/workflows/sync-toolchain.yml @@ -26,7 +26,8 @@ jobs: --file renovate.json \ --value ${NODE_VERSION:1} \ 'packageRules.all().property(matchPackageNames?).filter(equal(type(),array)).first().filter(equal(.,@types/node)).parent().parent().allowedVersions' - nix run nixpkgs#bun --inputs-from . -- biome check --write renovate.json + BIOME_VERSION=$(nix run nixpkgs#dasel --inputs-from . -- --file package.json 'devDependencies.@biomejs/biome') + nix shell nixpkgs#bun --inputs-from . --command bunx @biomejs/biome@${BIOME_VERSION} check --write renovate.json - name: Put Bun version run: | BUN_VERSION=$(nix run nixpkgs#bun --inputs-from . -- --version) From 8f82b721da09f15827ac829cf87353f82dec8c79 Mon Sep 17 00:00:00 2001 From: s3igo <85787242+s3igo@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:36:17 +0900 Subject: [PATCH 4/7] =?UTF-8?q?fix(ci):=20`BIOME=5FVERSION`=20=E3=81=8B?= =?UTF-8?q?=E3=82=89=E3=83=80=E3=83=96=E3=83=AB=E3=82=AF=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sync-toolchain.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-toolchain.yml b/.github/workflows/sync-toolchain.yml index 2fede2a7..fbdd9986 100644 --- a/.github/workflows/sync-toolchain.yml +++ b/.github/workflows/sync-toolchain.yml @@ -27,7 +27,8 @@ jobs: --value ${NODE_VERSION:1} \ 'packageRules.all().property(matchPackageNames?).filter(equal(type(),array)).first().filter(equal(.,@types/node)).parent().parent().allowedVersions' BIOME_VERSION=$(nix run nixpkgs#dasel --inputs-from . -- --file package.json 'devDependencies.@biomejs/biome') - nix shell nixpkgs#bun --inputs-from . --command bunx @biomejs/biome@${BIOME_VERSION} check --write renovate.json + # BIOME_VERSIONはダブルクォートで囲まれた文字列なので、それを取り除く + nix shell nixpkgs#bun --inputs-from . --command bunx @biomejs/biome@${BIOME_VERSION//\\"/} check --write renovate.json - name: Put Bun version run: | BUN_VERSION=$(nix run nixpkgs#bun --inputs-from . -- --version) From 39164286f194217bc9ce0ff3a1319ab5bed4957b Mon Sep 17 00:00:00 2001 From: s3igo <85787242+s3igo@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:43:54 +0900 Subject: [PATCH 5/7] ditto --- .github/workflows/sync-toolchain.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-toolchain.yml b/.github/workflows/sync-toolchain.yml index fbdd9986..352aa5c4 100644 --- a/.github/workflows/sync-toolchain.yml +++ b/.github/workflows/sync-toolchain.yml @@ -28,7 +28,7 @@ jobs: 'packageRules.all().property(matchPackageNames?).filter(equal(type(),array)).first().filter(equal(.,@types/node)).parent().parent().allowedVersions' BIOME_VERSION=$(nix run nixpkgs#dasel --inputs-from . -- --file package.json 'devDependencies.@biomejs/biome') # BIOME_VERSIONはダブルクォートで囲まれた文字列なので、それを取り除く - nix shell nixpkgs#bun --inputs-from . --command bunx @biomejs/biome@${BIOME_VERSION//\\"/} check --write renovate.json + nix shell nixpkgs#bun --inputs-from . --command bunx @biomejs/biome@${BIOME_VERSION//\"/} check --write renovate.json - name: Put Bun version run: | BUN_VERSION=$(nix run nixpkgs#bun --inputs-from . -- --version) From b8851c3bacafb4e0ae83430e74e64f5276cdf2a9 Mon Sep 17 00:00:00 2001 From: s3igo Date: Sun, 22 Dec 2024 15:45:32 +0000 Subject: [PATCH 6/7] Apply toolchain updates --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index c943823e..990b77f0 100644 --- a/renovate.json +++ b/renovate.json @@ -32,7 +32,7 @@ }, { "matchPackageNames": ["@types/node"], - "allowedVersions": "^20" + "allowedVersions": "20.18.1" } ] } From 46b6ac052c4c0464981df73eda6e9fe3393fc673 Mon Sep 17 00:00:00 2001 From: s3igo <85787242+s3igo@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:50:14 +0900 Subject: [PATCH 7/7] =?UTF-8?q?chore:=20=E5=86=97=E9=95=B7=E3=81=AA`bunx`?= =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E3=81=AE=E5=91=BC=E3=81=B3?= =?UTF-8?q?=E5=87=BA=E3=81=97=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 332ffd2c..af62642e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,11 +99,11 @@ jobs: env: HUSKY: 0 - name: Setup Playwright - run: bunx playwright install --with-deps ${{ matrix.browser }} + run: bun playwright install --with-deps ${{ matrix.browser }} - name: Build app run: bun run build - name: Run Playwright tests - run: bunx playwright test --project ${{ matrix.browser }} + run: bun playwright test --project ${{ matrix.browser }} vrt: name: VRT diff --git a/package.json b/package.json index 9d4164ec..eb15381c 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,9 @@ "build:clean": "rm -rf ./dist", "preview": "astro preview", "check": "astro check", - "biome:fix": "bunx @biomejs/biome check --write .", - "biome:unsafe": "bunx @biomejs/biome check --write --unsafe .", - "biome:ci": "bunx @biomejs/biome ci .", + "biome:fix": "biome check --write .", + "biome:unsafe": "biome check --write --unsafe .", + "biome:ci": "biome ci .", "lint:text": "textlint ./src/content/posts/**/*.md", "lint:ls": "ls-lint", "lint:knip": "knip",