Merged
Conversation
…ved file management Including rimraf in the project allows for easier and more efficient removal of files and directories, enhancing the development workflow, especially for tasks like cleaning up build artifacts.
Resolves persistent `ReferenceError: exports is not defined` errors encountered during unit tests (`unit-test (20.x)` job) in the GitHub Actions CI environment. These errors occurred specifically when importing `cli-testing-library` in the global Jest setup file (`test/jest-setup.ts`), despite tests passing locally with the same Node.js version (v20.19.0). After iterative testing, the following Jest configuration combination was identified as necessary to ensure consistent ESM handling and test success in both local and CI environments: - Set preset to `ts-jest/presets/default-esm` for stricter ESM rules. - Configured `transformIgnorePatterns` to ensure Jest transforms specific ESM dependencies (`cli-testing-library`, `@clack`, `cleye`) within `node_modules`. - Expanded the `transform` pattern (`^.+\\.(ts|tsx|js|jsx|mjs)$`) to explicitly cover various script types handled by `ts-jest`. - Included explicit `tsconfig` overrides (`module: 'ESNext'`, `target: 'ES2022'`) within the `ts-jest` transform options to resolve potential environment discrepancies. - Retained `moduleNameMapper` for `.js` imports for reliable module resolution. - Ensured `cli-testing-library` imports remain in the global setup (`test/jest-setup.ts`). - Removed test cache clearing from the `test:unit` script in `package.json`. This configuration now passes reliably across environments.
The space normalization logic is updated to replace only multiple spaces and tabs with a single space, while preserving newlines. This change ensures that the formatting of the content is maintained, especially when dealing with empty line requirements and max line length.
Owner
|
thank you dude |
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.
The space normalization logic is updated to replace only multiple spaces
and tabs with a single space, while preserving newlines. This change
ensures that the formatting of the content is maintained, especially
when dealing with empty line requirements and max line length.