Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: simplify codebase to upgrade webpack #308

Merged
merged 1 commit into from
Sep 9, 2021
Merged

Conversation

felipecrs
Copy link
Collaborator

@felipecrs felipecrs commented Sep 7, 2021

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 new tsconfig.test.json file just for the tests. This way, when testing, we build parallelly the tests with tsc and the codebase with webpack. 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.

@felipecrs felipecrs force-pushed the webpack branch 5 times, most recently from ce624b6 to 44ea3ea Compare September 7, 2021 17:42
@felipecrs felipecrs changed the title refactor: upgrade extension base with latest yo code refactor: upgrade base with latest yo code Sep 7, 2021
@felipecrs felipecrs marked this pull request as draft September 7, 2021 18:32
@felipecrs felipecrs force-pushed the webpack branch 3 times, most recently from 10ccf08 to 7239ae2 Compare September 9, 2021 01:40
@felipecrs felipecrs changed the title refactor: upgrade base with latest yo code refactor: simplify codebase to upgrade webpack Sep 9, 2021
@felipecrs felipecrs force-pushed the webpack branch 2 times, most recently from aec1e34 to b97effc Compare September 9, 2021 02:02
@felipecrs felipecrs marked this pull request as ready for review September 9, 2021 02:02
Copy link
Member

@timonwong timonwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The metrics were used during my early development but never used again, so it's safe to remove them.

@felipecrs
Copy link
Collaborator Author

LGTM

The metrics were used during my early development but never used again, so it's safe to remove them.

Awesome, thank you!

@felipecrs felipecrs merged commit 8454c64 into master Sep 9, 2021
@felipecrs felipecrs deleted the webpack branch September 9, 2021 13:18
timonwong pushed a commit that referenced this pull request Sep 9, 2021
### [0.16.2](v0.16.1...v0.16.2) (2021-09-09)

### Code Refactoring

* simplify codebase to upgrade webpack ([#308](#308)) ([8454c64](8454c64))
@github-actions
Copy link

github-actions bot commented Sep 9, 2021

🎉 This PR is included in version 0.16.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants