-
-
Notifications
You must be signed in to change notification settings - Fork 544
Closed
Milestone
Description
When schema emitter emits additional "definitions", and we muck around here, we do not copy those definitions.
ts-node/scripts/create-merged-schema.ts
Lines 20 to 62 in 8114afc
/** Patch ts-node stuff into the schemastore definition. */ | |
const mergedSchema = { | |
...schemastoreSchema, | |
definitions: { | |
...schemastoreSchema.definitions, | |
tsNodeDefinition: { | |
properties: { | |
'ts-node': { | |
...typescriptNodeSchema.definitions.TsConfigOptions, | |
description: | |
typescriptNodeSchema.definitions.TsConfigSchema.properties[ | |
'ts-node' | |
].description, | |
properties: { | |
...typescriptNodeSchema.definitions.TsConfigOptions.properties, | |
compilerOptions: { | |
...typescriptNodeSchema.definitions.TsConfigOptions.properties | |
.compilerOptions, | |
allOf: [ | |
{ | |
$ref: | |
'#/definitions/compilerOptionsDefinition/properties/compilerOptions', | |
}, | |
], | |
}, | |
}, | |
}, | |
}, | |
}, | |
}, | |
allOf: [ | |
// Splice into the allOf array at a spot that looks good. Does not affect | |
// behavior of the schema, but looks nicer if we want to submit as a PR to schemastore. | |
...schemastoreSchema.allOf.slice(0, 4), | |
{ $ref: '#/definitions/tsNodeDefinition' }, | |
...schemastoreSchema.allOf.slice(4), | |
], | |
}; | |
writeFileSync( | |
resolve(__dirname, '../tsconfig.schemastore-schema.json'), | |
JSON.stringify(mergedSchema, null, 2) | |
); | |
} |
Metadata
Metadata
Assignees
Labels
No labels