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/.github/workflows/sync-toolchain.yml b/.github/workflows/sync-toolchain.yml index b549abaa..352aa5c4 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,23 @@ 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' + 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 - 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/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", diff --git a/renovate.json b/renovate.json index f93a4dec..990b77f0 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.18.1" } ] } 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'