Skip to content

Commit 68ac251

Browse files
fix: fmt
1 parent 6b3c1f9 commit 68ac251

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

src/bin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
JsrPackageNameError,
1818
prettyTime,
1919
setDebug,
20-
styleText
20+
styleText,
2121
} from "./utils";
2222
import { PkgManagerName } from "./pkg_manager";
2323

src/commands.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2024 the JSR authors. MIT license.
22
import * as path from "node:path";
33
import * as fs from "node:fs";
4-
import { styleText } from './utils'
4+
import { styleText } from "./utils";
55
import {
66
exec,
77
fileExists,
@@ -26,7 +26,7 @@ async function wrapWithStatus(msg: string, fn: () => Promise<void>) {
2626

2727
try {
2828
await fn();
29-
process.stdout.write( styleText("green", "ok") + "\n");
29+
process.stdout.write(styleText("green", "ok") + "\n");
3030
} catch (err) {
3131
process.stdout.write(styleText("red", "error") + "\n");
3232
throw err;
@@ -235,16 +235,17 @@ export async function showPackageInfo(raw: string) {
235235

236236
console.log();
237237
console.log(
238-
styleText("cyan", `@${pkg.scope}/${pkg.name}@${pkg.version}`
239-
) +
238+
styleText("cyan", `@${pkg.scope}/${pkg.name}@${pkg.version}`) +
240239
` | latest: ${styleText("magenta", meta.latest ?? "-")} | versions: ${
241240
styleText("magenta", versionCount.toString())
242241
}`,
243242
);
244243
console.log(npmInfo.description);
245244
console.log();
246245
console.log(`npm tarball: ${styleText("cyan", versionInfo.dist.tarball)}`);
247-
console.log(`npm integrity: ${styleText("cyan", versionInfo.dist.integrity)}`);
246+
console.log(
247+
`npm integrity: ${styleText("cyan", versionInfo.dist.integrity)}`,
248+
);
248249
console.log();
249250
console.log(
250251
`published: ${styleText("magenta", timeAgo(Date.now() - publishTime))}`,

src/download.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as path from "node:path";
55
import * as util from "node:util";
66
import * as stream from "node:stream";
77
import * as StreamZip from "node-stream-zip";
8-
import { styleText } from './utils'
8+
import { styleText } from "./utils";
99

1010
const streamFinished = util.promisify(stream.finished);
1111

@@ -134,10 +134,11 @@ async function withProgressBar<T>(
134134
const percent = Math.floor((100 / options.max) * current);
135135

136136
const bar = "#".repeat((barLength / 100) * percent) + ">";
137-
const remaining = styleText("blue",
137+
const remaining = styleText(
138+
"blue",
138139
"-".repeat(Math.max(barLength - bar.length, 0)),
139140
);
140-
s += ` [${styleText("cyan",bar)}${remaining}] `;
141+
s += ` [${styleText("cyan", bar)}${remaining}] `;
141142
}
142143
s += styleText("dim", stats);
143144

src/pkg_manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { getLatestPackageVersion } from "./api";
33
import { InstallOptions } from "./commands";
44
import { exec, findProjectDir, JsrPackage, logDebug } from "./utils";
5-
import { styleText } from './utils'
5+
import { styleText } from "./utils";
66
import semiver from "semiver";
77

88
async function execWithLog(cmd: string, args: string[], cwd: string) {

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,5 +306,5 @@ export async function writeTextFile(
306306
}
307307

308308
export const styleText = typeof util.styleText === "function"
309-
? util.styleText
310-
: (_style: string[] | string, text: string) => text;
309+
? util.styleText
310+
: (_style: string[] | string, text: string) => text;

test/commands.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ describe("show", () => {
864864
undefined,
865865
true,
866866
);
867-
867+
868868
assert.ok(output.combined.includes("latest: -"));
869869
assert.ok(output.combined.includes("npm tarball:"));
870870
});

0 commit comments

Comments
 (0)