Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "@suaveplan/testing/runner";
const pkgRoot = join(__dirname, "..");
const pkg = JSON.parse(readFileSync(join(pkgRoot, "package.json"), "utf8")) as {
name: string;
sideEffects: boolean;
dependencies: Record<string, string>;
};
describe("dep-graph invariants", () => {
it("declares sideEffects: false", { timeout: 5000 }, () => {
expect(pkg.sideEffects).toBe(false);
});
it("declares the expected runtime dependencies", { timeout: 5000 }, () => {
expect(Object.keys(pkg.dependencies).sort()).toEqual([
"@suaveplan/currency",
"@suaveplan/currency-providers",
"@suaveplan/error",
"@suaveplan/types",
"tslib",
]);
});
it("uses workspace:^ for every @suaveplan/* dep", { timeout: 5000 }, () => {
for (const [name, range] of Object.entries(pkg.dependencies)) {
if (name.startsWith("@suaveplan/")) {
expect(range).toBe("workspace:^");
}
}
});
it("pins package name and version baseline", { timeout: 5000 }, () => {
expect(pkg.name).toBe(
"@suaveplan/currency-provider-open-exchange-rates"
);
});
});

View File

@@ -0,0 +1,7 @@
// Polyfills for test environment — none required. The package is universal
// and uses only `globalThis.fetch` (overridable via FetchLike injection),
// `Response`, `Number.parseFloat`, `Date.now`, `Map`, and `Object.entries` —
// available in every supported runtime (Node 18+, Bun, browsers, Web Workers).
// This file exists to give vitest a stable setup file path mirroring the
// sibling-package layout.
export { };