chore: bootstrap inkling project (Task 1)
Adds package.json, tsconfig.json, tsconfig.node.json, electron.vite.config.ts, vitest.config.ts, .gitignore, and package-lock.json. Verified Node 24.15.0 + npm 11.12.1 via Volta. better-sqlite3 12.9.0 native build succeeded against VS 2022 + Python 3.12. Plan v0.4 had two install pin issues; adjusted live and logged in plan Task 1 Step 2: - electron-vite@2.3.0 + vite@6.0.3 ERESOLVE (peer ^4||^5). Promoted build-tool chain: electron-vite 5.0.0, vite 7.3.2, @vitejs/plugin-react 5.1.4 (vite@7 is the compatible overlap; vitest@4.1.5 also accepts vite@7). - @types/uuid@11.0.0 deprecated stub (uuid@11 ships own types); removed from devDependencies. Other deps installed at the planned exact pins. Step 8 sanity: TypeScript 6.0.3, Vitest 4.1.5, Electron 41.3.0 (npm ls). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
node_modules/
|
||||
out/
|
||||
dist/
|
||||
*.log
|
||||
.vite/
|
||||
.DS_Store
|
||||
coverage/
|
||||
playwright-report/
|
||||
test-results/
|
||||
@@ -151,10 +151,9 @@ npm install --save-exact --save-dev \
|
||||
@types/node@24.0.0 \
|
||||
@types/react@19.0.0 @types/react-dom@19.0.0 \
|
||||
@types/better-sqlite3@7.6.11 \
|
||||
@types/uuid@11.0.0 \
|
||||
electron-vite@2.3.0 \
|
||||
vite@6.0.3 \
|
||||
@vitejs/plugin-react@4.3.4 \
|
||||
electron-vite@5.0.0 \
|
||||
vite@7.3.2 \
|
||||
@vitejs/plugin-react@5.1.4 \
|
||||
vitest@4.1.5 \
|
||||
undici@8.1.0 \
|
||||
@playwright/test@1.59.1
|
||||
@@ -162,6 +161,8 @@ npm install --save-exact --save-dev \
|
||||
|
||||
If a version is not yet published, run `npm view <pkg> version` and use the latest stable; update spec §7.2 in the same PR.
|
||||
|
||||
> **Resolution log (2026-04-25 install):** v0.4 had `electron-vite@2.3.0` (peer `vite@^4||^5`) conflicting with `vite@6.0.3`. Resolved by promoting the build-tool chain to `electron-vite@5.0.0` + `vite@7.3.2` + `@vitejs/plugin-react@5.1.4` (all share `vite@^7` as the compatible overlap; vitest@4.1.5 also accepts vite@7). `@types/uuid` line removed: uuid@11 ships its own type definitions, so `@types/uuid@11.0.0` is a deprecated stub.
|
||||
|
||||
- [ ] **Step 3: `tsconfig.json`**
|
||||
|
||||
```json
|
||||
|
||||
41
electron.vite.config.ts
Normal file
41
electron.vite.config.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: { index: resolve(__dirname, 'src/main/index.ts') }
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@shared': resolve(__dirname, 'src/shared'),
|
||||
'@main': resolve(__dirname, 'src/main')
|
||||
}
|
||||
}
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: { index: resolve(__dirname, 'src/preload/index.ts') }
|
||||
}
|
||||
},
|
||||
resolve: { alias: { '@shared': resolve(__dirname, 'src/shared') } }
|
||||
},
|
||||
renderer: {
|
||||
plugins: [react()],
|
||||
resolve: { alias: { '@shared': resolve(__dirname, 'src/shared') } },
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
inbox: resolve(__dirname, 'src/renderer/inbox/index.html'),
|
||||
quickcapture: resolve(__dirname, 'src/renderer/quickcapture/index.html')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
4079
package-lock.json
generated
Normal file
4079
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
40
package.json
Normal file
40
package.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "inkling",
|
||||
"version": "0.2.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "out/main/index.js",
|
||||
"scripts": {
|
||||
"dev": "electron-vite dev",
|
||||
"build": "electron-vite build",
|
||||
"start": "electron-vite preview",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:integration": "INKLING_INTEGRATION=1 vitest run tests/integration",
|
||||
"test:e2e": "playwright test",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"better-sqlite3": "12.9.0",
|
||||
"electron": "41.3.0",
|
||||
"electron-log": "5.2.0",
|
||||
"react": "19.2.5",
|
||||
"react-dom": "19.2.5",
|
||||
"uuid": "11.0.3",
|
||||
"zod": "4.3.6",
|
||||
"zustand": "5.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.59.1",
|
||||
"@types/better-sqlite3": "7.6.11",
|
||||
"@types/node": "24.0.0",
|
||||
"@types/react": "19.0.0",
|
||||
"@types/react-dom": "19.0.0",
|
||||
"@vitejs/plugin-react": "5.1.4",
|
||||
"electron-vite": "5.0.0",
|
||||
"typescript": "6.0.3",
|
||||
"undici": "8.1.0",
|
||||
"vite": "7.3.2",
|
||||
"vitest": "4.1.5"
|
||||
}
|
||||
}
|
||||
24
tsconfig.json
Normal file
24
tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2023",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"jsx": "react-jsx",
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"types": ["node"],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@shared/*": ["src/shared/*"],
|
||||
"@main/*": ["src/main/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*", "tests/**/*"],
|
||||
"exclude": ["node_modules", "out", "dist"]
|
||||
}
|
||||
11
tsconfig.node.json
Normal file
11
tsconfig.node.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2023",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["electron.vite.config.ts", "vitest.config.ts", "playwright.config.ts"]
|
||||
}
|
||||
18
vitest.config.ts
Normal file
18
vitest.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: 'node',
|
||||
globals: false,
|
||||
include: ['tests/unit/**/*.test.ts'],
|
||||
exclude: ['tests/integration/**', 'tests/e2e/**'],
|
||||
coverage: { reporter: ['text', 'html'] }
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@shared': resolve(__dirname, 'src/shared'),
|
||||
'@main': resolve(__dirname, 'src/main')
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user