Commit Graph

848 Commits

Author SHA1 Message Date
Renovate Bot e9e2f8d42a chore(): update dependency sync-monorepo-packages to v0.3.5 2022-04-19 14:24:18 +00:00
Jonathan Lipps 50900436d2 docs(appium): hide erroneous release tag and copy generic assets into each language dir 2022-04-18 10:55:24 -07:00
Jonathan Lipps 4f43eb8f03 docs(appium): move from jsdoc to mkdocs and create docutils package 2022-04-18 10:55:24 -07:00
Jonathan Lipps 69663229fa docs(appium): create new docs generator for appium 2 2022-04-18 10:55:24 -07:00
Renovate Bot ad00a2c1b6 chore(test-support): update dependency sinon to v13.0.2 2022-04-17 13:21:58 +00:00
Renovate Bot 98e20221b1 chore(gulp-plugins): update dependency @types/node to v16.11.27 2022-04-16 15:34:29 +00:00
Renovate Bot 14490a0d17 chore(): update dependency lint-staged to v12.3.8 2022-04-15 16:30:47 +00:00
Renovate Bot f50f493dd5 chore(): update dependency @types/async-lock to v1.1.5 2022-04-15 13:29:52 +00:00
Christopher Hiller 8b010df295 chore: simplify test scripts
- `e2e-test` is now `test:e2e`
- removed `pre`/`post` lifecycle scripts because it's hard to parse what's happening
- in CI, e2e tests do _not_ run in parallel, no extra build occurs, no types are built, and no lint happens.  (types/lint happens in a diff job, and there aren't enough cores available for parallel mode to make a difference)
- removed a bunch of scripts to test individual packages. you can just `cd packages/<pkgname> && npm t`
2022-04-14 14:30:00 -07:00
Christopher Hiller 83d87213c3 chore(execute-driver-plugin): import execute-driver-plugin
yeah this is my bad.  if we really need the history I can redo this.

no significant changes; just the usual stuff about builds and types.

bonus: I figured out how to get webdriverio types working
2022-04-14 14:30:00 -07:00
Christopher Hiller 5b54017054 chore: relocated plugins
- left some necessary config in packages/plugins-temp which will get removed after full integration

# Conflicts:
#	packages/appium-plugins/.github/workflows/main.yml
#	packages/appium-plugins/packages/base/package-lock.json
#	packages/appium-plugins/packages/base/package.json
#	packages/appium-plugins/packages/fake/package-lock.json
#	packages/appium-plugins/packages/images/package-lock.json
#	packages/appium-plugins/packages/images/package.json
#	packages/appium-plugins/packages/relaxed-caps/package-lock.json
#	packages/appium-plugins/packages/relaxed-caps/package.json
#	packages/appium-plugins/packages/universal-xml/package-lock.json
#	packages/fake-plugin/lib/logger.js
#	packages/fake-plugin/lib/scripts/fake-error.js
#	packages/fake-plugin/lib/scripts/fake-success.js
#	packages/fake-plugin/package.json
#	packages/universal-xml-plugin/package.json
2022-04-14 14:30:00 -07:00
Christopher Hiller 60d916e6d0 chore: fix clean scripts
note that `clean:distfiles` only cleans generated .js files, `clean:types` only cleans generated types/maps, and `clean:artifacts` does both but then deletes the build dirs just in case. clean happens in correct order now
2022-04-14 14:29:15 -07:00
Christopher Hiller 998fa46035 chore: fix duplicate preversion scripts
- `prepublishOnly` now cleans all build artifacts
- `preversion` does the same, except runs `sync-pkgs` also
2022-04-14 14:29:15 -07:00
Renovate Bot dd7a46e0fd chore(): update webdriverio monorepo to v7.19.5 2022-04-14 15:41:19 +00:00
Renovate Bot 52183f0c4e chore(): update dependency @types/chai to v4.3.1 2022-04-14 12:20:38 +00:00
Christopher Hiller 78f6a23bd3 chore: dev script builds types
- `npm run dev` will build all artifacts in "watch" mode (distfiles and types)
- also updated the default build task for vscode
2022-04-12 14:54:22 -07:00
Jonathan Lipps 42c83f8044 fix(appium,base-driver,doctor,docutils,eslint-config-appium,fake-driver,gulp-plugins,opencv,schema,support,test-support,types): make sure types are cleaned before release 2022-04-12 09:08:34 -07:00
Jonathan Lipps 04d2b385d2 chore(appium-monorepo): reorder clean scripts so reinstall works
cc @boneskull see my comment on previous commit
2022-04-12 08:46:51 -07:00
Renovate Bot d0f29bda28 chore(): update dependency webdriverio to v7.19.4 2022-04-12 12:41:26 +00:00
Jonathan Lipps f971aa9f1c chore(appium-monorepo): fix preversion script by removing schema reference 2022-04-07 16:09:06 -07:00
Christopher Hiller f33b87bbf9 chore(appium,types,schema): create @appium/schema
`@appium/schema` is a package which was extracted from `appium`.  It _only_ contains the schema.  The impetus here was to avoid cyclical dependencies, since `appium` depends on `@appium/types`, and `@appium/types` depends on the schema.  This package breaks the cycle.

The `scripts/generate-schema-json.js` (which converts the compiled JS schema file into JSON) has moved into this package, and the generated JSON file is now under version control.  This is because the `generate-schema-types.js` script (previously `generate-schema-declarations`) depends on it, and `@appium/types` depends on the generated types.  The generated types are _also_ under version control.  I do not expect the schema to change often, so I believe the tradeoff to be worth it.

## @appium/schema

`lib/appium-config-schema.js` is the "single source of truth" for the schema.

## appium

- Removed schema source
- Removed namespaces from internal types because they suck (see change to `types/index.d.ts`)
- Removed unused `continuation-local-storage`
- Add dep for `@appium/schema`
- Added a TS project dependency on `@appium/schema`

## @appium/types

- The "sources" have moved from `src` to `lib` for consistency.
- `lib/appium-config.ts` (the generated types) are now under version control.
- `lib/schema/` has been removed (it previously held the JSON schema artifact)
- `scripts/generate-schema-declarations.js` becomes `scripts/generate-schema-types.js`
- Updated scripts in `package.json`
- Added dep for `@appium/schema`
- Added a TS project dependency on `@appium/schema`

## Other

- Reorganize root `tsconfig.json`; add `schema` reference; remove unused `noEmit: true`
- Sort root `package.json`
- Remove schema JSON and schema declarations scripts, since those are now both handled in their respective packages
- Remove `lint-staged` config for schema file, since it didn't work right anyway (still need to do something about this, but probably doesn't need to be in a precommit hook)
- Remove stuff from `.gitignore`
2022-04-07 14:05:41 -07:00
Renovate Bot 02706de19d chore(gulp-plugins): update babel monorepo to v7.17.9 2022-04-07 14:51:07 +00:00
Renovate Bot bc36b8dfcc chore(gulp-plugins): update dependency eslint-plugin-import to v2.26.0 2022-04-06 13:39:35 +00:00
Renovate Bot 919d55d1cb chore(gulp-plugins): update dependency fancy-log to v2 2022-04-04 15:25:38 -07:00
renovate[bot] d23907def5 chore: update dependency webdriverio to v7 (#15489)
* chore(): update dependency webdriverio to v7

* chore(fake-driver,appium): upgrade webdriverio to latest

- fixed broken tests in `@appium/fake-driver` and `appium`
- remove unused `appium-base-driver` from root of monorepo

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Christopher Hiller <boneskull@boneskull.com>
2022-04-04 15:14:59 -07:00
Renovate Bot 3f388b935a chore(): update dependency @types/base64-stream to v1.0.2 2022-04-01 23:31:46 +00:00
Renovate Bot a91d283128 chore(support): update dependency type-fest to v2.12.2 2022-04-01 11:55:17 +00:00
Christopher Hiller 7a028c8d9a chore: add types for teen_process
which magically appeared. thanks definitelytyped!
2022-03-30 14:43:21 -07:00
Jonathan Lipps 54f1308a36 chore: fix reinstall script and clean ordering 2022-03-29 17:46:16 -07:00
Christopher Hiller 7498a7ab90 chore: add a script to sync LICENSE files across packages
This will be run before publish, and will copy the root `LICENSE` file to all packages, so that they appear in the published tarballs.

`packages/*/LICENSE` are ignored by Git, since they are redundant with the root `LICENSE` file.
2022-03-29 15:54:55 -07:00
Renovate Bot 25fab42940 chore(test-support): update dependency sinon to v13 2022-03-28 11:28:31 -07:00
Renovate Bot 6cf1590a2d chore(): update dependency @types/json-schema to v7.0.11 2022-03-26 17:39:51 +00:00
Renovate Bot 9b6565b3ba chore(gulp-plugins): update dependency eslint-plugin-promise to v6 2022-03-25 15:25:20 -07:00
Christopher Hiller 72085caa0a feat(types): add new @appium/types package
This changes the TS configuration to to a) emit declarations for supported packages, and b) build declarations incrementally by package.

To begin, we are targeting `appium`, `@appium/base-driver` and `@appium/support` for declarations; these three are intended to be published with declarations generated via their JS.

Both `@appium/support` and `appium` are fully typechecked (sans implicit `any` types), but `@appium/base-driver` is mostly not.  Regardless, declarations are generated for all three.

Each package will have its own `tsconfig.json` which "inherits" from `config/tsconfig.base.json`.  Each will also need to declare relative paths to dependencies. e.g., the `appium` package must configure its `tsconfig.json` so that it depends on the declarations of `@appium/support` and also where to find `@appium/support`. Essentially, a small dependency tree gets built, and those at the "root" get their declarations built first; then the consumers use those declarations.

Also reorganized some scripts and added `npm-run-all` to help and added a "typecheck" job to CI.

Since `npm install` will build, it's pretty inconvenient to have `npm` abort installation if the build fails.  In that case, if any of the build steps fail (see `build:loose`) the installation will continue.  Added a `prepublishOnly` which runs a build in "strict" mode where everything must pass.

_Note: there's still a strong coupling of "what `BaseDriver` provides" and "what an external driver *may* provide".  It's unclear to me if this is a problem, though there seem to be a handful of methods that external drivers *must* implement.  The easiest way to get around this would probably be to extract these required properties and methods into their own interface (duplication) if we cannot otherwise declare methods as "abstract".  As it stands, the `Driver` is basically just `BaseDriver`._

Also:

- Moved some configuration types out of `appium` and into here, since they are used both by `appium` and `base-driver` via `DriverOpts`
- Split `Driver` type into "the thing that BaseDriver is" and "all the other methods external drivers can implement"
- Added missing `proxyCommand` method
- Better generics for `LogType`
- Remove unused `Constructor` type
- Better types for `getSession`/`getSessions`
- Added util `Class` type
- Added many missing typings from DefinitelyTyped
- Added `ts-node` for `@wdio/types` (I need to send a PR to webdriver to eliminate this dependency)
- Type checks in their CI step
2022-03-25 14:54:45 -07:00
Renovate Bot 4ff63e2425 chore(): update dependency serve-static to v1.15.0 2022-03-25 14:43:56 +00:00
Renovate Bot 075eaeb8ce chore(): update dependency typescript to v4.6.3 2022-03-25 09:30:00 +00:00
Renovate Bot 1a73ac0b75 chore(): update dependency finalhandler to v1.2.0 2022-03-23 10:34:34 +00:00
Renovate Bot 9fb03950d6 chore(gulp-plugins): update dependency mocha to v9.2.2 2022-03-22 14:08:48 +00:00
Renovate Bot c8ee934718 chore(): update dependency type-fest to v2.12.1 2022-03-19 15:24:03 +00:00
Renovate Bot 0b4dad2f4c chore(): update dependency eslint-find-rules to v4.1.0 2022-03-19 14:06:16 +00:00
Renovate Bot 799fb87be3 chore(gulp-plugins): update babel monorepo to v7.17.8 2022-03-19 11:13:48 +00:00
Renovate Bot 43d36bb60c chore(): update dependency lint-staged to v12.3.7 2022-03-18 15:17:24 +00:00
Renovate Bot ad0814532b chore(): update dependency @types/json-schema to v7.0.10 2022-03-17 12:35:15 +00:00
Renovate Bot 3add8c0906 chore(gulp-plugins): update dependency eslint-plugin-import to v2.25.4 2022-03-16 18:14:37 +00:00
Renovate Bot 3648ed017b chore(gulp-plugins): update dependency @types/node to v16.11.26 2022-03-16 16:43:48 +00:00
Renovate Bot 11fb7c1a2e chore(): update dependency lint-staged to v12.3.6 2022-03-16 13:29:50 +00:00
Renovate Bot 297a307725 chore(gulp-plugins): update babel monorepo to v7.17.7 2022-03-16 10:55:01 +00:00
Renovate Bot 84eb71fb0f chore(): update dependency serve-static to v1.14.2 2022-03-14 14:26:50 +00:00
Renovate Bot d1e0043e37 chore(): update dependency lint-staged to v12.3.5 2022-03-14 11:13:28 +00:00
Renovate Bot b57115b2f0 chore(): update dependency chai to v4.3.6 2022-03-13 16:37:42 +00:00