diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3c96e63c..92724173 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,7 +11,7 @@ permissions: jobs: check: - name: npm run check + name: npm run check:ci runs-on: ubuntu-latest steps: @@ -30,4 +30,4 @@ jobs: run: npm ci --ignore-scripts - name: Check - run: npm run check + run: npm run check:ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a78aa837..8da8189f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: RELEASE_VERSION: ${{ github.ref_name }} - name: Run checks and build - run: npm run check + run: npm run check:ci - name: Generate artifact attestations uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4 diff --git a/docs/development.md b/docs/development.md index 56bb6ad9..e86d5f02 100644 --- a/docs/development.md +++ b/docs/development.md @@ -8,6 +8,7 @@ npm run build ``` Run `npm run format` after edits and before `npm run check` so Prettier-only issues are fixed upfront. `npm run check` runs TypeScript type checking, unit tests, ESLint, Prettier check, and a production esbuild bundle. +The local `npm run check` path runs checks in parallel and uses ESLint's local cache. Use `npm run check:ci` when you need to reproduce the sequential, non-cached CI validation path. `main.js`, `data.json`, and `node_modules/` are ignored by Git. `main.js` is still the file Obsidian loads, so run `npm run build` or `npm run build:prod` after source changes. diff --git a/docs/release.md b/docs/release.md index 10334d7e..42af436d 100644 --- a/docs/release.md +++ b/docs/release.md @@ -20,4 +20,4 @@ git push origin X.Y.Z `release:prepare` updates the version files and creates a `## Changes` release notes template. `release:preflight` verifies the local Jujutsu/Git state, release metadata, lockfile, and full build once after the release commit is on `main`. -The release workflow runs `npm ci`, `npm run release:check`, `npm run check`, attaches the install assets, and generates GitHub artifact attestations for them. The release notes file is required and must contain a single `## Changes` section. If a tag-triggered release fails before creating the GitHub Release, fix the commit, move the local tag with `jj tag set --allow-move -r main X.Y.Z`, then update the remote tag with `git push --force origin X.Y.Z`. +The release workflow runs `npm ci`, `npm run release:check`, `npm run check:ci`, attaches the install assets, and generates GitHub artifact attestations for them. The release notes file is required and must contain a single `## Changes` section. If a tag-triggered release fails before creating the GitHub Release, fix the commit, move the local tag with `jj tag set --allow-move -r main X.Y.Z`, then update the remote tag with `git push --force origin X.Y.Z`. diff --git a/package.json b/package.json index 83a41e16..5273d1b3 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,14 @@ "lint": "node scripts/run-parallel.mjs lint:ts lint:css", "lint:css": "stylelint \"*.css\" \"src/**/*.css\" --max-warnings=0", "lint:ts": "eslint src tests scripts \"*.config.ts\" \"*.config.mjs\" --max-warnings=0 --cache --cache-location node_modules/.cache/eslint/ --cache-strategy content", + "lint:ts:ci": "eslint src tests scripts \"*.config.ts\" \"*.config.mjs\" --max-warnings=0", "release:check": "node scripts/check-release.mjs", "release:preflight": "node scripts/preflight-release.mjs", "release:prepare": "node scripts/prepare-release.mjs", "test": "vitest run", "typecheck": "tsc -p tsconfig.json --noEmit", - "check": "node scripts/run-parallel.mjs typecheck test lint:ts lint:css format:check && npm run build:prod" + "check": "node scripts/run-parallel.mjs typecheck test lint:ts lint:css format:check && npm run build:prod", + "check:ci": "npm run typecheck && npm run test && npm run lint:ts:ci && npm run lint:css && npm run format:check && npm run build:prod" }, "devDependencies": { "@eslint/js": "^10.0.1",