Skip to content

chore: pull new changes from 1.19#6

Merged
phunguyenmurcul merged 23 commits intoebuilder-yamlfrom
pull-new-changes-1.19
May 8, 2025
Merged

chore: pull new changes from 1.19#6
phunguyenmurcul merged 23 commits intoebuilder-yamlfrom
pull-new-changes-1.19

Conversation

@phunguyenmurcul
Copy link
Copy Markdown
Collaborator

What does this PR do?

What issues does this PR fix or reference?

Is it tested? How?

msivasubramaniaan and others added 23 commits March 3, 2025 21:49
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>
@phunguyenmurcul phunguyenmurcul changed the title Pull new changes 1.19 chore: pull new changes from 1.19 May 8, 2025
@phunguyenmurcul phunguyenmurcul merged commit b521cac into ebuilder-yaml May 8, 2025
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.

7 participants