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({
12
12
'README.md' ,
13
13
] ,
14
14
} , {
15
- rules : { 'style/semi' : 'off' } ,
15
+ rules : {
16
+ 'style/semi' : 'off' ,
17
+ 'regexp/no-unused-capturing-group' : 'off' ,
18
+ } ,
16
19
} )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " graphql-codegen-typescript-validation-schema" ,
3
3
"version" : " 0.14.1" ,
4
+ "packageManager" : " pnpm@9.2.0" ,
4
5
"description" : " GraphQL Code Generator plugin to generate form validation schema from your GraphQL schema" ,
5
6
"respository" : {
6
7
"type" : " git" ,
84
85
"vitest" : " ^1.0.0" ,
85
86
"yup" : " 1.4.0" ,
86
87
"zod" : " 3.23.8"
87
- },
88
- "packageManager" : " pnpm@9.2.0"
88
+ }
89
89
}
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ function buildApiFromDirectiveObjectArguments(config: FormattedDirectiveObjectAr
154
154
}
155
155
156
156
function applyArgToApiSchemaTemplate ( template : string , apiArgs : any [ ] ) : string {
157
- const matches = template . matchAll ( / [ $ ] ( \d + ) / g) ;
157
+ const matches = template . matchAll ( / \$ ( \d + ) / g) ;
158
158
for ( const match of matches ) {
159
159
const placeholder = match [ 0 ] ; // `$1`
160
160
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
279
279
defaultValue ?. kind === Kind . INT
280
280
|| defaultValue ?. kind === Kind . FLOAT
281
281
|| defaultValue ?. kind === Kind . BOOLEAN
282
- )
282
+ ) {
283
283
fieldSchema = `${ fieldSchema } .default(${ defaultValue . value } )` ;
284
+ }
284
285
285
286
if ( defaultValue ?. kind === Kind . STRING || defaultValue ?. kind === Kind . ENUM )
286
287
fieldSchema = `${ fieldSchema } .default("${ defaultValue . value } ")` ;
You can’t perform that action at this time.
0 commit comments