Updating packages/Refactoring#17
Open
mariofink wants to merge 10 commits into
Open
Conversation
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.
This pull request includes several updates to dependencies, Node.js version requirements, and code style, as well as significant refactoring and modernization of the
src/customtypes.tsandsrc/generate.tsfiles. The changes improve code readability, consistency, and maintainability, and update the project to use newer versions of its dependencies and Node.js.This pull request also updates the type definitions to the latest version of B2C Commerce Script 25.10: https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/
Dependency and Environment Updates:
16.16.0to24.12.0in.nvmrcand removed theenginesfield frompackage.jsonto reflect this change. [1] [2]package.json, includingcheerio,cli-progress,comment-json,picocolors,prettier,properties-reader,xml2js, and TypeScript-related packages..prettierrcfile to support Prettier configuration.formatscript using Prettier and updated thetestscript inpackage.json.Code Refactoring and Style Improvements:
General modernization and style:
src/customtypes.tsandsrc/generate.tsto use consistent double quotes, arrow functions, and modern JavaScript/TypeScript conventions. [1] [2] [3] [4] [5] [6] [7] [8]prettierimports with namedformatimports and updated formatting calls to useawait format(...). [1] [2] [3] [4]src/customtypes.ts. [1] [2] [3] [4]src/customtypes.ts, making it more robust and readable. [1] [2]Type and attribute definition updates:
RESTErrorResponseto the list of type definitions in@types/sfcc/attrs.txt.These changes collectively modernize the codebase, improve maintainability, and ensure compatibility with newer Node.js and dependency versions.