Releases: checkout/checkout-sdk-node
Releases · checkout/checkout-sdk-node
3.3.0
Release 3.3.0 (#430)
This release improves multipart form-data handling in HTTP requests, specifically ensuring that FormData is properly serialized and sent in API calls. The changes fix a bug where the form-data instance was previously string-coerced (resulting in an invalid request body), and add comprehensive regression tests to prevent this issue from recurring.
HTTP request handling improvements:
- Added a
formDataToBufferutility to serializeFormDatastreams into a buffer, ensuring multipart bodies are transmitted correctly in HTTP requests. - Updated the HTTP request logic to use the new buffer serialization for
FormData, preventing accidental string coercion and ensuring the correctContent-Typeand body format. - Enhanced header generation to merge headers from
FormDatainstances when present, ensuring the multipart boundary is set correctly. - Imported Node's
Writablestream to support the new buffer serialization logic.
Testing and regression coverage:
- Improved and expanded tests in
test/files/files.jsto verify that multipart requests include the correct fields and headers, and added a regression test for issue #418 to ensure the bug does not reoccur. [1] [2]
3.2.1
3.2.0
Release 3.2.0 (#426)
New Features
- Account Updater API: New client for managing card account updates
- Identities API: Complete client with 6 submodules (AML screenings, applicants, face authentications, ID document verifications, identity verifications, delegation)
- Issuing API: Expanded with 10 new submodules (access, cardholders, cards, control groups, control profiles, controls, digital cards, disputes, simulate, transactions)
- Network Tokens API: New client for network token management
- Payment Methods API: New client for payment method operations
Improvements
- Error Handling: Enhanced error propagation for 401/403/404 responses with detailed error.body
- Code Organization: Refactored core modules (Checkout.js, Platforms, HTTP service) for better maintainability
- Test Suite: Reorganized 51+ test files with better separation between unit and integration tests
- Documentation: Improved JSDoc annotations with @memberof tags, updated README with new architecture examples
Technical Details
- Reduced Checkout.js from ~200 lines to ~46 lines through modularization
- Split Platforms API into focused submodules (subentity, files, payment-instruments, payout-schedules, reserve-rules)
- Enhanced HTTP client with better response processing and error context
- Added TypeScript definitions for all new API clients
- Test coverage: 97.89% (818 tests passing)
All changes maintain backward compatibility.