Commit Graph

34 Commits

Author SHA1 Message Date
Kazuaki Matsuo
8f4a5e9752 ci: drop nodejs 12, add 17 (#16703)
* ci: drop nodejs 12, add 18

* 17, not 18 yet as maximum version

* test: increase timeout
2022-04-05 15:31:25 +09:00
Renovate Bot
e5ad7a9fd8 chore(workflows): update actions/checkout action to v3 2022-03-29 17:46:52 -07:00
Renovate Bot
3bfee19a66 chore(workflows): update actions/setup-node action to v3 2022-03-28 11:27:40 -07:00
Christopher Hiller
326b7b4e06 feat(support): generate declaration files
Most of these changes are the addition of types.  There are a few places in which the typechecker found weirdness, and I have addressed those.

- In `logging.js`, `parseInt()` was being called on props of `process.env`; this is not allowed, because `parseInt()` only accepts a string, and props may be `undefined`.
- In `log-internal.js`, I had to remove the `raiseError()` function because TypeScript is unable to understand that a function, when called, will always throw.  The fix was just to replace with `throw new Error...`
- Introduced a var in `mjpeg.js` to avoid repeated casting
- Added some type guards to `net.js`. as function parameters, union types kind of suck. This is definitely one place TS would have helped, since it allows function overloads.  Also dropped use of deprecated `url` module in lieu of W3C `URL`.
- Removed some old-node-version cruft from `util.js`.

Non-code changes:

- Needed to use an override for `type-fest`, as it's included as a transitive dependency, but otherwise is only present in the devdeps of the monorepo root `package.json`. This means, due to version conflicts, a `support/node_modules/type-fest` would be created with an old, incompatible version, which would be preferred over the monorepo one due to Node's resolution algorithm.  This needs npm v8.3+ to work properly, but is only a problem for contributors (not consumers).
- Pinned type of `opencvv-bindings`.
- No longer deleting `build` dir before transpilation since it may contain generated declarations!
2022-03-25 14:54:45 -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
Christopher Hiller
c653d2cf3b chore: lint the code once per build action
Previously, every version of Node.js would run eslint, which is redundant
2022-03-10 10:52:02 -08:00
Christopher Hiller
ab9e2458ee chore: add workflow_dispatch event trigger
update install script URL.
2021-12-03 11:53:22 -08:00
Christopher Hiller
fa453a18db chore: restrict FOSSA workflow
This PR moves the FOSSA check from the Node workflow to its own.  It won't run if the API key secret is not present (which would be true when running PRs from forks).

In addition, the check

1. will only run on changes to any `package.json` in the monorepo
2. runs `fossa test` to fail upon failure (previously it would only fail upon _error_)
2021-12-03 11:53:22 -08:00
Christopher Hiller
91c3ff7f19 chore: attempt to get install-fake-driver working again in CI 2021-11-18 12:08:50 -08:00
Jonathan Lipps
bf313c2b07 fix(ci): fix fossa script yml typo 2021-08-19 13:38:28 -07:00
Christopher Hiller
76d147aba1 chore: configure FOSSA
FOSSA was giving us a bunch of warnings about copyleft licenses, but these licenses are only present in our examples.  This configuration file will tell FOSSA to ignore that stuff.

FOSSA recognizes `examples/` as something it should skip, but not `sample-code`.  It's easier to rename the dir than it is to negotiate a PR with FOSSA.  Why they don't allow the config file to just ignore directories is beyond me...
2021-08-18 12:25:13 -07:00
Christopher Hiller
de428c60c8 chore: add node.js v16 to build matrix
- run `generate_docs` build with default Node.js
- multiline yaml
2021-06-30 10:01:58 -07:00
renovate[bot]
ce47f82d17 chore(workflows): update actions/setup-node action to v2 (#15496)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-11 08:29:47 -07:00
Christopher Hiller
9ca3f0f119 chore: replace call to lerna in workflow with npm script 2021-05-17 14:17:48 -07:00
Christopher Hiller
f7c9286e92 update node.js workflow for lerna 2021-05-17 14:17:40 -07:00
Christopher Hiller
db8e19e965 update node.js workflow for lerna 2021-05-17 14:17:40 -07:00
Jonathan Lipps
648d62e715 chore: require node v12 2021-01-19 16:30:43 -08:00
Kazuaki Matsuo
3e98cc98f3 chore: merge master to 2.0 (#15007)
* fix: fix urls in docs (#14910)

* docs: Update generated docs [ci skip] (#14913)

Co-authored-by: runner <runner@Mac-1606273407156.local>

* feat: Add Mac2Driver (#14911)

* docs: Add Mac2Driver documentation (#14914)

* chore: add scripts for doing releases (#14918)

* docs: Update push-file.yml (#14920)

* chore: fix a link in appium.io (#14929)

* fix links

* fix

* docs: Update generated docs [ci skip] (#14930)

Co-authored-by: runner <runner@Mac-1607067954655.local>

* docs: removed deprecated method (#14934)

assert.equal was deprecated — since v9.9.0 - use strictEqual() instead.

* docs: add links to mac2 driver in caps and settings (#14942)

* cods: add links to mac2 driver in caps and settings

* tweak naming

* chore: remove authorize-ios from package (#14946)

* chore: add 1.19.1 in changelog (#14947)

* feat: add --keep-alive-timeout CLI arg to adjust server keepalive and connection timeout

* rename release-candidate.sh to release

* chore: Switch to GitHub CI (#14978)

* docs: changelog for Appium v1.20 (#14985)

* docs: swap out hamcrest.org reference

* docs: fix example comment (#14995)

changed the app name in a comment for the notepad example from AlarmClock to Notepad

* docs: update README with english tutorial version to learn Appium with Python (#14999)

* update README

* Update README.md

* remove duplicated lib/parser.js

* install fakedriver

Co-authored-by: Appium Triager <maintainers@appium.io>
Co-authored-by: runner <runner@Mac-1606273407156.local>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
Co-authored-by: Dan Graham <dpgraham.85@gmail.com>
Co-authored-by: Ilija Boshkov <ilija.boshkov@gmail.com>
Co-authored-by: runner <runner@Mac-1607067954655.local>
Co-authored-by: roman-olshevskiy <56480723+roman-olshevskiy@users.noreply.github.com>
Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
Co-authored-by: BoldAsLove <john.wojner@gmail.com>
Co-authored-by: Maria Clara dos Santos Bezerra <clarinhab@gmail.com>
2021-01-11 08:04:13 +09:00
dependabot-preview[bot]
c440fdc58d chore: Update Dependabot config file (#14712)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-06 19:16:04 +09:00
Mark Han
591c776b8e Add documentation checkbox (#13120) 2019-08-26 08:00:56 -04:00
Isaac A. Murchie
7aefac479c Add lock app to deal with old issues (#12534) 2019-04-23 13:44:22 -04:00
Isaac A. Murchie
fe03aedb1b Add npm/yarn question to issue template (#12070) 2019-01-24 13:50:37 -05:00
Isaac A. Murchie
04f6543561 Bring Sample Code into master (#10880)
* Sample code stub (#9887)

* WD tests

* WD sample code (#9918)

* WebdriverIO sample code (#10166)

* Ruby sample code (#10331)

* PHP Sample Code (#10209)

* Basic Android java test

* Java sample code (#10427)

* Sample code (#10834)

* Sample code stub (#9887)

* WD tests

* WD sample code (#9918)

* WebdriverIO sample code (#10166)

* Ruby sample code (#10331)

* PHP Sample Code (#10209)

* Basic Android java test

* Java sample code (#10427)

* fixed WDIO test

* Update .npmignore
2018-06-15 08:23:42 -04:00
Isaac A. Murchie
355980b6b2 Make the CONTRIBUTING link in the PR template point to the right place (#9732) 2017-12-04 08:08:35 -05:00
Jonathan Lipps
aefbedf8f0 remove suggested reviewers from pull request template
github now has a reviewer request feature so this is duplicative.
2017-08-18 11:02:24 -07:00
vikramvi
5f531f400a updated issue template with clear instructions to provide appium logs in gist format only 2017-03-10 07:05:53 +01:00
Jonathan Lipps
4f09890104 Merge pull request #7823 from appium/isaac-pr
Fix CLA link in PR template
2017-02-07 11:33:34 -08:00
Isaac Murchie
35292fdfd4 Fix CLA link in PR template 2017-02-07 10:15:22 -05:00
Bas Broek
a6d4d1b5c3 Remove unnecessary punctuation 2017-02-07 15:43:41 +01:00
Bas Broek
66f03c7796 Fix typos in Issue Template 2017-02-07 15:30:56 +01:00
vikramvi
1d3f7e2334 updated issue template asking users to give optional source code as well. 2016-03-03 19:07:20 +01:00
Jonathan Lipps
a0cd6dd22e add a pull request template (and mention the CLA) 2016-02-17 14:29:37 -08:00
Jonathan Lipps
8142eec021 fix correct version of issue template 2016-02-17 12:29:06 -08:00
Jonathan Lipps
28222a9ba8 add basic issue template 2016-02-17 12:23:45 -08:00