refactor: restructured monorepo TypeScript config and build tasks for unified setup
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo. - Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo. - Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent. - Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines. - Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration. - Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
This commit is contained in:
+37
-9
@@ -2,27 +2,55 @@
|
||||
"name": "omp-monorepo",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"packageManager": "bun@1.3.12",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"turbo": "turbo",
|
||||
"install:dev": "bun install && bun --cwd=packages/coding-agent link && bun --cwd=packages/ai link",
|
||||
"dev": "bun --cwd=packages/coding-agent src/cli.ts",
|
||||
"stats": "bun --cwd=packages/coding-agent src/cli.ts stats",
|
||||
"test": "bun run --workspaces --if-present --parallel test",
|
||||
"build": "bun run build:ws",
|
||||
"build:ws": "turbo run build",
|
||||
"build:native": "bun --cwd=packages/natives run build",
|
||||
"build:affected": "turbo run build --affected",
|
||||
"test": "bun run test:ts",
|
||||
"test:ts": "turbo run test",
|
||||
"test:affected": "turbo run test --affected",
|
||||
"check": "bun run --parallel check:ts check:rs",
|
||||
"check:ts": "biome check . && tsgo -p tsconfig.json",
|
||||
"check:ts": "bun run --parallel check:tools check:ws",
|
||||
"check:tools": "biome check . --no-errors-on-unmatched && bun run check:types",
|
||||
"check:types": "tsgo -p tsconfig.tools.json --noEmit",
|
||||
"check:ws": "turbo run check",
|
||||
"check:types:ws": "turbo run check:types",
|
||||
"check:affected": "bun run check:tools && turbo run check --affected",
|
||||
"check:rs": "cargo fmt --all -- --check && cargo clippy --workspace -- -D warnings",
|
||||
"lint": "bun run --parallel lint:ts lint:rs",
|
||||
"lint:ts": "biome lint .",
|
||||
"lint:ts": "bun run --parallel lint:tools lint:ws",
|
||||
"lint:tools": "biome lint . --no-errors-on-unmatched",
|
||||
"lint:ws": "turbo run lint",
|
||||
"lint:rs": "cargo clippy --workspace -- -D warnings",
|
||||
"fmt": "bun run --parallel fmt:ts fmt:rs",
|
||||
"fmt:ts": "biome format --write .",
|
||||
"fmt:ts": "bun run --parallel fmt:tools fmt:ws",
|
||||
"fmt:tools": "biome format --write . --no-errors-on-unmatched",
|
||||
"fmt:ws": "turbo run fmt",
|
||||
"fmt:rs": "cargo fmt --all",
|
||||
"fix": "bun run --parallel fix:ts fix:rs",
|
||||
"fix:ts": "biome check --write --unsafe . && bun --cwd=packages/coding-agent run format-prompts && bun --cwd=packages/coding-agent run generate-docs-index",
|
||||
"fix:ts": "bun run --parallel fix:tools fix:ws",
|
||||
"fix:tools": "biome check --write --unsafe . --no-errors-on-unmatched",
|
||||
"fix:ws": "turbo run fix",
|
||||
"fix:rs": "cargo fmt --all && cargo clippy --fix --allow-dirty --all-targets --no-deps --allow-staged --broken-code --allow-no-vcs",
|
||||
"build:native": "bun --cwd=packages/natives run build:native",
|
||||
"ci:check:affected": "bun run check:affected",
|
||||
"ci:check:full": "bun run check:ts",
|
||||
"ci:build:native": "bun scripts/ci-build-native.ts",
|
||||
"ci:test:affected": "bun run test:affected",
|
||||
"ci:test:full": "bun run test",
|
||||
"ci:test:smoke": "bun packages/coding-agent/src/cli.ts --version && bun packages/coding-agent/src/cli.ts --help && bun packages/coding-agent/src/cli.ts stats --help",
|
||||
"ci:test:install-methods": "bash scripts/install-tests/run-ci.sh",
|
||||
"ci:release:verify-natives": "bun scripts/ci-release-verify-natives.ts",
|
||||
"ci:release:build-binaries": "bun scripts/ci-release-build-binaries.ts",
|
||||
"ci:release:publish": "bun scripts/ci-release-publish.ts",
|
||||
"bench:gen-fixtures": "bun --cwd=packages/typescript-edit-benchmark run src/generate.ts --typescript-dir /tmp/typescript-source --count-per-type 8",
|
||||
"bench:edit": "bun --cwd=packages/typescript-edit-benchmark run start",
|
||||
"prepublishOnly": "bun run check",
|
||||
@@ -30,10 +58,9 @@
|
||||
"publish": "bun run prepublishOnly && npm publish -ws --access public",
|
||||
"publish:dry": "bun run prepublishOnly && npm publish -ws --access public --dry-run",
|
||||
"release": "bun scripts/release.ts",
|
||||
"generate-models": "bun --cwd=packages/ai scripts/generate-models.ts",
|
||||
"generate-models": "bun --cwd=packages/ai run generate-models",
|
||||
"generate-docs-index": "bun --cwd=packages/coding-agent run generate-docs-index",
|
||||
"generate-template": "bun --cwd=packages/coding-agent run generate-template",
|
||||
"sync-exports": "bun scripts/sync-exports.ts",
|
||||
"check-spoofed-versions": "bun scripts/check-spoofed-versions.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -42,7 +69,8 @@
|
||||
"@types/bun": "^1.3",
|
||||
"@typescript/native-preview": "^7.0.0-dev.20260302.1",
|
||||
"lint-staged": "^16.3",
|
||||
"prettier": "^3.8"
|
||||
"prettier": "^3.8",
|
||||
"turbo": "^2.5.8"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,ts,jsx,tsx,json,jsonc,css}": "biome check --write --no-errors-on-unmatched"
|
||||
|
||||
Reference in New Issue
Block a user