Closed lehuygiang28 closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vnpay | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 21, 2024 7:33am |
[!WARNING]
Review Failed
The head commit changed during the review from 7a08a1577d9a1ac3553cbfe14244e19eb7c72f68 to d5fda876349c5a37ee2a45c407fb8e2e91823ff2.
The update primarily focuses on refactoring the codebase to improve type safety and code clarity by replacing string literals with enums, consolidating imports, and enhancing logging capabilities. It also includes configuration and formatting changes to support ESLint and Prettier for better code quality. Additionally, new types and utilities were introduced to streamline VNPay integration and logging functionalities.
File(s) | Change Summary |
---|---|
src/constants/index.ts |
Removed export of product-code.constant , retained other constants. |
src/enums/index.ts , src/enums/product-code.enum.ts |
Converted constants to enums, added ProductCode enum. |
src/types/... |
Refactored types to use new enums and configurations, introduced new types for logging and configuration. |
src/utils/index.ts , src/utils/logger.ts |
Added export for logger module, introduced consoleLogger and fileLogger functions. |
src/vnpay.ts |
Added ProductCode import, updated configurations and logging functionalities. |
test/build-payment-url.test.ts |
Updated tests to reflect new enums and logging features. |
.coderabbit.yaml , .eslintignore , .eslintrc , .prettierignore |
Added configurations for ESLint, Prettier, and YAML language server. |
docs/... |
Formatting and indentation adjustments in various documentation files. |
package.json |
Added new scripts for linting and formatting, updated dependencies for ESLint and Prettier. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
Pull Request Description
eslint
&prettier
configverifyIpnCall
Type of Change
Please check the type of change your PR introduces:
Does this introduce a breaking change?
If yes, please describe the impact and migration path for existing applications:
ProductCode
,VnpLocale
,VnpCurrCode
to use as enum insteadSummary by CodeRabbit
New Features
response-map.constant
,api-endpoint.constant
,ipn-result-for-vnpay.constant
, andregex.constant
.UrlService
,HashAlgorithm
,VnpCurrCode
,VnpLocale
, and addedVnpCardType
.BuildPaymentUrlLogger
,BuildPaymentUrlOptions
,GlobalConfig
, andDefaultConfig
.Refactor
Chores