Skip to content

Conversation

@antongolub
Copy link
Collaborator

  • Tests pass
  • Appropriate changes to README are included in PR

@antongolub antongolub added the refactoring Internal code improvements label Jul 19, 2025
@antongolub antongolub requested a review from Copilot July 19, 2025 19:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the initialization approach for AbortController and EventEmitter to ensure consistency in the ProcessPromise class. The refactor moves AbortController initialization from the snapshot creation to the class constructor, aligning it with the existing EventEmitter pattern.

  • Moves AbortController instantiation from snapshot to class constructor for consistent initialization
  • Adds a new ac getter to provide access to the abort controller with fallback logic
  • Updates all references to use the new ac property instead of accessing it from the snapshot

Reviewed Changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.

File Description
src/core.ts Main refactor: adds _ac field, removes AC from snapshot, adds ac getter, updates references
build/core.cjs Compiled output reflecting the TypeScript changes
package.json Dependency updates for @types/node and esbuild
.size-limit.json Updated size limits reflecting the code changes

@antongolub antongolub merged commit 553d5e2 into google:main Jul 19, 2025
28 checks passed
@antongolub antongolub deleted the refactor-ac-init branch July 19, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Internal code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant