Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed Dec 27, 2024
1 parent 78b7833 commit eb504ba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"preversion": "yarn dist && yarn test && yarn validate",
"version": "node --experimental-strip-types scripts/clean.ts && yarn dist && yarn docs && git add -u",
"postversion": "git push && git push --tags && npm publish && yarn coverage:report",
"check": "biome check src test",
"ci": "biome ci src test"
"check": "biome check src test scripts",
"ci": "biome ci src test scripts"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
Expand Down
6 changes: 3 additions & 3 deletions scripts/clean.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from "node:fs/promises";
import path from "node:path";
import fs from 'node:fs/promises';
import path from 'node:path';

const dist = "dist";
const dist = 'dist';
for (const file of await fs.readdir(dist)) {
await fs.unlink(path.join(dist, file));
}
6 changes: 3 additions & 3 deletions scripts/spawn-async.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { spawn } from 'node:child_process';

export type SpawnResult = { code: number, stdout: string, stderr: string }
export type SpawnResult = { code: number; stdout: string; stderr: string };

export function spawnAsync(command: string, args: string[]): Promise<SpawnResult> {
return new Promise((resolve) => {
Expand All @@ -10,11 +10,11 @@ export function spawnAsync(command: string, args: string[]): Promise<SpawnResult
let stderr = '';

p.stdout.on('data', (x) => {
stdout += x.toString()
stdout += x.toString();
});

p.stderr.on('data', (x) => {
stderr += x.toString()
stderr += x.toString();
});

p.on('exit', (code) => {
Expand Down
2 changes: 1 addition & 1 deletion test/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { tmpdir } from 'node:os';
import { basename, join, sep } from 'node:path';
import test from 'ava';
import { read, write } from 'ktx-parse';
import { type SpawnResult, spawnAsync } from '../scripts/spawn-async.ts';
import { type SpawnResult, spawnAsync } from '../scripts/spawn-async.js';

const tmpDir = await mkdtemp(`${tmpdir()}${sep}`);

Expand Down

0 comments on commit eb504ba

Please sign in to comment.