Skip to content

Commit

Permalink
fix code duplication bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Jun 20, 2021
1 parent a9bd6bc commit a8c6ff4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ configure({

## Release Notes

## [1.6.3] - 2021-06-20

### Fixed

- Fixes code formatting generating broken / duplicate code

## [1.6.2] - 2021-05-22

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"publisher": "rikurouvila",
"description": "🧪 Take samples of runtime values and turn them into type definitions automatically",
"repository": "https://github.com/rikukissa/typehole",
"version": "1.6.2",
"version": "1.6.3",
"private": true,
"icon": "images/logo.png",
"galleryBanner": {
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async function updateTypes(hole: Typehole, types: string, fileName: string) {
typesToBeInserted
);

vscode.workspace.applyEdit(workEdits);
await vscode.workspace.applyEdit(workEdits);

try {
const workEdits = new vscode.WorkspaceEdit();
Expand All @@ -202,7 +202,7 @@ async function updateTypes(hole: Typehole, types: string, fileName: string) {

if (edits) {
workEdits.set(document.uri, edits);
vscode.workspace.applyEdit(workEdits);
await vscode.workspace.applyEdit(workEdits);
}
} catch (err) {
error("Formatting the document failed", err.message);
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.6.2",
"version": "1.6.3",
"name": "typehole",
"repository": "rikukissa/typehole",
"description": "Turn runtime types into static typescript types automatically",
Expand Down

0 comments on commit a8c6ff4

Please sign in to comment.