refactor: simplify codebase to upgrade webpack
#308
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By upgrading
webpack
, we solve some security vulnerabilities found in the repository.This simplifies the bundling process by adopting the same structure as a new extension generated with
yo code
would have.However, in order to solve microsoft/vscode-generator-code#299,
npm-run-all
was used alongside a newtsconfig.test.json
file just for the tests. This way, when testing, we build parallelly the tests withtsc
and the codebase withwebpack
. It may not be the best solution, but it works reasonably.After eamodio/vscode-tsl-problem-matcher#9 gets merged and released, the build task in VS Code will be a bit more reliable.
Adjust the vscode configuration so that Prettier is used as the formatter by all the matching languages, with format on save.
Add the prompt for the user to use the locally installed Typescript instead of the global one, so it's kept in sync with the version used in this project (especially as we are not using the latest one).
Remove some performance metrics related stuff as I was not sure about their need (@timonwong I would really appreciate your advice on this). With this, the extension entry point was simplified to a unique file, more in sync with the vscode sample extensions.
Recheck the
.vscodeignore
file. Some files were included in the extension without need, causing an unnecessary increase of size.