Skip to content

fix(schematics): make fresh projects and new systems type-check - #364

Merged
Exeloo merged 7 commits into
mainfrom
fix/schematics-templates
Nov 23, 2026
Merged

Exeloo merged 7 commits into
mainfrom
fix/schematics-templates

Conversation

@Exeloo

@Exeloo Exeloo commented Nov 23, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Closes #307
Closes #323
Closes #324
Closes #325
Refs #308 (part 2 only: part 1 was already fixed on main, part 3 is engine-side in NanoForge-dev/Engine#530)

Fixes the schematics so that a fresh project and a new system both type-check:

  • the system template imports Position2D and calls ctx.app.requestStop();
  • the drawable circle passes only the props that are defined;
  • the JS jsconfig enables esModuleInterop;
  • the offline engine fallback is ^3;
  • the component and system schemas reject names that don't give a valid identifier.

How do you test this PR?

  • Before: the new schematics e2e tests fail (2 + 3 + 8 + 1 + 2). tsc on a strict nf new project plus nf create system reports TS2379, TS2307 (example.component) and TS2551 (setIsRunning).
    After: schematics e2e passes 170/170. tsc reports only the editor-lib TS2307 (Engine#530).
  • Commands run: schematics build, test:unit (48), test:e2e (170) and lint, all pass.

Merge danger

Door: two-way.
Blast radius: small. The only runtime dependent is @nanoforge-dev/cli; engine e2e games and examples get it through generated projects.

Quality gate

Check Result Notes
Docs Updated schematics/system.mdx, component.mdx, guides/components-and-systems.mdx
Correctness Pass 2 Minor: the guide, fixed in aa6569d (not re-reviewed); the definedProps return type, kept
Performance Pass Minor: definedProps allocates one object per circle, not measured
Accessibility Pass
Security Pass
Style Pass lint: pass

Follow-up issues

@github-actions github-actions Bot added documentation Improvements or additions to documentation lib:schematics Related to the @nanoforge-dev/schematics library labels Nov 23, 2026
@Exeloo
Exeloo merged commit 197a4f6 into main Nov 23, 2026
9 checks passed
@Exeloo
Exeloo deleted the fix/schematics-templates branch November 23, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lib:schematics Related to the @nanoforge-dev/schematics library

Projects

None yet

1 participant