Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lage.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/** @type {import('lage').ConfigOptions} */
module.exports = {
pipeline: {
typecheck: {
type: 'npmScript',
},
test: {
type: 'npmScript',
options: {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lint": "oxfmt --check . && oxlint --type-aware",
"lint:fix": "oxfmt . && oxlint --fix --type-aware",
"install:server": "yarn workspaces focus @actual-app/sync-server --production",
"typecheck": "yarn tsc --incremental && tsc-strict",
"typecheck": "tsc -p tsconfig.root.json --noEmit && lage typecheck",
"jq": "./node_modules/node-jq/bin/jq",
"prepare": "husky"
},
Expand All @@ -84,8 +84,7 @@
"prompts": "^2.4.2",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4"
"typescript": "^5.9.3"
},
"resolutions": {
"rollup": "4.40.1",
Expand Down
8 changes: 5 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
"scripts": {
"build:app": "yarn workspace loot-core build:api",
"build:crdt": "yarn workspace @actual-app/crdt build",
"build:node": "tsc --p tsconfig.dist.json && tsc-alias -p tsconfig.dist.json",
"build:migrations": "cp migrations/*.sql dist/migrations",
"build:node": "tsc && tsc-alias",
"build:migrations": "mkdir dist/migrations && cp migrations/*.sql dist/migrations",
"build:default-db": "cp default-db.sqlite dist/",
"build": "yarn run clean && yarn run build:app && yarn run build:node && yarn run build:migrations && yarn run build:default-db",
"test": "yarn run clean && yarn run build:app && yarn run build:crdt && vitest --run",
"clean": "rm -rf dist @types"
"clean": "rm -rf dist @types",
"typecheck": "yarn build && tsc --noEmit && tsc-strict"
},
"dependencies": {
"@actual-app/crdt": "workspace:^",
Expand All @@ -29,6 +30,7 @@
"devDependencies": {
"tsc-alias": "^1.8.16",
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4",
"vitest": "^4.0.18"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"declarationDir": "@types",
"paths": {
"loot-core/*": ["./@types/loot-core/src/*"]
}
},
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"include": ["."],
"include": [".", "../../packages/loot-core/typings/pegjs.ts"],
"exclude": ["**/node_modules/*", "dist", "@types", "*.test.ts"]
}
3 changes: 2 additions & 1 deletion packages/component-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"test": "npm-run-all -cp 'test:*'",
"test:web": "ENV=web vitest --run -c vitest.web.config.ts",
"start:storybook": "storybook dev -p 6006",
"build:storybook": "storybook build"
"build:storybook": "storybook build",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@emotion/css": "^11.13.5",
Expand Down
10 changes: 10 additions & 0 deletions packages/component-library/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true,
"rootDir": "src",
"strict": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
}
5 changes: 3 additions & 2 deletions packages/crdt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build:node": "tsc --p tsconfig.dist.json",
"build:node": "tsc",
"proto:generate": "./bin/generate-proto",
"build": "rm -rf dist && yarn run build:node",
"test": "vitest --run"
"test": "vitest --run",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"google-protobuf": "^3.21.4",
Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion packages/desktop-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"test": "vitest --run",
"e2e": "npx playwright test --browser=chromium",
"vrt": "cross-env VRT=true npx playwright test --browser=chromium",
"playwright": "playwright"
"playwright": "playwright",
Comment thread
MatissJanis marked this conversation as resolved.
"typecheck": "tsc --noEmit && tsc-strict"
},
"devDependencies": {
"@actual-app/components": "workspace:*",
Expand Down Expand Up @@ -90,6 +91,8 @@
"remark-gfm": "^4.0.1",
"rollup-plugin-visualizer": "^6.0.5",
"sass": "^1.97.3",
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4",
"usehooks-ts": "^3.1.1",
"uuid": "^13.0.0",
"vite": "^7.3.1",
Expand Down
22 changes: 22 additions & 0 deletions packages/desktop-client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true,
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"../../packages/loot-core/typings/pegjs.ts",
"../../packages/loot-core/typings/window.ts"
],
"exclude": [
"node_modules",
"build",
"**/service-worker/**",
"e2e",
"**/*.test.ts",
"**/*.test.tsx",
"**/setupTests.ts"
]
}
6 changes: 4 additions & 2 deletions packages/desktop-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"clean": "rm -rf dist",
"update-client": "bin/update-client",
"build": "yarn build:dist && electron-builder",
"build:dist": "tsc --p tsconfig.dist.json && yarn copy-static-assets",
"build:dist": "tsc && yarn copy-static-assets",
"typecheck": "tsc --noEmit && tsc-strict",
"copy-static-assets": "copyfiles --exclude 'build/**/*' **/*.html icons/**/* build/desktop-electron",
"watch": "yarn build:dist && cross-env ACTUAL_DOCUMENT_DIR=\"../../data\" ACTUAL_DATA_DIR=\"../../data\" electron .",
"e2e": "npx playwright test"
Expand All @@ -29,7 +30,8 @@
"cross-env": "^10.1.0",
"electron": "39.2.7",
"electron-builder": "26.4.0",
"typescript": "^5.9.3"
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4"
},
"build": {
"appId": "com.actualbudget.actual",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"noEmit": false,
"declaration": true,
"outDir": "build",
"rootDir": ".."
"rootDir": "..",
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"include": ["."],
"include": [".", "../../packages/loot-core/typings/window.ts"],
"exclude": [
"**/node_modules/*",
"build/**/*",
Expand Down
5 changes: 4 additions & 1 deletion packages/loot-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"generate:i18n": "i18next",
"test": "npm-run-all -cp 'test:*'",
"test:node": "ENV=node vitest --run",
"test:web": "ENV=web vitest --run -c vitest.web.config.ts"
"test:web": "ENV=web vitest --run -c vitest.web.config.ts",
"typecheck": "tsc --noEmit && tsc-strict"
},
"dependencies": {
"@jlongster/sql.js": "^1.6.7",
Expand All @@ -81,6 +82,8 @@
"memoize-one": "^6.0.0",
"mitt": "^3.0.1",
"slash": "5.1.0",
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4",
"ua-parser-js": "^2.0.9",
"uuid": "^13.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/loot-core/tsconfig.api.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"declaration": true,
Expand Down
21 changes: 21 additions & 0 deletions packages/loot-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true,
"types": ["vite/client", "vitest/globals", "node"],
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"typings/**/*.ts",
"typings/**/*.d.ts"
],
"exclude": [
"node_modules",
"build",
"lib-dist",
"**/*.test.ts",
"**/*.spec.ts"
]
}
12 changes: 12 additions & 0 deletions packages/loot-core/typings/process-worker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MessagePort } from 'worker_threads';

