Skip to content

feat(sdk): add AbortController support so user can cancel API request#998

Merged
mathio merged 5 commits intolingodotdev:mainfrom
VAIBHAVSING:abort
Jul 8, 2025
Merged

feat(sdk): add AbortController support so user can cancel API request#998
mathio merged 5 commits intolingodotdev:mainfrom
VAIBHAVSING:abort

Conversation

@VAIBHAVSING
Copy link
Copy Markdown
Contributor

@VAIBHAVSING VAIBHAVSING commented Jul 3, 2025

fixes #567
This pull request introduces support for the AbortController API across all public methods in the LingoDotDevEngine SDK, enabling consumers to cancel long-running operations. It also includes extensive refactoring to propagate AbortSignal throughout internal methods and batch operations, along with comprehensive unit tests to validate the new functionality.

@mathio
Copy link
Copy Markdown
Contributor

mathio commented Jul 3, 2025

Additionally, the SDK package has been cleaned up by removing non-essential files.

@VAIBHAVSING I dont see any removed files 🤔

@VAIBHAVSING
Copy link
Copy Markdown
Contributor Author

@mathio sorry for that I don't remove any files or clean.
I just use GitHub pull request summerizer it won't works as expected.
I just add abort controller and its test case
Thanks

Copy link
Copy Markdown
Contributor

@mathio mathio left a comment

Choose a reason for hiding this comment

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

Your PR description reminds me of output from an LLM. In this case it does not provide any value to the reviewer. Please do not reference files like this, they are viewable in "Files changed" tab of the PR.

Comment thread .changeset/short-parents-applaud.md
Comment thread packages/sdk/src/index.ts Outdated
@VAIBHAVSING VAIBHAVSING requested a review from mathio July 4, 2025 18:42
@VAIBHAVSING
Copy link
Copy Markdown
Contributor Author

@mathio PTAL

@mathio
Copy link
Copy Markdown
Contributor

mathio commented Jul 8, 2025

Testing locally, works as expected:

> tsc && node dist/index.js


node:internal/deps/undici/undici:13510
      Error.captureStackTrace(err);
            ^
DOMException [AbortError]: This operation was aborted
    at node:internal/deps/undici/undici:13510:13
    at async LingoDotDevEngine.localizeChunk (/Users/m/work/lingo.dev/packages/sdk/build/index.cjs:74:17)
    at async LingoDotDevEngine._localizeRaw (/Users/m/work/lingo.dev/packages/sdk/build/index.cjs:48:37)

Node.js v22.17.0
 ELIFECYCLE  Command failed with exit code 1.

@mathio mathio merged commit cb2aa0f into lingodotdev:main Jul 8, 2025
3 checks passed
@VAIBHAVSING VAIBHAVSING deleted the abort branch July 9, 2025 09:44
17prateek12 pushed a commit to 17prateek12/lingo.dev that referenced this pull request Jan 23, 2026
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.

SDK Modules (/packages/sdk): Add support for the Abort Controller API

2 participants