chore: pull new changes from 1.19#6
Merged
phunguyenmurcul merged 23 commits intoebuilder-yamlfrom May 8, 2025
Merged
Conversation
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
* fix enum values to be unique
fix enum values to be unique
* when several schemas get combined (e.g., `oneOf`, `anyOf`) the available values for an `enum` could get merged
* this could lead to enum values present several time
* this PR only adds an enum values to the merged list, if its value is not present so far
* corresponding unit test is present as well
example:
schema:
```json
{
"type": "object",
"properties": {
"animal": {
"description": "should return this description",
"anyOf": [
{
"enum": [ "cat", "dog", "non" ],
"enumDescriptions": [ "", "Canis familiaris" ]
},
{
"enum": [ "bird", "fish", "non" ],
"enumDescriptions": [ "", "Special fish" ]
}
]
}
}
}
```
Without the fix the `available value` list is: `[ cat, dog, non, bird, fish, non ]` with `non` being present twice.
With the fix the second `non` is removed, leaving only: `[ cat, dog, non, bird, fish ]`
* Update yamlHover.ts
---------
Co-authored-by: Muthurajan Sivasubramanian <93245779+msivasubramaniaan@users.noreply.github.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
* decodedURIComponent on ref value Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * fixed test case Signed-off-by: msivasubramaniaan <msivasub@redhat.com> --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
The import from `prettier` includes support for all languages supported by Prettier. The `prettier/standalone` import only includes the core. The `prettier` export also points to `prettier/standalone` for the `browser` export condition. This means that with this change `yaml-language-server` has to load less code, leading to faster startup time. And depending on configuration, it may lead to smaller bundle sizes. Co-authored-by: Muthurajan Sivasubramanian <93245779+msivasubramaniaan@users.noreply.github.com>
* add function to calculate remainder for floats correctly without rounding errors and fix checking if a number is a multipleOf for floats * fix formatting * add unit test * rm copyright --------- Co-authored-by: Steinke, Rico <Rico.Steinke@vector.com> Co-authored-by: Muthurajan Sivasubramanian <93245779+msivasubramaniaan@users.noreply.github.com>
* added support for enum yes and no Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * added support for enum yes and no Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * added test case Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * Quote were appended based on the yaml settings --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
…edhat-developer#1051) * fix: exclude not suggest properties from possible properties error * chore: update comments --------- Co-authored-by: Muthurajan Sivasubramanian <93245779+msivasubramaniaan@users.noreply.github.com>
* updated changelog for the release-1.18.0 Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * updated changelog for the release-1.18.0 Signed-off-by: msivasubramaniaan <msivasub@redhat.com> --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
* showed error on unresolved alias * updated the error severity to info
…redhat-developer#1057) I think the error message changed when switching validators. There is nothing more concrete (such as a diagnostic code) to identify the "identation cannot be tabs" diagnostics. Fixes redhat-developer#1052 Signed-off-by: David Thompson <davthomp@redhat.com> Co-authored-by: Muthurajan Sivasubramanian <93245779+msivasubramaniaan@users.noreply.github.com>
Brings in a few bug fixes Fixes redhat-developer#1110 Signed-off-by: David Thompson <davthomp@redhat.com>
This option is available in prettier so implementing it is trivial.
Needs the 'estree' prettier plugin, which is responsible for formatting
JSON. As a result, this might increase the size of the language server.
eg. in the following, when 'yaml.format.trailingComma` is set to `false`, the last comma should be removed:
```yaml
{
key: 'value',
food: 'raisins',
airport: 'YYZ',
lightened_bulb: 'illuminating',
}
```
See redhat-developer/vscode-yaml#1112
Signed-off-by: David Thompson <davthomp@redhat.com>
Some clients, like Neovim, do not support dynamic registration of formatting and range formatting. In this case, to tell the client that formatting is supported, the response to `initialized`, which contains the `ServerCapabilities`, should mark formatting and range formatting as supported. Fixes redhat-developer#1031 Signed-off-by: David Thompson <davthomp@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
What issues does this PR fix or reference?
Is it tested? How?