fix: pre import before dev#32
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the CLI package’s TypeScript ESM import strategy (explicit .ts extensions) and adds a “pre-import” step to the kirie dev flow so Godot imports the project before launching the dev session. It also refactors the runDev tests to use a real example project fixture and to assert the new import invocation.
Changes:
- Enable TypeScript imports with
.tsextensions and update internal imports/exports accordingly. - Add
prepareGodotProject()to rungodot --headless --importbefore launching Godot inrunDev(). - Improve dev tests by copying a real example project into a temp workspace and using a reusable fake Godot capture script.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/tsconfig.json | Enables allowImportingTsExtensions to support explicit .ts ESM specifiers. |
| packages/cli/test-fixtures/fake-godot.js | Adds a reusable fake Godot script to record invocations for tests. |
| packages/cli/src/vite.ts | Updates internal type import to include .ts extension. |
| packages/cli/src/vite-raw.d.ts | Adds typing for Vite/Vitest ?raw imports used by tests. |
| packages/cli/src/test-project.ts | Introduces helper to copy the example CLI project into a temp directory for tests. |
| packages/cli/src/index.ts | Updates public exports to include .ts extensions. |
| packages/cli/src/godot.ts | Adds prepareGodotProject() and updates imports to .ts. |
| packages/cli/src/dev.ts | Runs the new Godot import step before launching Godot. |
| packages/cli/src/dev.test.ts | Refactors tests to use the example project + validates the import + launch invocations. |
| packages/cli/src/cli.ts | Updates runDev import to include .ts extension. |
| docs/architecture.md | Clarifies future scope around export/build workflow. |
| AGENTS.md | Documents the new examples/basic-kirie-cli example and updates CLI v1 scope wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5
to
+8
| const basicKirieCliExample = fileURLToPath( | ||
| import.meta.resolve("../../../examples/basic-kirie-cli"), | ||
| ); | ||
| const repositoryTmpDir = fileURLToPath(import.meta.resolve("../../../.tmp")); |
Comment on lines
+18
to
+22
| await fs.symlink( | ||
| path.join(basicKirieCliExample, "node_modules"), | ||
| path.join(project, "node_modules"), | ||
| "dir", | ||
| ); |
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.
No description provided.