refactor: add the supported languages config to git
Description
This MR adds the supported languages configuration to package.json
and keeps it versioned there. Before this MR we were dynamically generating this config schema.
The new approach has the advantage that we can edit metadata like the config name and order the same way as for any other config. The update script only updates the dynamic properties.
This will allow me to order the config properties ([VS Code] Make extension settings order consist... (#1429 - closed)) without having to set one order
attribute somewhere in the scripts
folder.
The benefit of this solution is that it is more obvious:
- you can see all settings in the
package.json
(otherwise you'd be surprised that the build script added this config to thedist-desktop/package.json
- you can edit all the non-dynamic properties directly in
package.json
The drawback is that when we update the list of the supported languages in the LS, now you have to run npm run update-supported-languages
in the VS Code Extension. Before, there would be no developer intervention necessary. But we are not doing this often (not once since we introduced this logic 3 months ago).
Related Issues
Part of #1429 (closed)
How has this been tested?
The automation:
Apply the following patch which makes the supported languages schema out of sync:
diff --git a/package.json b/package.json
index 2ed98d3c..add0b105 100644
--- a/package.json
+++ b/package.json
@@ -346,8 +346,7 @@
},
"java": {
"type": "boolean",
- "default": true,
- "description": "Java"
+ "default": true
},
"javascript": {
"type": "boolean",
@@ -442,7 +441,6 @@
"go": true,
"haml": true,
"handlebars": true,
- "java": true,
"javascript": true,
"javascriptreact": true,
"kotlin": true,
Now run npm run test:unit
to see the error message and follow it's instructions to fix the issue.
Extension
Start the extension and validate that you still see the UI for enabled languages:
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:
Bug fix fixes - a user-facing issue in production - included in changelog -
feature:
New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:
(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes