diff --git a/packages/embark-async-wrapper/README.md b/packages/embark-async-wrapper/README.md new file mode 100644 index 000000000..39eb991e4 --- /dev/null +++ b/packages/embark-async-wrapper/README.md @@ -0,0 +1 @@ +## Embark Async Wrapper diff --git a/packages/embark-async-wrapper/package.json b/packages/embark-async-wrapper/package.json new file mode 100644 index 000000000..f06aa8df1 --- /dev/null +++ b/packages/embark-async-wrapper/package.json @@ -0,0 +1,59 @@ +{ + "name": "embark-async-wrapper", + "version": "4.0.0-beta.0", + "author": "Iuri Matias ", + "contributors": [], + "description": "Embark is a framework that allows you to easily develop and deploy DApps", + "homepage": "https://embark.status.im/", + "keywords": [ + "blockchain", + "dapps", + "ethereum", + "ipfs", + "serverless", + "solc", + "solidity" + ], + "license": "MIT", + "repository": "github:embark-framework/embark", + "main": "./dist/index.js", + "scripts": { + "build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps", + "ci": "npm run qa", + "clean": "npx rimraf dist embark-*.tgz package", + "lint": "npm-run-all lint:*", + "lint:js": "eslint src/", + "lint:ts": "tslint -c tslint.json \"src/**/*.ts\"", + "package": "npm pack", + "qa": "npm-run-all lint build package", + "reset": "npm run clean && npx rimraf node_modules", + "start": "npm run watch", + "typecheck": "tsc", + "watch": "run-p watch:*", + "watch:build": "npm run build -- --verbose --watch", + "watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" + }, + "eslintConfig": { + "extends": "../../.eslintrc.json" + }, + "dependencies": { + "async": "2.6.1", + "@babel/runtime-corejs2": "7.3.1" + }, + "devDependencies": { + "@babel/cli": "7.2.3", + "@babel/core": "7.2.2", + "cross-env": "5.2.0", + "eslint": "5.7.0", + "npm-run-all": "4.1.5", + "rimraf": "2.6.3", + "tslint": "5.11.0", + "typescript": "3.3.1" + }, + "engines": { + "node": ">=8.12.0", + "npm": ">=6.4.1", + "yarn": ">=1.12.3" + } +} + diff --git a/packages/embark-compiler/src/utils/async_extend.js b/packages/embark-async-wrapper/src/index.js similarity index 100% rename from packages/embark-compiler/src/utils/async_extend.js rename to packages/embark-async-wrapper/src/index.js diff --git a/packages/embark-async-wrapper/tsconfig.json b/packages/embark-async-wrapper/tsconfig.json new file mode 100644 index 000000000..52d43eaaa --- /dev/null +++ b/packages/embark-async-wrapper/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/packages/embark-async-wrapper/tslint.json b/packages/embark-async-wrapper/tslint.json new file mode 100644 index 000000000..0946f2096 --- /dev/null +++ b/packages/embark-async-wrapper/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tslint.json" +} diff --git a/packages/embark-compiler/package.json b/packages/embark-compiler/package.json index 431032618..9e42d5ab6 100644 --- a/packages/embark-compiler/package.json +++ b/packages/embark-compiler/package.json @@ -22,7 +22,6 @@ "ci": "npm run qa", "clean": "npx rimraf dist embark-*.tgz package", "lint": "npm-run-all lint:*", - "lint:js": "eslint src/", "lint:ts": "tslint -c tslint.json \"src/**/*.ts\"", "package": "npm pack", "qa": "npm-run-all lint typecheck build package", @@ -33,18 +32,14 @@ "watch:build": "npm run build -- --verbose --watch", "watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" }, - "eslintConfig": { - "extends": "../../.eslintrc.json" - }, "dependencies": { - "async": "2.6.1", - "@babel/runtime-corejs2": "7.3.1" + "@babel/runtime-corejs2": "7.3.1", + "embark-async-wrapper": "4.0.0-beta.0" }, "devDependencies": { "@babel/cli": "7.2.3", "@babel/core": "7.2.2", "cross-env": "5.2.0", - "eslint": "5.7.0", "npm-run-all": "4.1.5", "rimraf": "2.6.3", "tslint": "5.11.0", diff --git a/packages/embark-compiler/src/index.ts b/packages/embark-compiler/src/index.ts index d8a5ac4fd..c2f198374 100644 --- a/packages/embark-compiler/src/index.ts +++ b/packages/embark-compiler/src/index.ts @@ -1,7 +1,7 @@ import {Callback, CompilerPluginObject, Embark, Plugins} from "embark"; import {__} from "i18n"; -const async = require("./utils/async_extend.js"); +const async = require("embark-async-wrapper"); class Compiler { private logger: any; diff --git a/packages/embark-vyper/package.json b/packages/embark-vyper/package.json index a4b8a4dab..00b14e7d0 100644 --- a/packages/embark-vyper/package.json +++ b/packages/embark-vyper/package.json @@ -38,8 +38,8 @@ "extends": "../../.eslintrc.json" }, "dependencies": { - "async": "2.6.1", "@babel/runtime-corejs2": "7.3.1", + "embark-async-wrapper": "4.0.0-beta.0", "shelljs": "0.5.3" }, "devDependencies": { diff --git a/packages/embark-vyper/src/index.js b/packages/embark-vyper/src/index.js index 3d4b6dc8e..6807aa278 100644 --- a/packages/embark-vyper/src/index.js +++ b/packages/embark-vyper/src/index.js @@ -1,4 +1,4 @@ -let async = require('./utils/async_extend.js'); +const async = require("embark-async-wrapper"); const shelljs = require('shelljs'); const path = require('path'); diff --git a/packages/embark-vyper/src/utils/async_extend.js b/packages/embark-vyper/src/utils/async_extend.js deleted file mode 100644 index 616dc5199..000000000 --- a/packages/embark-vyper/src/utils/async_extend.js +++ /dev/null @@ -1,15 +0,0 @@ -let async = require('async'); - -function asyncEachObject(object, iterator, callback) { - async.each( - Object.keys(object || {}), - function (key, next) { - iterator(key, object[key], next); - }, - callback - ); -} - -async.eachObject = asyncEachObject; - -module.exports = async;