@@ -45,21 +45,23 @@ export const exportConfigSchema = z.object({
4545
4646export const PackageExportsSchema = z . record ( z . string ( ) , z . union ( [ exportConfigSchema , z . string ( ) ] ) ) ;
4747
48- export const packageJsonSchema = z . object ( {
49- dependencies : z
50- . record ( z . string ( ) , z . string ( ) )
51- . optional ( )
52- . describe ( "List of runtime dependencies with their versions" ) ,
53- devDependencies : z
54- . record ( z . string ( ) , z . string ( ) )
55- . optional ( )
56- . describe ( "List of development dependencies with their versions" ) ,
57- exports : PackageExportsSchema . optional ( ) . describe ( "Export mappings for the package" ) ,
58- name : z . string ( ) . describe ( "Name of the package" ) ,
59- scripts : z . record ( z . string ( ) , z . string ( ) ) . describe ( "Script commands defined for the package" ) ,
60- "simple-git-hooks" : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) . describe ( "Git hooks configuration for the package" ) ,
61- version : z . string ( ) . optional ( ) . describe ( "Version of the package" ) ,
62- } ) ;
48+ export const packageJsonSchema = z
49+ . object ( {
50+ dependencies : z
51+ . record ( z . string ( ) , z . string ( ) )
52+ . optional ( )
53+ . describe ( "List of runtime dependencies with their versions" ) ,
54+ devDependencies : z
55+ . record ( z . string ( ) , z . string ( ) )
56+ . optional ( )
57+ . describe ( "List of development dependencies with their versions" ) ,
58+ exports : PackageExportsSchema . optional ( ) . describe ( "Export mappings for the package" ) ,
59+ name : z . string ( ) . describe ( "Name of the package" ) ,
60+ scripts : z . record ( z . string ( ) , z . string ( ) ) . describe ( "Script commands defined for the package" ) ,
61+ "simple-git-hooks" : z . record ( z . string ( ) , z . string ( ) ) . optional ( ) . describe ( "Git hooks configuration for the package" ) ,
62+ version : z . string ( ) . optional ( ) . describe ( "Version of the package" ) ,
63+ } )
64+ . catchall ( z . unknown ( ) ) ;
6365
6466export type PackageConfig = z . infer < typeof packageConfigSchema > ;
6567
0 commit comments