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`.
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 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.
Jest, eslint, and typescript-tslint-plugin were installed, but never used. Node
types were used for timers, but this is incorrect, as this code is supposed to
run in the browser.