Repository navigation
fix(schematics): import the ecs types from @nanoforge-dev/ecs in item templates - #271
Merged
Merged
Conversation
… templates The component and system templates imported @nanoforge-dev/ecs-client or ecs-server, which the engine no longer publishes. The project templates already use @nanoforge-dev/ecs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
No linked issue: found while working on the registry lib move (#263). No issue was filed for it.
nf create componentandnf create system(schematicscomponentandsystem) wrote files that imported@nanoforge-dev/ecs-clientor@nanoforge-dev/ecs-server(ecs-<%= part %>). The engine no longer publishes those packages, and projects made bynf newdepend on@nanoforge-dev/ecs, so every created item started with a broken import.libs/schematics/src/libs/{component,system}/files/{ts,js}) now import from@nanoforge-dev/ecs, like thenf newproject templates.Contextstill comes from@nanoforge-dev/common.docs/docs/schematics/{component,system}.mdx. I also removed the warnings that told users to fix the import by hand, from those two pages and fromdocs/docs/commands/create.mdx, plus that step indocs/guides/components-and-systems.mdx.partis still passed (create.action.ts). It's still used in a comment of the JS system template, and stays required by both schemas.How do you test this PR?
{ type EditorComponentManifest } from "@nanoforge-dev/ecs-client", a package that's not installed and no longer published.libs/schematics/e2e/component.test.ts,system.test.ts) check that the generated ts and js files contain"@nanoforge-dev/ecs"and no@nanoforge-dev/ecs-import.@nanoforge-dev/ecs@2.0.0exports every imported name at its root (EditorComponentManifest,EditorSystemManifest,Registry…).9a4b12a, from the pre-push hook:pnpm run repo:build: 4/4pnpm run repo:lint: 4/4pnpm run repo:test:unit: 4/4pnpm run repo:test:e2e: 6/6Merge danger
Door: two-way. It changes templates and docs only.
Blast radius: the files
nf create component|systemwrites, once the next CLI release is out. Files already generated don't change. Nothing deploys on merge.Follow-up issues
None.
Quality gate
docs/docs/commands/create.mdx,docs/docs/schematics/{component,system}.mdx,docs/guides/components-and-systems.mdxpartstays, still used)