Skip to content

Remove timers-ext dependency#175

Merged
GrahamCampbell merged 1 commit intomainfrom
remove-timers-ext
Apr 27, 2026
Merged

Remove timers-ext dependency#175
GrahamCampbell merged 1 commit intomainfrom
remove-timers-ext

Conversation

@GrahamCampbell
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

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 removes the external timers-ext dependency by introducing an internal lib/utils/sleep helper and updating runtime + test code to use it.

Changes:

  • Drop timers-ext from package.json.
  • Add lib/utils/sleep.js and update production code to require it instead of timers-ext/promise/sleep.
  • Update tests to import/stub the new sleep helper and add dedicated unit coverage for it.

Reviewed changes

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

Show a summary per file
File Description
test/utils/misc.js Switch test helper to use internal lib/utils/sleep.
test/unit/lib/utils/sleep.test.js Add unit tests for new lib/utils/sleep behavior.
test/unit/lib/plugins/aws/logs.test.js Update proxyquire stub to match new sleep import path.
test/unit/lib/plugins/aws/deploy-function.test.js Update modulesCacheStub to stub the resolved lib/utils/sleep.js module path.
test/unit/lib/configuration/variables/resolve.test.js Replace timers-ext sleep import with internal sleep.
test/unit/lib/aws/request.test.js Update proxyquire stubs to ../utils/sleep.
test/lib/setup-fixtures-engine.js Replace timers-ext sleep import with internal sleep.
test/lib/aws-request.js Replace timers-ext sleep import with internal sleep (used for retry backoff).
test/integration/aws/websocket.test.js Replace timers-ext sleep import with internal sleep.
scripts/serverless.js Replace timers-ext sleep import with internal sleep.
package.json Remove timers-ext dependency.
lib/utils/sleep.js New internal sleep utility with timeout normalization + max-timeout guard.
lib/plugins/aws/logs.js Replace timers-ext sleep import with internal sleep.
lib/plugins/aws/lib/wait-for-change-set-creation.js Replace timers-ext sleep import with internal sleep.
lib/plugins/aws/lib/monitor-stack.js Replace timers-ext sleep import with internal sleep.
lib/plugins/aws/deploy-function.js Replace timers-ext sleep import with internal sleep.
lib/aws/request.js Replace timers-ext sleep import with internal sleep (retry backoff).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GrahamCampbell GrahamCampbell merged commit 96287d2 into main Apr 27, 2026
7 checks passed
@GrahamCampbell GrahamCampbell deleted the remove-timers-ext branch April 27, 2026 01:07
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.

2 participants