Skip to content

fix: make all typecheck and test gates green on macOS - #292

Open
VanniMnemonic wants to merge 3 commits into
lightningpixel:mainfrom
VanniMnemonic:fix/typecheck-and-pytest-gates
Open

fix: make all typecheck and test gates green on macOS#292
VanniMnemonic wants to merge 3 commits into
lightningpixel:mainfrom
VanniMnemonic:fix/typecheck-and-pytest-gates

Conversation

@VanniMnemonic

Copy link
Copy Markdown

Summary

  • Repair the TypeScript gates: enable rewriteRelativeImportExtensions (node:test needs .ts specifiers for native type-stripping), include src/shared/types in the node project, drop the orphaned collections.ts, type Dirent[] entries, annotate assetLibraryUi map callbacks, add a null guard in the UI test.
  • Fix a macOS-only bug in generator_registry: os.path.abspath does not resolve /var/private/var, so correctly-authorized extensions stayed blocked as "incomplete installation". Now compares against ext_dir.resolve().
  • Make run-pytests.mjs prefer api/.venv (system Python lacks fastapi) and bump Electron to ^44.1.1 (pending from the packaging work).

Test plan

  • npx tsc --noEmit green on all four projects (node, web, root, builtins) — 26 errors → 0
  • npm run test:node — 118/118 pass
  • npm run test:py — 63/63 pass (was 2 import errors + 2 failures)
  • npx eslint . — clean
  • npm run build — exit 0

tsc (node/web/root/builtins), eslint, build, test:node and test:py all
pass now.

- Enable rewriteRelativeImportExtensions: node:test runs the TS suites
  with native type stripping, which requires .ts import specifiers.
- Include src/shared/types in tsconfig.node.json and drop the orphaned
  collections.ts that pulled the renderer store into the node graph.
- Type readdir entries as Dirent[] and annotate the assetLibraryUi map
  callbacks so the null-filter predicates check against declared types.
- Fix the macOS registration bug in generator_registry: abspath does not
  resolve /var to /private/var, so authorized extensions stayed blocked
  as "incomplete installation". Compare against ext_dir.resolve() instead.
- Prefer api/.venv in run-pytests.mjs: the system Python lacks fastapi.
Drop unconditional stdout prints that fired at import time and on every
registry init/reload; WARNING and ERROR diagnostics are kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant