-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat: add all the types #819
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
looks like appium-adb is published, and i'll run another publish of appium soon |
@jlipps hold off on publishing appium; want to make sure xcuitest works ok with those changes |
@jlipps actually, xcuitest is managed by renovate right, so I think it's okay to publish. was just worried loose deps would sink the ship |
index.ts
Outdated
@@ -0,0 +1,28 @@ | |||
import {install} from 'source-map-support'; |
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.
Didn't we already have the same issue in appium/node-teen_process#253 ?
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.
...what?
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.
@jlipps could you please explain better what the actual issue was?
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.
@mykola-mokhnach this should be ok. it's a typescript file and is transpiled. so long as package.json's main field points to the transpiled code this will be ok.
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.
as far as I could tell the problem there was with tsconfig.json
, not source-map-support
index.ts
Outdated
} from './lib/helpers/webview'; | ||
|
||
/** | ||
* @privateRemarks `androidCommands` was previously exported as an object |
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.
we only need mixin commands there. Methods defined in the driver class itself must be ignored
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.
why?
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.
because AndroidDriver class itself contains stuff which is specific for the obsolete driver. It must not be used neither in uia2 nor in espresso
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.
ok, I changed this to the way it was
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.
but also, ideally, uia2 and espresso would be subclasses of AndroidDriver
, which renders it moot; they will get everything in AndroidDriver
and would need to override any prop on the prototype they don't want
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.
right now it is a collection of various mixins and helper methods which matter in this component.
UIA2 and Espresso are too different to prefer subsclassing over composition.
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.
this PR is impossible to really review. I think we should probably just merge/publish as a beta and then do a bunch of testing with uiauto2/espresso
index.ts
Outdated
* prototype from `AndroidDriver` proper. Hopefully, doing it this way won't | ||
* break anything. | ||
*/ | ||
export const androidCommands = {...AndroidDriver.prototype}; |
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.
i think the rationale was that these commands were exported so they could be applied to the prototype of the subclass. it was meant to be "the set of driver commands", not "the set of everything on the AndroidDriver prototype"
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.
so yeah i don't know if this is a bad idea or not. maybe we don't really need this anymore if the commands are applied to the AndroidDriver prototype and all the subclasses extend AndroidDriver?
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.
I guess it remains to be seen. I really have no idea why this is necessary at all
@jlipps that sounds good. this will automatically be published if we merge it, so... maybe we should just publish it from the head branch? |
@mykola-mokhnach why does the PR title have to be in conventional commit format? does it somehow affect the release or changelog? |
yes, it affects the changelog and also the logic for automated versions bumping |
yeah I think so, maybe just publish a beta from this PR branch and we can work with it for a while. this repo doesn't see many commits so i don't anticipate much divergence. we could just freeze all work not related to this PR while we're working on it. |
6aefcdf
to
453d2dc
Compare
53358c2
to
77f29db
Compare
db5c19b
to
e677125
Compare
OK, the build is looking good, so I'm going to publish this as a beta or something. |
14e0b07
to
ccf99ba
Compare
as of right now, this needs new stuff in |
does the release of appium I pushed a few hours ago do the trick? |
@jlipps no it needs appium/appium#18817 |
assuming this build passes, I'll release another alpha off of it and deal w/ appium/appium-uiautomator2-driver#635 |
👍 |
d62fc48
to
e3e95af
Compare
- upgrade typescript - actually ship types - add missing `type-fest` dep chore: use strict types where enabled chore: update eslint config chore: add missing `appWaitForLaunch` constraint; rename file chore: reorganize helpers chore: remove appium-adb stub feat: add types to all commands chore: review changes chore: add wallaby config chore: fix all the tests chore(deps): upgrade to latests 5.14.0-alpha.0 fix: add missing files to release 5.14.0-alpha.1 chore: move index.ts into lib fix: broken types fix(types): fix unknown-related types fix(types): allow generic settings, createresult fix: fix broken main field fix: upgrade appium-chromedriver fix(types): fix inconsistent signature of execute() chore: upgrade appium deps 5.14.0-alpha2 fix: remove unused endCoverage cmd 5.14.0-alpha.3
e3e95af
to
a790400
Compare
this PR requires both appium/appium-adb#661 and appium/appium#18721 to be published for the build to pass.
note: I did not type the entire codebase, but all of the commands are typed, as is the driver proper.
@typedef
s which aren't aliases intotypes.ts
and created many moreThisType
to avoid needing to use@this
everywheremixins.ts
, in addition to the declaration merge withAndroidDriver
coverage
mixin was removed entirely per a slack convoappWaitForLaunch
constraint