Skip to content

Commit 8c3f57d

Browse files
committed
Adjust to switch of formatter implementation from prettier to yaml
We switched the formatter implementation of yaml-language-server to be based on eemeli/yaml instead of prettier, since it can provide all the same functionality, and avoiding the extra dependency on prettier reduces the total size of the language server. Using prettier to provide formatting support was also a blocker for getting the formatting to work in the web version of the extension, since prettier doesn't work well with bundlers. This PR removes the shim that changed formatting on web to a NO-OP, since we should now be able to format properly on web. Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent 64c5308 commit 8c3f57d

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

.vscodeignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,3 @@ CONTRIBUTING.md
2121
**/**.vsix
2222
**/**.tar.gz
2323
test-resources
24-
!node_modules/prettier/index.js
25-
!node_modules/prettier/third-party.js
26-
!node_modules/prettier/parser-yaml.js

webpack.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const config = {
3131
devtool: 'source-map',
3232
externals: {
3333
vscode: 'commonjs vscode', // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
34-
prettier: 'commonjs prettier',
3534
},
3635
resolve: {
3736
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
@@ -136,7 +135,6 @@ const serverWeb = {
136135
mainFields: ['browser', 'module', 'main'],
137136
extensions: ['.ts', '.js'], // support ts-files and js-files
138137
alias: {
139-
'./services/yamlFormatter': path.resolve(__dirname, './build/polyfills/yamlFormatter.js'), // not supported for now. prettier can run in the web, but it's a bit more work.
140138
'vscode-json-languageservice/lib/umd': 'vscode-json-languageservice/lib/esm',
141139
},
142140
fallback: {

0 commit comments

Comments
 (0)