Add support for importing translation files directly#19
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
🦋 Changeset detectedLatest commit: 228d887 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryThis PR replaces the two-step Confidence Score: 5/5Safe to merge; only a single P2 finding about error reporting in watch mode that doesn't affect the happy path. All findings are P2 or lower. The core inline-import feature (babel + unplugin load hooks, .d.ts generation, hash URL-safety) is implemented correctly. The watch-mode error suppression is a UX gap but doesn't affect normal extraction or the new direct-import feature. packages/config/src/commands/extract.ts — watch + allSettled interaction Prompt To Fix All With AIThis is a comment left during a code review.
Path: packages/config/src/commands/extract.ts
Line: 23-29
Comment:
**Error reporting unreachable in watch mode**
When `--watch` is active, each bucket's task `await`s `worker.watch()`, which is an infinite loop and never resolves. `Promise.allSettled(tasks)` therefore never settles, so the `AggregateError` block is never reached. If one bucket fails during `scan()` / `write()` while another is watching, the failure is logged but never surfaced as a thrown error — the CLI appears to be running correctly while silently ignoring one bucket's failure.
A common pattern is to run the scan/write phase with `Promise.all` first (letting it throw immediately on failure), then start watch loops independently:
```ts
await Promise.all(
workers.map(async (w) => { await w.scan(); await w.write(); }),
);
if (options.watch) await Promise.all(workers.map((w) => w.watch()));
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (4): Last reviewed commit: "Remove fallback references from docs" | Re-trigger Greptile |
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…error aggregation
Replace the
compilestep with support for importing the translation files directlyCloses #18