File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,8 @@ export default antfu({
1212 'README.md' ,
1313 ] ,
1414} , {
15- rules : { 'style/semi' : 'off' } ,
15+ rules : {
16+ 'style/semi' : 'off' ,
17+ 'regexp/no-unused-capturing-group' : 'off' ,
18+ } ,
1619} )
Original file line number Diff line number Diff line change 11{
22 "name" : " graphql-codegen-typescript-validation-schema" ,
33 "version" : " 0.14.1" ,
4+ "packageManager" : " pnpm@9.2.0" ,
45 "description" : " GraphQL Code Generator plugin to generate form validation schema from your GraphQL schema" ,
56 "respository" : {
67 "type" : " git" ,
8485 "vitest" : " ^1.0.0" ,
8586 "yup" : " 1.4.0" ,
8687 "zod" : " 3.23.8"
87- },
88- "packageManager" : " pnpm@9.2.0"
88+ }
8989}
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ function buildApiFromDirectiveObjectArguments(config: FormattedDirectiveObjectAr
154154}
155155
156156function applyArgToApiSchemaTemplate ( template : string , apiArgs : any [ ] ) : string {
157- const matches = template . matchAll ( / [ $ ] ( \d + ) / g) ;
157+ const matches = template . matchAll ( / \$ ( \d + ) / g) ;
158158 for ( const match of matches ) {
159159 const placeholder = match [ 0 ] ; // `$1`
160160 const idx = Number . parseInt ( match [ 1 ] , 10 ) - 1 ; // start with `1 - 1`
Original file line number Diff line number Diff line change @@ -279,8 +279,9 @@ function shapeFields(fields: readonly (FieldDefinitionNode | InputValueDefinitio
279279 defaultValue ?. kind === Kind . INT
280280 || defaultValue ?. kind === Kind . FLOAT
281281 || defaultValue ?. kind === Kind . BOOLEAN
282- )
282+ ) {
283283 fieldSchema = `${ fieldSchema } .default(${ defaultValue . value } )` ;
284+ }
284285
285286 if ( defaultValue ?. kind === Kind . STRING || defaultValue ?. kind === Kind . ENUM )
286287 fieldSchema = `${ fieldSchema } .default("${ defaultValue . value } ")` ;
You can’t perform that action at this time.
0 commit comments