Skip to content

[v0.8.3] Adjustments - CandlePilot TS Migration

Choose a tag to compare

@FelipeRamosDev FelipeRamosDev released this 05 Aug 17:59
48c888a

This pull request updates the 4Hands API from version 0.8.2 to 0.8.3 and refactors several utility and response patterns throughout the codebase. The main focus is on removing custom object prototype extensions (like getSafe, toSuccess, and oid) in favor of explicit utility function usage and plain object responses. This improves maintainability, safety, and clarity. Additionally, there are minor dependency and middleware updates.

API and Utility Refactoring:

  • Removed custom Object.prototype methods (getSafe, toSuccess, oid) from src/global/index.js and replaced their usage with utility functions (e.g., getObjectPath, global.oid) throughout the codebase. This prevents prototype pollution and makes utility usage more explicit. [1] [2] [3] [4] [5] [6] [7]
  • Standardized success responses to plain objects with { success: true, ... } instead of using .toSuccess() method, improving consistency and making the response structure clearer. [1] [2] [3]

Dependency and Middleware Updates:

  • Removed the body-parser dependency and switched to using express.json({ limit }) directly in src/services/ServerAPI/index.js, simplifying middleware usage. [1] [2]

Versioning and Documentation:

  • Bumped the API version from 0.8.2 to 0.8.3 in README.md and package.json to reflect these changes. [1] [2]