Skip to content

feat: Ditch bluebird#996

Merged
mykola-mokhnach merged 3 commits intoappium:masterfrom
mykola-mokhnach:lint
May 3, 2026
Merged

feat: Ditch bluebird#996
mykola-mokhnach merged 3 commits intoappium:masterfrom
mykola-mokhnach:lint

Conversation

@mykola-mokhnach
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

Removes the Bluebird dependency across the project by switching to native Promises and asyncbox utilities, and updates affected unit/functional tests accordingly.

Changes:

  • Removed bluebird / @types/bluebird from package.json and replaced B.all/B.resolve usages with Promise.all/Promise.resolve.
  • Replaced B.delay waits in functional tests with asyncbox helpers (sleep, waitForCondition) and adjusted a few retry patterns.
  • Minor refactors/reordering to keep helper/type definitions and class members organized after the dependency removal.

Reviewed changes

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

Show a summary per file
File Description
test/unit/driver-specs.ts Replaces Bluebird resolves with native Promise.resolve in stubs/mocks.
test/functional/driver-e2e-specs.ts Removes Bluebird delay and uses a more robust retryInterval wait for ADB readiness.
test/functional/desired.ts Moves amendCapabilities earlier (no functional change).
test/functional/commands/orientation-e2e-specs.ts Replaces fixed delays with waitForCondition polling for orientation settling.
test/functional/commands/keyboard/keyboard-e2e-specs.ts Uses asyncbox.sleep instead of B.delay.
test/functional/commands/find/by-image-e2e-specs.ts Uses asyncbox.sleep instead of B.delay.
test/functional/commands/file-movement-e2e-specs.ts Replaces new B(...) with native new Promise(...).
scripts/reset.js Replaces B.all with Promise.all.
package.json Removes bluebird and @types/bluebird dependencies.
lib/uiautomator2.ts Replaces B.* usages with Promise.all and asyncbox.sleep; keeps types co-located.
lib/helpers.ts Adds JSDoc for isWriteable and signApp.
lib/driver.ts Replaces B.all with Promise.all and repositions some class field assignments (no behavior change).
lib/css-converter.ts Moves helper functions (no functional change).
lib/commands/screenshot.ts Replaces B.all with Promise.all.
lib/commands/element.ts Replaces B.all with Promise.all.
lib/commands/app-management.ts Replaces B.all with Promise.all.

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

Comment on lines +78 to +79
await waitForOrientation('LANDSCAPE');
expect(await driver.getOrientation()).to.eql('LANDSCAPE');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since waitForOrientation now calls driver.getOrientation(), the second line doesn't check anything new anymore. Same applies to the following two tests as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

makes sense. Removed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now the tests don't have any expect calls, so they're not actually validating anything

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they still check if the actual orientation has actually changed

@mykola-mokhnach mykola-mokhnach merged commit 68a290e into appium:master May 3, 2026
9 checks passed
@mykola-mokhnach mykola-mokhnach deleted the lint branch May 3, 2026 19:46
github-actions Bot pushed a commit that referenced this pull request May 3, 2026
## [7.2.0](v7.1.2...v7.2.0) (2026-05-03)

### Features

* Ditch bluebird ([#996](#996)) ([68a290e](68a290e))
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

🎉 This PR is included in version 7.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants