Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jan 14, 2024
1 parent 83d1e0c commit 0bc4807
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions deployment/npm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* @returns {string}
*/
function getPath() {
return require("path").join(__dirname, "plugin.wasm");
return require("path").join(__dirname, "plugin.wasm");
}

module.exports = {
getPath,
getPath,
};
12 changes: 6 additions & 6 deletions deployment/npm/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const wasmPath = path.join(__dirname, "../../target/wasm32-unknown-unknown/relea
fs.copyFileSync(wasmPath, path.join(__dirname, "plugin.wasm"));

if (args.length > 0) {
// update the version based on the first argument
const packageJsonPath = path.join(__dirname, "package.json");
const packageJsonText = fs.readFileSync(packageJsonPath, "utf8");
const packageJson = JSON.parse(packageJsonText);
packageJson.version = args[0];
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, undefined, 2) + "\n");
// update the version based on the first argument
const packageJsonPath = path.join(__dirname, "package.json");
const packageJsonText = fs.readFileSync(packageJsonPath, "utf8");
const packageJson = JSON.parse(packageJsonText);
packageJson.version = args[0];
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, undefined, 2) + "\n");
}
11 changes: 5 additions & 6 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"incremental": true,
"indentWidth": 2,
"exec": {
"associations": "**/*.rs",
"rustfmt": "rustfmt"
"commands": [{
"command": "rustfmt --edition 2021 --config imports_granularity=item",
"exts": ["rs"]
}]
},
"includes": ["**/*.{ts,tsx,js,jsx,cjs,mjs,json,md,toml,rs}"],
"excludes": [
"**/node_modules",
"**/*-lock.json",
Expand All @@ -16,6 +15,6 @@
"https://plugins.dprint.dev/json-0.14.0.wasm",
"https://plugins.dprint.dev/markdown-0.12.1.wasm",
"https://plugins.dprint.dev/toml-0.5.3.wasm",
"https://plugins.dprint.dev/exec-0.3.1.json@9351b67ec7a6b58a69201c2834cba38cb3d191080aefc6422fb1320f03c8fc4d"
"https://plugins.dprint.dev/exec-0.4.2.json@ca3c3d1cc1105b4ac1c31afdb26791a90209f13a5950f8de00dcab5e5ee293a7"
]
}
2 changes: 1 addition & 1 deletion scripts/generate_release_notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { generateChangeLog } from "https://raw.githubusercontent.com/dprint/auto

const version = Deno.args[0];
const changelog = await generateChangeLog({
versionTo: version,
versionTo: version,
});
const text = `## Changes
Expand Down
2 changes: 1 addition & 1 deletion src/generation/generate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dockerfile_parser::*;
use dprint_core::formatting::ir_helpers::SingleLineOptions;
use dprint_core::formatting::ir_helpers::gen_from_raw_string;
use dprint_core::formatting::ir_helpers::SingleLineOptions;
use dprint_core::formatting::*;

use super::context::Context;
Expand Down
2 changes: 1 addition & 1 deletion src/wasm_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use dprint_core::generate_plugin_code;
use dprint_core::plugins::FileMatchingInfo;
use dprint_core::plugins::FormatResult;
use dprint_core::plugins::PluginInfo;
use dprint_core::plugins::SyncPluginInfo;
use dprint_core::plugins::SyncPluginHandler;
use dprint_core::plugins::SyncPluginInfo;
use std::path::Path;

use super::configuration::resolve_config;
Expand Down

0 comments on commit 0bc4807

Please sign in to comment.