From be6a7c691075c003ca32b645d51202012e36a7a6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Mar 2026 17:45:33 +0000 Subject: [PATCH 1/2] chore: add missing typecheck scripts to all packages - Add 'typecheck: tsc --noEmit' to 12 packages that had tsconfig.json but no typecheck script: grida-canvas-cg, grida-canvas-color, grida-canvas-pixelgrid, grida-canvas-ruler, grida-canvas-transparency-grid, grida-cmath, grida-mixed-properties, grida-tokens, grida-tree, lib/treearray, react-p-queue, desktop - Add tsconfig.json + typecheck script to 3 packages with TypeScript sources but no tsconfig: grida-canvas-bitmap, grida-canvas-tailwind, database - Fix existing tsconfig.json files to use consistent settings (target: es2020, module: esnext, moduleResolution: bundler, skipLibCheck: true) matching the project-wide convention used in working packages Co-authored-by: Universe --- database/package.json | 3 +++ database/tsconfig.json | 12 ++++++++++++ desktop/package.json | 3 ++- packages/grida-canvas-bitmap/package.json | 3 +++ packages/grida-canvas-bitmap/tsconfig.json | 12 ++++++++++++ packages/grida-canvas-cg/package.json | 3 ++- packages/grida-canvas-cg/tsconfig.json | 7 +++---- packages/grida-canvas-color/package.json | 3 ++- packages/grida-canvas-color/tsconfig.json | 5 ++++- packages/grida-canvas-pixelgrid/package.json | 3 ++- packages/grida-canvas-pixelgrid/tsconfig.json | 7 ++++++- packages/grida-canvas-ruler/package.json | 3 ++- packages/grida-canvas-ruler/tsconfig.json | 7 ++++++- packages/grida-canvas-tailwind/package.json | 5 ++++- packages/grida-canvas-tailwind/tsconfig.json | 12 ++++++++++++ packages/grida-canvas-transparency-grid/package.json | 3 ++- .../grida-canvas-transparency-grid/tsconfig.json | 7 ++++++- packages/grida-cmath/package.json | 3 ++- packages/grida-cmath/tsconfig.json | 7 ++++++- packages/grida-mixed-properties/package.json | 3 ++- packages/grida-mixed-properties/tsconfig.json | 3 +++ packages/grida-tokens/package.json | 3 ++- packages/grida-tokens/tsconfig.json | 11 +++++++++-- packages/grida-tree/package.json | 3 ++- packages/grida-tree/tsconfig.json | 7 ++++++- packages/lib/treearray/package.json | 3 ++- packages/react-p-queue/package.json | 3 ++- packages/react-p-queue/tsconfig.json | 9 +++++++-- 28 files changed, 126 insertions(+), 27 deletions(-) create mode 100644 database/tsconfig.json create mode 100644 packages/grida-canvas-bitmap/tsconfig.json create mode 100644 packages/grida-canvas-tailwind/tsconfig.json diff --git a/database/package.json b/database/package.json index c7c3f3d6f3..e680ae1891 100644 --- a/database/package.json +++ b/database/package.json @@ -3,5 +3,8 @@ "private": true, "dependencies": { "type-fest": "^4.41.0" + }, + "scripts": { + "typecheck": "tsc --noEmit" } } diff --git a/database/tsconfig.json b/database/tsconfig.json new file mode 100644 index 0000000000..904a3c6855 --- /dev/null +++ b/database/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "noImplicitAny": true, + "strict": true, + "skipLibCheck": true + }, + "exclude": ["dist"] +} diff --git a/desktop/package.json b/desktop/package.json index d4ed2c2d5d..ff2676733a 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -17,7 +17,8 @@ "lint": "eslint --ext .ts,.tsx .", "make": "electron-forge make", "package": "electron-forge package", - "publish:prerelease": "electron-forge publish" + "publish:prerelease": "electron-forge publish", + "typecheck": "tsc --noEmit" }, "dependencies": { "clsx": "^2.1.1", diff --git a/packages/grida-canvas-bitmap/package.json b/packages/grida-canvas-bitmap/package.json index 1939231d5c..874e312432 100644 --- a/packages/grida-canvas-bitmap/package.json +++ b/packages/grida-canvas-bitmap/package.json @@ -5,5 +5,8 @@ "dependencies": { "@grida/cmath": "workspace:*", "@grida/color": "workspace:*" + }, + "scripts": { + "typecheck": "tsc --noEmit" } } diff --git a/packages/grida-canvas-bitmap/tsconfig.json b/packages/grida-canvas-bitmap/tsconfig.json new file mode 100644 index 0000000000..904a3c6855 --- /dev/null +++ b/packages/grida-canvas-bitmap/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "noImplicitAny": true, + "strict": true, + "skipLibCheck": true + }, + "exclude": ["dist"] +} diff --git a/packages/grida-canvas-cg/package.json b/packages/grida-canvas-cg/package.json index 336d089767..5253346e37 100644 --- a/packages/grida-canvas-cg/package.json +++ b/packages/grida-canvas-cg/package.json @@ -30,7 +30,8 @@ }, "scripts": { "build": "tsup index.ts --format cjs,esm --dts", - "dev": "tsup index.ts --format cjs,esm --dts --watch" + "dev": "tsup index.ts --format cjs,esm --dts --watch", + "typecheck": "tsc --noEmit" }, "dependencies": { "@grida/color": "workspace:*" diff --git a/packages/grida-canvas-cg/tsconfig.json b/packages/grida-canvas-cg/tsconfig.json index 31d525a7f9..564fb3196f 100644 --- a/packages/grida-canvas-cg/tsconfig.json +++ b/packages/grida-canvas-cg/tsconfig.json @@ -2,13 +2,12 @@ "compilerOptions": { "target": "es2020", "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", "lib": ["dom", "dom.iterable", "esnext"], - "outDir": "./dist", - "rootDir": ".", "esModuleInterop": true, "noImplicitAny": true, - "strict": true + "strict": true, + "skipLibCheck": true }, "exclude": ["dist"] } diff --git a/packages/grida-canvas-color/package.json b/packages/grida-canvas-color/package.json index 16aa0a3922..0ea2b974c3 100644 --- a/packages/grida-canvas-color/package.json +++ b/packages/grida-canvas-color/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "tsup index.ts --format cjs,esm --dts", "dev": "tsup index.ts --format cjs,esm --dts --watch", - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" } } diff --git a/packages/grida-canvas-color/tsconfig.json b/packages/grida-canvas-color/tsconfig.json index e647c1f9bf..894d827394 100644 --- a/packages/grida-canvas-color/tsconfig.json +++ b/packages/grida-canvas-color/tsconfig.json @@ -1,10 +1,13 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", "moduleResolution": "bundler", "esModuleInterop": true, "noImplicitAny": true, "strict": true, - "skipLibCheck": true + "skipLibCheck": true, + "types": ["vitest/globals"] }, "exclude": ["dist"] } diff --git a/packages/grida-canvas-pixelgrid/package.json b/packages/grida-canvas-pixelgrid/package.json index f877b77c26..84106dbb6d 100644 --- a/packages/grida-canvas-pixelgrid/package.json +++ b/packages/grida-canvas-pixelgrid/package.json @@ -36,7 +36,8 @@ }, "scripts": { "build": "tsup index.ts react.tsx --format cjs,esm --dts", - "dev": "tsup index.ts react.tsx --format cjs,esm --dts --watch" + "dev": "tsup index.ts react.tsx --format cjs,esm --dts --watch", + "typecheck": "tsc --noEmit" }, "devDependencies": { "@types/react": "^19", diff --git a/packages/grida-canvas-pixelgrid/tsconfig.json b/packages/grida-canvas-pixelgrid/tsconfig.json index eeb7665489..a1ec3ae387 100644 --- a/packages/grida-canvas-pixelgrid/tsconfig.json +++ b/packages/grida-canvas-pixelgrid/tsconfig.json @@ -1,7 +1,12 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", "jsx": "react-jsx", - "moduleResolution": "node" + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true }, "exclude": ["dist"] } diff --git a/packages/grida-canvas-ruler/package.json b/packages/grida-canvas-ruler/package.json index 23ea4112cf..6faad8ca12 100644 --- a/packages/grida-canvas-ruler/package.json +++ b/packages/grida-canvas-ruler/package.json @@ -35,7 +35,8 @@ }, "scripts": { "build": "tsup index.ts react.tsx --format cjs,esm --dts", - "dev": "tsup index.ts react.tsx --format cjs,esm --dts --watch" + "dev": "tsup index.ts react.tsx --format cjs,esm --dts --watch", + "typecheck": "tsc --noEmit" }, "devDependencies": { "@types/react": "^19", diff --git a/packages/grida-canvas-ruler/tsconfig.json b/packages/grida-canvas-ruler/tsconfig.json index eeb7665489..a1ec3ae387 100644 --- a/packages/grida-canvas-ruler/tsconfig.json +++ b/packages/grida-canvas-ruler/tsconfig.json @@ -1,7 +1,12 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", "jsx": "react-jsx", - "moduleResolution": "node" + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true }, "exclude": ["dist"] } diff --git a/packages/grida-canvas-tailwind/package.json b/packages/grida-canvas-tailwind/package.json index a69e93be2a..c397fa8497 100644 --- a/packages/grida-canvas-tailwind/package.json +++ b/packages/grida-canvas-tailwind/package.json @@ -1,5 +1,8 @@ { "name": "@grida/tailwindcss", "private": true, - "description": "TailwindCSS Integration for Grida Canvas" + "description": "TailwindCSS Integration for Grida Canvas", + "scripts": { + "typecheck": "tsc --noEmit" + } } diff --git a/packages/grida-canvas-tailwind/tsconfig.json b/packages/grida-canvas-tailwind/tsconfig.json new file mode 100644 index 0000000000..904a3c6855 --- /dev/null +++ b/packages/grida-canvas-tailwind/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "noImplicitAny": true, + "strict": true, + "skipLibCheck": true + }, + "exclude": ["dist"] +} diff --git a/packages/grida-canvas-transparency-grid/package.json b/packages/grida-canvas-transparency-grid/package.json index 7366fdb525..77ddaead46 100644 --- a/packages/grida-canvas-transparency-grid/package.json +++ b/packages/grida-canvas-transparency-grid/package.json @@ -37,7 +37,8 @@ }, "scripts": { "build": "tsup index.ts react.tsx --format cjs,esm --dts", - "dev": "tsup index.ts react.tsx --format cjs,esm --dts --watch" + "dev": "tsup index.ts react.tsx --format cjs,esm --dts --watch", + "typecheck": "tsc --noEmit" }, "dependencies": { "color-parse": "^2.0.2" diff --git a/packages/grida-canvas-transparency-grid/tsconfig.json b/packages/grida-canvas-transparency-grid/tsconfig.json index 718f76dd55..0f4278cd85 100644 --- a/packages/grida-canvas-transparency-grid/tsconfig.json +++ b/packages/grida-canvas-transparency-grid/tsconfig.json @@ -1,8 +1,13 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", "lib": ["dom", "dom.iterable", "esnext"], "jsx": "react-jsx", - "moduleResolution": "node", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, "types": ["@webgpu/types"] }, "exclude": ["dist"] diff --git a/packages/grida-cmath/package.json b/packages/grida-cmath/package.json index 1180b72a7c..dc73c5392e 100644 --- a/packages/grida-cmath/package.json +++ b/packages/grida-cmath/package.json @@ -65,6 +65,7 @@ "scripts": { "build": "tsup index.ts _blob.ts _dnd.ts _layout.ts _measurement.ts _snap.ts --format cjs,esm --dts", "dev": "tsup index.ts _blob.ts _dnd.ts _layout.ts _measurement.ts _snap.ts --format cjs,esm --dts --watch", - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" } } diff --git a/packages/grida-cmath/tsconfig.json b/packages/grida-cmath/tsconfig.json index e4aa77d6f1..894d827394 100644 --- a/packages/grida-cmath/tsconfig.json +++ b/packages/grida-cmath/tsconfig.json @@ -1,8 +1,13 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", "esModuleInterop": true, "noImplicitAny": true, - "strict": true + "strict": true, + "skipLibCheck": true, + "types": ["vitest/globals"] }, "exclude": ["dist"] } diff --git a/packages/grida-mixed-properties/package.json b/packages/grida-mixed-properties/package.json index 96dc96d5ea..9acab5b969 100644 --- a/packages/grida-mixed-properties/package.json +++ b/packages/grida-mixed-properties/package.json @@ -24,7 +24,8 @@ "scripts": { "build": "tsup index.ts --format cjs,esm --dts", "dev": "tsup index.ts --format cjs,esm --dts --watch", - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" }, "dependencies": { "fast-deep-equal": "^3.1.3" diff --git a/packages/grida-mixed-properties/tsconfig.json b/packages/grida-mixed-properties/tsconfig.json index 564ce12f25..894d827394 100644 --- a/packages/grida-mixed-properties/tsconfig.json +++ b/packages/grida-mixed-properties/tsconfig.json @@ -1,9 +1,12 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", "moduleResolution": "bundler", "esModuleInterop": true, "noImplicitAny": true, "strict": true, + "skipLibCheck": true, "types": ["vitest/globals"] }, "exclude": ["dist"] diff --git a/packages/grida-tokens/package.json b/packages/grida-tokens/package.json index 0270afb8b4..8603ee7ae7 100644 --- a/packages/grida-tokens/package.json +++ b/packages/grida-tokens/package.json @@ -40,6 +40,7 @@ "scripts": { "build": "tsup src/index.ts src/utils.ts src/locales.ts --format cjs,esm --dts", "dev": "tsup src/index.ts src/utils.ts src/locales.ts --format cjs,esm --dts --watch", - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" } } diff --git a/packages/grida-tokens/tsconfig.json b/packages/grida-tokens/tsconfig.json index 2f98042715..c3afa7ee5f 100644 --- a/packages/grida-tokens/tsconfig.json +++ b/packages/grida-tokens/tsconfig.json @@ -1,5 +1,12 @@ { "compilerOptions": { - "esModuleInterop": true - } + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "types": ["vitest/globals"] + }, + "exclude": ["dist"] } diff --git a/packages/grida-tree/package.json b/packages/grida-tree/package.json index f5a027ebf8..fa8372e0d0 100644 --- a/packages/grida-tree/package.json +++ b/packages/grida-tree/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" } } diff --git a/packages/grida-tree/tsconfig.json b/packages/grida-tree/tsconfig.json index 3da8c431f7..476a68dccd 100644 --- a/packages/grida-tree/tsconfig.json +++ b/packages/grida-tree/tsconfig.json @@ -1,7 +1,12 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", + "esModuleInterop": true, "noImplicitAny": true, "strict": true, - "esModuleInterop": true + "skipLibCheck": true, + "types": ["vitest/globals"] } } diff --git a/packages/lib/treearray/package.json b/packages/lib/treearray/package.json index 5703b75f43..d98d0d6b6f 100644 --- a/packages/lib/treearray/package.json +++ b/packages/lib/treearray/package.json @@ -23,6 +23,7 @@ "scripts": { "build": "tsup index.ts --format cjs,esm --dts", "dev": "tsup index.ts --format cjs,esm --dts --watch", - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" } } diff --git a/packages/react-p-queue/package.json b/packages/react-p-queue/package.json index 352782a3b0..70e3660ff0 100644 --- a/packages/react-p-queue/package.json +++ b/packages/react-p-queue/package.json @@ -32,7 +32,8 @@ "scripts": { "build": "tsup index.tsx --format cjs,esm --dts", "dev": "tsup index.tsx --format cjs,esm --dts --watch", - "test": "vitest run" + "test": "vitest run", + "typecheck": "tsc --noEmit" }, "dependencies": { "p-queue": "^7.4.1" diff --git a/packages/react-p-queue/tsconfig.json b/packages/react-p-queue/tsconfig.json index ce4449c9bd..80605f9ad5 100644 --- a/packages/react-p-queue/tsconfig.json +++ b/packages/react-p-queue/tsconfig.json @@ -1,8 +1,13 @@ { "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", "jsx": "react-jsx", - "moduleResolution": "node", - "esModuleInterop": true + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "types": ["vitest/globals"] }, "exclude": ["dist"] } From 7d26c457a72e85b5245b36d61b726263af494e67 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Mar 2026 18:04:55 +0000 Subject: [PATCH 2/2] fix: restore moduleResolution:node and add types:node for packages using Node built-ins grida-cmath and react-p-queue both import from the 'assert' Node.js built-in. Changing moduleResolution to 'bundler' and restricting types to ['vitest/globals'] broke tsup's DTS build because @types/node was excluded from the types lookup. Fix: - Revert moduleResolution to 'node' for both packages - Add 'node' to the types array so @types/node is included alongside vitest/globals - Remove strict:true from react-p-queue (no strict mode in original) Co-authored-by: Universe --- packages/grida-cmath/tsconfig.json | 11 ++++++++--- packages/react-p-queue/tsconfig.json | 12 ++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/grida-cmath/tsconfig.json b/packages/grida-cmath/tsconfig.json index 894d827394..dcf378fb1a 100644 --- a/packages/grida-cmath/tsconfig.json +++ b/packages/grida-cmath/tsconfig.json @@ -2,12 +2,17 @@ "compilerOptions": { "target": "es2020", "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "node", "esModuleInterop": true, "noImplicitAny": true, "strict": true, "skipLibCheck": true, - "types": ["vitest/globals"] + "types": [ + "vitest/globals", + "node" + ] }, - "exclude": ["dist"] + "exclude": [ + "dist" + ] } diff --git a/packages/react-p-queue/tsconfig.json b/packages/react-p-queue/tsconfig.json index 80605f9ad5..22e91938da 100644 --- a/packages/react-p-queue/tsconfig.json +++ b/packages/react-p-queue/tsconfig.json @@ -2,12 +2,16 @@ "compilerOptions": { "target": "es2020", "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "node", "jsx": "react-jsx", "esModuleInterop": true, - "strict": true, "skipLibCheck": true, - "types": ["vitest/globals"] + "types": [ + "vitest/globals", + "node" + ] }, - "exclude": ["dist"] + "exclude": [ + "dist" + ] }