-
Notifications
You must be signed in to change notification settings - Fork 469
feat: Migrate the module to typescript #1096
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
Conversation
There was a problem hiding this 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 migrates the appium-webdriveragent module from JavaScript to TypeScript, introducing several breaking changes by removing deprecated functionality. The migration includes updating all source files to TypeScript, converting utility scripts to ESM modules (.mjs format), and marking private methods and properties appropriately for better encapsulation.
Key changes:
- Complete TypeScript migration with proper type annotations and interfaces
- Removed deprecated parameters:
xcodeVersionfrom WebDriverAgent and XcodeBuild constructors,idbproperty from WebDriverAgent - Removed deprecated
checkForDependenciesexport from the public API - Scripts converted to ESM format (.mjs) with proper import.meta.url usage
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/webdriveragent-specs.ts | Updated test constructor calls to remove xcodeVersion parameter; added type casts for private method access |
| test/functional/webdriveragent-e2e-specs.ts | Removed xcodeVersion imports and usage; updated constructors and private method access |
| test/functional/helpers/simulator.ts | Removed CLOUD environment variable checks |
| package.json | Updated script references from .js to .mjs for build and utility scripts |
| lib/xcodebuild.ts | Migrated to TypeScript with proper types; removed xcodeVersion parameter; marked private methods; reorganized method order |
| lib/webdriveragent.ts | Migrated to TypeScript; removed deprecated idb property and xcodeVersion parameter; converted many methods to private; added xcodebuild getter with error handling |
| lib/utils.ts | Converted to TypeScript with typed exports; refactored for ESM compatibility with __filename/__dirname handling |
| lib/no-session-proxy.ts | Migrated to TypeScript with proper ProxyOptions typing and override keyword |
| lib/logger.ts | New TypeScript file replacing logger.js with named export |
| lib/constants.ts | New TypeScript file with const exports replacing .js version |
| lib/check-dependencies.ts | Migrated to TypeScript; removed deprecated checkForDependencies function |
| index.ts | Updated to remove checkForDependencies export per breaking change |
| Scripts/update-wda-version.mjs | Converted to ESM with proper import statements |
| Scripts/fetch-prebuilt-wda.mjs | Converted to ESM with import.meta.url for module detection |
| Scripts/build-webdriveragent.mjs | Converted to ESM with proper import statements and module detection |
Comments suppressed due to low confidence (3)
lib/webdriveragent.ts:292
- The logic in this method is inverted. The documentation states it returns
trueif the source is fresh (all required files exist), but the implementation returnstruewhen at least one file does NOT exist (usingsome((v) => v === false)). This should useevery((v) => v === true)instead to correctly returntruewhen all files exist, or the documentation should be corrected to match the actual behavior.
lib/webdriveragent.ts:597 - Spelling error: "hovewer" should be "however".
lib/webdriveragent.ts:621 - Spelling error: "clenup" should be "cleanup".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## [11.0.0](v10.5.4...v11.0.0) (2025-12-21) ### ⚠ BREAKING CHANGES * Removed the deprecated xcodeVersion argument from WebDriverAgent constructor * Removed the deprecated xcodeVersion argument from XcodeBuild constructor * Removed the deprecated idb property from WebDriverAgent class * Removed the noop checkForDependencies export from index - All .js modules were migrated to TypeScript - Module scripts were migrated to ESM/.mjs - All private WebDriverAgent and XcodeBuild methods and properties were marked as such ### Features * Migrate the module to typescript ([#1096](#1096)) ([7d0a022](7d0a022))
|
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: Removed the deprecated xcodeVersion argument from WebDriverAgent constructor
BREAKING CHANGE: Removed the deprecated xcodeVersion argument from XcodeBuild constructor
BREAKING CHANGE: Removed the deprecated idb property from WebDriverAgent class
BREAKING CHANGE: Removed the noop checkForDependencies export from index