Skip to content
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

[refactoring]: refactor some old functions in adapter and improve comments #2875

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

GermanBluefox
Copy link
Contributor

No description provided.

Added log message about different versions
Copy link
Collaborator

@foxriver76 foxriver76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if it makes sense to only touch codebase without changing anything with the risk of introducing errors

@GermanBluefox GermanBluefox changed the title Changed some old functions in adapter and [refactoring]: Changed some old functions in adapter and improve comments Sep 3, 2024
@GermanBluefox GermanBluefox changed the title [refactoring]: Changed some old functions in adapter and improve comments [refactoring]: refactor some old functions in adapter and improve comments Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR refactors several functions in the adapter and improves associated comments for better clarity. Key changes include:

  • Updated documentation and deprecated annotations for clarity.
  • Conversion of functions from callback-based to async/await (e.g., _deleteObjects and _extendObjects).
  • Minor type refinements and improved logging, including a new version check warning.

Reviewed Changes

File Description
packages/adapter/src/lib/adapter/adapter.ts Refactoring functions to async/await and clarifying comments; improved type assertions and error handling

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

packages/adapter/src/lib/adapter/adapter.ts:11899

  • Switching from callback-based error handling to throwing an error in _extendObjects may abort processing of remaining tasks immediately. Consider whether a more graceful error handling strategy (e.g., collecting errors or continuing with subsequent tasks) is desired.
throw e;

packages/adapter/src/lib/adapter/adapter.ts:4546

  • The updated _deleteObjects function returns immediately when the tasks list is empty, which differs from the previous callback invocation. Confirm that this change in control flow is fully compatible with the calling code that no longer expects a callback.
return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants