@@ -45,21 +45,23 @@ export const exportConfigSchema = z.object({
45
45
46
46
export const PackageExportsSchema = z . record ( z . string ( ) , z . union ( [ exportConfigSchema , z . string ( ) ] ) ) ;
47
47
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 ( ) ) ;
63
65
64
66
export type PackageConfig = z . infer < typeof packageConfigSchema > ;
65
67
0 commit comments