diff --git a/apps/docs/package.json b/apps/docs/package.json index 92c91e1c3..956d96315 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -4,7 +4,7 @@ "private": true, "license": "Apache-2.0", "scripts": { - "dev": "next dev --port 3001", + "dev": "next dev --turbo --port 3001", "build": "next build", "start": "next start", "postinstall": "fumadocs-mdx" diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 74d13e6ed..cf8cdab00 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -34,4 +34,4 @@ "content/docs/connections/index.mdx" ], "exclude": ["node_modules"] -} +} \ No newline at end of file diff --git a/apps/sim/package.json b/apps/sim/package.json index 4db0dc179..8f3cf130c 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -4,6 +4,7 @@ "private": true, "license": "Apache-2.0", "type": "module", + "packageManager": "bun@1.2.12", "engines": { "bun": ">=1.2.13", "node": ">=20.0.0" @@ -134,7 +135,8 @@ "tailwindcss": "^3.4.1", "typescript": "^5.7.3", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^3.0.8" + "vitest": "^3.0.8", + "@simstudio/tsconfig": "workspace:*" }, "lint-staged": { "*.{js,jsx,ts,tsx,json,css,scss,md}": [ diff --git a/apps/sim/tsconfig.json b/apps/sim/tsconfig.json index 58e1fd44c..d8e152cb6 100644 --- a/apps/sim/tsconfig.json +++ b/apps/sim/tsconfig.json @@ -1,13 +1,6 @@ { + "extends": "@simstudio/tsconfig/nextjs.json", "compilerOptions": { - "target": "es2020", - "module": "esnext", - "moduleResolution": "bundler", - "lib": ["es2020", "dom", "dom.iterable"], - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { "@/*": ["./*"], @@ -28,19 +21,7 @@ "@/db/*": ["./db/*"], "@/executor": ["./executor"], "@/executor/*": ["./executor/*"] - }, - "allowJs": true, - "noEmit": true, - "incremental": true, - "resolveJsonModule": true, - "isolatedModules": true, - "allowImportingTsExtensions": true, - "jsx": "preserve", - "plugins": [ - { - "name": "next" - } - ] + } }, "include": [ "**/*.ts", diff --git a/bun.lock b/bun.lock index 0bd17dabe..3eb2ef387 100644 --- a/bun.lock +++ b/bun.lock @@ -131,6 +131,7 @@ "zod": "^3.24.2", }, "devDependencies": { + "@simstudio/tsconfig": "workspace:*", "@tailwindcss/typography": "^0.5.16", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", @@ -161,7 +162,7 @@ }, "packages/simstudio": { "name": "simstudio", - "version": "0.1.16", + "version": "0.1.17", "bin": { "simstudio": "dist/index.js", }, @@ -173,11 +174,16 @@ "listr2": "^6.6.1", }, "devDependencies": { + "@simstudio/tsconfig": "workspace:*", "@types/inquirer": "^8.2.6", "@types/node": "^20.5.1", "typescript": "^5.1.6", }, }, + "packages/tsconfig": { + "name": "@simstudio/tsconfig", + "version": "0.0.0", + }, }, "trustedDependencies": [ "sharp", @@ -974,6 +980,8 @@ "@simplewebauthn/server": ["@simplewebauthn/server@13.1.1", "", { "dependencies": { "@hexagon/base64": "^1.1.27", "@levischuck/tiny-cbor": "^0.2.2", "@peculiar/asn1-android": "^2.3.10", "@peculiar/asn1-ecc": "^2.3.8", "@peculiar/asn1-rsa": "^2.3.8", "@peculiar/asn1-schema": "^2.3.8", "@peculiar/asn1-x509": "^2.3.8" } }, "sha512-1hsLpRHfSuMB9ee2aAdh0Htza/X3f4djhYISrggqGe3xopNjOcePiSDkDDoPzDYaaMCrbqGP1H2TYU7bgL9PmA=="], + "@simstudio/tsconfig": ["@simstudio/tsconfig@workspace:packages/tsconfig"], + "@smithy/abort-controller": ["@smithy/abort-controller@4.0.2", "", { "dependencies": { "@smithy/types": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-Sl/78VDtgqKxN2+1qduaVE140XF+Xg+TafkncspwM4jFP/LHr76ZHmIY/y3V1M0mMLNk+Je6IGbzxy23RSToMw=="], "@smithy/chunked-blob-reader": ["@smithy/chunked-blob-reader@5.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-+sKqDBQqb036hh4NPaUiEkYFkTUGYzRsn3EuFhyfQfMy6oGHEUJDurLP9Ufb5dasr/XiAmPNMr6wa9afjQB+Gw=="], diff --git a/package.json b/package.json index 71f89fa51..9ded5f747 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simstudio", - "packageManager": "bun@1.2.12", + "packageManager": "bun@1.2.13", "version": "0.0.0", "private": true, "license": "Apache-2.0", diff --git a/packages/simstudio/package.json b/packages/simstudio/package.json index ad7ad03bc..49484bb9a 100644 --- a/packages/simstudio/package.json +++ b/packages/simstudio/package.json @@ -37,7 +37,8 @@ "devDependencies": { "@types/inquirer": "^8.2.6", "@types/node": "^20.5.1", - "typescript": "^5.1.6" + "typescript": "^5.1.6", + "@simstudio/tsconfig": "workspace:*" }, "engines": { "node": ">=16" diff --git a/packages/simstudio/tsconfig.json b/packages/simstudio/tsconfig.json index 2dbecd2a2..652ca53da 100644 --- a/packages/simstudio/tsconfig.json +++ b/packages/simstudio/tsconfig.json @@ -1,16 +1,8 @@ { + "extends": "@simstudio/tsconfig/library.json", "compilerOptions": { - "target": "es2020", - "module": "ESNext", - "moduleResolution": "node", "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "declaration": true, - "forceConsistentCasingInFileNames": true + "rootDir": "./src" }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] + "include": ["src/**/*"] } \ No newline at end of file diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json new file mode 100644 index 000000000..21e94c9b9 --- /dev/null +++ b/packages/tsconfig/base.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", + "compilerOptions": { + "target": "es2020", + "module": "esnext", + "moduleResolution": "bundler", + "lib": ["es2020", "dom", "dom.iterable"], + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + "noEmit": true, + "incremental": true, + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve" + }, + "exclude": ["node_modules", "dist", ".next"] +} diff --git a/packages/tsconfig/library.json b/packages/tsconfig/library.json new file mode 100644 index 000000000..30076eb81 --- /dev/null +++ b/packages/tsconfig/library.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Library", + "extends": "./base.json", + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "node", + "declaration": true, + "noEmit": false + }, + "exclude": ["node_modules", "dist"] +} \ No newline at end of file diff --git a/packages/tsconfig/nextjs.json b/packages/tsconfig/nextjs.json new file mode 100644 index 000000000..3582f2691 --- /dev/null +++ b/packages/tsconfig/nextjs.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "extends": "./base.json", + "compilerOptions": { + "allowImportingTsExtensions": true, + "noEmit": true, + "plugins": [ + { + "name": "next" + } + ] + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ] +} diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json new file mode 100644 index 000000000..d12f24425 --- /dev/null +++ b/packages/tsconfig/package.json @@ -0,0 +1,11 @@ +{ + "name": "@simstudio/tsconfig", + "version": "0.0.0", + "private": true, + "license": "Apache-2.0", + "files": [ + "base.json", + "nextjs.json", + "library.json" + ] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..f9b916830 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@simstudio/tsconfig/base.json" +}