Skip to content

Commit

Permalink
chore: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Nov 17, 2023
1 parent dc56f07 commit 021f49a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 36 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off",
"[typescript]": {
"editor.defaultFormatter": "wasm-fmt.wasm-fmt"
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@
"watch": "./esbuild.mjs --watch"
},
"devDependencies": {
"@types/node": "^20.8.7",
"@types/vscode": "=1.81.0",
"@types/node": "^20.9.1",
"@types/vscode": "^1.84.1",
"esbuild": "^0.19.5"
},
"dependencies": {
"@wasm-fmt/biome_fmt": "^0.1.0",
"@wasm-fmt/clang-format": "^0.2.7",
"@wasm-fmt/gofmt": "^0.4.5",
"@wasm-fmt/ruff_fmt": "^0.4.3",
"@wasm-fmt/gofmt": "^0.4.6",
"@wasm-fmt/ruff_fmt": "^0.5.0",
"@wasm-fmt/zig_fmt": "^0.0.3",
"malva": "^0.1.1"
"malva": "^0.1.2"
},
"keywords": [
"prettier",
Expand Down
46 changes: 23 additions & 23 deletions pnpm-lock.yaml

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

6 changes: 3 additions & 3 deletions src/format/clang-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ export function formattingSubscription() {
const range = document.validateRange(
new vscode.Range(
document.positionAt(0),
document.positionAt(text.length)
)
document.positionAt(text.length),
),
);
return [vscode.TextEdit.replace(range, formatted)];
} catch (e) {
logger.error(e);
return [];
}
},
}
},
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/format/malva_fmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export function formattingSubscription() {
const range = document.validateRange(
new vscode.Range(
document.positionAt(0),
document.positionAt(text.length)
)
document.positionAt(text.length),
),
);
return [vscode.TextEdit.replace(range, formatted)];
} catch (error) {
logger.error(error);
return [];
}
},
}
},
);
}
3 changes: 2 additions & 1 deletion src/format/ruff_fmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ export function formattingSubscription() {
const indent_style = options.insertSpaces ? "space" : "tab";
const indent_width = options.tabSize;

logger.info("file:", document.fileName);
logger.info("indent_style:", indent_style);
logger.info("indent_width:", indent_width);

try {
const formatted = ruff_fmt(text, {
const formatted = ruff_fmt(text, document.fileName, {
indent_style,
indent_width,
});
Expand Down

0 comments on commit 021f49a

Please sign in to comment.