This repository was archived by the owner on Mar 27, 2023. It is now read-only.
Open
Conversation
added 3 commits
April 26, 2020 00:07
Replace the deprecated `vscode` module with `vscode-test`, and add test placeholders and entrypoints following the latest sample code at: https://github.com/microsoft/vscode-extension-samples
This fixes a bug where tags that contain a non-array value, e.g. a string break parsing and make the tree view get stuck.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This series of commits:
Migrates the testing infrastructure to
vscode-test. The changes follow practices set by Microsoft's current sample code.The tests are set up to be written in TypeScript, however the production code is left as JavaScript.
Fixes linting errors in existing code found by the new
npm linttask added in the commit above.And finally, the duplicated front matter parsing code is extracted into its own class. Its behaviour is covered by unit tests. The new parsing code fixes front-matter parsing causes error and high cpu utilization #77.
Assuming that this approach is acceptable, I'll continue refactoring the code to make it more testable and writing tests. These changes will make it easier and safer to add new features in the future.
Ideally I'd like to start using TypeScript in the production code as well to get the benefit of static typing.
I would also like to set up a pipeline to run the tests automatically, including on pull requests. (edit There is now a working pipeline tied to my fork.)