Conversation
- Updated build scripts in package.json to use tsup instead of ncc. - Replaced @vercel/ncc with tsup in devDependencies. - Adjusted build:watch script for tsup compatibility. - Refined expect function type annotation for better validator key inference. - Added outDir option to tsconfig.json for output directory specification.
There was a problem hiding this comment.
Pull Request Overview
This PR updates the build system from Vercel's ncc to tsup, improves type safety in the expect function, and updates project dependencies to their latest versions.
- Replaced ncc build tool with tsup for better TypeScript compilation
- Enhanced type safety by constraining the
typeparameter to valid validator keys - Updated development dependencies to latest versions
Reviewed Changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tsup.config.ts | New configuration file for tsup build tool setup |
| src/expect.ts | Improved type safety by constraining type parameter to validator keys |
| package.json | Updated build scripts, version bump, and dependency updates |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| export default defineConfig({ | ||
| entry: ['src/index.ts'], | ||
| outDir: 'dist', | ||
| format: ['cjs'], |
There was a problem hiding this comment.
[nitpick] Consider adding 'esm' format alongside 'cjs' to support both CommonJS and ES modules, providing better compatibility for different consumers of the package.
| format: ['cjs'], | |
| format: ['cjs', 'esm'], |
| minify: true, | ||
| splitting: false, | ||
| bundle: true, | ||
| noExternal: ['@actions/core', '@actions/github'], |
There was a problem hiding this comment.
[nitpick] The noExternal configuration bundles these dependencies, which may increase bundle size. Consider if these should remain external dependencies instead of being bundled.
| noExternal: ['@actions/core', '@actions/github'], | |
| // noExternal: ['@actions/core', '@actions/github'], // Removed to keep these dependencies external |
No description provided.