2026-04-25 06:12:17 +00:00
|
|
|
{
|
|
|
|
|
"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",
|
feat: provider/lifecycle robustness, onboarding nudge, CI coverage gate
Assessment-driven batch of 10 verified, low-risk improvements. All gates green
(typecheck, biome, obsidian lint + strict review, 28 test files, branch
coverage 100%, e2e gate).
Correctness:
- provider-request: decide structured-output fallback on HTTP status via a new
ProviderApiError (status+body) instead of pattern-matching the i18n-translated
message — previously only en/zh matched, so fr/de/es/ja/ko users hit silent
permanent failures when a provider rejected json_schema.
- streaming: surface in-stream provider error payloads ({type:'error'} /
{error:{}}) by throwing, instead of swallowing them and later misreporting a
transient overload/quota error as "non-JSON LLM output". Note: detection runs
outside the JSON.parse try/catch so the throw is not swallowed.
- main: throwIfCancelled before cacheManager.put so a cancelled job cannot
poison the cache.
- generation-job-manager: add cancelAll(); onunload now cancels in-flight jobs
(aborting streaming HTTP + SIGKILL-ing CLI children), not just queued waiters.
Onboarding / UX:
- settings: DEFAULT_SETTINGS.promptLanguage 'zh' -> 'auto' so new non-Chinese
users get source-language summaries by default (existing users unaffected).
- view/main/types: first-run "Set up AI provider" CTA in the empty state when no
credential is configured (PluginHost.openSettings + isCredentialConfigured).
- error-ui/generation-job-manager/types: new 'network' ErrorKind with an
actionable notice + Retry for offline/connection failures.
- i18n-strings: 4 new keys across all 7 locales (parity test enforced).
CI / docs:
- .c8rc.json + package.json: branch-coverage gate (check-coverage, branches=100,
degenerate metrics disabled) and preserve c8's exit code in the coverage script.
- ci.yml: run coverage gate and strict obsidian review in CI.
- README: fix Obsidian version badge 1.4.0 -> 1.8.7 (matches manifest).
- e2e product-shell DOM shim: add createSpan (was missing; real Obsidian has it).
Tests: cover the status-based fallback (incl. non-English locale), in-stream
error throwing, cancelAll, and network classification.
Change-Id: Ic619098aa7cdf3dc1c444be4bb8a445550eadf55
2026-06-16 01:37:59 +00:00
|
|
|
"coverage": "c8 node scripts/run-tests.mjs --all; status=$?; rm -rf .test-bundles; exit $status",
|
2026-04-30 06:45:56 +00:00
|
|
|
"lint": "biome check main.ts src/ tests/ scripts/ .e2e/scripts/",
|
|
|
|
|
"lint:fix": "biome check --write main.ts src/ tests/ scripts/ .e2e/scripts/",
|
2026-05-03 02:45:10 +00:00
|
|
|
"lint:obsidian": "eslint main.ts src/",
|
2026-05-09 02:48:36 +00:00
|
|
|
"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",
|
2026-04-27 11:51:11 +00:00
|
|
|
"version": "node scripts/bump-version.mjs",
|
2026-04-27 08:04:03 +00:00
|
|
|
"test": "npm run build && npm run typecheck && node scripts/run-tests.mjs",
|
2026-04-30 06:45:56 +00:00
|
|
|
"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"
|
2026-04-25 06:12:17 +00:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
2026-04-25 15:47:49 +00:00
|
|
|
"@biomejs/biome": "^2.4.13",
|
2026-04-25 06:12:17 +00:00
|
|
|
"@types/node": "^22.10.2",
|
2026-05-03 02:45:10 +00:00
|
|
|
"@typescript-eslint/parser": "^8.59.1",
|
2026-05-15 16:22:31 +00:00
|
|
|
"c8": "^10.1.3",
|
2026-04-25 06:12:17 +00:00
|
|
|
"esbuild": "^0.24.2",
|
2026-05-03 02:45:10 +00:00
|
|
|
"eslint": "^9.39.4",
|
|
|
|
|
"eslint-plugin-obsidianmd": "^0.2.9",
|
2026-04-25 06:12:17 +00:00
|
|
|
"obsidian": "^1.7.2",
|
|
|
|
|
"typescript": "^5.7.2"
|
|
|
|
|
}
|
|
|
|
|
}
|