fancive_obsidian-parallel-r.../package.json
wujunchen 606593e39b test: add c8 coverage harness with source-map remapping
- npm run coverage runs the full suite under c8
- Wire inline source maps into the esbuild test bundles
- Redirect bundles into repo (.test-bundles) under coverage so c8
  processes them; cleaned automatically after the run
- Fix esbuild->v8-to-istanbul source path remap (tests/coverage-sourcemap.js)
- .c8rc.json, .gitignore, dev-dep c8

Note: statement/function totals are degenerate under esbuild bundling;
branch coverage + HTML report are the reliable signals.

Change-Id: I880f5ee1e9a8e5368e27a8e274825f917d972269
2026-05-16 00:22:31 +08:00

37 lines
1.5 KiB
JSON

{
"name": "obsidian-parallel-reader",
"version": "0.0.0",
"private": true,
"main": "main.js",
"scripts": {
"build": "node esbuild.config.mjs production",
"dev": "node esbuild.config.mjs watch",
"typecheck": "tsc --noEmit",
"coverage": "c8 node scripts/run-tests.mjs --all; rm -rf .test-bundles",
"lint": "biome check main.ts src/ tests/ scripts/ .e2e/scripts/",
"lint:fix": "biome check --write main.ts src/ tests/ scripts/ .e2e/scripts/",
"lint:obsidian": "eslint main.ts src/",
"lint:obsidian:review": "eslint --config eslint.obsidian-review.config.mjs --no-config-lookup main.ts src/",
"lint:obsidian:review:all": "npm run lint:obsidian:review -- --max-warnings=0",
"version": "node scripts/bump-version.mjs",
"test": "npm run build && npm run typecheck && node scripts/run-tests.mjs",
"test:only": "node scripts/run-tests.mjs",
"test:unit": "node scripts/run-tests.mjs --category unit",
"test:component": "node scripts/run-tests.mjs --category component",
"test:contract": "node scripts/run-tests.mjs --category contract",
"e2e": "bash .e2e/gate.sh --json",
"test:e2e": "npm run build && node .e2e/cases/product-shell/run.mjs",
"test:live": "npm run build && node .e2e/cases/live/run.mjs"
},
"devDependencies": {
"@biomejs/biome": "^2.4.13",
"@types/node": "^22.10.2",
"@typescript-eslint/parser": "^8.59.1",
"c8": "^10.1.3",
"esbuild": "^0.24.2",
"eslint": "^9.39.4",
"eslint-plugin-obsidianmd": "^0.2.9",
"obsidian": "^1.7.2",
"typescript": "^5.7.2"
}
}