1. Uses `sync-monorepo-packages` to keep `README.md` and `packages/appium/README.md` in sync. Since `README` gets published to npm but _also_ shows in the GitHub repo, both places need a `README`. In lieu of a custom `README`, we can just sync it for now. This is called via a `preversion` script.
1. Various fields are synced in `package.json`. This does not include dependencies—but those _in common_ should probably be kept in sync as well.
1. Lerna uses conventional commits and Git tags to figure out what to do. It should automatically determine what needs releasing and what version it should be released as.
1. Tags have been pushed to the repo for Lerna to use. In the case where the changesets are functionally identical to the latest code in the old repositories, the version number has been retained, and the tag is of the format `[@scope/]<package-name>@<version>`. In the case where the old repos had _unreleased_ changesets, I’ve tagged with a new patch release and adopted the `-rc.0` suffix. So if we were at v5.5.0 in `appium-gulp-plugins`, `@appium/gulp-plugins` is tagged as `@appium/gulp-plugins@5.5.1-rc.0`. I have not modified the version in `package.json`.
1. As with adopting any new release/publishing strategy, we should be meticulous about what we’re doing until we’re comfortable with how it works. Lerna supports dry runs; we should use them.
1. Documentation on usage will arrive in next changes to this PR.
sinon supports promises natively, and we are using bluebird here. promise resolution seems to go wonky when using sinon's stub `.returns(B.reject(err))`, so now we tell sinon to use _bluebird's_ promises, which makes `.rejects(err)` do the same thing except better.
- remove dupe files
- move dev deps into root
- move `.azure-pipelines.yml` to root for reasons
- tweak gulp `lint` task to avoid linting `.min.js` files (vendored jQuery)
- update `.eslintignore` to do the same
* '2.0-monorepo' of ../appium-base-driver: (762 commits)
chore: prepare to merge history w/ monorepo
chore: bump 8.0 beta to 8.0.0-beta.6
refactor!: generalize concepts of server updater and extra method map basedriver shouldn't really know about plugins or drivers. it should just expose the ability to update the server or add methods
chore: bump 2.0 to beta.5
fix!: remove image element proxy check, and allow proxyRouteIsAvoided to inspect the body
chore: bump to 8.0.0-beta.4
fix: update plugin server adjustment to use new style
chore: bump to 8.0.0-beta.3
feat: allow retrieval of basedriver version from any inheriting driver
chore: bump to 8.0.0-beta.2 since beta.1 is already published
chore!: remove image element code since it is now handled by @appium/images-plugin
fix: Avoid unhandled error on driver exit (#447) (#448)
7.4.1
fix: Avoid unhandled error on driver exit (#447)
feat: make vendor prefix mandatory (#440)
7.4.0
feat: make server connection timeout configurable
chore: bump major version
chore: merge master into 2.0 (#441)
chore: merge master to 2.0 branch (#438)
...
- tests cannot be debugged very easily due to the babel dependencies _and_ the root babel config living in two separate places. this change adds them to the monorepo root. the drawback here is that these modules are duplicated, because they live as dependencies in gulp-plugins as well.
- add a bunch of convenience scripts for e2e tests
- normalize lerna args
`exit: true` is only necessary in mocha if your code doesn't clean up after itself. this is not needed for the unit tests--haven't tested with e2e tests yet
- add `npm start` script to run appium server
- add `npm run doctor` convenience script to run doctor
- renamed `clean` script to `reinstall`
- added new `clean` script to just clean
- updated the "appium from source" doc
this pkg is unique in that it does not use `gulp`, so for now we tell lerna to always ignore it when running `lerna exec` across packages. it has no tests, but it's marginally useful to lint the `index.js`, so we'll do that (see `lint` script in root `package.json`).
the canonical way to handle plugin deps in a sharable config is to use `peerDependencies`, so it now uses `peerDependencies` instead of `dependencies`. these peer deps are installed by the dependencies of `@appium-gulp-plugins`. see [docs](https://eslint.org/docs/developer-guide/shareable-configs#publishing-a-shareable-config)
our root `.eslintrc` depends upon `@appium/eslint-config-appium` (which is not an unusual situation). to pull this off in a monorepo, a cheat is to `file:` schema in the dependency specifier of the root `package.json`.
also tweaked `lerna.json` to _always_ run `bootstrap` with the `--no-ci` flag. lerna will attempt to use `npm ci` if `CI` env var is present, but for that to work, we must have `package-lock.json` under version control.
- all tests changed were needed because of path issues. I was unable to get the tests working in their entirety _without_ adding `@appium/fake-driver` to the monorepo--it would have required a separate `npm install` step in `appium-fake-driver` due to the lack of its `devDependencies` and `prepare` script--so I figured I might as well pull it in now.
- deduped `package.json` scripts somewhat
- updated ESLint configuration to include `@appium/fake-driver`'s rule override
- sorted the root `package.json` because fussy
- added `wd` as a dev dep because `@appium/fake-driver` needs it
This PR supersedes PR #14562.
This is my first attempt at making this repo a monorepo and moving appium-proper into `packages/appium`.
I had tried to make this work with npm's "workspaces", but it seems lifecycle scripts don't run as you'd expect them to upon install. Instead, I'm using Lerna, which provides more features for monorepos.
Changes include:
- The root `package.json` is now a package named `appium-monorepo`, which is `private`. The monorepo should not be published.
- All dev dependencies remain in the root `package.json`.
- `gulpfile.js` _moved_ into `packages/appium/gulpfile.js`, but this should be **temporary**--`appium-gulp-plugins` makes certain assumptions which a monorepo violates, and I was unable to get it working without patching `appium-gulp-plugins`.
- Most of the `package.json` `scripts` moved into `packages/appium/package.json` due to the above. This too should be considered **temporary**.
- Adds a root `postinstall` lifecycle script which calls `lerna bootstrap` to install/link packages. I don't see a `package-lock.json` in `packages/appium/`; this needs investigating.
- Adds a root `test` lifecycle script which executes `npm run test` in all packages. The tests do not pass, but I don't know if this is my fault.
- The `clean` script will purge all `node_modules` folders in each package, as well.
- I removed `scripts/release*.sh`, since it seems they would fail anyway--`lerna` should be used for releases instead
- The shrinkwrap-related stuff is untested.
- Renamed `tags` prop in `packages/appium/package.json` to `keywords`. I don't know if `tags` is supported.