feat(station): build configuration#1718
Conversation
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request refactors the build configuration and TypeScript setup to support a monorepo structure with shared configuration and stricter type checking. The changes introduce a centralized TypeScript config, update package entry points for workspace development, fix dependency catalog references, and add non-null assertions throughout the codebase to satisfy stricter compiler options.
Changes:
- Simplified CI workflow to focus on monorepo packages with reduced coverage (removed testing, linting, and multi-version Node.js checks)
- Created shared TypeScript configuration at
internals/config/tsconfig.jsonwith strict type checking includingnoUncheckedIndexedAccess - Updated package entry points to TypeScript source files for workspace development, with build outputs specified in
publishConfig
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/build.yml | Simplified CI to only build packages/* on Node 20.x, removing tests, linting, and multi-version testing |
| package.json | Added Prettier and related plugins as root dependencies; includes nonexistent version ^3.8.1 |
| internals/config/tsconfig.json | New shared TypeScript configuration with strict type checking and noUncheckedIndexedAccess enabled |
| packages/typia/tsconfig.json | Refactored to extend shared config, removing 100+ lines of duplicated configuration |
| packages/typia/package.json | Updated rimraf to use catalog reference for consistency |
| packages/openapi/tsconfig.json | Refactored to extend shared config, removing 100+ lines of duplicated configuration |
| packages/openapi/package.json | Changed main entry to src/index.ts with publishConfig for lib outputs, added ts-node catalog reference |
| packages/openapi/src/**/*.ts | Added non-null assertions throughout to satisfy noUncheckedIndexedAccess from shared config |
| internals/examples/package.json | Fixed typo in catalog references: catalogs:typescript → catalog:typescript |
This pull request introduces several improvements and refactors to the build configuration, package management, and TypeScript usage across the repository. The most significant changes are the migration to a monorepo-style build workflow, the addition of a shared TypeScript configuration, and enhanced handling of TypeScript references and types in the codebase.
Build and Package Management Updates:
.github/workflows/build.ymlto support a monorepo structure, simplifying CI jobs and focusing builds onpackages/*directories and workspace files. This change removes redundant jobs and streamlines dependency installation and build steps.package.jsonto standardize code formatting across the project.internals/examples/package.jsonforts-patchandtypescriptto ensure correct dependency resolution.TypeScript Configuration and Usage:
internals/config/tsconfig.jsonwith strict type checking, improved module resolution, and consistent compiler options for all packages.packages/openapi/package.jsonfrom built JS files to the TypeScript source file (src/index.ts), and moved the output file references topublishConfigfor correct packaging. Also addedts-nodeas a dev dependency. [1] [2] [3]Code Quality and Type Safety Improvements:
!) when accessing array elements and reference keys, reducing potential runtime errors related to undefined values. [1] [2] [3] [4] [5] [6] [7] [8] [9]