Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(appium): allow multiple drivers to be installed
Closes #16674 the problem here was the existence of the empty `package.json`. it should exist, because if it doesn't, then `npm` may end up using a `package.json` in a parent directory. but it can't be _empty_, because subsequent `npm install`s will essentially remove any package that it's currently not installing! `npm` likes to "fix" `node_modules`, which is undesirable here. to avoid this, the behavior has changed to persisting the dependency version to `package.json`. behavior differs if we're using a local `APPIUM_HOME` or the default one. with the default, we have more control, and choose to use `--save-dev --save-exact --no-package-lock --global-style` which gives us what we need. if `APPIUM_HOME` is a local package, all we can do is `--save-dev` (since it's _likely_ that an extension will be a dev dependency). in the future, we may choose to actually determine _what kind_ of dependency `appium` is and tell `npm` to use the same one. not sure if that's needed, though. further, in the case of a local appium dep (local `APPIUM_HOME`), updating `package.json` should cause the package hash (used by the thing that syncs `extensions.yaml` with installed packages) to update as well, so we're doing that. modified the logic in `ExtensionCommand` to treat `--source=local` to pass the `installSpec` thru verbatim. also fixed `BuildInfo` type to reflect reality and use `@types/teen_process`. fixed some other broken types in `test` (files in `test` are not checked by typescript yet; we'll need a separate `tsconfig.json` for this, since we do not want to emit declarations)
- Loading branch information
Showing
8 changed files
with
112 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.