-
-
Notifications
You must be signed in to change notification settings - Fork 186
Complement #1625: refactoring with safe conditions #1648
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
Conversation
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.
Pull Request Overview
This PR implements a patch update focused on improving the import transformer functionality and updating generated test outputs to use internal helpers directly instead of default typia imports. The changes enhance code maintainability by making import handling more explicit and reducing reliance on the default typia import.
Key Changes
- Refactored the
removeUnusedTypiaImports
function inImportTransformer.ts
for better clarity and maintainability - Updated generated test files to use explicit internal helper imports instead of default typia imports
- Version bump from 9.7.0 to 9.7.1
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
File | Description |
---|---|
test/generate/output/generate_use.ts | Replaced default typia import with explicit internal helper import for UUID format validation |
test/generate/output/generate_protobuf.ts | Removed default typia import and added multiple internal helper imports for protobuf operations |
test/generate/output/generate_plain.ts | Comprehensive replacement of default typia import with 15+ internal helper imports for various validation and generation functions |
test/generate/output/generate_notations.ts | Similar pattern - removed default typia import and added internal helper imports for format validation and assertion functions |
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
commit: |
This pull request introduces a patch update to the
typia
package, focusing on improving how unused imports are removed and updating generated output to use internal helpers directly. The most significant changes are a refactor of theremoveUnusedTypiaImports
function for better clarity and maintainability, and updates to generated test files to avoid default imports and use explicit internal helpers.Import transformer improvements
removeUnusedTypiaImports
function inImportTransformer.ts
to use clearer variable names, a dedicatedImportMetadata
interface, and more concise logic for collecting and updating imports. This should make the code easier to follow and maintain.Generated output updates
test/generate/output/generate_http.ts
to remove the defaulttypia
import and instead import only the required named exports and internal helpers. The generated functions now use these helpers directly for parsing, validation, and assertion, resulting in more explicit and modular code.test/generate/output/generate_use.ts
to remove the defaulttypia
import, import only the necessary named export, and use the internal_isFormatUuid
helper directly.Version bump
9.7.0
to9.7.1
inpackage.json
to reflect these improvements and fixes.