Merged
Conversation
- Do not include any trailing spaces in the error range
- This is a change in behaviour; it seems this behaviour was
intentional based on the test cases,
but I don't agree with it, since the error range should only cover
the erroneous code.
- Fix a bug where `]` or `}` are not included in the error range if they're the last character in the document
Fixes redhat-developer#1060
Signed-off-by: David Thompson <davthomp@redhat.com>
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
Fix a bug where YAML files containing a JSON Schema that start with %YAML 1.x or a comment that contains a number would fail to to be parsed. This is caused by the fact that the JSON Schema parser would contain the number, e.g. 1.2 as the value of `unresolvedJsonSchema.schema` and so the test for `=== undefined` would fail. This would cause the error from the JSON parser to be returned instead of trying to parse the file as a YAML file. To work around this, also check if `unresolvedJsonSchema.schema` is a number. It if is, it clearly was not a JSON Schema and so we can safely try to parse the file as a YAML file. Fixes: redhat-developer#922 Signed-off-by: David Lechner <dlechner@baylibre.com>
* add (failing) test case for boolean enum and const values
failing with:
```
[
{
code: 1,
data: {
schemaUri: [ 'file:///default_schema_id.yaml' ],
values: [ true, false ]
},
message: 'Value is not accepted. Valid values: true, false.',
range: {
end: { character: 15, line: 0 },
start: { character: 11, line: 0 }
},
severity: 1,
source: 'yaml-schema: file:///default_schema_id.yaml'
}
]
```
* fix the issue for `boolean` values in `enum`
this is the same fix for `enum` that has been applied a while back for `const` values here: redhat-developer@e6165e4
fixes issue: redhat-developer#1078
---------
Co-authored-by: xxx <xxx>
This helps to support the schema for openapi 3.0.0, among others, that use an older draft of JSON schema that has some type differences that make it incompatible with JSON schema draft 07. See redhat-developer#1006 , I think the root cause for the issues that PR caused is that we were trying to download and cache the metaschema from the "URL" instead of using the copy that's bundled with `ajv`. Fixes redhat-developer#780, Fixes redhat-developer#752 (and many, many duplicates we'll have to find and clean up) Signed-off-by: David Thompson <davthomp@redhat.com>
* Ensure recursion works as expected * fix test safety for when parse fails * use a cache to keep track of resolved aliases
redhat-developer#1086) * added l10n bundle for various language and translate the local strings * upstream node * upstream node * update to node 18 * Changed NodeJS.Timeout as per node 18 * upstream to node 20 * updated coversall script * fixed test case * override json service translation * fixed test cases
…eloper#1085) This is a follow-up submission for redhat-developer#1028, which removes duplicate enum values in merged enum lists. This fix/improvement ensures that the first **non-empty** enum description is used for the corresponding enum value. Before this fix: if the first non-unique enum value was not providing a description but the second one was, it was not picked up and the enum value description stayed empty. Co-authored-by: xxx <xxx> Co-authored-by: Muthurajan Sivasubramanian <93245779+msivasubramaniaan@users.noreply.github.com>
* Updated changelog for the release 1.19.0 * updated chhangelog.md * addressed review comments
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
* check NODE_AUTH_TOKEN is available or not Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * set NODE_AUTH_TOKEN --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
* check NODE_AUTH_TOKEN is available or not Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * set NODE_AUTH_TOKEN * set npmAuthToken $NODE_AUTH_TOKEN * set npmAuthToken $NODE_AUTH_TOKEN --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
just set token to 123 and check what error occur
This reverts commit 8c4c22f.
* check NODE_AUTH_TOKEN is available or not Signed-off-by: msivasubramaniaan <msivasub@redhat.com> * set NODE_AUTH_TOKEN * set npmAuthToken $NODE_AUTH_TOKEN * set npmAuthToken $NODE_AUTH_TOKEN * all the required parameters are set --------- Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
If the language server client doesn't specify the location of the l10n folder, then the language server falls back to a path relative to the complied file. This path was wrong; `server.js` is in `./out/server/src/server.js`, so the relative path of the `l10n` folder is `../../../l10n` instead of `../l10n`. Signed-off-by: David Thompson <davthomp@redhat.com>
…hat-developer#1105) If the language server client doesn't specify the location of the l10n folder, then the language server falls back to a path relative to the complied file. This path was wrong; `server.js` is in `./out/server/src/server.js`, so the relative path of the `l10n` folder is `../../../l10n` instead of `../l10n`. Signed-off-by: David Thompson <davthomp@redhat.com> Co-authored-by: David Thompson <davidethompson@me.com>
* set always-auth true * added registry url and release ci on main push for testing * removed main push * renamed to NPM_TOKEN * used YARN_NPM_AUTH_TOKEN * used npm_token * used YARN_NPM_AUTH_TOKEN * added registry-url * tried NODE_AUTH_TOKEN * created .npmrc file * removed .npmrc * check NODE_AUTH_TOKEN available or not * moved the check code on top * checked NPM_TOKEN * tried with NODE_AUTH_TOKEN * Try with NPM instead of YARN * switch to npm * removed install command * fix build issue * fix build issue * done pkg fix * Completely moved to npm from yarn * review comments addressed
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) to 6.0.2 and updates ancestor dependency [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together. Updates `serialize-javascript` from 6.0.0 to 6.0.2 - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](yahoo/serialize-javascript@v6.0.0...v6.0.2) Updates `mocha` from 9.2.2 to 11.7.1 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v9.2.2...v11.7.1) --- updated-dependencies: - dependency-name: serialize-javascript dependency-version: 6.0.2 dependency-type: indirect - dependency-name: mocha dependency-version: 11.7.1 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
From my understanding, I think we just need the GitHub Action in order for things to work. Signed-off-by: David Thompson <davthomp@redhat.com>
- setup-node@v5 creates a .npmrc if you provide a registry, so there should be no need to do that separately - after setup-node@v5 is run, `npm publish` expects the token to be accessible from the environment variable `NODE_AUTH_TOKEN` - also fix coveralls, because that's getting annoying (root cause is that it tried to publish the results for each platform instead of just once) See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm Signed-off-by: David Thompson <davthomp@redhat.com>
The options that were being used in `npm publish` to modify the version to include the git hash at the end are intended to be used with the `npm version` command beforehand instead. I think this got messed up somewhere along the way while rewriting the GitHub Action. Fixes redhat-developer#1128 Signed-off-by: David Thompson <davthomp@redhat.com>
We burned the 1.19.0 release by publishing a prerelease version labelled 1.19.0. In order to release, we'll need to use a different version number. Signed-off-by: David Thompson <davthomp@redhat.com>
fix typo Signed-off-by: roc <roc@imroc.cc> Co-authored-by: David Lechner <david@lechnology.com>
* Wrapping code action title with string * adding textedit value field wrapped as string
The `kate` editor has `yaml-language-server` as its default for the YAML format built-in (no plugins or manual configuration needed).
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?