declare global {
namespace NodeJS {
// oxlint-disable-next-line typescript/consistent-type-definitions -- global Process augmentation requires interface for declaration merging
interface Process {
parentPort?: MessagePort;
}
}
}

export {};
5 changes: 5 additions & 0 deletions packages/loot-core/typings/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ type Actual = {
declare global {
var Actual: Actual;

// oxlint-disable-next-line typescript/consistent-type-definitions -- global Window augmentation requires interface
interface Window {
Actual: Actual;
}

var IS_TESTING: boolean;

var currentMonth: string | null;
Expand Down
4 changes: 3 additions & 1 deletion packages/plugins-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"scripts": {
"build": "cross-env NODE_ENV=production ./bin/build-service-worker",
"build-dev": "cross-env NODE_ENV=development ./bin/build-service-worker",
"watch": "cross-env NODE_ENV=development ./bin/build-service-worker --watch"
"watch": "cross-env NODE_ENV=development ./bin/build-service-worker --watch",
"typecheck": "tsc --noEmit && tsc-strict"
},
"dependencies": {
"workbox-precaching": "^7.4.0"
Expand All @@ -17,6 +18,7 @@
"@types/node": "^22.19.10",
"cross-env": "^10.1.0",
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4",
"vite": "^7.3.1"
}
}
3 changes: 2 additions & 1 deletion packages/plugins-service/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"strict": false,
"types": ["vite/client"],
"outDir": "dist",
"rootDir": "src"
"rootDir": "src",
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
Expand Down
2 changes: 2 additions & 0 deletions packages/sync-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"start": "yarn build && node build/app",
"start-monitor": "nodemon --exec 'yarn build && node build/app' --ignore './build/**/*' --ext 'ts,js' build/app",
"build": "tsc && yarn add-import-extensions && yarn copy-static-assets",
"typecheck": "tsc --noEmit && tsc-strict",
"add-import-extensions": "node bin/add-import-extensions.mjs",
"copy-static-assets": "rm -rf build/src/sql && cp -r src/sql build/src/sql",
"test": "NODE_ENV=test NODE_OPTIONS='--experimental-vm-modules --import ./register-loader.mjs --trace-warnings' vitest --run",
Expand Down Expand Up @@ -64,6 +65,7 @@
"nodemon": "^3.1.11",
"supertest": "^7.2.2",
"typescript": "^5.9.3",
"typescript-strict-plugin": "^2.4.4",
"vitest": "^4.0.18"
}
}
3 changes: 2 additions & 1 deletion packages/sync-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"lib": ["ES2021"],
"noEmit": false,
"outDir": "build"
"outDir": "build",
"plugins": [{ "name": "typescript-strict-plugin", "paths": ["."] }]
},
"include": [
"src/**/*",
Expand Down
8 changes: 1 addition & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@
"@desktop-client/e2e/*": ["./packages/desktop-client/e2e/*"],
// Allow importing from hyperformula's internal typings for custom function plugins
"hyperformula/typings/*": ["./node_modules/hyperformula/typings/*"]
},
"plugins": [
{
"name": "typescript-strict-plugin",
"path": ["./packages"]
}
]
}
},
"include": ["packages/**/*", "bin/*.ts"],
"exclude": [
Expand Down
5 changes: 5 additions & 0 deletions tsconfig.root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["bin/*.ts"],
"exclude": ["node_modules"]
}
6 changes: 6 additions & 0 deletions upcoming-release-notes/7019.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [MatissJanis]
---

TypeScript: individual tsconfig files per package, running via lage
Loading
Loading