Cache local check subtasks

This commit is contained in:
murashit 2026-05-30 08:51:05 +09:00
parent 31181ca27e
commit 9e67471279
2 changed files with 8 additions and 5 deletions

View file

@ -8,7 +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.
The local `npm run check` path runs checks in parallel and uses local caches for TypeScript, Vitest, ESLint, and Prettier. 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.

View file

@ -18,7 +18,8 @@
"build:prod": "node esbuild.config.mjs --production",
"dev": "node esbuild.config.mjs --watch",
"format": "prettier --write \"src/**/*.{ts,tsx,js,mjs,json,css,md}\" \"tests/**/*.{ts,tsx,js,mjs,json,css,md}\" \"scripts/**/*.{js,mjs}\" \"*.{ts,json,mjs,md,css}\" \"!src/generated/**\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,mjs,json,css,md}\" \"tests/**/*.{ts,tsx,js,mjs,json,css,md}\" \"scripts/**/*.{js,mjs}\" \"*.{ts,json,mjs,md,css}\" \"!src/generated/**\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,mjs,json,css,md}\" \"tests/**/*.{ts,tsx,js,mjs,json,css,md}\" \"scripts/**/*.{js,mjs}\" \"*.{ts,json,mjs,md,css}\" \"!src/generated/**\" --cache --cache-location node_modules/.cache/prettier/.prettier-cache --cache-strategy content",
"format:check:ci": "prettier --check \"src/**/*.{ts,tsx,js,mjs,json,css,md}\" \"tests/**/*.{ts,tsx,js,mjs,json,css,md}\" \"scripts/**/*.{js,mjs}\" \"*.{ts,json,mjs,md,css}\" \"!src/generated/**\"",
"api:baseline": "node scripts/report-api-baseline.mjs",
"api:baseline:check": "node scripts/report-api-baseline.mjs --check",
"generate:app-server-types": "node scripts/clean-generated-types.mjs && codex app-server generate-ts --experimental --out src/generated/app-server && node scripts/normalize-generated-types.mjs",
@ -29,10 +30,12 @@
"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",
"test": "vitest run --cache",
"test:ci": "vitest run",
"typecheck": "tsc -p tsconfig.json --noEmit --incremental --tsBuildInfoFile node_modules/.cache/typescript/tsconfig.tsbuildinfo",
"typecheck:ci": "tsc -p tsconfig.json --noEmit",
"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"
"check:ci": "npm run typecheck:ci && npm run test:ci && npm run lint:ts:ci && npm run lint:css && npm run format:check:ci && npm run build:prod"
},
"devDependencies": {
"@eslint/js": "^10.0.1",