Skip to content

One of the emitted tsconfig schemas is technically invalid #1425

Closed

Description

@cspotcode

When schema emitter emits additional "definitions", and we muck around here, we do not copy those definitions.

/** 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)
);
}

Activity

  1. changed the title [-]Schema build technically omits invalid schema[/-] [+]Schema build technically emits invalid schema[/+] on Aug 9, 2021
  2. changed the title [-]Schema build technically emits invalid schema[/-] [+]One of the emitted tsconfig schemas is technically invalid[/+] on Aug 9, 2021
  3. added this to the 10.3.0 milestone on Aug 11, 2021
  4. removed this from the 10.3.0 milestone on Oct 10, 2021
  5. added this to the 10.5.0 milestone on Jan 31, 2022
  6. added a commit that references this issue on Feb 1, 2022
    5284051
  7. added a commit that references this issue on Sep 9, 2026
    f95c13e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions