-
Notifications
You must be signed in to change notification settings - Fork 6
Release Version 5.0.0 #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
* Moves Legacy CLI into a `legacy` folder and provides a new entrypoint to the beta CLI - adds a `--legacy (-l)` CLI option that forces the application to run in legacy mode. - adds a new warning message when the CLI is run in legacy mode. * Update lib/legacy/index.ts Co-authored-by: Marla Hoggard <[email protected]> --------- Co-authored-by: Marla Hoggard <[email protected]>
* Moves Legacy CLI into a `legacy` folder and provides a new entrypoint to the beta CLI - adds a `--legacy (-l)` CLI option that forces the application to run in legacy mode. - adds a new warning message when the CLI is run in legacy mode. * Update lib/legacy/index.ts Co-authored-by: Marla Hoggard <[email protected]> * Cleanup build scripts and upgrade typescript and esbuild (#114) * Modernize build system and upgrade esbuild and typescript - Additionally removes the v8-compile-cache that provides little value in modern node applications of this size. - Adds minification support via esbuild as well as cleaner map files. - Updates package.json "files" property to now only ship required files to npm. --------- Co-authored-by: Marla Hoggard <[email protected]>
* Moves Legacy CLI into a `legacy` folder and provides a new entrypoint to the beta CLI - adds a `--legacy (-l)` CLI option that forces the application to run in legacy mode. - adds a new warning message when the CLI is run in legacy mode. * Modernize build system and upgrade esbuild and typescript - Additionally removes the v8-compile-cache that provides little value in modern node applications of this size. - Adds minification support via esbuild as well as cleaner map files. - Updates package.json "files" property to now only ship required files to npm. * Add CONTRIBUTING.md file with guidelines for getting started with the CLI code * Adds IS_LOCAL flag for improved debugging experience in beta CLI * Adds support for fetching and saving API tokens via the beta cli. * Remove CONTRIBUTING.md file as part of project restructuring. * Cleanup file structure and prepare for tests * Introduce basic pull command * Full implementation of generating basic i18Next File * Enhance I18NextFormatter to conditionally generate driver files based on configuration. Update error handling in handleOutput to provide clearer output format messages. Add default value for generateDriverFile in ZI18NextOutput schema. * Add support for json formats with frameworks * Address PR feedback * Add documentation for generateImportStatements method in I18NextFramework class * Update GitHub Actions to use latest versions of actions/cache, actions/checkout, and actions/setup-node * Update GitHub Actions workflow to use Ubuntu 24.04 for testing environment * Remove obsolete test files for JSON and configuration services * Refactor API token handling and HTTP client configuration. Introduce default interceptor for axios requests and update token validation logic to improve error handling and context management. * add comments and small nit changes * Update lib/src/services/projectConfig.ts Co-authored-by: Marla Hoggard <[email protected]> * Update lib/src/http/client.ts Co-authored-by: Marla Hoggard <[email protected]> * Update lib/src/http/checkToken.ts Co-authored-by: Marla Hoggard <[email protected]> * Remove default data parameter from readGlobalConfigData function and return an empty object if parsing fails. * Update lib/src/http/checkToken.ts Co-authored-by: Marla Hoggard <[email protected]> * Refactor JSONFormatter to include a new line for improved readability and update fetchText function to stringify filters in API request parameters. * Refactor JSONFormatter to use a variable for filename construction, improving code clarity and maintainability. --------- Co-authored-by: Marla Hoggard <[email protected]>
…pdate debug condition in error logging. Use a predefined list of keys for production environment variables and change the local debug check from IS_LOCAL to DEBUG.
#117) * Refactor CLI command handling and project configuration - Introduced a new `--config` flag for the `pull` command to specify the project config file path. - Updated `initProjectConfig` to accept options for configuration. - Enhanced `executeCommand` to handle command options more effectively. - Adjusted output directory handling in JSONFormatter for improved flexibility. - Added `outDir` to output filters in shared outputs for better configuration management. * Enhance file writing functions to create missing directories - Updated `writeFileSync` and `writeFile` functions to check for the existence of the target directory and create it recursively if it does not exist. This ensures that files can be written without errors related to missing directories. * Refactor JSON framework handling and enhance JSONFormatter - Moved framework processor logic to a new `json` directory for better organization. - Updated `JSONFormatter` to utilize the new `getFrameworkProcessor` function from the JSON framework. - Removed obsolete base framework and index files, streamlining the framework structure. - Introduced `BaseFramework` and `I18NextFramework` classes to handle specific framework processing. - Enhanced output directory handling in `BaseFormatter` for improved configuration management. * Refactor JSON framework handling and update framework processor logic - Updated `JSONFormatter` to correctly process the framework output. - Removed obsolete imports and files related to the i18next framework. - Simplified framework type handling in the framework processor. - Enhanced Zod schema for JSON output to directly specify the framework type. * Refactor output handling and improve configuration management - Simplified the `format` method in `BaseFormatter` and `JSONFormatter` by removing unnecessary parameters. - Updated output directory handling in `BaseFormatter` and `AppContext` for better consistency and clarity. - Enhanced the `outDir` retrieval logic in `AppContext` to prioritize project configuration settings.
* Refactor output directory handling and enhance module type support in JSON formatters - Updated `JSONFormatter` and `BaseFramework` to use `outDir` instead of `outputDir` for improved consistency. - Introduced module type handling in `I18NextFramework` to support both CommonJS and ES module formats. - Added methods for generating require statements and module exports to streamline output generation. - Enhanced Zod schema for JSON output to include optional module type specification. * Suggestions from review: - Add docstring comments to codegen methods - Add type to some additional docstring comments - Rename one codegen method - Add named require method --------- Co-authored-by: Marla Hoggard <[email protected]>
* Better error messaging for config errors * Create DittoError * Use zods error flattening * Enhance Zod schemas for JSON outputs by enforcing strict mode in base output definitions * Use errorText in sentry --------- Co-authored-by: [email protected] <[email protected]>
…authentication, and usage details for the Ditto CLI v5.
…JSON output processing (#122)
…the shorthand '-l' option alongside the '--legacy' flag.
…o only use '--legacy' flag for clarity.
…ds/cli into ash/dit-11112-rich-text-for-cli
Updates createMockTextItem function to use Partial<TextItemsResponse[0]> instead of any, providing better type safety for test mock overrides.
Improves test organization by moving testDir, outputDir variables and beforeEach/afterEach hooks inside the main describe block for better scoping and isolation.
Replaces mutating sort() calls with non-mutating toSorted() to avoid potential side effects in test assertions.
These tests mock HTTP calls and set appContext directly, so the YAML config files were never actually read. Removed the duplication between YAML strings and setProjectConfig() calls - now tests only create what they need and use a single source of truth for configuration. This eliminates the risk of YAML/object mismatch bugs and makes the tests clearer about what they're actually testing.
Adds toHaveBeenCalledWith assertions to filter tests to verify that config filters are correctly converted to API query parameters. Tests now catch bugs in the config->API params conversion logic instead of just testing the mocked response->file output flow. This addresses the concern that filter tests weren't actually testing the filtering functionality due to complete API mocking.
Bump beta version to 7
* Add support for fetching components from API for JSON output * clean up logs, basic test * make folders optional, add tests * split up filter rode, clean up error logging * support nested folder specification * upgrade to beta 8 version
f3c6b90 to
a7af95d
Compare
JWhite30515
approved these changes
Oct 1, 2025
JWhite30515
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest README LGTM! verified all links work
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.
Overview
This PR includes all of the v5 beta releases, through
5.0.0-beta.8. It has an updated README and the version has been updated to5.0.0.Once this PR is merged to master, we will publish the update as the latest stable version, coming out of Beta.
Review Checklist