Files
filevista/tsconfig.base.json
CoderLambertandClaude 88a96525ad fix(workspace): make pnpm monorepo actually verify clean
After the apps/packages split, several setup gaps surfaced when running
the full lint/typecheck/test/build chain:

Build & install
- .npmrc: switch to npmmirror + raise fetch-timeout (next/swc tarballs
  were timing out against npmjs.org)
- pnpm-workspace.yaml: approve esbuild build script (tsup needs it)
- pnpm-lock.yaml: regenerated for the new workspace layout
- .gitignore: ignore apps/*/.next, apps/*/out, packages/*/dist (the
  root-only globs no longer covered post-split)

Script ordering — playground typecheck/dev/build read types from the
library's dist/, so the lib must build first:
- root package.json: prepend build:lib to dev/typecheck/build:playground
- root package.json: add start/preview scripts for previewing prod build

TypeScript config
- tsconfig.base.json: drop incremental: true (broke tsup's DTS step;
  TS5074 — needs tsBuildInfoFile when emitted from tsup)
- apps/playground/tsconfig.json: re-add incremental locally (Next uses it)

Library typecheck fixes — needed to make tsup's DTS step pass:
- utils.ts, core/binary.ts: drop Uint8Array<ArrayBuffer> generic (5.7+
  syntax; we keep ^5 in deps so the source must compile on older TS too)
- XlsxPreview.tsx: cast bytes.buffer as ArrayBuffer (now ArrayBufferLike
  by default; exceljs's .xlsx.load expects ArrayBuffer)
- icons.tsx: wrap rest-children in Children.toArray() so multi-path
  icons (EyeIcon, Code2Icon, …) get auto-keys — was throwing the
  'unique key prop' warning on every page load
- vitest.setup.ts → src/__tests__/setup.ts + update vitest.config.ts:
  the setup file was outside rootDir 'src', breaking tsc --noEmit;
  moving it under src/__tests__ keeps tsup's entry filter happy

Cleanup
- apps/playground/src/lib/shiki.ts: orphan from the split (no importers;
  the real shiki module lives in packages/file-preview/src/shiki.ts)

After all this: lint / typecheck / test / build:lib / build:playground
all green.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 10:39:31 +08:00

17 lines
367 B
JSON

{
"compilerOptions": {
"target": "ES2020",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noImplicitAny": false,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx"
}
}