Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
- uses: actions/checkout@v7

# Set up Node
- name: Use Node 22
- name: Use Node 22.13.0
uses: actions/setup-node@v7
with:
node-version: 22
node-version: 22.13.0
registry-url: 'https://registry.npmjs.org'

# Run install dependencies
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
npm-debug.log
.vscode
node_modules/
npm-debug.log
.nyc_output
out/server
.DS_Store
yarn-error.log
coverage
lib/
eslint-result.sarif
yarn.lock
9 changes: 0 additions & 9 deletions .mocharc.json

This file was deleted.

7 changes: 2 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/src
/test
.editorconfig
Jenkinsfile
tsconfig.json
.nyc_output/
coverage/
.vscode/
.github/
.eslintrc.js
.prettierrc.json
.travis.yml
.mocharc.json
eslint.config.mjs
eslint-result.sarif
22 changes: 13 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,41 @@
"request": "attach",
"port": 6009,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/server/**/*.ts"],
"outFiles": ["${workspaceRoot}/out/server/**/*.js"],
"protocol": "inspector",
"trace": true,
"preLaunchTask": "watch typescript",
},
// A launch configuration that compiles the server and runs mocha unit tests
// A launch configuration that compiles the server and runs tests with Node's test runner
{
"type": "node",
"request": "launch",
"name": "Launch Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["-u", "bdd", "--timeout", "999999", "--colors", "-r", "ts-node/register", "${workspaceRoot}/test/*.test.ts"],
"preLaunchTask": "watch typescript",
"runtimeArgs": ["--enable-source-maps", "--test"],
"args": ["${workspaceFolder}/out/server/test/*.test.js"],
"cwd": "${workspaceFolder}",
"preLaunchTask": "npm: compile",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
"console": "integratedTerminal",
},
// A launch configuration that compiles the server and runs mocha unit tests
// A launch configuration that compiles the server and runs the currently open test file
{
"type": "node",
"request": "launch",
"name": "Launch Single File Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["-u", "bdd", "--timeout", "999999", "--colors", "-r", "ts-node/register", "${workspaceRoot}/${relativeFile}"],
"preLaunchTask": "watch typescript",
"runtimeArgs": ["--enable-source-maps", "--test"],
"args": ["${workspaceFolder}/out/server/test/${fileBasenameNoExtension}.js"],
"cwd": "${workspaceFolder}",
"preLaunchTask": "npm: compile",
"sourceMaps": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
"console": "integratedTerminal",
}
]
}
6 changes: 6 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"isDefault": true
}
},
{
"type": "npm",
"script": "compile",
"problemMatcher": ["$tsc"],
"label": "npm: compile"
},
{
"type": "npm",
"script": "lint",
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
### 1.25.0

- Feat: Add support for negated schema file-match patterns in `yaml.schemas`. See [#1345](https://github.com/redhat-developer/yaml-language-server/pull/1345).
- Feat: Show a separate schema CodeLens for each YAML document, with resource-specific titles for Kubernetes schemas. See [#1309](https://github.com/redhat-developer/yaml-language-server/pull/1309).
- Fix: Schema fileMatch regression in 1.24.0 where single `*` in glob patterns matches across path separators. See [#1295](https://github.com/redhat-developer/yaml-language-server/issues/1295).
- Fix: Preserve Kubernetes schema priority after resource-specific schema detection, preventing SchemaStore associations from overriding the configured Kubernetes schema. See [#1298](https://github.com/redhat-developer/yaml-language-server/issues/1298).
- Fix: Do not depend on specific working directory within container image. See [#1301](https://github.com/redhat-developer/yaml-language-server/pull/1301).
- Fix: Recognize Kubernetes CRD schema as built-in resources. See [#1310](https://github.com/redhat-developer/yaml-language-server/issues/1310).
- Fix: Schema priority lookup for normalized file URIs. See [#1312](https://github.com/redhat-developer/yaml-language-server/pull/1312).
- Fix: Resolve percent-encoded schema paths in modelines without encoding them a second time. See [#1316](https://github.com/redhat-developer/yaml-language-server/pull/1316).
- Fix: Type diagnostic reports schema filenames instead of `"object"` when multiple schemas match. See [#1317](https://github.com/redhat-developer/yaml-language-server/issues/1317).
- Fix: `enum` and `const` validation for nested boolean values. See [#1323](https://github.com/redhat-developer/yaml-language-server/pull/1323).
- Fix: Resolve schema references through non-standard containers such as `#/components/schemas`, including nested references to the same local file or a sibling file. See [#1322](https://github.com/redhat-developer/yaml-language-server/issues/1322).
- Fix: Keep constraints on cyclic cross-file `$refs` in unindexed resources. See [#1326](https://github.com/redhat-developer/yaml-language-server/pull/1326).
- Fix: Report the underlying reason when a schema fails to load instead of always reporting `No content`. See [#1337](https://github.com/redhat-developer/yaml-language-server/issues/1337) and [vscode-yaml#1282](https://github.com/redhat-developer/vscode-yaml/pull/1282).
- Fix: Retry remote schema requests after transient HTTP or connection failures. See [#1341](https://github.com/redhat-developer/yaml-language-server/issues/1341) and [vscode-yaml#1284](https://github.com/redhat-developer/vscode-yaml/issues/1284).
- Fix: Resolve nested schema paths prefixed with a workspace folder name and match a workspace folder name only as a whole path segment in multi-root workspaces. See [#1348](https://github.com/redhat-developer/yaml-language-server/pull/1348) and [#1349](https://github.com/redhat-developer/yaml-language-server/pull/1349).
- Fix: Improve handling of schemas written using YAML when the first key is quoted, and avoid requesting the same schema content twice. See [vscode-yaml#1275](https://github.com/redhat-developer/vscode-yaml/issues/1275).
- Fix: Detect SchemaStore schemas for nonstandard and extensionless YAML filenames such as `.clang-format`. See [vscode-yaml#1124](https://github.com/redhat-developer/vscode-yaml/issues/1124).
- Fix: Make formatter settings resource scoped. See [vscode-yaml#1240](https://github.com/redhat-developer/vscode-yaml/issues/1240).
- Fix: Keep automatic schema detection for more specific extensions out of user settings. See [vscode-yaml#1271](https://github.com/redhat-developer/vscode-yaml/issues/1271).
- Fix: Restore auto indentation after a key with an anchor when `editor.autoIndent` is set to `full`. See [vscode-yaml#1289](https://github.com/redhat-developer/vscode-yaml/pull/1289).
- Fix: Exclude YAML delimiters from word selection. See [vscode-yaml#940](https://github.com/redhat-developer/vscode-yaml/issues/940).
- Chore: Remove the unmaintained `setup-xvfb` CI action to eliminate Node 20 deprecation warnings. See [#1343](https://github.com/redhat-developer/yaml-language-server/issues/1343).
- Chore: Remove the unused `mocha-lcov-reporter` dependency. See [#1351](https://github.com/redhat-developer/yaml-language-server/pull/1351).
- Chore: Remove the redundant direct dependency on `@typescript-eslint/parser`. See [#1357](https://github.com/redhat-developer/yaml-language-server/pull/1357).
- Chore: Replace legacy URL resolution to address `DEP0169`. See [#1359](https://github.com/redhat-developer/yaml-language-server/pull/1359).
- Chore: Upgrade `rimraf` to v6. See [#1360](https://github.com/redhat-developer/yaml-language-server/pull/1360).

Thanks to [Alexandre Kohler](https://github.com/kwy404), [Andreas Reichel](https://github.com/AndreasReichel), [Noritaka Kobayashi](https://github.com/noritaka1166), [Simon Heather](https://github.com/X-Guardian), [Yusuke Hayashi](https://github.com/yhay81), [ProbstDJakob](https://github.com/ProbstDJakob), [youdie006](https://github.com/youdie006), [hassan](https://github.com/h55n), [sama Pyb](https://github.com/Pybsama)for your contributions.

### 1.24.0
- Feat: Add support for declaring a schema using an inline `$schema` property. See [#964](https://github.com/redhat-developer/yaml-language-server/issues/964).
- Feat: Add support for the `yaml.disableSchemaDetection` setting to disable automatic schema association for matching files. See [#1140](https://github.com/redhat-developer/yaml-language-server/issues/1140) and [vscode-yaml#245](https://github.com/redhat-developer/vscode-yaml/issues/245).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ interface JSONSchemaDescriptionExt extends JSONSchemaDescription {

### Prerequisites

- [Node.js](https://nodejs.org/) v18.18.0 or higher
- [Node.js](https://nodejs.org/) v22.13.0 or higher
- npm

### Setup
Expand All @@ -620,7 +620,7 @@ Use `npm test` to run tests.

### Module builds

Building YAML Language Server produces [CommonJS](http://www.commonjs.org/) output in the `out/server/src` directory. In addition, a build also produces [UMD](https://github.com/umdjs/umd) (Universal Module Definition) modules and [ES Modules](https://tc39.es/ecma262/#sec-modules) (ESM) in the `lib` directory. These module formats support different server-side module loaders and browser bundlers such as webpack.
Building YAML Language Server produces [ES Modules](https://tc39.es/ecma262/#sec-modules) (ESM) and declarations in the `out/server/src` directory.

### CI

Expand Down
6 changes: 4 additions & 2 deletions bin/yaml-language-server
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env node

const version = require('../package.json').version;
import packageConfig from '../package.json' with { type: 'json' };

const version = packageConfig.version;
const args = process.argv.slice(2);

if (args.includes('--version') || args.includes('-version')) {
Expand All @@ -24,4 +26,4 @@ Other:
}

process.env.YAML_LANGUAGE_SERVER_VERSION = version;
require('../out/server/src/server.js');
await import('../out/server/src/server.js');
Loading
Loading