mirror of
https://github.com/appium/appium.git
synced 2026-10-17 04:41:24 +08:00
chore: use tsc for compilation across the board
- `@appium/gulp-plugins` does not use `tsc` and continues to use...whatever it uses.
- `@appium/doctor` now has generated declarations, though I didn't bother to do anything with the types
- rewrote swaths of build scripts:
- removed the `fix` and `lint` scripts from each workspace (package) since I don't think they get used and they are of limited value
- for tests and autoinstallation of extensions, added `ts-node` for on-the-fly compilation
- workspaces _can_ define their own `build` and `clean` scripts (both should be required if either is used). these do not currently get run when running `npm run dev`, but they do occur on a bare `npm install` from the monorepo root or a `npm run reinstall`.
- `npm run rebuild` does a fresh rebuild, but does not clean any `node_modules` dirs nor does it reinstall anything.
- removed `prepublishOnly` since `preversion` does the same thing
- `npm test` now runs `build`/`lint` in parallel
- postinstall script of `appium` ("autoinstall") script now must call `npm run build` if in a fresh dev environment. this is because a) lifecycle scripts of packages run before lifecycle scripts in the monorepo root, and b) `postinstall` runs before `prepare`. so there's really no way around it; even using `ts-node` fails because other modules depend on `@appium/support/index.js` which expects the pkg to be built.
Closes #17746
Closes #17807
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "14"
|
||||
},
|
||||
"shippedProposals": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": ["source-map-support"],
|
||||
"comments": false,
|
||||
"sourceMaps": true,
|
||||
"env": {
|
||||
"coverage": {
|
||||
"plugins": [
|
||||
[
|
||||
"istanbul",
|
||||
{
|
||||
"exclude": ["test", "build"]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"retainLines": true,
|
||||
"comments": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
|
||||
Generated
+1
-167
@@ -13,10 +13,6 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@appium/fake-plugin": "1.3.1",
|
||||
"@babel/cli": "7.19.3",
|
||||
"@babel/core": "7.20.5",
|
||||
"@babel/preset-env": "7.20.2",
|
||||
"@babel/register": "7.18.9",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@commitlint/cli": "17.3.0",
|
||||
"@commitlint/config-conventional": "17.3.0",
|
||||
@@ -30,8 +26,6 @@
|
||||
"@types/teen_process": "2.0.0",
|
||||
"@types/ws": "8.5.3",
|
||||
"asyncbox": "2.9.4",
|
||||
"babel-plugin-istanbul": "6.1.1",
|
||||
"babel-plugin-source-map-support": "2.2.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-webdriverio-async": "2.7.0",
|
||||
@@ -64,6 +58,7 @@
|
||||
"sinon-chai": "3.7.0",
|
||||
"sync-monorepo-packages": "1.0.1",
|
||||
"through2": "4.0.2",
|
||||
"ts-node": "10.9.1",
|
||||
"typedoc": "0.23.21",
|
||||
"typedoc-plugin-markdown": "3.14.0",
|
||||
"typedoc-plugin-resolve-crossmodule-references": "0.3.2",
|
||||
@@ -169,34 +164,6 @@
|
||||
"resolved": "packages/universal-xml-plugin",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@babel/cli": {
|
||||
"version": "7.19.3",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "^0.3.8",
|
||||
"commander": "^4.0.1",
|
||||
"convert-source-map": "^1.1.0",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"glob": "^7.2.0",
|
||||
"make-dir": "^2.1.0",
|
||||
"slash": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"babel": "bin/babel.js",
|
||||
"babel-external-helpers": "bin/babel-external-helpers.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3",
|
||||
"chokidar": "^3.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.18.6",
|
||||
"license": "MIT",
|
||||
@@ -1574,24 +1541,6 @@
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/register": {
|
||||
"version": "7.18.9",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"clone-deep": "^4.0.1",
|
||||
"find-cache-dir": "^2.0.0",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.5",
|
||||
"source-map-support": "^0.5.16"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.20.1",
|
||||
"license": "MIT",
|
||||
@@ -4259,12 +4208,6 @@
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nicolo-ribaudo/chokidar-2": {
|
||||
"version": "2.1.8-no-fsevents.3",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/@nicolo-ribaudo/eslint-scope-5-internals": {
|
||||
"version": "5.1.1-v1",
|
||||
"license": "MIT",
|
||||
@@ -7616,14 +7559,6 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "4.1.1",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/common-ancestor-path": {
|
||||
"version": "1.0.1",
|
||||
"dev": true,
|
||||
@@ -10107,86 +10042,6 @@
|
||||
"version": "2.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/find-cache-dir": {
|
||||
"version": "2.1.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commondir": "^1.0.1",
|
||||
"make-dir": "^2.0.0",
|
||||
"pkg-dir": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/find-cache-dir/node_modules/find-up": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"locate-path": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/find-cache-dir/node_modules/locate-path": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-locate": "^3.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/find-cache-dir/node_modules/p-limit": {
|
||||
"version": "2.3.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-try": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/find-cache-dir/node_modules/p-locate": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-limit": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/find-cache-dir/node_modules/path-exists": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/find-cache-dir/node_modules/pkg-dir": {
|
||||
"version": "3.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"find-up": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/find-up": {
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
@@ -10606,11 +10461,6 @@
|
||||
"xtend": "~4.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-readdir-recursive": {
|
||||
"version": "1.1.0",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
@@ -18864,14 +18714,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pirates": {
|
||||
"version": "4.0.5",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/pixelmatch": {
|
||||
"version": "4.0.2",
|
||||
"license": "ISC",
|
||||
@@ -20691,14 +20533,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/slash": {
|
||||
"version": "2.0.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/slice-ansi": {
|
||||
"version": "5.0.0",
|
||||
"dev": true,
|
||||
|
||||
+21
-26
@@ -27,42 +27,42 @@
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run-s build:types build:distfiles",
|
||||
"build:distfiles": "lerna run build",
|
||||
"build:types": "tsc -b",
|
||||
"clean": "run-s clean:artifacts clean:packages clean:monorepo",
|
||||
"clean:artifacts": "run-s clean:distfiles clean:types && npx rimraf \"packages/*/build\"",
|
||||
"clean:distfiles": "npx rimraf \"packages/*/build/**/*.js\"",
|
||||
"clean:monorepo": "npx rimraf node_modules",
|
||||
"clean:packages": "lerna clean -y",
|
||||
"clean:types": "tsc -b --clean",
|
||||
"dev": "run-p dev:*",
|
||||
"dev:distfiles": "lerna run dev",
|
||||
"dev:types": "tsc -b --watch",
|
||||
"build": "tsc -b",
|
||||
"build:all": "run-s build build:packages",
|
||||
"build:packages": "lerna run build",
|
||||
"clean": "run-s \"clean:artifacts:*\" clean:workspaces",
|
||||
"clean:artifacts": "run-p \"clean:artifacts:*\"",
|
||||
"clean:artifacts:distfiles": "run-s \"build -- --clean\"",
|
||||
"clean:artifacts:packages": "lerna run clean || true",
|
||||
"clean:workspaces": "lerna clean -y",
|
||||
"ci": "npm ci",
|
||||
"dev": "run-s \"build -- --watch\"",
|
||||
"doctor": "node ./packages/doctor",
|
||||
"generate-docs": "lerna run --scope=appium generate-docs",
|
||||
"prepare": "husky install && npm run build:types || true",
|
||||
"husky-install": "husky install",
|
||||
"generate-docs": "npm run --workspace=packages/appium generate-docs",
|
||||
"prepare": "run-p husky-install build:all || true",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"lint:fix": "run-s \"lint -- --fix\"",
|
||||
"lint:commit": "commitlint",
|
||||
"lint:staged": "lint-staged",
|
||||
"prepublishOnly": "run-s clean:artifacts build sync-pkgs",
|
||||
"reinstall": "run-s clean && npm ci",
|
||||
"rebuild:types": "run-s clean:types build:types",
|
||||
"prepublishOnly": "run-s rebuild",
|
||||
"reinstall": "run-s clean ci",
|
||||
"rebuild": "run-s clean:artifacts build:all",
|
||||
"start": "appium",
|
||||
"sync-pkgs": "run-p sync-pkgs:*",
|
||||
"sync-pkgs:appium-readme": "sync-monorepo-packages --force --no-package-json --packages=packages/appium README.md",
|
||||
"sync-pkgs:common-fields": "sync-monorepo-packages --fields=author,license,bugs,homepage,engines",
|
||||
"sync-pkgs:keywords": "sync-monorepo-packages --field=keywords --packages=\"packages/*\" --packages=\"!packages/eslint-config-appium\" --packages=\"!packages/types\"",
|
||||
"sync-pkgs:license": "sync-monorepo-packages --force --no-package-json LICENSE",
|
||||
"test": "run-s build test:unit lint",
|
||||
"stage-synced-pkgs": "git add -A packages/appium/README.md \"packages/*/package.json\"",
|
||||
"test": "npm-run-all -p lint build -s test:unit",
|
||||
"test:ci": "run-s test:smoke test:unit test:e2e",
|
||||
"test:e2e": "lerna run --concurrency=1 --max-buffer=128 test:e2e",
|
||||
"test:smoke": "smoker --all test:smoke",
|
||||
"test:unit": "lerna run test",
|
||||
"typedoc": "typedoc --logLevel Verbose",
|
||||
"upload": "gulp github-upload",
|
||||
"preversion": "run-s clean:artifacts build sync-pkgs && git add -A packages/appium/README.md packages/*/package.json",
|
||||
"preversion": "run-s rebuild sync-pkgs stage-synced-pkgs",
|
||||
"zip": "zip -qr ./appium.zip ./packages/appium",
|
||||
"zip-and-upload": "run-s zip upload"
|
||||
},
|
||||
@@ -73,10 +73,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@appium/fake-plugin": "1.3.1",
|
||||
"@babel/cli": "7.19.3",
|
||||
"@babel/core": "7.20.5",
|
||||
"@babel/preset-env": "7.20.2",
|
||||
"@babel/register": "7.18.9",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@commitlint/cli": "17.3.0",
|
||||
"@commitlint/config-conventional": "17.3.0",
|
||||
@@ -90,8 +86,6 @@
|
||||
"@types/teen_process": "2.0.0",
|
||||
"@types/ws": "8.5.3",
|
||||
"asyncbox": "2.9.4",
|
||||
"babel-plugin-istanbul": "6.1.1",
|
||||
"babel-plugin-source-map-support": "2.2.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-webdriverio-async": "2.7.0",
|
||||
@@ -124,6 +118,7 @@
|
||||
"sinon-chai": "3.7.0",
|
||||
"sync-monorepo-packages": "1.0.1",
|
||||
"through2": "4.0.2",
|
||||
"ts-node": "10.9.1",
|
||||
"typedoc": "0.23.21",
|
||||
"typedoc-plugin-markdown": "3.14.0",
|
||||
"typedoc-plugin-resolve-crossmodule-references": "0.3.2",
|
||||
|
||||
@@ -41,19 +41,14 @@
|
||||
"types"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "exit 0",
|
||||
"build:docs": "node docs/scripts/build-docs.js",
|
||||
"build:docs:cli": "node docs/scripts/gen-cli-args-docs.js",
|
||||
"build:docs:assets": "node docs/scripts/copy-assets.js",
|
||||
"dev": "npm run build -- --watch",
|
||||
"build:docs:cli": "node docs/scripts/gen-cli-args-docs.js",
|
||||
"dev:docs": "npm run build:docs:assets && npm run dev:docs:en",
|
||||
"dev:docs:en": "mkdocs serve -f ./docs/mkdocs-en.yml",
|
||||
"dev:docs:ja": "mkdocs serve -f ./docs/mkdocs-ja.yml",
|
||||
"dev:docs:zh": "mkdocs serve -f ./docs/mkdocs-zh.yml",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"postinstall": "node ./scripts/autoinstall-extensions.js",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "tsc -b",
|
||||
"publish:docs": "cross-env APPIUM_DOCS_PUBLISH=1 npm run build:docs",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha --timeout 1m --slow 30s \"./test/e2e/**/*.spec.js\"",
|
||||
@@ -107,8 +102,8 @@
|
||||
"access": "public",
|
||||
"tag": "next"
|
||||
},
|
||||
"gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72",
|
||||
"typedoc": {
|
||||
"entryPoint": "./build/lib/main.js"
|
||||
},
|
||||
"gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,24 @@
|
||||
* code upon failure (which will typically break a build). Otherwise, it
|
||||
* will always exit with code 0, even if errors occur.
|
||||
*
|
||||
* @module
|
||||
* @example
|
||||
* `npm install -g appium --drivers=uiautomator2,xcuitest --plugins=images`
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const {exec} = require('teen_process');
|
||||
const B = require('bluebird');
|
||||
|
||||
B.config({
|
||||
cancellation: true,
|
||||
});
|
||||
|
||||
/**
|
||||
* This is only used if we're actually in the monorepo
|
||||
*/
|
||||
const MONOREPO_ROOT = path.join(__dirname, '..', '..', '..');
|
||||
|
||||
/** @type {import('../lib/cli/extension').runExtensionCommand} */
|
||||
let runExtensionCommand;
|
||||
/** @type {import('../lib/constants').DRIVER_TYPE} */
|
||||
@@ -27,44 +41,82 @@ let PLUGIN_TYPE;
|
||||
/** @type {import('../lib/extension').loadExtensions} */
|
||||
let loadExtensions;
|
||||
|
||||
const {env, util, logger} = require('@appium/support');
|
||||
const _ = require('lodash');
|
||||
const wrap = _.partial(
|
||||
require('wrap-ansi'),
|
||||
_,
|
||||
process.stderr.columns ?? process.stdout.columns ?? 25
|
||||
process.stderr.columns ?? process.stdout.columns ?? 80
|
||||
);
|
||||
|
||||
const ora = require('ora');
|
||||
|
||||
const log = (message) => {
|
||||
let env, util, logger;
|
||||
|
||||
function log(message) {
|
||||
console.error(wrap(`[Appium] ${message}`));
|
||||
};
|
||||
}
|
||||
|
||||
const spinner = ora({
|
||||
text: 'Checking Appium installation...',
|
||||
prefixText: '[Appium]',
|
||||
}).start();
|
||||
async function init() {
|
||||
/** @type {import('ora').Ora} */
|
||||
let spinner;
|
||||
|
||||
try {
|
||||
({runExtensionCommand} = require('../build/lib/cli/extension'));
|
||||
({DRIVER_TYPE, PLUGIN_TYPE} = require('../build/lib/constants'));
|
||||
({loadExtensions} = require('../build/lib/extension'));
|
||||
spinner.succeed('Appium installation OK');
|
||||
// suppress logs from Appium, which mess up the script output
|
||||
logger.getLogger('Appium').level = 'error';
|
||||
} catch (e) {
|
||||
spinner.fail(`Could not load required module(s); has Appium been built? (${e.message})`);
|
||||
if (process.env.CI) {
|
||||
console.error('Detected CI environment, exiting with code 1');
|
||||
process.exitCode = 1;
|
||||
} else {
|
||||
process.exitCode = 0;
|
||||
try {
|
||||
({env, util, logger} = require('@appium/support'));
|
||||
require('..');
|
||||
} catch {
|
||||
spinner = ora({
|
||||
text: 'Building Appium dev environment...',
|
||||
prefixText: '[Appium]',
|
||||
}).start();
|
||||
|
||||
try {
|
||||
const {stderr, code} = await exec('npm', ['run', 'build'], {
|
||||
cwd: MONOREPO_ROOT,
|
||||
encoding: 'utf8',
|
||||
});
|
||||
if (!code) {
|
||||
spinner.succeed('Appium build successfully.');
|
||||
} else {
|
||||
spinner.fail(`Building Appium failed!`);
|
||||
log(stderr);
|
||||
}
|
||||
} catch (err) {
|
||||
spinner.fail(`Building Appium failed!`);
|
||||
log(err);
|
||||
}
|
||||
}
|
||||
process.exit();
|
||||
|
||||
spinner = ora({
|
||||
text: 'Checking Appium installation...',
|
||||
prefixText: '[Appium]',
|
||||
}).start();
|
||||
|
||||
try {
|
||||
({env, util, logger} = require('@appium/support'));
|
||||
({runExtensionCommand} = require('../build/lib/cli/extension'));
|
||||
({DRIVER_TYPE, PLUGIN_TYPE} = require('../build/lib/constants'));
|
||||
({loadExtensions} = require('../build/lib/extension'));
|
||||
spinner.succeed('Appium installation OK');
|
||||
// suppress logs from Appium, which mess up the script output
|
||||
logger.getLogger('Appium').level = 'error';
|
||||
} catch (e) {
|
||||
spinner.fail(`Could not load required module(s); has Appium been built? (${e.message})`);
|
||||
if (process.env.CI) {
|
||||
log('Detected CI environment, exiting with code 1');
|
||||
process.exitCode = 1;
|
||||
} else {
|
||||
process.exitCode = 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
if (!(await init())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if we're doing `npm install -g appium` then we will assume we don't have a local appium.
|
||||
if (!process.env.npm_config_global && (await env.hasAppiumDependency())) {
|
||||
log(`Found local Appium installation; skipping automatic installation of extensions.`);
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
"@appium/schema": ["../schema"],
|
||||
"appium": ["."]
|
||||
},
|
||||
"checkJs": true,
|
||||
"emitDeclarationOnly": false
|
||||
"checkJs": true
|
||||
},
|
||||
"include": ["lib", "types"],
|
||||
"references": [
|
||||
|
||||
@@ -35,11 +35,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -23,11 +23,6 @@
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
|
||||
@@ -37,13 +37,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build:lib": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"build:bin": "babel bin --source-maps --root-mode=upward --out-dir=build/bin",
|
||||
"build": "run-s build:*",
|
||||
"dev": "run-p \"build:lib -- --watch\" \"build:bin -- --watch\"",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./build/lib/index.js",
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../../config/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "build",
|
||||
"paths": {
|
||||
"@appium/support": ["../support"],
|
||||
},
|
||||
},
|
||||
"include": ["lib", "bin"],
|
||||
"references": [
|
||||
{"path": "../support"}
|
||||
]
|
||||
}
|
||||
@@ -34,13 +34,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "npm run build:sources && npm run build:test",
|
||||
"build:sources": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"build:test": "babel test --source-maps --root-mode=upward --out-dir=build/test --copy-files",
|
||||
"dev": "npm run build:sources -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "echo \"No e2e tests for this package\"",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -33,11 +33,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --root-mode=upward --source-maps --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "mocha \"test/unit/**/*.spec.js\""
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
"eslint:find:current-rules": "eslint-find-rules -c",
|
||||
"eslint:find:plugin-rules": "eslint-find-rules -p",
|
||||
"eslint:find:unused-rules": "eslint-find-rules -u -n",
|
||||
"lint": "eslint index.js",
|
||||
"test:smoke": "node ./index.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha -t 160s --slow 20s \"./test/e2e/**/*.spec.js\"",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -36,11 +36,6 @@
|
||||
"test/fixtures"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib --copy-files",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
|
||||
"test:smoke": "node ./build/lib/index.js",
|
||||
|
||||
@@ -23,11 +23,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "npx rimraf build",
|
||||
"dev": "gulp dev --no-notif",
|
||||
"build": "gulp transpile",
|
||||
"prepare": "npm run build",
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha --timeout 40s --slow 20s \"./test/e2e/**/*.spec.js\"",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -33,11 +33,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --root-mode=upward --source-maps --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "exit 0"
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
|
||||
@@ -30,13 +30,8 @@
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "run-s build:*",
|
||||
"build:distfiles": "babel lib --source-maps --root-mode=upward --out-dir=build",
|
||||
"build:schema-json": "node ./scripts/generate-schema-json.js",
|
||||
"dev": "npm run build:distfiles -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"build": "node ./scripts/generate-schema-json.js",
|
||||
"clean": "git checkout -- ./lib/appium-config.schema.json",
|
||||
"test:smoke": "node ./index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -33,11 +33,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:e2e": "mocha --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -38,11 +38,6 @@
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
"author": "https://github.com/appium",
|
||||
"types": "./build/plugin.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -b",
|
||||
"dev": "exit 0",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "exit 0",
|
||||
"test:e2e": "exit 0",
|
||||
"test:smoke": "node ./index.js",
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"rootDir": "lib",
|
||||
"outDir": "build",
|
||||
"strict": true,
|
||||
"emitDeclarationOnly": false,
|
||||
"module": "CommonJS",
|
||||
"sourceMap": true,
|
||||
"lib": ["ES2022"],
|
||||
|
||||
@@ -25,12 +25,9 @@
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --root-mode=upward --out-dir=build/lib && node ./scripts/generate-schema-types.js",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test:smoke": "echo 'No smoke test for this package'"
|
||||
"build": "node ./scripts/generate-schema-types.js",
|
||||
"clean": "git checkout -- ./types/lib/appium-config.ts",
|
||||
"test:smoke": "node ./index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/schema": "^0.0.9",
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
"lib"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --source-maps --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./build/lib/index.js",
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
|
||||
+1
-6
@@ -13,12 +13,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// This configures @babel/register to look for a babel config in parent dir(s) of
|
||||
// wherever the tests are run. This is required if running tests via `mocha` in a package dir
|
||||
// instead of the monorepo root. This does not affect `gulp-mocha`, since it has its own `.babelrc`.
|
||||
// This file is required _in addition to_ the monorepo root's `test/setup.js`.
|
||||
|
||||
require('@babel/register')({rootMode: 'upward'});
|
||||
require('ts-node').register({transpileOnly: true});
|
||||
|
||||
const chai = require('chai');
|
||||
const chaiAsPromised = require('chai-as-promised');
|
||||
|
||||
@@ -64,6 +64,12 @@
|
||||
},
|
||||
{
|
||||
"path": "packages/typedoc-plugin-appium"
|
||||
},
|
||||
{
|
||||
"path": "packages/typedoc-plugin-appium"
|
||||
},
|
||||
{
|
||||
"path": "packages/doctor"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user