Skip to content

feat: add Windows support for development environment #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import colors from "picocolors";
import { readdirSync } from "node:fs";
import { resolve } from "node:path";
import { argv } from "node:process";
import { pathToFileURL } from "node:url";
const benchmarkType = argv.includes("--theoretical")
? "theoretical"
: "applied";
Expand All @@ -16,7 +17,7 @@ const benchmarks = readdirSync(resolve("./benchmarks", benchmarkType)).filter(
);
console.log(`Running ${benchmarks.length} ${benchmarkType} benchmarks`);
for (const file of benchmarks) {
const benchmark = await import(resolve("benchmarks", benchmarkType, file));
const benchmark = await import(pathToFileURL(resolve("benchmarks", benchmarkType, file)));
const obj = benchmark.original;
const newObj = benchmark.changed;

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": "./dist/index.cjs"
},
"scripts": {
"build": "tsc --module CommonJS && mv \"dist/index.js\" \"dist/index.cjs\" && mv \"dist/index.d.ts\" \"dist/index.d.cts\" && tsc --module es2020 && prettier -w dist/*",
"build": "tsc --module CommonJS && shx mv \"dist/index.js\" \"dist/index.cjs\" && shx mv \"dist/index.d.ts\" \"dist/index.d.cts\" && tsc --module es2020 && prettier -w dist/*",
"test": "npm run build && node --test ./tests/*",
"bench": "npm run build && node --expose-gc bench.js",
"prepublish": "npm run build"
Expand All @@ -30,6 +30,7 @@
"mitata": "^1.0.19",
"picocolors": "^1.1.1",
"prettier": "^3.4.1",
"shx": "^0.4.0",
"typescript": "^5.7.2"
},
"type": "module",
Expand Down