From d5c984c592eb6e012a327f1a3d7e620f4161ae14 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Thu, 2 May 2019 13:24:38 -0500 Subject: [PATCH] build: use babel cli's `--extensions` consistently in all packages If a package uses only `.js` then supply `--extensions ".js"`. If a package uses only `.ts` then supply `--extensions ".ts"`. If a package uses both, then supply `--extensions ".js,.ts"`. The reason for this is that adding/removing TS/JS support ought to occasion revising a package's `package.json` file and adjusting other scripts as well, e.g. for linting. With these changes, it won't work to simply start adding `.ts` files in a package's `src/` directory, which should prompt the developer to review `package.json` and make the appropriate changes, and/or other developers may realize changes need to be made during code review. --- packages/embark-api-client/package.json | 2 +- packages/embark-api/package.json | 2 +- packages/embark-async-wrapper/package.json | 2 +- packages/embark-authenticator/package.json | 2 +- packages/embark-compiler/package.json | 2 +- packages/embark-contracts-manager/package.json | 2 +- packages/embark-core/package.json | 2 +- packages/embark-ens/package.json | 2 +- packages/embark-graph/package.json | 2 +- packages/embark-library-manager/package.json | 2 +- packages/embark-logger/package.json | 2 +- packages/embark-process-logs-api/package.json | 2 +- packages/embark-profiler/package.json | 2 +- packages/embark-scaffolding/package.json | 2 +- packages/embark-specialconfigs/package.json | 2 +- packages/embark-test-runner/package.json | 2 +- packages/embark-transaction-tracker/package.json | 2 +- packages/embark-vyper/package.json | 2 +- packages/embark-watcher/package.json | 2 +- packages/embark-webserver/package.json | 2 +- packages/embark-whisper/package.json | 2 +- packages/embarkjs-ipfs/package.json | 8 ++++---- packages/embarkjs-swarm/package.json | 8 ++++---- packages/embarkjs-whisper/package.json | 8 ++++---- packages/embarkjs/package.json | 8 ++++---- 25 files changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/embark-api-client/package.json b/packages/embark-api-client/package.json index ddac1697d..1e634408e 100644 --- a/packages/embark-api-client/package.json +++ b/packages/embark-api-client/package.json @@ -26,7 +26,7 @@ "dist" ], "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-api/package.json b/packages/embark-api/package.json index 838368ef9..1e8203302 100644 --- a/packages/embark-api/package.json +++ b/packages/embark-api/package.json @@ -26,7 +26,7 @@ "dist" ], "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".ts\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-async-wrapper/package.json b/packages/embark-async-wrapper/package.json index 2be7c31ad..4a09ee212 100644 --- a/packages/embark-async-wrapper/package.json +++ b/packages/embark-async-wrapper/package.json @@ -26,7 +26,7 @@ "dist" ], "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-authenticator/package.json b/packages/embark-authenticator/package.json index cd2c10a70..d277557f2 100644 --- a/packages/embark-authenticator/package.json +++ b/packages/embark-authenticator/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-compiler/package.json b/packages/embark-compiler/package.json index f5a6e65e9..bb310f9f8 100644 --- a/packages/embark-compiler/package.json +++ b/packages/embark-compiler/package.json @@ -26,7 +26,7 @@ "dist" ], "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".ts\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-contracts-manager/package.json b/packages/embark-contracts-manager/package.json index 6d520618d..2af2fd2df 100644 --- a/packages/embark-contracts-manager/package.json +++ b/packages/embark-contracts-manager/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-core/package.json b/packages/embark-core/package.json index ddf912423..1f401bedd 100644 --- a/packages/embark-core/package.json +++ b/packages/embark-core/package.json @@ -27,7 +27,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-ens/package.json b/packages/embark-ens/package.json index 5d19782db..69a9984e4 100644 --- a/packages/embark-ens/package.json +++ b/packages/embark-ens/package.json @@ -27,7 +27,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-graph/package.json b/packages/embark-graph/package.json index 51bb33db8..2e32549a6 100644 --- a/packages/embark-graph/package.json +++ b/packages/embark-graph/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-library-manager/package.json b/packages/embark-library-manager/package.json index 32254a6e9..2a4c350bc 100644 --- a/packages/embark-library-manager/package.json +++ b/packages/embark-library-manager/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-logger/package.json b/packages/embark-logger/package.json index fa3c09eb0..83257f9f1 100644 --- a/packages/embark-logger/package.json +++ b/packages/embark-logger/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-process-logs-api/package.json b/packages/embark-process-logs-api/package.json index 0b3f6ff57..512652775 100644 --- a/packages/embark-process-logs-api/package.json +++ b/packages/embark-process-logs-api/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-profiler/package.json b/packages/embark-profiler/package.json index ca9f2f323..c9282134b 100644 --- a/packages/embark-profiler/package.json +++ b/packages/embark-profiler/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-scaffolding/package.json b/packages/embark-scaffolding/package.json index aabd73568..8d8f27782 100644 --- a/packages/embark-scaffolding/package.json +++ b/packages/embark-scaffolding/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps --copy-files", + "build": "cross-env BABEL_ENV=node babel src --copy-files --extensions \".ts\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "copy:templates": "cp -rf src/**/*.hbs dist/", diff --git a/packages/embark-specialconfigs/package.json b/packages/embark-specialconfigs/package.json index 3bdc99d86..1b3b97050 100644 --- a/packages/embark-specialconfigs/package.json +++ b/packages/embark-specialconfigs/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-test-runner/package.json b/packages/embark-test-runner/package.json index 633bc8ce1..1d6fc1c95 100644 --- a/packages/embark-test-runner/package.json +++ b/packages/embark-test-runner/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-transaction-tracker/package.json b/packages/embark-transaction-tracker/package.json index d9907a094..284271e9f 100644 --- a/packages/embark-transaction-tracker/package.json +++ b/packages/embark-transaction-tracker/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-vyper/package.json b/packages/embark-vyper/package.json index 7499372a9..db9b9e689 100644 --- a/packages/embark-vyper/package.json +++ b/packages/embark-vyper/package.json @@ -26,7 +26,7 @@ "dist" ], "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-watcher/package.json b/packages/embark-watcher/package.json index 31ea4ba10..d72a0d442 100644 --- a/packages/embark-watcher/package.json +++ b/packages/embark-watcher/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-webserver/package.json b/packages/embark-webserver/package.json index 99c95abea..a2787859e 100644 --- a/packages/embark-webserver/package.json +++ b/packages/embark-webserver/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --copy-files --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --copy-files --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embark-whisper/package.json b/packages/embark-whisper/package.json index 6f154d797..65cf999c7 100644 --- a/packages/embark-whisper/package.json +++ b/packages/embark-whisper/package.json @@ -26,7 +26,7 @@ }, "main": "./dist/index.js", "scripts": { - "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "build": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "lint": "npm-run-all lint:*", diff --git a/packages/embarkjs-ipfs/package.json b/packages/embarkjs-ipfs/package.json index 4230b9ca3..04b0a1561 100644 --- a/packages/embarkjs-ipfs/package.json +++ b/packages/embarkjs-ipfs/package.json @@ -35,10 +35,10 @@ ], "scripts": { "build": "npm-run-all build:**", - "build:browser": "cross-env BABEL_ENV=browser babel src --out-dir dist/browser --root-mode upward", - "build:node": "cross-env BABEL_ENV=node babel src --out-dir dist --root-mode upward --source-maps", - "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --out-dir dist --root-mode upward --source-maps", - "// build:node:test": "cross-env BABEL_ENV=node:test babel test --out-dir build-test --root-mode upward --source-maps", + "build:browser": "cross-env BABEL_ENV=browser babel src --extensions \".js\" --out-dir dist/browser --root-mode upward", + "build:node": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "// build:node:test": "cross-env BABEL_ENV=node:test babel test --extensions \".js\" --out-dir build-test --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "package": "npm pack", diff --git a/packages/embarkjs-swarm/package.json b/packages/embarkjs-swarm/package.json index d0be025cc..02bdd46a4 100644 --- a/packages/embarkjs-swarm/package.json +++ b/packages/embarkjs-swarm/package.json @@ -35,10 +35,10 @@ ], "scripts": { "build": "npm-run-all build:**", - "build:browser": "cross-env BABEL_ENV=browser babel src --out-dir dist/browser --root-mode upward", - "build:node": "cross-env BABEL_ENV=node babel src --out-dir dist --root-mode upward --source-maps", - "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --out-dir dist --root-mode upward --source-maps", - "// build:node:test": "cross-env BABEL_ENV=node:test babel test --out-dir build-test --root-mode upward --source-maps", + "build:browser": "cross-env BABEL_ENV=browser babel src --extensions \".js\" --out-dir dist/browser --root-mode upward", + "build:node": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "// build:node:test": "cross-env BABEL_ENV=node:test babel test --extensions \".js\" --out-dir build-test --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "package": "npm pack", diff --git a/packages/embarkjs-whisper/package.json b/packages/embarkjs-whisper/package.json index a0c64c03b..75f69f486 100644 --- a/packages/embarkjs-whisper/package.json +++ b/packages/embarkjs-whisper/package.json @@ -35,10 +35,10 @@ ], "scripts": { "build": "npm-run-all build:**", - "build:browser": "cross-env BABEL_ENV=browser babel src --out-dir dist/browser --root-mode upward", - "build:node": "cross-env BABEL_ENV=node babel src --out-dir dist --root-mode upward --source-maps", - "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --out-dir dist --root-mode upward --source-maps", - "// build:node:test": "cross-env BABEL_ENV=node:test babel test --out-dir build-test --root-mode upward --source-maps", + "build:browser": "cross-env BABEL_ENV=browser babel src --extensions \".js\" --out-dir dist/browser --root-mode upward", + "build:node": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "// build:node:test": "cross-env BABEL_ENV=node:test babel test --extensions \".js\" --out-dir build-test --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "package": "npm pack", diff --git a/packages/embarkjs/package.json b/packages/embarkjs/package.json index 68448319b..81d7697b3 100644 --- a/packages/embarkjs/package.json +++ b/packages/embarkjs/package.json @@ -35,10 +35,10 @@ ], "scripts": { "build": "npm-run-all build:**", - "build:browser": "cross-env BABEL_ENV=browser babel src --out-dir dist/browser --root-mode upward", - "build:node": "cross-env BABEL_ENV=node babel src --out-dir dist --root-mode upward --source-maps", - "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --out-dir dist --root-mode upward --source-maps", - "build:node:test": "cross-env BABEL_ENV=node:test babel test --out-dir build-test --root-mode upward --source-maps", + "build:browser": "cross-env BABEL_ENV=browser babel src --extensions \".js\" --out-dir dist/browser --root-mode upward", + "build:node": "cross-env BABEL_ENV=node babel src --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "build:node:async": "cross-env BABEL_ENV=node:async babel src/node --extensions \".js\" --out-dir dist --root-mode upward --source-maps", + "build:node:test": "cross-env BABEL_ENV=node:test babel test --extensions \".js\" --out-dir build-test --root-mode upward --source-maps", "ci": "npm run qa", "clean": "npm run reset", "package": "npm pack",