Skip to content

Conversation

@VAIBHAVSING
Copy link
Collaborator

closes #243
This pull request introduces a new "watch mode" feature to the Lingo.dev CLI, allowing automatic retranslation of source files when changes are detected. The implementation includes updates to the CLI's core functionality, new dependencies, and comprehensive documentation.

Watch Mode Feature:

  • New CLI Options: Added --watch flag for enabling watch mode and --debounce flag for configuring the debounce delay (default: 5000ms). These options are integrated into the run command. (packages/cli/src/cli/cmd/run/_types.ts - [1] packages/cli/src/cli/cmd/run/index.ts - [2] [3]
  • File Watching Implementation: Introduced watch.ts for monitoring file changes using chokidar. This includes debounce logic, error handling, and integration with the existing translation pipeline. (packages/cli/src/cli/cmd/run/watch.ts - packages/cli/src/cli/cmd/run/watch.tsR1-R174)

Dependency Updates:

  • Added Dependencies: Integrated chokidar for file watching and its TypeScript definitions. (packages/cli/package.json - [1] [2] pnpm-lock.yaml - [3] [4] [5] [6]

Documentation:

  • Feature Documentation: Created a detailed WATCH_MODE.md file explaining the watch mode's usage, features, implementation details, and testing instructions. (packages/cli/WATCH_MODE.md - packages/cli/WATCH_MODE.mdR1-R176)
  • Release Notes: Added a changeset file summarizing the new feature for inclusion in release notes. (.changeset/hip-jars-hammer.md - .changeset/hip-jars-hammer.mdR1-R33)
@VAIBHAVSING
Copy link
Collaborator Author

Tests look like this
Screenshot from 2025-06-26 00-07-29

@mathio mathio merged commit 8b306bc into lingodotdev:main Jun 26, 2025
3 checks passed
@VAIBHAVSING VAIBHAVSING deleted the cli--watch branch June 26, 2025 08:52
mainstar123 pushed a commit to mainstar123/lingo.dev that referenced this pull request Jul 7, 2025
…godotdev#966)

* feat(cli): add file watching feature for automatic retranslation

* fix: fix prettier error

* fix: update chnageset debouncing from 20s to 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants