inkhash 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 naamukim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,12 @@
1
- # Temporary Holding Version
1
+ # inkhash
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ## Why did I start this project?
4
+
5
+ I don't agree that regression tests should always use devices, browsers, or simulators.
6
+ They're too expensive and inefficient, so my idea is to skip them and just use a lock file that hashes your service's UI.
7
+
8
+ ## How to use it
9
+
10
+ 1. Scaffold it with `npx inkhash init`.
11
+ 2. Add your config (supported browser versions, etc.).
12
+ 3. That's it.
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/cli.mjs ADDED
@@ -0,0 +1,364 @@
1
+ #!/usr/bin/env node
2
+ import { defineCommand, runMain } from "citty";
3
+ import { n as load } from "./config-CvO48-dR.mjs";
4
+ import { existsSync, readFileSync } from "node:fs";
5
+ import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
6
+ import { dirname, join, resolve } from "node:path";
7
+ import { registerHooks } from "node:module";
8
+ import { fileURLToPath, pathToFileURL } from "node:url";
9
+ import { transformSync } from "oxc-transform";
10
+ import { selectAll, selectOne } from "css-select";
11
+ import postcss from "postcss";
12
+ import { createHash } from "node:crypto";
13
+ import { parseDocument } from "htmlparser2";
14
+ import { createElement } from "react";
15
+ import { renderToStaticMarkup } from "react-dom/server";
16
+ // package.json
17
+ var name = "inkhash";
18
+ var version = "0.0.2";
19
+ var description = "Visual regression keys from React views and browser profiles, without running a browser";
20
+ // src/init.ts
21
+ const template = `import { defineConfig } from 'inkhash'
22
+
23
+ export default defineConfig({
24
+ renderers: [],
25
+ css: [],
26
+ views: [],
27
+ })
28
+ `;
29
+ async function init(cwd = process.cwd()) {
30
+ const changed = [];
31
+ const config = join(cwd, "inkhash.config.ts");
32
+ if (!existsSync(config)) {
33
+ await writeFile(config, template);
34
+ changed.push("inkhash.config.ts");
35
+ }
36
+ const ignore = join(cwd, ".gitignore");
37
+ const text = existsSync(ignore) ? await readFile(ignore, "utf8") : "";
38
+ if (!text.split("\n").includes(".inkhash")) {
39
+ await appendFile(ignore, `${text && !text.endsWith("\n") ? "\n" : ""}.inkhash\n`);
40
+ changed.push(".gitignore");
41
+ }
42
+ return changed;
43
+ }
44
+ // src/hooks.ts
45
+ const graph = /* @__PURE__ */ new Map();
46
+ const source = /\.[mc]?[jt]sx?$/;
47
+ const asset = /\.(png|jpe?g|gif|webp|avif|svg|ico|bmp|woff2?|ttf|otf)$/;
48
+ const extensions = [
49
+ ".tsx",
50
+ ".ts",
51
+ ".jsx",
52
+ ".js",
53
+ "/index.tsx",
54
+ "/index.ts",
55
+ "/index.jsx",
56
+ "/index.js"
57
+ ];
58
+ registerHooks({
59
+ resolve(specifier, context, next) {
60
+ let result;
61
+ try {
62
+ result = next(specifier, context);
63
+ } catch (error) {
64
+ if (!specifier.startsWith(".")) throw error;
65
+ const found = extensions.map((ext) => {
66
+ try {
67
+ return next(specifier + ext, context);
68
+ } catch {}
69
+ }).find(Boolean);
70
+ if (!found) throw error;
71
+ result = found;
72
+ }
73
+ if (context.parentURL) {
74
+ if (!graph.has(context.parentURL)) graph.set(context.parentURL, /* @__PURE__ */ new Set());
75
+ graph.get(context.parentURL).add(result.url);
76
+ }
77
+ return result;
78
+ },
79
+ load(url, context, next) {
80
+ if (url.endsWith(".css")) return {
81
+ format: "module",
82
+ source: "export default new Proxy({}, { get: (_, k) => k })",
83
+ shortCircuit: true
84
+ };
85
+ if (asset.test(url)) return {
86
+ format: "module",
87
+ source: `export default ${JSON.stringify(url)}`,
88
+ shortCircuit: true
89
+ };
90
+ if (url.startsWith("file:") && source.test(url) && !url.includes("/node_modules/")) {
91
+ const file = fileURLToPath(url);
92
+ const { code } = transformSync(file, readFileSync(file, "utf8"), { jsx: { runtime: "automatic" } });
93
+ return {
94
+ format: "module",
95
+ source: code,
96
+ shortCircuit: true
97
+ };
98
+ }
99
+ return next(url, context);
100
+ }
101
+ });
102
+ function closure(url, seen = /* @__PURE__ */ new Set()) {
103
+ if (seen.has(url)) return seen;
104
+ seen.add(url);
105
+ for (const child of graph.get(url) ?? []) closure(child, seen);
106
+ return seen;
107
+ }
108
+ // src/css.ts
109
+ const dynamic = /::?(before|after|first-line|first-letter|marker|placeholder|selection|backdrop|file-selector-button|hover|focus|focus-visible|focus-within|active|visited|target|-webkit-[\w-]+|-moz-[\w-]+)(?![\w-])/g;
110
+ const nested = /* @__PURE__ */ new Set([
111
+ "media",
112
+ "supports",
113
+ "layer",
114
+ "container",
115
+ "scope"
116
+ ]);
117
+ const vars = (value) => [...value.matchAll(/var\(\s*(--[\w-]+)/g)].map((m) => m[1]);
118
+ async function sheet(file) {
119
+ const root = postcss.parse(await readFile(file, "utf8"), { from: file });
120
+ for (const rule of root.nodes.filter((n) => n.type === "atrule" && n.name === "import")) {
121
+ const path = rule.params.match(/^(?:url\()?\s*['"]?([^'")\s]+)/)?.[1];
122
+ if (path && !/^[a-z]+:/i.test(path)) rule.replaceWith((await sheet(resolve(dirname(file), path))).nodes);
123
+ }
124
+ return root;
125
+ }
126
+ const matches = (doc, selector) => {
127
+ const stripped = selector.replace(dynamic, "").trim() || "*";
128
+ if (stripped !== selector.trim() && /:(not|is|where|has)\(/.test(selector)) return true;
129
+ try {
130
+ return !!selectOne(stripped, doc);
131
+ } catch {
132
+ return true;
133
+ }
134
+ };
135
+ const scope = (node) => node.parent?.type === "atrule" ? `${scope(node.parent)}@${node.parent.name} ${node.parent.params}` : "";
136
+ function select(doc, sheets, inline) {
137
+ const rules = [];
138
+ const atRules = [];
139
+ const visit = (nodes = []) => nodes.forEach((node) => {
140
+ if (node.type === "atrule" && nested.has(node.name)) visit(node.nodes);
141
+ else if (node.type === "atrule") atRules.push(node);
142
+ else if (node.type === "rule" && node.selectors.some((s) => matches(doc, s))) {
143
+ rules.push(node);
144
+ visit(node.nodes);
145
+ }
146
+ });
147
+ sheets.forEach((root) => visit(root.nodes));
148
+ const plain = rules.flatMap((r) => r.nodes.filter((d) => d.type === "decl" && !d.prop.startsWith("--")));
149
+ const custom = rules.flatMap((r) => r.nodes.filter((d) => d.type === "decl" && d.prop.startsWith("--")));
150
+ const used = /* @__PURE__ */ new Set();
151
+ const queue = [...plain.map((d) => d.value), ...inline].flatMap(vars);
152
+ for (let name; name = queue.shift();) {
153
+ if (used.has(name)) continue;
154
+ used.add(name);
155
+ for (const d of custom) if (d.prop === name) queue.push(...vars(d.value));
156
+ }
157
+ const kept = /* @__PURE__ */ new Set([...plain, ...custom.filter((d) => used.has(d.prop))]);
158
+ const text = [...kept].map((d) => d.value).join("\n") + "\n" + inline.join("\n");
159
+ const named = (rule) => {
160
+ if (rule.name === "font-face") return [...rule.nodes ?? []].some((d) => d.type === "decl" && d.prop === "font-family" && text.includes(d.value.replace(/['"]/g, "")));
161
+ if (/keyframes$/.test(rule.name)) return text.includes(rule.params);
162
+ if (rule.name === "property") return used.has(rule.params);
163
+ return true;
164
+ };
165
+ const extra = atRules.filter(named);
166
+ return {
167
+ css: [...rules.map((r) => `${scope(r)}{${r.selector}{${r.nodes.filter((d) => kept.has(d)).map(String).join(";")}}}`), ...extra.map((r) => `${scope(r)}{${r}}`)],
168
+ urls: [...[...kept].map((d) => [d.value, d.source?.input.file]), ...extra.map((r) => [String(r), r.source?.input.file])].flatMap(([value, file]) => [...value.matchAll(/url\(\s*['"]?([^'")]+)/g)].map((m) => /^[a-z]+:/i.test(m[1]) ? m[1] : resolve(dirname(file ?? "."), m[1])))
169
+ };
170
+ }
171
+ // src/hash.ts
172
+ const hash = (v) => createHash("sha256").update(typeof v === "string" || v instanceof Uint8Array ? v : JSON.stringify(v)).digest("hex");
173
+ // src/lock.ts
174
+ const read = async (file, fallback) => existsSync(file) ? JSON.parse(await readFile(file, "utf8")) : fallback;
175
+ const write = async (file, value) => {
176
+ await mkdir(dirname(file), { recursive: true });
177
+ await writeFile(file, JSON.stringify(value, null, 2) + "\n");
178
+ };
179
+ function open(config) {
180
+ const last = join(config.dir, "last.json");
181
+ return {
182
+ read: () => read(config.lock, {}),
183
+ write: (locks) => write(config.lock, locks),
184
+ last: () => read(last, []),
185
+ save: (verdicts) => write(last, verdicts)
186
+ };
187
+ }
188
+ // src/renderer.ts
189
+ async function renderer(config, id) {
190
+ const file = join(config.dir, "renderers", `${id}.json`);
191
+ if (existsSync(file)) return JSON.parse(await readFile(file, "utf8"));
192
+ if (!config.registry) throw new Error(`renderer ${id}: not in ${file} and no registry configured`);
193
+ const response = await fetch(config.registry.replace("{id}", encodeURIComponent(id)));
194
+ if (!response.ok) throw new Error(`renderer ${id}: ${response.status}`);
195
+ const bundle = await response.json();
196
+ if (bundle.id !== id) throw new Error(`renderer ${id}: registry returned ${bundle.id}`);
197
+ await mkdir(join(config.dir, "renderers"), { recursive: true });
198
+ await writeFile(file, JSON.stringify(bundle, null, 2) + "\n");
199
+ return bundle;
200
+ }
201
+ // src/view.ts
202
+ const attributes = [
203
+ "src",
204
+ "srcset",
205
+ "poster",
206
+ "href",
207
+ "xlink:href"
208
+ ];
209
+ async function bytes(url, config) {
210
+ if (url.startsWith("data:")) return url;
211
+ const file = url.startsWith("file:") ? fileURLToPath(url) : url.startsWith("/") && !existsSync(url) ? join(config.public, url) : /^[a-z]+:/i.test(url) ? null : resolve(url);
212
+ return file && existsSync(file) ? hash(await readFile(file)) : null;
213
+ }
214
+ async function render(view, config) {
215
+ const url = pathToFileURL(resolve(view.import)).href;
216
+ const mod = await import(url);
217
+ return {
218
+ markup: config.template.replace("{view}", renderToStaticMarkup(createElement(mod[view.export ?? "default"], view.props))),
219
+ css: [...config.css.map((f) => resolve(f)), ...[...closure(url)].filter((u) => u.endsWith(".css")).map((u) => fileURLToPath(u))]
220
+ };
221
+ }
222
+ async function page(view, config, sheet) {
223
+ const rendered = await render(view, config).catch(() => null);
224
+ if (!rendered) return null;
225
+ const { markup, css: files } = rendered;
226
+ const doc = parseDocument(markup);
227
+ const elements = selectAll("[src],[srcset],[poster],image[href],use[href],[style]", doc);
228
+ const inline = elements.flatMap((e) => e.attribs.style ?? []);
229
+ const { css, urls } = select(doc, await Promise.all(files.map(sheet)), inline);
230
+ const refs = [
231
+ ...urls,
232
+ ...inline.flatMap((s) => [...s.matchAll(/url\(\s*['"]?([^'")]+)/g)].map((m) => m[1])),
233
+ ...elements.flatMap((e) => attributes.flatMap((a) => e.name === "a" ? [] : e.attribs[a]?.split(",").map((s) => s.trim().split(/\s+/)[0]) ?? []))
234
+ ];
235
+ const assets = await Promise.all([...new Set(refs)].sort().map(async (ref) => [ref, await bytes(ref, config)]));
236
+ if (assets.some(([, b]) => b === null)) return null;
237
+ return {
238
+ markup: hash(markup),
239
+ css: hash(css),
240
+ assets: hash(assets)
241
+ };
242
+ }
243
+ // src/run.ts
244
+ async function run(config) {
245
+ const db = open(config);
246
+ const locks = await db.read();
247
+ const renderers = await Promise.all(config.renderers.map((id) => renderer(config, id)));
248
+ const context = hash([config.device, config.media]);
249
+ const sheets = /* @__PURE__ */ new Map();
250
+ const load = (file) => sheets.get(file) ?? sheets.set(file, sheet(file)).get(file);
251
+ const verdicts = [];
252
+ for (const view of config.views) {
253
+ const parts = await page(view, config, load);
254
+ const content = parts && hash(parts);
255
+ for (const bundle of renderers) {
256
+ const e = hash(bundle);
257
+ const key = {
258
+ renderer: e,
259
+ context,
260
+ page: content,
261
+ parts,
262
+ value: content && hash([
263
+ e,
264
+ context,
265
+ content
266
+ ])
267
+ };
268
+ const base = locks[`${bundle.id}:${view.id}`]?.key;
269
+ const verdict = {
270
+ view: view.id,
271
+ renderer: bundle.id,
272
+ status: "capture",
273
+ key
274
+ };
275
+ if (!key.value) verdict.reason = "unkeyable";
276
+ else if (!base) verdict.reason = "new";
277
+ else if (base.value === key.value) verdict.status = "skip";
278
+ else if (base.renderer !== key.renderer) verdict.reason = "renderer";
279
+ else if (base.context !== key.context) verdict.reason = "context";
280
+ else {
281
+ verdict.reason = "page";
282
+ verdict.changed = Object.keys(parts).filter((k) => base.parts?.[k] !== parts[k]);
283
+ }
284
+ verdicts.push(verdict);
285
+ }
286
+ }
287
+ await db.save(verdicts);
288
+ return verdicts;
289
+ }
290
+ async function accept(config, cause, view) {
291
+ const db = open(config);
292
+ const locks = await db.read();
293
+ const accepted = [];
294
+ for (const v of await db.last()) {
295
+ if (v.status === "skip" || view && v.view !== view) continue;
296
+ accepted.push(locks[`${v.renderer}:${v.view}`] = {
297
+ view: v.view,
298
+ renderer: v.renderer,
299
+ key: v.key,
300
+ acceptedAt: (/* @__PURE__ */ new Date()).toISOString(),
301
+ cause
302
+ });
303
+ }
304
+ await db.write(locks);
305
+ return accepted;
306
+ }
307
+ async function explain(config, view) {
308
+ const db = open(config);
309
+ const [locks, last] = [await db.read(), await db.last()];
310
+ return last.filter((v) => v.view === view).map((v) => ({
311
+ verdict: v,
312
+ lock: locks[`${v.renderer}:${v.view}`]
313
+ }));
314
+ }
315
+ // src/cli.ts
316
+ const print = (v) => console.log(JSON.stringify(v, null, 2));
317
+ runMain(defineCommand({
318
+ meta: {
319
+ name,
320
+ version,
321
+ description
322
+ },
323
+ subCommands: {
324
+ init: defineCommand({
325
+ meta: { description: "Scaffold inkhash.config.ts and ignore .inkhash" },
326
+ async run() {
327
+ print(await init());
328
+ }
329
+ }),
330
+ run: defineCommand({
331
+ meta: { description: "Hash every view and list the ones that need a capture" },
332
+ async run() {
333
+ print(await run(await load()));
334
+ }
335
+ }),
336
+ accept: defineCommand({
337
+ meta: { description: "Record the last run in the lock file" },
338
+ args: {
339
+ view: {
340
+ type: "positional",
341
+ required: false
342
+ },
343
+ cause: {
344
+ type: "string",
345
+ required: true
346
+ }
347
+ },
348
+ async run({ args }) {
349
+ print(await accept(await load(), args.cause, args.view));
350
+ }
351
+ }),
352
+ explain: defineCommand({
353
+ meta: { description: "Show which key layer and page part changed" },
354
+ args: { view: {
355
+ type: "positional",
356
+ required: true
357
+ } },
358
+ async run({ args }) {
359
+ print(await explain(await load(), args.view));
360
+ }
361
+ })
362
+ }
363
+ }));
364
+ export {};
@@ -0,0 +1,35 @@
1
+ import { loadConfig } from "c12";
2
+ // src/config.ts
3
+ const defineConfig = (config) => config;
4
+ const defaults = {
5
+ renderers: [],
6
+ registry: "",
7
+ views: [],
8
+ css: [],
9
+ template: "<!doctype html><html><head></head><body><div id=\"root\">{view}</div></body></html>",
10
+ public: "public",
11
+ device: {
12
+ viewport: {
13
+ width: 1280,
14
+ height: 720
15
+ },
16
+ dpr: 1
17
+ },
18
+ media: {
19
+ colorScheme: "light",
20
+ reducedMotion: true,
21
+ locale: "en-US"
22
+ },
23
+ dir: ".inkhash",
24
+ lock: "inkhash.lock"
25
+ };
26
+ async function load(overrides = {}, cwd = process.cwd()) {
27
+ const { config } = await loadConfig({
28
+ name: "inkhash",
29
+ cwd,
30
+ defaults,
31
+ overrides
32
+ });
33
+ return config;
34
+ }
35
+ export { load as n, defineConfig as t };
@@ -0,0 +1,77 @@
1
+ interface View {
2
+ id: string;
3
+ import: string;
4
+ export?: string;
5
+ props?: Record<string, unknown>;
6
+ }
7
+ interface Config {
8
+ renderers: string[];
9
+ registry: string;
10
+ views: View[];
11
+ css: string[];
12
+ template: string;
13
+ public: string;
14
+ device: {
15
+ viewport: {
16
+ width: number;
17
+ height: number;
18
+ };
19
+ dpr: number;
20
+ safeArea?: {
21
+ top: number;
22
+ bottom: number;
23
+ };
24
+ };
25
+ media: {
26
+ colorScheme: 'light' | 'dark';
27
+ reducedMotion: boolean;
28
+ locale: string;
29
+ };
30
+ dir: string;
31
+ lock: string;
32
+ }
33
+ type UserConfig = Partial<Omit<Config, 'device' | 'media'>> & {
34
+ device?: Partial<Config['device']>;
35
+ media?: Partial<Config['media']>;
36
+ };
37
+ export declare const defineConfig: (config: UserConfig) => UserConfig;
38
+ interface Page {
39
+ markup: string;
40
+ css: string;
41
+ assets: string;
42
+ }
43
+ interface Key {
44
+ renderer: string;
45
+ context: string;
46
+ page: string | null;
47
+ parts: Page | null;
48
+ value: string | null;
49
+ }
50
+ interface Verdict {
51
+ view: string;
52
+ renderer: string;
53
+ status: 'skip' | 'capture';
54
+ reason?: 'new' | 'renderer' | 'context' | 'page' | 'unkeyable';
55
+ changed?: (keyof Page)[];
56
+ key: Key;
57
+ }
58
+ interface Lock {
59
+ view: string;
60
+ renderer: string;
61
+ key: Key;
62
+ acceptedAt: string;
63
+ cause: string;
64
+ }
65
+ interface Renderer {
66
+ id: string;
67
+ digest: string;
68
+ engine: 'chromium' | 'webkit';
69
+ arch: 'x86_64' | 'arm64';
70
+ raster: 'software';
71
+ fonts: string[];
72
+ webview?: {
73
+ textZoom: number;
74
+ algorithmicDarkening: boolean;
75
+ };
76
+ }
77
+ export type { Config, Key, Lock, Page, Renderer, UserConfig, Verdict, View };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export { t as defineConfig } from "./config-CvO48-dR.mjs";
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "inkhash",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.2",
4
+ "description": "Visual regression keys from React views and browser profiles, without running a browser",
5
+ "keywords": [
6
+ "css",
7
+ "react",
8
+ "static-analysis",
9
+ "visual-regression",
10
+ "vrt"
11
+ ],
12
+ "homepage": "https://github.com/NaamuKim/inkhash#readme",
13
+ "bugs": "https://github.com/NaamuKim/inkhash/issues",
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/NaamuKim/inkhash.git"
18
+ },
19
+ "bin": {
20
+ "inkhash": "./dist/cli.mjs"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "type": "module",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.mts",
29
+ "default": "./dist/index.mjs"
30
+ }
31
+ },
32
+ "dependencies": {
33
+ "c12": "4.0.0-rc.4",
34
+ "citty": "^0.2.2",
35
+ "css-select": "^7.0.0",
36
+ "domhandler": "^6.0.1",
37
+ "htmlparser2": "^12.0.0",
38
+ "oxc-transform": "^0.161.0",
39
+ "postcss": "^8.5.34"
40
+ },
41
+ "devDependencies": {
42
+ "@changesets/cli": "^3.1.0",
43
+ "@types/node": "^26.6.11",
44
+ "@types/react": "^19.3.3",
45
+ "@types/react-dom": "^19.3.0",
46
+ "fs-fixture": "^2.16.2",
47
+ "odiff-bin": "^4.5.0",
48
+ "oxfmt": "^0.81.0",
49
+ "playwright-core": "^1.65.2",
50
+ "react": "^19.3.1",
51
+ "react-dom": "^19.3.1",
52
+ "tsdown": "^0.23.8",
53
+ "typescript": "^7.0.2"
54
+ },
55
+ "peerDependencies": {
56
+ "react": ">=18",
57
+ "react-dom": ">=18"
58
+ },
59
+ "engines": {
60
+ "node": ">=22.15"
61
+ },
62
+ "scripts": {
63
+ "build": "tsdown",
64
+ "typecheck": "tsc --noEmit",
65
+ "format": "oxfmt",
66
+ "format:check": "oxfmt --check",
67
+ "test": "tsdown && node --test 'test/*.test.ts'",
68
+ "bench": "node bench/bench.ts",
69
+ "changeset": "changeset",
70
+ "release": "changeset publish"
71
+ }
6
72
  }