You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filed unassigned by the #7923 dev (PR #8061) as an out-of-scope observation. Nothing is red; this is a "should be covered" note.
What is dark
#7923 graduated @objectstack/example-showcase out of TEST_DEBT by widening its include to reach the e2e/ Playwright specs. The glob it added is spec-scoped — e2e + /**/*.spec.ts — deliberately, and NOT the wholesale e2e + /**/*, because the deleted TEST_DEBT note warned that the wholesale form would pull in e2e/global-setup.ts and bill the test layer 6 errors from a file that is not a test. That warning was re-measured on origin/main @ 3373a29 during #7923 and is exactly right.
So the three specs are now type-checked and the fixture beside them still is not. global-setup.ts is read by no tsc program at all — it is not a *.spec.ts, so the coverage gate (which counts test files) has no opinion on it either. It is genuinely invisible rather than ledgered.
Measured, at 3373a29
Adding e2e + /**/* to the package include and running tsc --noEmit:
e2e/global-setup.ts(2,10): error TS2305: Module '"node:fs"' has no exported member 'mkdirSync'.
e2e/global-setup.ts(2,21): error TS2724: '"node:fs"' has no exported member named 'writeFileSync'. Did you mean 'readFileSync'?
e2e/global-setup.ts(3,25): error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node?
e2e/global-setup.ts(11,21): error TS2339: Property 'env' does not exist on type '{ cwd(): string; }'.
e2e/global-setup.ts(12,23): error TS2339: Property 'env' does not exist on type '{ cwd(): string; }'.
e2e/global-setup.ts(13,26): error TS2339: Property 'env' does not exist on type '{ cwd(): string; }'.
Two different causes, and the split is the interesting part:
3 x TS2305 / TS2724 / TS2591 are holes in test/node-shim.d.ts itself: the node:fs shim declares existsSync/readFileSync/readdirSync but not mkdirSync or writeFileSync, and there is no node:path module declaration at all. This half is not a global-setup.ts defect — it is the shim being narrower than what the package actually imports, and any future file reaching for those members hits the same wall.
That second half is why #7923 did not fold this in: extending a shim that serves the vitest layer, for the benefit of a non-test file, is a different change from the graduation it was scoped to.
Why it is worth closing anyway
global-setup.ts is what authenticates the e2e run (it reads SMOKE_API_URL / SMOKE_EMAIL / SMOKE_PASSWORD and writes a storage-state file). A type error in it fails the whole smoke suite at setup rather than in a spec, and test:smoke is non-blocking nightly — so a break here is quiet in exactly the way that costs an afternoon later.
Likely shape of the repair: add the file-local declare const process (3 gone), add mkdirSync/writeFileSync to the node:fs shim and a minimal node:path module declaration (3 gone), then widen the include glob to e2e + /**/*. Worth deciding as part of that: whether test/node-shim.d.ts is still the right home for a declaration the e2e/ tree also depends on.
Filed unassigned by the #7923 dev (PR #8061) as an out-of-scope observation. Nothing is red; this is a "should be covered" note.
What is dark
#7923 graduated
@objectstack/example-showcaseout ofTEST_DEBTby widening itsincludeto reach thee2e/Playwright specs. The glob it added is spec-scoped —e2e+/**/*.spec.ts— deliberately, and NOT the wholesalee2e+/**/*, because the deletedTEST_DEBTnote warned that the wholesale form would pull ine2e/global-setup.tsand bill the test layer 6 errors from a file that is not a test. That warning was re-measured onorigin/main@3373a29during #7923 and is exactly right.So the three specs are now type-checked and the fixture beside them still is not.
global-setup.tsis read by no tsc program at all — it is not a*.spec.ts, so the coverage gate (which counts test files) has no opinion on it either. It is genuinely invisible rather than ledgered.Measured, at
3373a29Adding
e2e+/**/*to the packageincludeand runningtsc --noEmit:Two different causes, and the split is the interesting part:
process.envshape. The package deliberately omits@types/nodeand each module that needs env reads declares a file-localdeclare const process— the idiom already inobjectstack.config.ts,src/system/self-url.tsandtest/connector-self-url.test.ts. [finding] The 3 test layers #7353 made visible are repair candidates, not permanent debt — metadata-fs (6) and example-showcase (4) look like same-day graduations #7923 applied the same one-liner to the three specs. This file just never got it, because nothing ever checked it.test/node-shim.d.tsitself: thenode:fsshim declaresexistsSync/readFileSync/readdirSyncbut notmkdirSyncorwriteFileSync, and there is nonode:pathmodule declaration at all. This half is not aglobal-setup.tsdefect — it is the shim being narrower than what the package actually imports, and any future file reaching for those members hits the same wall.That second half is why #7923 did not fold this in: extending a shim that serves the vitest layer, for the benefit of a non-test file, is a different change from the graduation it was scoped to.
Why it is worth closing anyway
global-setup.tsis what authenticates the e2e run (it readsSMOKE_API_URL/SMOKE_EMAIL/SMOKE_PASSWORDand writes a storage-state file). A type error in it fails the whole smoke suite at setup rather than in a spec, andtest:smokeis non-blocking nightly — so a break here is quiet in exactly the way that costs an afternoon later.Likely shape of the repair: add the file-local
declare const process(3 gone), addmkdirSync/writeFileSyncto thenode:fsshim and a minimalnode:pathmodule declaration (3 gone), then widen the include glob toe2e+/**/*. Worth deciding as part of that: whethertest/node-shim.d.tsis still the right home for a declaration thee2e/tree also depends on.Related: #7923 (PR #8061) · #7353 · #7312 · #5286