Landed
Start oscabriel/burrow
Landed as 6182530
authored by oscabriel · committed by the platform · the first commit · Browse files · 50 files·+1435 added−0 removed
50 files changed+1435 added−0 removed
added:.myr/project.ts+32 added
1234567891011121314151617181920212223242526272829303132import { check, kinds, project, territory } from "@myr/cli/rules";
// The run block `myr init` found in this repo's own files, each command with// where it was found; deciders, kinds and the ratchet added since.export default project({ deciders: { "**": ["okafor", "lin-h"] }, kinds: [kinds.fix, kinds.lintToZero, kinds.ratchetDown, kinds.migrate], modules: territory.fromWorkspaces(), ratchets: { // Module-level bindings in a package's src/, which our own lint rule // warns about: six when the rule landed, one per package. The count may // only fall; at zero the rule becomes an error. "no-module-level-mutable-state": check.ratchet.count( "bun run lint --format json", { rule: "burrow/no-module-level-mutable-state" } ), }, run: { checks: { // checks.lint from lefthook.yml lint: "bun run lint", // checks.types from lefthook.yml types: "bun run typecheck", // checks.unit from lefthook.yml unit: "bun test", }, // setup inferred from bun.lock setup: "bun install --frozen-lockfile", // test from lefthook.yml test: "bun test {path}", },});added:.myr/vouched.td+11 added
1+# Who may claim burrow's asks: one handle per line, the reason after a space.2+# A leading "-" denounces.3+okafor maintainer4+lin-h maintainer5+wren6+tamsin7+ivo8+marisol9+dagny10+pell11+-quickclaim Claimed asks and never pushedadded:packages/auth/src/index.ts+2 added
12export { currentSession, isMember, signIn } from "./session.ts";export type { Session } from "./session.ts";added:packages/auth/src/session.ts+41 added
1234567891011121314151617181920212223242526272829303132333435363738394041import { API, legacyFetch } from "@burrow/kit";import type { Transport } from "@burrow/kit";
/** Who a session belongs to, and when it ends. */export interface Session { readonly expiresAt: string; readonly user: string;}
// The session signed in last.let current: Session | undefined;
/** Exchanges a sign-in token for a session, and keeps it as the current one. */export const signIn = async ( token: string, transport?: Transport): Promise<Session> => { const session: Session = JSON.parse( await legacyFetch(`${API}/sessions/${encodeURIComponent(token)}`, transport) );
current = session;
return session;};
/** The session signed in last, if any. */export const currentSession = (): Session | undefined => current;
/** Whether a session's user may act for a team. */export const isMember = async ( session: Session, team: string, transport?: Transport): Promise<boolean> => { const members: readonly string[] = JSON.parse( await legacyFetch(`${API}/teams/${encodeURIComponent(team)}`, transport) );
return members.includes(session.user);};added:packages/auth/test/session.test.ts+25 added
12345678910111213141516171819202122232425import assert from "node:assert/strict";import { test } from "node:test";
import { API } from "@burrow/kit";import { fakeTransport } from "@burrow/kit/testing";
import { currentSession, isMember, signIn } from "../src/index.ts";
const session = { expiresAt: "2031-01-01T00:00:00Z", user: "wren" };
const { transport } = fakeTransport( new Map([ [`${API}/sessions/t-1`, JSON.stringify(session)], [`${API}/teams/ops`, JSON.stringify(["wren", "tamsin"])], ]));
test("signing in keeps the session as the current one", async () => { assert.deepEqual(await signIn("t-1", transport), session); assert.deepEqual(currentSession(), session);});
test("a session's user is a member of the teams that list them", async () => { assert.equal(await isMember(session, "ops", transport), true);});added:packages/auth/package.json+12 added
123456789101112{ "name": "@burrow/auth", "version": "0.9.0", "private": true, "type": "module", "exports": { ".": "./src/index.ts" }, "dependencies": { "@burrow/kit": "workspace:*" }}added:packages/billing/src/index.ts+3 added
123export { invoiceLines, invoiceTotal } from "./invoice.ts";export type { InvoiceLine } from "./invoice.ts";export { toUsdCents } from "./rates.ts";added:packages/billing/src/invoice.ts+24 added
123456789101112131415161718192021222324import { API, legacyFetch } from "@burrow/kit";import type { Transport } from "@burrow/kit";
/** One line of an invoice. */export interface InvoiceLine { readonly cents: number; readonly item: string;}
/** An invoice's lines, as billing stored them. */export const invoiceLines = async ( invoice: string, transport?: Transport): Promise<readonly InvoiceLine[]> => JSON.parse( await legacyFetch( `${API}/invoices/${encodeURIComponent(invoice)}`, transport ) );
/** An invoice's total, in cents. */export const invoiceTotal = (lines: readonly InvoiceLine[]) => lines.reduce((sum, line) => sum + line.cents, 0);added:packages/billing/src/rates.ts+29 added
1+import { API, legacyFetch } from "@burrow/kit";2+import type { Transport } from "@burrow/kit";3+4+// US cents per unit of each currency, fetched on first use and kept.5+let rates: ReadonlyMap<string, number> | undefined;6+7+const ratesFrom = async (transport?: Transport) => {8+ rates ??= new Map(9+ Object.entries(JSON.parse(await legacyFetch(`${API}/rates`, transport)))10+ );11+12+ return rates;13+};14+15+/** An amount in `currency`, in US cents, rounded to the cent. */16+export const toUsdCents = async (17+ amount: number,18+ currency: string,19+ transport?: Transport20+): Promise<number> => {21+ const table = await ratesFrom(transport);22+ const rate = table.get(currency);23+24+ if (rate === undefined) {25+ throw new Error(`no rate for ${currency}`);26+ }27+28+ return Math.round(amount * rate);29+};added:packages/billing/test/billing.test.ts+30 added
1+import assert from "node:assert/strict";2+import { test } from "node:test";3+4+import { API } from "@burrow/kit";5+import { fakeTransport } from "@burrow/kit/testing";6+7+import { invoiceLines, invoiceTotal, toUsdCents } from "../src/index.ts";8+9+const { asked, transport } = fakeTransport(10+ new Map([11+ [`${API}/rates`, JSON.stringify({ EUR: 108, USD: 100 })],12+ [13+ `${API}/invoices/inv-7`,14+ JSON.stringify([15+ { cents: 1200, item: "seats" },16+ { cents: 350, item: "storage" },17+ ]),18+ ],19+ ])20+);21+22+test("converts to US cents with rates fetched once", async () => {23+ assert.equal(await toUsdCents(10, "EUR", transport), 1080);24+ assert.equal(await toUsdCents(10, "USD", transport), 1000);25+ assert.equal(asked.filter((url) => url === `${API}/rates`).length, 1);26+});27+28+test("totals an invoice's lines", async () => {29+ assert.equal(invoiceTotal(await invoiceLines("inv-7", transport)), 1550);30+});added:packages/billing/package.json+12 added
1+{2+ "name": "@burrow/billing",3+ "version": "0.9.0",4+ "private": true,5+ "type": "module",6+ "exports": {7+ ".": "./src/index.ts"8+ },9+ "dependencies": {10+ "@burrow/kit": "workspace:*"11+ }12+}added:packages/catalog/src/client.ts+39 added
1+import { API, legacyFetch } from "@burrow/kit";2+import type { Transport } from "@burrow/kit";3+4+/** A product as the catalog lists it. */5+export interface Product {6+ readonly id: string;7+ readonly name: string;8+ readonly priceCents: number;9+}10+11+/** Reads the catalog. */12+export interface CatalogClient {13+ readonly category: (slug: string) => Promise<readonly Product[]>;14+ readonly product: (id: string) => Promise<Product>;15+}16+17+const clientOver = (transport?: Transport): CatalogClient => ({18+ category: async (slug) =>19+ JSON.parse(20+ await legacyFetch(21+ `${API}/categories/${encodeURIComponent(slug)}`,22+ transport23+ )24+ ),25+ product: async (id) =>26+ JSON.parse(27+ await legacyFetch(`${API}/products/${encodeURIComponent(id)}`, transport)28+ ),29+});30+31+// Made on first use.32+let client: CatalogClient | undefined;33+34+/** The catalog client, made on first use over the transport it was first given. */35+export const catalog = (transport?: Transport): CatalogClient => {36+ client ??= clientOver(transport);37+38+ return client;39+};added:packages/catalog/src/index.ts+2 added
1+export { catalog } from "./client.ts";2+export type { CatalogClient, Product } from "./client.ts";added:packages/catalog/test/client.test.ts+23 added
1+import assert from "node:assert/strict";2+import { test } from "node:test";3+4+import { API } from "@burrow/kit";5+import { fakeTransport } from "@burrow/kit/testing";6+7+import { catalog } from "../src/index.ts";8+9+const lamp = { id: "p-1", name: "Desk lamp", priceCents: 4500 };10+11+const { transport } = fakeTransport(12+ new Map([13+ [`${API}/products/p-1`, JSON.stringify(lamp)],14+ [`${API}/categories/lighting`, JSON.stringify([lamp])],15+ ])16+);17+18+test("reads a product and a category", async () => {19+ const client = catalog(transport);20+21+ assert.deepEqual(await client.product("p-1"), lamp);22+ assert.deepEqual(await client.category("lighting"), [lamp]);23+});added:packages/catalog/package.json+12 added
1+{2+ "name": "@burrow/catalog",3+ "version": "0.9.0",4+ "private": true,5+ "type": "module",6+ "exports": {7+ ".": "./src/index.ts"8+ },9+ "dependencies": {10+ "@burrow/kit": "workspace:*"11+ }12+}added:packages/kit/src/health.ts+17 added
1+import { legacyFetch } from "./legacy.ts";2+import { API } from "./transport.ts";3+import type { Transport } from "./transport.ts";4+5+/** Whether the named service answers its health check. */6+export const isHealthy = async (7+ service: string,8+ transport?: Transport9+): Promise<boolean> => {10+ try {11+ await legacyFetch(`${API}/${service}/health`, transport);12+13+ return true;14+ } catch {15+ return false;16+ }17+};added:packages/kit/src/http.ts+25 added
1+import { fetchTransport, isSuccess } from "./transport.ts";2+import type { Transport } from "./transport.ts";3+4+/** A GET's outcome: the body on a success, the status otherwise. */5+export type Got =6+ | { readonly ok: true; readonly text: string }7+ | { readonly ok: false; readonly status: number };8+9+/**10+ * The HTTP helpers new code uses. A failed request is a value the caller11+ * handles, never an exception.12+ */13+export const http = {14+ /** GETs `url`. */15+ get: async (16+ url: string,17+ transport: Transport = fetchTransport18+ ): Promise<Got> => {19+ const reply = await transport(url);20+21+ return isSuccess(reply.status)22+ ? { ok: true, text: reply.text }23+ : { ok: false, status: reply.status };24+ },25+};added:packages/kit/src/index.ts+6 added
1+export { isHealthy } from "./health.ts";2+export { http } from "./http.ts";3+export type { Got } from "./http.ts";4+export { legacyFetch, legacyRequestsSent } from "./legacy.ts";5+export { API, fetchTransport } from "./transport.ts";6+export type { Reply, Transport } from "./transport.ts";added:packages/kit/src/legacy.ts+28 added
1+import { fetchTransport, isSuccess } from "./transport.ts";2+import type { Transport } from "./transport.ts";3+4+// How many requests went out through `legacyFetch`, for the debug page.5+let requestsSent = 0;6+7+/** How many requests `legacyFetch` has sent since the process started. */8+export const legacyRequestsSent = () => requestsSent;9+10+/**11+ * The first HTTP helper, from before `http.get`: it returns the body as12+ * text and throws on any status that isn't a success. New code uses13+ * `http.get`.14+ */15+export const legacyFetch = async (16+ url: string,17+ transport: Transport = fetchTransport18+): Promise<string> => {19+ requestsSent += 1;20+21+ const reply = await transport(url);22+23+ if (!isSuccess(reply.status)) {24+ throw new Error(`GET ${url} answered ${reply.status}`);25+ }26+27+ return reply.text;28+};added:packages/kit/src/testing.ts+21 added
1+import type { Transport } from "./transport.ts";2+3+/**4+ * A transport that answers from a table of URL to body, and 404 for any URL5+ * not in it. It records each URL it was asked for.6+ */7+export const fakeTransport = (routes: ReadonlyMap<string, string>) => {8+ const asked: string[] = [];9+10+ const transport: Transport = (url) => {11+ asked.push(url);12+13+ const text = routes.get(url);14+15+ return Promise.resolve(16+ text === undefined ? { status: 404, text: "" } : { status: 200, text }17+ );18+ };19+20+ return { asked, transport };21+};added:packages/kit/src/transport.ts+21 added
1+/** What a request comes back as: its status, and its body as text. */2+export interface Reply {3+ readonly status: number;4+ readonly text: string;5+}6+7+/** Sends a GET to a URL. Services use `fetchTransport`; tests pass a fake. */8+export type Transport = (url: string) => Promise<Reply>;9+10+/** Where every burrow service's API lives. */11+export const API = "https://api.burrow.example";12+13+/** The transport over the runtime's own `fetch`. */14+export const fetchTransport: Transport = async (url) => {15+ const response = await fetch(url);16+17+ return { status: response.status, text: await response.text() };18+};19+20+/** Whether a status is a success (2xx). */21+export const isSuccess = (status: number) => status >= 200 && status < 300;added:packages/kit/test/http.test.ts+47 added
1+import assert from "node:assert/strict";2+import { describe, test } from "node:test";3+4+import { API, http, isHealthy, legacyFetch } from "../src/index.ts";5+import { fakeTransport } from "../src/testing.ts";6+7+const routes = new Map([8+ [`${API}/greeting`, "hello"],9+ [`${API}/search/health`, "ok"],10+]);11+12+describe("http.get", () => {13+ test("gives the body of a success", async () => {14+ const { transport } = fakeTransport(routes);15+16+ assert.deepEqual(await http.get(`${API}/greeting`, transport), {17+ ok: true,18+ text: "hello",19+ });20+ });21+22+ test("gives the status of a failure, without throwing", async () => {23+ const { transport } = fakeTransport(routes);24+25+ assert.deepEqual(await http.get(`${API}/missing`, transport), {26+ ok: false,27+ status: 404,28+ });29+ });30+});31+32+describe("legacyFetch", () => {33+ test("throws on a failure", async () => {34+ const { transport } = fakeTransport(routes);35+36+ await assert.rejects(legacyFetch(`${API}/missing`, transport), /404/u);37+ });38+});39+40+describe("isHealthy", () => {41+ test("is true for a service that answers, false for one that doesn't", async () => {42+ const { transport } = fakeTransport(routes);43+44+ assert.equal(await isHealthy("search", transport), true);45+ assert.equal(await isHealthy("billing", transport), false);46+ });47+});added:packages/kit/package.json+10 added
1+{2+ "name": "@burrow/kit",3+ "version": "0.9.0",4+ "private": true,5+ "type": "module",6+ "exports": {7+ ".": "./src/index.ts",8+ "./testing": "./src/testing.ts"9+ }10+}added:packages/notify/src/index.ts+1 added
1+export { render, renderedCount } from "./templates.ts";added:packages/notify/src/templates.ts+29 added
1+import { API, legacyFetch } from "@burrow/kit";2+import type { Transport } from "@burrow/kit";3+4+// Messages rendered since the process started, for the metrics endpoint.5+let rendered = 0;6+7+const SLOT = /\{\{(?<name>\w+)\}\}/gu;8+9+/** Renders the named message template, filling each `{{slot}}` from `values`. */10+export const render = async (11+ template: string,12+ values: ReadonlyMap<string, string>,13+ transport?: Transport14+): Promise<string> => {15+ const text = await legacyFetch(16+ `${API}/templates/${encodeURIComponent(template)}`,17+ transport18+ );19+20+ rendered += 1;21+22+ return text.replaceAll(23+ SLOT,24+ (slot: string, name: string) => values.get(name) ?? slot25+ );26+};27+28+/** How many messages have been rendered. */29+export const renderedCount = () => rendered;added:packages/notify/test/templates.test.ts+20 added
1+import assert from "node:assert/strict";2+import { test } from "node:test";3+4+import { API } from "@burrow/kit";5+import { fakeTransport } from "@burrow/kit/testing";6+7+import { render } from "../src/index.ts";8+9+const { transport } = fakeTransport(10+ new Map([11+ [`${API}/templates/welcome`, "Hello {{name}}, welcome to {{team}}."],12+ ])13+);14+15+test("fills a template's slots, and leaves unknown ones as they are", async () => {16+ assert.equal(17+ await render("welcome", new Map([["name", "Wren"]]), transport),18+ "Hello Wren, welcome to {{team}}."19+ );20+});added:packages/notify/package.json+12 added
1+{2+ "name": "@burrow/notify",3+ "version": "0.9.0",4+ "private": true,5+ "type": "module",6+ "exports": {7+ ".": "./src/index.ts"8+ },9+ "dependencies": {10+ "@burrow/kit": "workspace:*"11+ }12+}added:packages/search/src/index.ts+2 added
1+export { search, searchAgain } from "./query.ts";2+export type { Hit } from "./query.ts";added:packages/search/src/query.ts+29 added
1+import { API, legacyFetch } from "@burrow/kit";2+import type { Transport } from "@burrow/kit";3+4+/** A search result: what matched, and how well. */5+export interface Hit {6+ readonly id: string;7+ readonly score: number;8+}9+10+// The query run last, for "search again".11+let lastQuery = "";12+13+/** Searches the index; the best hit comes first. */14+export const search = async (15+ query: string,16+ transport?: Transport17+): Promise<readonly Hit[]> => {18+ lastQuery = query;19+20+ const hits: readonly Hit[] = JSON.parse(21+ await legacyFetch(`${API}/search?q=${encodeURIComponent(query)}`, transport)22+ );23+24+ return hits.toSorted((one, other) => other.score - one.score);25+};26+27+/** Runs the last query again. */28+export const searchAgain = (transport?: Transport) =>29+ search(lastQuery, transport);added:packages/search/test/query.test.ts+34 added
1+import assert from "node:assert/strict";2+import { test } from "node:test";3+4+import { API } from "@burrow/kit";5+import { fakeTransport } from "@burrow/kit/testing";6+7+import { search, searchAgain } from "../src/index.ts";8+9+const { asked, transport } = fakeTransport(10+ new Map([11+ [12+ `${API}/search?q=desk%20lamp`,13+ JSON.stringify([14+ { id: "p-2", score: 0.4 },15+ { id: "p-1", score: 0.9 },16+ ]),17+ ],18+ ])19+);20+21+test("puts the best hit first, and runs the last query again", async () => {22+ const hits = await search("desk lamp", transport);23+ const again = await searchAgain(transport);24+25+ assert.deepEqual(26+ hits.map(({ id }) => id),27+ ["p-1", "p-2"]28+ );29+ assert.deepEqual(again, hits);30+ assert.deepEqual(asked, [31+ `${API}/search?q=desk%20lamp`,32+ `${API}/search?q=desk%20lamp`,33+ ]);34+});added:packages/search/package.json+12 added
1+{2+ "name": "@burrow/search",3+ "version": "0.9.0",4+ "private": true,5+ "type": "module",6+ "exports": {7+ ".": "./src/index.ts"8+ },9+ "dependencies": {10+ "@burrow/kit": "workspace:*"11+ }12+}added:scripts/count-callers.ts+61 added
1+/**2+ * Counts the calls to a function in each workspace package's `src/`:3+ *4+ * bun scripts/count-callers.ts legacyFetch a table5+ * bun scripts/count-callers.ts legacyFetch --json {"byModule": {"@burrow/kit": n, …}, "total": n}6+ *7+ * A plain text scan: a call is the name followed by `(`, so the function's8+ * own definition, an import or a property of another name (`x.legacyFetch`)9+ * is not one. Dotted names work too: `http.get`.10+ */11+import { readdirSync, readFileSync } from "node:fs";12+import path from "node:path";13+14+interface Manifest {15+ readonly name: string;16+}17+18+const [symbol, ...flags] = process.argv.slice(2);19+20+if (symbol === undefined || symbol.startsWith("-")) {21+ throw new Error("usage: bun scripts/count-callers.ts <symbol> [--json]");22+}23+24+const escaped = symbol.replaceAll(/[$()*+.?[\\\]^{|}]/gu, String.raw`\$&`);25+const call = new RegExp(String.raw`(?<![\w.$])${escaped}\s*\(`, "gu");26+27+const callsIn = (dir: string) =>28+ readdirSync(dir, { encoding: "utf-8", recursive: true })29+ .filter((file) => /\.tsx?$/u.test(file))30+ .map(31+ (file) =>32+ readFileSync(path.join(dir, file), "utf-8").match(call)?.length ?? 033+ )34+ .reduce((sum, count) => sum + count, 0);35+36+const byModule = Object.fromEntries(37+ readdirSync("packages", { encoding: "utf-8" })38+ .toSorted()39+ .map((dir) => {40+ const manifest: Manifest = JSON.parse(41+ readFileSync(path.join("packages", dir, "package.json"), "utf-8")42+ );43+44+ return [45+ manifest.name,46+ callsIn(path.join("packages", dir, "src")),47+ ] as const;48+ })49+);50+51+const total = Object.values(byModule).reduce((sum, count) => sum + count, 0);52+53+if (flags.includes("--json")) {54+ console.log(JSON.stringify({ byModule, total }));55+} else {56+ for (const [module, count] of Object.entries(byModule)) {57+ console.log(`${module.padEnd(20)} ${count}`);58+ }59+60+ console.log(`${"total".padEnd(20)} ${total}`);61+}added:scripts/debt.ts+50 added
1+/**2+ * burrow's escape count. Every directive that switches a check off (a lint3+ * disable, a TypeScript suppression) must say why after ` -- `, and their4+ * number may only fall: raising `debt.baseline.json` is a decision for a5+ * maintainer, made in review.6+ */7+import { readdirSync, readFileSync } from "node:fs";8+import path from "node:path";9+10+interface Baseline {11+ readonly escapes: number;12+}13+14+const ROOTS = ["packages", "scripts", "tools"];15+16+// A directive opens a comment line, or ends a line of code (the `-line`17+// forms).18+const ESCAPE =19+ /(?:\/\/|\/\*)\s*(?:(?:oxlint|eslint)-disable|@ts-(?:expect-error|ignore|nocheck)|biome-ignore)/u;20+21+const escapes = ROOTS.flatMap((root) =>22+ readdirSync(root, { encoding: "utf-8", recursive: true })23+ .filter((file) => /\.tsx?$/u.test(file) && !file.includes("node_modules"))24+ .flatMap((file) =>25+ readFileSync(path.join(root, file), "utf-8")26+ .split("\n")27+ .flatMap((text, index) =>28+ ESCAPE.test(text)29+ ? [{ at: `${path.join(root, file)}:${index + 1}`, text }]30+ : []31+ )32+ )33+);34+35+const baseline: Baseline = JSON.parse(36+ readFileSync("debt.baseline.json", "utf-8")37+);38+const unreasoned = escapes.filter(({ text }) => !/ -- \S/u.test(text));39+40+for (const { at, text } of unreasoned) {41+ console.error(42+ `${at}: an escape without a reason after " -- ": ${text.trim()}`43+ );44+}45+46+console.log(`debt: ${escapes.length} escapes (baseline ${baseline.escapes})`);47+48+if (unreasoned.length > 0 || escapes.length > baseline.escapes) {49+ process.exitCode = 1;50+}added:tools/oxlint/burrow/fixtures/bad.ts+16 added
1+// Each binding below is state at module scope: the rule reports all three.2+let requests = 0;3+4+var cache = new Map<string, string>();5+6+if (requests === 0) {7+ // A `var` in a block still hoists to the module.8+ var warmed = true;9+}10+11+export const count = () => {12+ requests += 1;13+ cache.set("last", String(requests));14+15+ return warmed;16+};added:tools/oxlint/burrow/fixtures/good.ts+20 added
1+// Nothing here is state at module scope: the rule reports none of it.2+declare let injected: string;3+4+const limit = 10;5+6+export const counter = () => {7+ let count = 0;8+9+ return () => {10+ count += 1;11+12+ return count <= limit ? injected : "";13+ };14+};15+16+export function hoisted() {17+ var local = limit;18+19+ return local;20+}added:tools/oxlint/burrow/rules/no-module-level-mutable-state.ts+98 added
1+// Ported from joelhooks/rat-stack@fba26d8 `scripts/oxlint-plugin-patterns.ts`2+// l.28–43 and l.621–677 (MIT, tools/oxlint/burrow/LICENSE-rat-stack.txt).3+// Changes are listed in tools/oxlint/burrow/UPSTREAM.md.4+import { defineRule } from "@oxlint/plugins";5+import type { ESTree } from "@oxlint/plugins";6+7+/**8+ * The file's path from its workspace on: `packages/<name>/src/…` or9+ * `apps/<name>/src/…`. Read from the path string alone, so a copy of that10+ * layout anywhere (a lint fixture, a temporary tree) counts the same. The path11+ * is made relative to oxlint's working directory first, so the folders above12+ * the one oxlint runs from never match.13+ */14+export const workspacePath = (filename: string, cwd: string) => {15+ const slashed = filename.replaceAll("\\", "/");16+ const root = `${cwd.replaceAll("\\", "/")}/`;17+18+ const relative = slashed.startsWith(root)19+ ? slashed.slice(root.length)20+ : slashed;21+22+ const match =23+ /(?:^|\/)(?<workspace>(?:apps|packages)\/[^/]+\/src\/.+)$/u.exec(relative);24+25+ return match?.groups?.workspace ?? relative;26+};27+28+/** Code that runs in a Worker isolate or a server process. */29+const isRuntimeSource = (path: string) =>30+ /^(?:apps|packages)\/[^/]+\/src\/./u.test(path);31+32+/** A `var` hoists to the nearest function, static block or namespace. */33+const isModuleScopedVar = (node: ESTree.Node) => {34+ let current = node.parent;35+36+ while (current !== null && current.type !== "Program") {37+ if (38+ current.type === "ArrowFunctionExpression" ||39+ current.type === "FunctionDeclaration" ||40+ current.type === "FunctionExpression" ||41+ current.type === "StaticBlock" ||42+ current.type === "TSDeclareFunction" ||43+ current.type === "TSModuleBlock"44+ ) {45+ return false;46+ }47+48+ current = current.parent;49+ }50+51+ return current?.type === "Program";52+};53+54+/**55+ * Refuses a `let` or `var` at module scope in `apps/<name>/src` and56+ * `packages/<name>/src`: a Worker isolate keeps its module state across57+ * requests.58+ */59+export const noModuleLevelMutableState = defineRule({60+ create(context) {61+ if (!isRuntimeSource(workspacePath(context.filename, context.cwd))) {62+ return {};63+ }64+65+ return {66+ VariableDeclaration(node) {67+ // `declare let` names a binding something else owns; it holds nothing.68+ if (69+ (node.kind !== "let" && node.kind !== "var") ||70+ node.declare === true71+ ) {72+ return;73+ }74+75+ const scope = context.sourceCode.getScope(node);76+77+ const moduleScoped =78+ node.kind === "let"79+ ? scope.type === "module" || scope.type === "global"80+ : isModuleScopedVar(node);81+82+ if (moduleScoped) {83+ context.report({ messageId: "moduleState", node });84+ }85+ },86+ };87+ },88+ meta: {89+ docs: {90+ description: "Keep state out of module-level let and var bindings.",91+ },92+ messages: {93+ moduleState:94+ "Module-level let and var are shared by every request a Worker isolate or server process handles. Keep state in a Ref inside a Layer, a Durable Object, or the database.",95+ },96+ type: "problem",97+ },98+});added:tools/oxlint/burrow/index.ts+14 added
1+/**2+ * burrow's own lint rules, registered as the `burrow` plugin in3+ * `oxlint.config.ts`.4+ */5+import { definePlugin } from "@oxlint/plugins";6+7+import { noModuleLevelMutableState } from "./rules/no-module-level-mutable-state.ts";8+9+export default definePlugin({10+ meta: { name: "burrow" },11+ rules: {12+ "no-module-level-mutable-state": noModuleLevelMutableState,13+ },14+});added:tools/oxlint/burrow/LICENSE-rat-stack.txt+21 added
1+MIT License2+3+Copyright (c) 2026 Joel Hooks4+5+Permission is hereby granted, free of charge, to any person obtaining a copy6+of this software and associated documentation files (the "Software"), to deal7+in the Software without restriction, including without limitation the rights8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9+copies of the Software, and to permit persons to whom the Software is10+furnished to do so, subject to the following conditions:11+12+The above copyright notice and this permission notice shall be included in all13+copies or substantial portions of the Software.14+15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19+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 THE21+SOFTWARE.added:tools/oxlint/burrow/rule.test.ts+55 added
1+/**2+ * The rule's own fixture test (`bun run lint:rules`): oxlint's `RuleTester`3+ * runs it over `fixtures/`, as code in a package's `src/` and outside it.4+ */5+import { readFileSync } from "node:fs";6+import { describe, it } from "node:test";7+8+import { RuleTester } from "oxlint/plugins-dev";9+10+import { noModuleLevelMutableState } from "./rules/no-module-level-mutable-state.ts";11+12+RuleTester.describe = describe;13+RuleTester.it = it;14+15+const fixture = (name: string) =>16+ readFileSync(new URL(`fixtures/${name}`, import.meta.url), "utf-8");17+18+const bad = fixture("bad.ts");19+const good = fixture("good.ts");20+21+new RuleTester().run(22+ "no-module-level-mutable-state",23+ noModuleLevelMutableState,24+ {25+ invalid: [26+ {27+ code: bad,28+ errors: [29+ { line: 2, messageId: "moduleState" },30+ { line: 4, messageId: "moduleState" },31+ { line: 8, messageId: "moduleState" },32+ ],33+ filename: "packages/kit/src/bad.ts",34+ name: "module-level let and var in a package's src/",35+ },36+ ],37+ valid: [38+ {39+ code: good,40+ filename: "packages/kit/src/good.ts",41+ name: "const, an ambient let, and bindings inside functions",42+ },43+ {44+ code: bad,45+ filename: "packages/kit/test/bad.test.ts",46+ name: "a test is not runtime source",47+ },48+ {49+ code: bad,50+ filename: "scripts/bad.ts",51+ name: "a script outside the packages is not runtime source",52+ },53+ ],54+ }55+);added:tools/oxlint/burrow/UPSTREAM.md+14 added
1+# Where burrow's lint rule comes from2+3+`rules/no-module-level-mutable-state.ts` is a copy of a rule the repository that holds this example once carried (`tools/oxlint/fence/rules/no-module-level-mutable-state.ts`, removed there on 2026-10-07), which ported it from [joelhooks/rat-stack](https://github.com/joelhooks/rat-stack) `scripts/oxlint-plugin-patterns.ts` (l.28–43, `workspacePath` and `isRuntimeSource`; l.621–677, `isModuleScopedVar` and the rule) at `fba26d8`. MIT; the licence is `LICENSE-rat-stack.txt` beside this file. The file keeps its header naming the source. It is ours to change, and upstream is never synced in.4+5+## Changes from the copy6+7+- The header points at this folder's licence and this file, not the source repository's.8+- The rule is registered in the `burrow` plugin (`index.ts`), not `fence`, and `oxlint.config.ts` sets it to `warn` until the last module-level binding is gone.9+10+Everything else is as copied, including the source repository's own changes from Rat Stack: `workspacePath` reads the path string alone, stripping oxlint's working directory and finding the whole `(apps|packages)/<name>/src/` shape anywhere in what is left (so `packages/<name>/src/` here counts, and folders above the checkout don't); upstream's `.svelte` exclusion is dropped; a `declare let` or `declare var` is skipped. The `let` check by scope, `isModuleScopedVar`, the `moduleState` message and the description are upstream's.11+12+## Tests13+14+`rule.test.ts` runs oxlint's `RuleTester` (from `oxlint/plugins-dev`) over `fixtures/bad.ts` and `fixtures/good.ts`, each named as a file in a package's `src/`, and over the bad fixture named as a test and as a script, where the rule stays silent. The RuleTester needs Node, so `bun run lint:rules` runs it with `node --test`. The lint config ignores `fixtures/`, so each fixture keeps the faults its test points at.added:.gitignore+1 added
1+node_modules/added:bun.lock+322 added
1+{2+ "lockfileVersion": 2,3+ "configVersion": 1,4+ "workspaces": {5+ "": {6+ "name": "burrow",7+ "devDependencies": {8+ "@oxlint/plugins": "1.87.0",9+ "@types/node": "26.6.4",10+ "oxlint": "1.87.0",11+ "typescript": "7.0.2",12+ "ultracite": "7.12.4",13+ },14+ },15+ "packages/auth": {16+ "name": "@burrow/auth",17+ "version": "0.9.0",18+ "dependencies": {19+ "@burrow/kit": "workspace:*",20+ },21+ },22+ "packages/billing": {23+ "name": "@burrow/billing",24+ "version": "0.9.0",25+ "dependencies": {26+ "@burrow/kit": "workspace:*",27+ },28+ },29+ "packages/catalog": {30+ "name": "@burrow/catalog",31+ "version": "0.9.0",32+ "dependencies": {33+ "@burrow/kit": "workspace:*",34+ },35+ },36+ "packages/kit": {37+ "name": "@burrow/kit",38+ "version": "0.9.0",39+ },40+ "packages/notify": {41+ "name": "@burrow/notify",42+ "version": "0.9.0",43+ "dependencies": {44+ "@burrow/kit": "workspace:*",45+ },46+ },47+ "packages/search": {48+ "name": "@burrow/search",49+ "version": "0.9.0",50+ "dependencies": {51+ "@burrow/kit": "workspace:*",52+ },53+ },54+ },55+ "packages": {56+ "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.7", "", {}, "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw=="],57+58+ "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="],59+60+ "@babel/parser": ["@babel/parser@7.29.9", "", { "dependencies": { "@babel/types": "^7.29.8" }, "bin": "./bin/babel-parser.js" }, "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA=="],61+62+ "@babel/types": ["@babel/types@7.29.8", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg=="],63+64+ "@burrow/auth": ["@burrow/auth@workspace:packages/auth"],65+66+ "@burrow/billing": ["@burrow/billing@workspace:packages/billing"],67+68+ "@burrow/catalog": ["@burrow/catalog@workspace:packages/catalog"],69+70+ "@burrow/kit": ["@burrow/kit@workspace:packages/kit"],71+72+ "@burrow/notify": ["@burrow/notify@workspace:packages/notify"],73+74+ "@burrow/search": ["@burrow/search@workspace:packages/search"],75+76+ "@clack/core": ["@clack/core@1.5.1", "", { "dependencies": { "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ=="],77+78+ "@clack/prompts": ["@clack/prompts@1.8.1", "", { "dependencies": { "@clack/core": "1.5.1", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ=="],79+80+ "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],81+82+ "@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="],83+84+ "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],85+86+ "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.87.0", "", { "os": "android", "cpu": "arm" }, "sha512-22tVIHlB9898OYsBKmYB6He1MCSqdTmK1BVWuSNUTVrpS0KWNege+U9uEYqGJ+KatQag0r/oU44i3OOs46z7HQ=="],87+88+ "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.87.0", "", { "os": "android", "cpu": "arm64" }, "sha512-JfZQ3MWf74n8ov0DojZpkOduIubYJvZL5tbTMMhDutsal6u1xH1QuNpN+lK+EQwF8AeAfgwTR2fgh5U2br27XA=="],89+90+ "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.87.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rkx6Xvvw93z2GImVOyvbZwAZcoY0Z6MJW177XNsSB+i/CBsH7ANyelTp01VZyIkM3iSXtqKVb4+ptBgPHap5pQ=="],91+92+ "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.87.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-cw5nYw7L/pQ2SgGBgOcg/Qo89llQre3vIc/kuBLhSICzu1r5s8L76H3ug6AIFsD98WpROj8/z5JVzkf4daxHaQ=="],93+94+ "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.87.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-x/SuznE6loRZK9gz9AS4ZmzNzSu+5KdeoCS+sVHhnrE8HM6AD8UyTjwldQTTqlXGvkwHASgB0NiTNOc3o3PdAg=="],95+96+ "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.87.0", "", { "os": "linux", "cpu": "arm" }, "sha512-+JEDmCAXiiFmKhAjZhgAOwaHWY6WENOQ5QA+lFuY59tgsUCDOTRi46B+lENK6CWvtxsXpwkZXNOgpjAQcpIpnA=="],97+98+ "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.87.0", "", { "os": "linux", "cpu": "arm" }, "sha512-/uC9XqXLAC9AHFLNycwmSQEvKqGrOCgU+uXALI7gNW0DG81TJ/3T2eHnKdRvcb5R1gFEfjxDwI4e4zIa29rICQ=="],99+100+ "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.87.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-FTRYPsBy/M728vnUv7l+KAwSAa3Qi4BQbhVvy7NYuMTZ0sUa/OWsbMx79HVFw6u/5KWcaYayDsoOiv7xbevzDg=="],101+102+ "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.87.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-6sC+N7IY0h1egd8SrYUGNN7CUyKJZ4bIZakKa7V7hfinf4jfi8Kq4+klJvFp5DqXcwMn44I5MeBwmJluO1odFg=="],103+104+ "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.87.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-d5Mnn+ICbhoJPi37Ccjy+86T5qfH2+mSTrTMBXNPfB+wqSWOayBBLLIrCXdUy1YssluCVdGkl+DO9w5r5ODmUA=="],105+106+ "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.87.0", "", { "os": "linux", "cpu": "none" }, "sha512-sf5YWuUo1Dx9loqWCgF8P278MycfcD4JHjDC/LV5j11L3Lqa4PFiwCjD6B8kP4AjsgZZkLn3xbpJEtZBaccs4Q=="],107+108+ "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.87.0", "", { "os": "linux", "cpu": "none" }, "sha512-+aCraYbmK3uU3P0rFojjeaK9pGY6JvBDXh/0CM+gPyWKmNmXmnFe0qj4qj02U4ibFpbd9Pa9CmDvIdjJUd29rA=="],109+110+ "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.87.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-7rzbZQIljo6VLWVPqUyLa2P/WV3VFsJB4M52R4NCUJn1A50yjtUsHxiMHFL9opEKGFIiTbZ3VQzmtcJOPUq4NQ=="],111+112+ "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.87.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Dry46Fa+AXE/xt9J/YriujU1pU9mzfNWHGQwtOYibAFH8HLrKWCi93AhIGnuUMiwn2JbuBkRyz51f50Ly4r4ow=="],113+114+ "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.87.0", "", { "os": "linux", "cpu": "x64" }, "sha512-f/HMZez74gJvnRpGz+b5sdGyWrEgRLmFTXg9sNoqjPWogGxYHUhXKTKyMiYsu9rUGR2ciYqL3fk+Ua4JhMJbRA=="],115+116+ "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.87.0", "", { "os": "none", "cpu": "arm64" }, "sha512-lEC6ZfPZm/07JlB7FsOWX9o1RiHlXiBW594LSUGuXmekC8LZmvUPP9XzE2WZcNxJi5cHA/Fw56o02c3JxgMA5g=="],117+118+ "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.87.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-afBWKOD36dUiA9AenaiWpCg8xfyUVPYznyAAVXu413brK4RA5UI/Xoc4yfeGIT8G1a44MV+JR7hioryerBDzGQ=="],119+120+ "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.87.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-daptNsEOuru4/nJTxV4DBHNJ5GepzmaBVQf+jjgKQGi9NRlZKik+RFq4hUL7ewsF1pwjKM+SkYaMbF82UwFGnw=="],121+122+ "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.87.0", "", { "os": "win32", "cpu": "x64" }, "sha512-k+m/EShyXE29J/r1fjk0HlAzhN5JhIvj044oSJkXTEkCLrWZQgXb/3r4q5LTw/eaKW/4GuMXG2xmiJs3s5rPNw=="],123+124+ "@oxlint/plugins": ["@oxlint/plugins@1.87.0", "", {}, "sha512-OtSZ6NxNkS7bkVy7zk9zGnajz2hVIu0uRPP/dJvJesGRaXtimpA4lpxap7FaIJndG2UIoKhnBU4DxyDQIWv6yg=="],125+126+ "@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],127+128+ "@sindresorhus/merge-streams": ["@sindresorhus/merge-streams@4.0.0", "", {}, "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ=="],129+130+ "@types/node": ["@types/node@26.6.4", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg=="],131+132+ "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],133+134+ "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],135+136+ "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],137+138+ "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],139+140+ "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],141+142+ "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],143+144+ "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],145+146+ "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],147+148+ "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],149+150+ "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],151+152+ "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],153+154+ "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],155+156+ "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],157+158+ "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],159+160+ "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],161+162+ "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],163+164+ "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],165+166+ "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],167+168+ "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],169+170+ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],171+172+ "acorn": ["acorn@8.19.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw=="],173+174+ "ansi-escapes": ["ansi-escapes@7.3.0", "", { "dependencies": { "environment": "^1.0.0" } }, "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg=="],175+176+ "ansi-regex": ["ansi-regex@6.4.0", "", {}, "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw=="],177+178+ "ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],179+180+ "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],181+182+ "citty": ["citty@0.2.2", "", {}, "sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w=="],183+184+ "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="],185+186+ "cli-truncate": ["cli-truncate@6.1.1", "", { "dependencies": { "slice-ansi": "^9.0.0", "string-width": "^8.2.0" } }, "sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw=="],187+188+ "commander": ["commander@15.0.0", "", {}, "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg=="],189+190+ "confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="],191+192+ "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="],193+194+ "empathic": ["empathic@2.1.0", "", {}, "sha512-AnfC1ATldl49/cvZdLPDjBfrRNwbDO05aibiOtzQu3qtlbJtomNLhF30HEtn/7iBz50dlMECqATo3fG0LrdEgw=="],195+196+ "environment": ["environment@1.1.0", "", {}, "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="],197+198+ "execa": ["execa@10.1.0", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "figures": "^6.1.0", "get-stream": "^9.0.1", "human-signals": "^8.0.1", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", "pretty-ms": "^9.3.1", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", "which-command": "^0.1.0", "yoctocolors": "^2.2.0" } }, "sha512-5HT/600HqXEtmkb9mK/PkTWw+bQSCzPnWiZ4/87wD3Hi0wFzCapOuNT9p4M08PDd+KLHdHvFhKjOWmNx/npRNQ=="],199+200+ "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="],201+202+ "fast-string-truncated-width": ["fast-string-truncated-width@3.0.3", "", {}, "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g=="],203+204+ "fast-string-width": ["fast-string-width@3.0.2", "", { "dependencies": { "fast-string-truncated-width": "^3.0.2" } }, "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg=="],205+206+ "fast-wrap-ansi": ["fast-wrap-ansi@0.2.2", "", { "dependencies": { "fast-string-width": "^3.0.2" } }, "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q=="],207+208+ "fastq": ["fastq@1.20.3", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw=="],209+210+ "figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="],211+212+ "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],213+214+ "find-workspaces": ["find-workspaces@0.3.1", "", { "dependencies": { "fast-glob": "^3.3.2", "pkg-types": "^1.0.3", "yaml": "^2.3.4" } }, "sha512-UDkGILGJSA1LN5Aa7McxCid4sqW3/e+UYsVwyxki3dDT0F8+ym0rAfnCkEfkL0rO7M+8/mvkim4t/s3IPHmg+w=="],215+216+ "get-east-asian-width": ["get-east-asian-width@1.7.0", "", {}, "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q=="],217+218+ "get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="],219+220+ "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],221+222+ "human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="],223+224+ "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],225+226+ "is-fullwidth-code-point": ["is-fullwidth-code-point@5.1.0", "", { "dependencies": { "get-east-asian-width": "^1.3.1" } }, "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ=="],227+228+ "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],229+230+ "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="],231+232+ "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],233+234+ "is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="],235+236+ "is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],237+238+ "jsonc-parser": ["jsonc-parser@3.3.1", "", {}, "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ=="],239+240+ "log-update": ["log-update@8.0.0", "", { "dependencies": { "ansi-escapes": "^7.3.0", "cli-cursor": "^5.0.0", "slice-ansi": "^9.0.0", "string-width": "^8.2.0", "strip-ansi": "^7.2.0", "wrap-ansi": "^10.0.0" } }, "sha512-lddSgOt3bPASrylL54ZSpy8nBHns+vBVSoILlVOx+dei300pnLRN958rj/EdlVLKuWlSESU3qdnDZdAI7FXYGg=="],241+242+ "magicast": ["magicast@0.5.5", "", { "dependencies": { "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7", "source-map-js": "^1.2.1" } }, "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA=="],243+244+ "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],245+246+ "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],247+248+ "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],249+250+ "mlly": ["mlly@1.8.2", "", { "dependencies": { "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.3" } }, "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA=="],251+252+ "npm-run-path": ["npm-run-path@6.0.0", "", { "dependencies": { "path-key": "^4.0.0", "unicorn-magic": "^0.3.0" } }, "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA=="],253+254+ "nypm": ["nypm@0.6.10", "", { "dependencies": { "citty": "^0.2.2", "pathe": "^2.0.3", "tinyexec": "^1.3.1" }, "bin": { "nypm": "./dist/cli.mjs" } }, "sha512-W72Hrj1petq+b3Hk2aAC+9zswetlIFTnDW4s5djseZh2nYqBbyQLOtj472HwcbcWykPBUW1WpWpjOd4nK6gMRw=="],255+256+ "onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],257+258+ "oxlint": ["oxlint@1.87.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.87.0", "@oxlint/binding-android-arm64": "1.87.0", "@oxlint/binding-darwin-arm64": "1.87.0", "@oxlint/binding-darwin-x64": "1.87.0", "@oxlint/binding-freebsd-x64": "1.87.0", "@oxlint/binding-linux-arm-gnueabihf": "1.87.0", "@oxlint/binding-linux-arm-musleabihf": "1.87.0", "@oxlint/binding-linux-arm64-gnu": "1.87.0", "@oxlint/binding-linux-arm64-musl": "1.87.0", "@oxlint/binding-linux-ppc64-gnu": "1.87.0", "@oxlint/binding-linux-riscv64-gnu": "1.87.0", "@oxlint/binding-linux-riscv64-musl": "1.87.0", "@oxlint/binding-linux-s390x-gnu": "1.87.0", "@oxlint/binding-linux-x64-gnu": "1.87.0", "@oxlint/binding-linux-x64-musl": "1.87.0", "@oxlint/binding-openharmony-arm64": "1.87.0", "@oxlint/binding-win32-arm64-msvc": "1.87.0", "@oxlint/binding-win32-ia32-msvc": "1.87.0", "@oxlint/binding-win32-x64-msvc": "1.87.0" }, "peerDependencies": { "oxlint-tsgolint": ">=7.0.2003", "vite-plus": "*" }, "optionalPeers": ["oxlint-tsgolint", "vite-plus"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-drxVlaW7Oqq7wSy1CN25znRu00aRq8n57Q2wniJRxCmtYVz07ufCm7EVDPQFZURrTgQIjzKrVEHAD/HcvJXObg=="],259+260+ "parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="],261+262+ "path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="],263+264+ "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],265+266+ "picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],267+268+ "pkg-types": ["pkg-types@1.3.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="],269+270+ "pretty-ms": ["pretty-ms@9.3.1", "", { "dependencies": { "parse-ms": "^4.0.0" } }, "sha512-HzMy3Geq23nVALD/M2LliU+F+M+gVNsvkQWWqeBZ8HDiCgzo6YPJ/Omrmtq24EFrIsk0a3EkQGEd7bDOo+IhGA=="],271+272+ "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],273+274+ "resolve.exports": ["resolve.exports@2.0.3", "", {}, "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A=="],275+276+ "restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="],277+278+ "reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="],279+280+ "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],281+282+ "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],283+284+ "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],285+286+ "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],287+288+ "slice-ansi": ["slice-ansi@9.0.1", "", { "dependencies": { "ansi-styles": "^6.2.3", "is-fullwidth-code-point": "^5.1.0" } }, "sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA=="],289+290+ "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="],291+292+ "string-width": ["string-width@8.3.0", "", { "dependencies": { "get-east-asian-width": "^1.5.0", "strip-ansi": "^7.1.2" } }, "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ=="],293+294+ "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],295+296+ "strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],297+298+ "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="],299+300+ "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],301+302+ "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],303+304+ "ufo": ["ufo@1.6.4", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="],305+306+ "ultracite": ["ultracite@7.12.4", "", { "dependencies": { "@clack/prompts": "^1.8.1", "cli-truncate": "^6.1.1", "commander": "^15.0.0", "deepmerge": "^4.3.1", "empathic": "^2.1.0", "execa": "^10.0.1", "fast-glob": "^3.3.3", "find-workspaces": "^0.3.1", "jsonc-parser": "^3.3.1", "log-update": "^8.0.0", "magicast": "^0.5.5", "npm-run-path": "^6.0.0", "nypm": "^0.6.10", "resolve.exports": "^2.0.3", "semver": "^7.8.5", "string-width": "^8.3.0", "which-command": "^0.1.0", "yaml": "^2.9.1", "zod": "^4.6.5" }, "peerDependencies": { "@biomejs/biome": "^2.5.0", "eslint": "^10.9.0", "oxfmt": ">=0.59.0", "oxlint": "^1.86.0", "prettier": "^3.0.0", "stylelint": "^17.0.0" }, "optionalPeers": ["@biomejs/biome", "eslint", "oxfmt", "oxlint", "prettier", "stylelint"], "bin": { "ultracite": "dist/index.js" } }, "sha512-6jVEwaZBaytFm6XRoI3WGS2ZydrkrNvHTD0qTf7983ti2FlEWL1YcxnPaMaYuS6PkXqMhIK2XGr0cbsL4x5pQA=="],307+308+ "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],309+310+ "unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="],311+312+ "which-command": ["which-command@0.1.0", "", { "bin": { "which-command": "cli.js" } }, "sha512-XZyoF5/5hZtXitIwzrU4NKK+Wtbb9aB9CezUEw2Q0wlYK8NUYQxC1rRXgNueYLtBAJwXIb+/tFVk4dozciNJMA=="],313+314+ "wrap-ansi": ["wrap-ansi@10.0.2", "", { "dependencies": { "ansi-styles": "^6.2.3", "string-width": "^8.2.0" } }, "sha512-6OLRNZqRntVGBm26ghZ5eZhCuWWyOkRCSn8XsOIuq5stpCE/tjLbdozd93naILZig0lmD8ANfRwnhn0DLeXGlg=="],315+316+ "yaml": ["yaml@2.9.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw=="],317+318+ "yoctocolors": ["yoctocolors@2.2.0", "", {}, "sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg=="],319+320+ "zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],321+ }322+}added:bunfig.toml+10 added
1+[install]2+exact = true3+linker = "isolated"4+# Nothing younger than a day is installed (one day, in seconds).5+minimumReleaseAge = 864006+7+[test]8+# The packages' tests. The lint rule's own test runs under Node9+# (`bun run lint:rules`): oxlint's RuleTester needs it.10+root = "packages"added:debt.baseline.json+3 added
1+{2+ "escapes": 03+}added:lefthook.yml+13 added
1+# Git hooks for burrow (https://lefthook.dev). Run `lefthook install` once.2+pre-commit:3+ parallel: true4+ commands:5+ lint:6+ run: bun run lint7+ typecheck:8+ run: bun run typecheck9+10+pre-push:11+ commands:12+ test:13+ run: bun testadded:LICENSE+21 added
1+MIT License2+3+Copyright (c) 2026 The burrow authors4+5+Permission is hereby granted, free of charge, to any person obtaining a copy6+of this software and associated documentation files (the "Software"), to deal7+in the Software without restriction, including without limitation the rights8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell9+copies of the Software, and to permit persons to whom the Software is10+furnished to do so, subject to the following conditions:11+12+The above copyright notice and this permission notice shall be included in all13+copies or substantial portions of the Software.14+15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19+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 THE21+SOFTWARE.added:oxlint.config.ts+21 added
1+import { defineConfig } from "oxlint";2+import antiSlop from "ultracite/oxlint/anti-slop";3+import core from "ultracite/oxlint/core";4+5+export default defineConfig({6+ extends: [core, antiSlop],7+ ignorePatterns: [8+ ...(core.ignorePatterns ?? []),9+ // The rule's fixtures keep the faults its test points at.10+ "tools/oxlint/burrow/fixtures/**",11+ ],12+ jsPlugins: [{ name: "burrow", specifier: "./tools/oxlint/burrow/index.ts" }],13+ rules: {14+ // Every package's src/ runs inside long-lived server processes: state15+ // kept in a module is shared by every request they handle. A warning16+ // until the last module-level binding is gone, so the lint and its hook17+ // stay green meanwhile; the count may only fall (the project's ratchet,18+ // README "How we keep it tidy"). Then it becomes an error.19+ "burrow/no-module-level-mutable-state": "warn",20+ },21+});added:package.json+23 added
1+{2+ "name": "burrow",3+ "private": true,4+ "license": "MIT",5+ "workspaces": [6+ "packages/*"7+ ],8+ "type": "module",9+ "scripts": {10+ "lint": "oxlint",11+ "lint:rules": "node --test tools/oxlint/burrow/rule.test.ts",12+ "typecheck": "tsc --noEmit",13+ "test": "bun test",14+ "debt": "bun scripts/debt.ts"15+ },16+ "devDependencies": {17+ "@oxlint/plugins": "1.87.0",18+ "@types/node": "26.6.4",19+ "oxlint": "1.87.0",20+ "typescript": "7.0.2",21+ "ultracite": "7.12.4"22+ }23+}added:README.md+41 added
1+# burrow2+3+The services behind burrow's shop: six small TypeScript packages in one Bun workspace, sharing one HTTP kit.4+5+burrow, its shop and the people named here are fictional, made up as an example project; no real person, company or host is meant.6+7+| Package | What it does |8+| --- | --- |9+| `@burrow/kit` | The HTTP helpers every service uses: `http.get`, and `legacyFetch`, which it replaces |10+| `@burrow/auth` | Sessions, and who is on which team |11+| `@burrow/billing` | Exchange rates and invoices |12+| `@burrow/catalog` | Products and categories |13+| `@burrow/notify` | Message templates |14+| `@burrow/search` | Search, and "search again" |15+16+## Working on it17+18+```sh19+bun install20+bun run lint # oxlint: Ultracite's core and anti-slop presets, and our own rule21+bun run typecheck22+bun test23+bun run lint:rules # our lint rule's fixture test (oxlint's RuleTester, under Node)24+bun run debt # escape directives, against debt.baseline.json25+```26+27+`lefthook.yml` runs the lint and the typecheck before each commit and the tests before each push, once you run `lefthook install`.28+29+## How we keep it tidy30+31+- **No state in modules.** Our one lint rule, `no-module-level-mutable-state` (in `tools/oxlint/burrow`), flags a `let` or `var` at the top of a package's `src/`: the services are long-lived processes, so that binding is shared by every request they serve. Six are left, one per package. The rule warns until they are gone, and their count may only fall; then it becomes an error. A fix is usually a factory, a parameter, or a cache the caller owns.32+- **Escapes say why.** A comment that switches a check off (`oxlint-disable`, `@ts-expect-error`) carries its reason after ` -- `, and `bun run debt` keeps their number at or under `debt.baseline.json`.33+- **`legacyFetch` is on its way out.** It throws on any failed request; `http.get` hands the failure back as a value. `bun scripts/count-callers.ts legacyFetch` shows who still calls it, by package (`--json` for a script).34+35+## Contributing36+37+Work is offered as asks, each with a check that says when it is done. The project's process lives in `.myr/`: `project.ts` (maintainers, ask kinds, the module-state ratchet), `vouched.td` (who may claim), and the open asks in `asks/`. `okafor` and `lin-h` decide for every path.38+39+## License40+41+MIT, see `LICENSE`. `tools/oxlint/burrow/rules/no-module-level-mutable-state.ts` is MIT too, under its authors' notice in `tools/oxlint/burrow/LICENSE-rat-stack.txt`.added:tsconfig.json+20 added
1+{2+ "compilerOptions": {3+ "allowImportingTsExtensions": true,4+ "exactOptionalPropertyTypes": true,5+ "isolatedModules": true,6+ "lib": ["ES2024"],7+ "module": "preserve",8+ "moduleDetection": "force",9+ "moduleResolution": "bundler",10+ "noEmit": true,11+ "noUncheckedIndexedAccess": true,12+ "skipLibCheck": true,13+ "strict": true,14+ "target": "ES2024",15+ "types": ["node"],16+ "verbatimModuleSyntax": true17+ },18+ "include": ["packages", "scripts", "tools", "*.config.ts"],19+ "exclude": ["node_modules", "tools/oxlint/burrow/fixtures"]20+}