feat(package): add tsconfig pkg to share across packages in monorepo (#380)

* add tsconfig pkg to share across packages in monorepo

* fixed docs build

* acknowledged PR comments
This commit is contained in:
Waleed Latif
2025-05-19 16:58:51 -07:00
committed by GitHub
parent 2a4590e649
commit f5cbcfb514
13 changed files with 89 additions and 38 deletions

View File

@@ -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"

View File

@@ -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}": [

View File

@@ -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",

View File

@@ -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=="],

View File

@@ -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",

View File

@@ -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"

View File

@@ -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/**/*"]
}

View File

@@ -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"]
}

View File

@@ -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"]
}

View File

@@ -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"
]
}

View File

@@ -0,0 +1,11 @@
{
"name": "@simstudio/tsconfig",
"version": "0.0.0",
"private": true,
"license": "Apache-2.0",
"files": [
"base.json",
"nextjs.json",
"library.json"
]
}

3
tsconfig.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": "@simstudio/tsconfig/base.json"
}