If it turns out people use this, we can support a custom schema request
service implementation instead.
Also error responses for schema requests are now handled.
For better ESM compatibility, this adds a file extension for nested
package files.
This also removes the nested special handling of
`vscode-languageserver-types` and `vscode-languageserver-document`
imports. This is unnecessary, because they use the `"module"` field in
`package.json`.
- Both `js-yaml` and `yaml-languageserver-parser` have been replaced with
`yaml`.
- `jsonc-parser` has been externalized.
- All defaults are now specified explicitly.
- The new property `yamlVersion` has been added to match
`yaml-language-server`. The default is `1.2`.
- `DiagnosticsOptions` properties are now sorted alphabetically and
documentation has been enhanced.
Closes#117
It was defined once, but it was passed into various functions. This
added unnecessary complexity.
It is now defined in a constants file, which is imported where
necessary.
TypeScript is better at inferring types when using simple functions and
objects instead of classes. As a result many type annotations have now
been removed without impacting type safety.
Some other benefits are this can be minified better and private fields
are now truly private variables.
This is much more flexible than `monaco-plugin-helpers`. Because of
this, it’s possible to use Prettier as an external dependency, so users
can ignore it in their own build process of they choose not to support
formatting.
Instead of rewriting YAML language service imports in the build tool, I
decided to just import them from where they need to be imported in the
source code.
Closes#63
This is a preparation for `monaco-editor@^0.22.0`. In this version the global
`monaco` object was removed for ESM users.
A choice was made to use `monaco-editor` imports, because this probably has
best compatibility for most users. If users want to use `monaco-editor-core`,
they will have to create an alias in their own build process.
Since both yaml-language-server and prettier are included in the bundle, their
versions should match for best compatibility. Also code has been formatted using
the updated prettier.