chore: create appium monorepo; closes #14441

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.
This commit is contained in:
Christopher Hiller
2021-05-07 15:49:20 -07:00
parent f6e31765b9
commit a945cfcde0
189 changed files with 126 additions and 91 deletions
-13
View File
@@ -1,13 +0,0 @@
git fetch
echo "* Creating release branch $1"
git checkout -b releases/$1
rm -rf node_modules/ npm-shrinkwrap.json package-lock.json
npm install
npm shrinkwrap
echo "* git add ."
git add npm-shrinkwrap.json package.json
git commit -m 'add shrinkwrap'
echo "* npm version $1.0-rc.0"
npm version $1.0-rc.0
git push origin releases/$1
bash ./scripts/release.sh
-4
View File
@@ -1,4 +0,0 @@
npm version prerelease --preid=$1
git push
git push --tags
npm publish --tag $1