Skip to content

Conversation

@cherkanovart
Copy link
Contributor

Summary

Fix CLI command script for Windows 11 compatibility by renaming command from lingo.dev to lingo, which resolves shell script path issues and improves bucket path resolution

Changes

  • Rename CLI command from lingo.dev to lingo in package.json bin field to fix Windows 11 execution issue and shell script path references
  • Fix glob package import to use namespace import for better compatibility
  • Improve bucket path pattern matching and locale path resolution
  • Update tests to cover the improved path resolution logic

Testing

Business logic tests added:

Visuals

Required for UI/UX changes:

  • Before/after screenshots attached
  • Video demo for interactions (< 30s)

Checklist

  • Changeset added (if version bump needed)
  • Tests cover business logic (not just happy path)
  • No breaking changes (or documented below)

Closes #1521
Closes #1606

@maxprilutskiy maxprilutskiy requested a review from Copilot January 21, 2026 23:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Windows 11 compatibility issues by renaming the CLI command from lingo.dev to lingo and improving glob package imports for better cross-platform support.

Changes:

  • Renamed bin entry from lingo.dev to lingo in package.json to resolve Windows 11 shell script path issues
  • Changed glob imports from named imports to namespace imports for better compatibility
  • Fixed code formatting inconsistencies in bucket path pattern matching

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/cli/package.json Updated bin entry from lingo.dev to lingo for Windows 11 compatibility
packages/cli/src/cli/utils/find-locale-paths.ts Changed glob import to namespace import and fixed empty catch block formatting
packages/cli/src/cli/utils/find-locale-paths.spec.ts Updated test file to match new glob import pattern
packages/cli/src/cli/utils/buckets.ts Changed glob import to namespace import and reformatted regexp string concatenation
packages/cli/src/cli/utils/buckets.spec.ts Updated test file to use namespace import for glob
packages/cli/src/cli/utils/ensure-patterns.ts Removed unused glob import
packages/cli/tsup.config.ts Added "glob" to external dependencies list
.changeset/cute-icons-write.md Added changeset documenting the CLI command fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

resolveLocaleCode(locale as LocaleCode);
return { locale, file };
} catch (e) {}
} catch (e) { }
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty catch block silently swallows errors. Consider logging the error or adding a comment explaining why it's safe to ignore exceptions here.

Suggested change
} catch (e) { }
} catch (e) {
// Intentionally ignore invalid locale candidates and try the next one.
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

correct code 🐞 [BUG REPORT] ~ Issue with npx lingo.dev command is not working on Windows 11

3 participants