chore/port-solidtime-audit-fixes #1

Merged
danijel merged 54 commits from chore/port-solidtime-audit-fixes into main 2026-07-12 21:13:09 +00:00
64 changed files with 1574 additions and 632 deletions
Showing only changes of commit bb2751eede - Show all commits

View File

@@ -1,5 +1,6 @@
import "./no-instrumentation"; import "./no-instrumentation";
// Reserved for future global node-env setup. Currently a no-op so that // Applies the no-instrumentation guard (vi.mock against real Sentry/OTel SDK
// vitest configs may reference @repo/core-testing/setup/node uniformly. // init) via the import above; otherwise reserved for future global node-env
// setup so vitest configs may reference @repo/core-testing/setup/node uniformly.
export {}; export {};

View File

@@ -3,7 +3,8 @@ import { jsdomVitestConfig } from "./vitest.base.jsdom";
// jsdomVitestConfig is built with mergeConfig(nodeVitestConfig, ...). // jsdomVitestConfig is built with mergeConfig(nodeVitestConfig, ...).
// mergeConfig concatenates arrays rather than replacing them, so: // mergeConfig concatenates arrays rather than replacing them, so:
// - setupFiles inherits the node setup file (currently a no-op) AND adds the jsdom one // - setupFiles inherits the node setup file (which applies the
// no-instrumentation guard) AND adds the jsdom one
// - include inherits the node patterns AND adds the tsx-aware patterns (the file globs deduplicate at resolution) // - include inherits the node patterns AND adds the tsx-aware patterns (the file globs deduplicate at resolution)
// We assert the EXACT merged arrays so any future change to setup/node.ts or to include // We assert the EXACT merged arrays so any future change to setup/node.ts or to include
// behavior is consciously visible in this test. // behavior is consciously visible in this test.
@@ -12,7 +13,7 @@ describe("jsdomVitestConfig", () => {
it("uses jsdom environment", () => { it("uses jsdom environment", () => {
expect(jsdomVitestConfig.test?.environment).toBe("jsdom"); expect(jsdomVitestConfig.test?.environment).toBe("jsdom");
}); });
it("loads both the node setup (no-op) and jsdom setup files", () => { it("loads both the node setup (no-instrumentation guard) and jsdom setup files", () => {
expect(jsdomVitestConfig.test?.setupFiles).toEqual([ expect(jsdomVitestConfig.test?.setupFiles).toEqual([
"@repo/core-testing/setup/node", "@repo/core-testing/setup/node",
"@repo/core-testing/setup/jsdom", "@repo/core-testing/setup/jsdom",