Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(types) - update plugins configuration interface #1246

Merged
merged 2 commits into from
Jul 21, 2021
Merged

docs(types) - update plugins configuration interface #1246

merged 2 commits into from
Jul 21, 2021

Conversation

robtayl0r
Copy link
Contributor

@robtayl0r robtayl0r commented Jul 20, 2021

JSON Schema validation fails for nest-cli.json if an item in CompilerOptions.plugins[] uses the object notation.

PR Checklist

Please check if your PR fulfills the following requirements:

I don't think tests or doc updates are applicable here. Backwards compatible as it just adds a union with the existing type string[] and does not affect the preferred default value.

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[✅] Other... Please describe: Types/Documentation

What is the current behavior?

When validating a local nest-cli.json via it's JSON Schema at json.schemastore.org/nest-cli.json, the plugin items will fail validation if using the object notation (see second code block).

Side note, some IDEs (i.e. IntelliJ IDEA) have capabilities bundled-in that automatically reference schemastore.org for matching schemas based on local filenames, with the editor reporting invalid JSON as per the schema without any obvious indicators as to what or where the schema is being defined.

Issue Number: N/A

What is the new behavior?

JSON Schema now honors plugins defined in string or object format.

Does this PR introduce a breaking change?

[ ] Yes
[✅ ] No

Other information

I'm unsure if this is automated as part of this project's CI, but a new draft of the JSON Schema will need to be published to https://json.schemastore.org/nest-cli.json

JSON Schema validation fails for nest-cli.json if an item in CompilerOptions.plugins[] uses the object notation.
lib/configuration/configuration.ts Outdated Show resolved Hide resolved
JSON Schema validation fails for nest-cli.json if an item in CompilerOptions.plugins[] uses the object notation.
@kamilmysliwiec kamilmysliwiec merged commit fe433d8 into nestjs:master Jul 21, 2021
@kamilmysliwiec
Copy link
Member

LGTM thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants