Commit Graph
6 Commits
Author SHA1 Message Date
Christopher Hiller 65c8ed1adc chore(appium): fix various broken tests tests (#17787)
- update flattened schema fixture to match actual schema
- plugin/driver e2e tests were also busted

NOTE: test that checks for a symlink when doing a local install is _not_ passing in CI and I cannot reproduce locally. I have disabled the test for now.
2022-11-18 17:00:28 -08:00
Kazuaki MatsuoandJonathan Lipps 6082118de0 docs(appium): update migration guide more (#17770)
* address wrap with qupte for Win env

* use the comma-delimited string

* Update migrating-1-to-2.md

* Update appium-config-schema.js

* Update migrating-1-to-2.md

* Apply suggestions from code review

Co-authored-by: Jonathan Lipps <jlipps@gmail.com>

Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
2022-11-16 17:18:52 -08:00
Christopher Hiller 09c5901719 fix(schema): add definition for log filters 2022-11-02 18:39:16 -07:00
Christopher Hiller 726a7e10de feat(schema): allow root $schema prop
this allows a config file to reference the config schema for validation via editor/IDE
2022-11-02 18:39:16 -07:00
Christopher Hiller 133db5355f chore: reformat everything
this reformats all `.js`, `.ts`, and `.d.ts` files.
2022-05-09 19:09:50 -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