mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-27 22:16:15 +00:00
3693ebd90d
Many packages in the monorepo did not specify all of their dependencies; they were effectively relying on resolution in the monorepo's root `node_modules`. In a production release of `embark` and `embark[js]-*` packages this can lead to broken packages. To fix the problem currently and to help prevent it from happening again, make use of the `eslint-plugin-import` package's `import/no-extraneous-dependencies` and `import/no-unresolved` rules. In the root `tslint.json` set `"no-implicit-dependencies": true`, wich is the tslint equivalent of `import/no-extraneous-dependencies`; there is no tslint equivalent for `import/no-unresolved`, but we will eventually replace tslint with an eslint configuration that checks both `.js` and `.ts` files. For `import/no-unresolved` to work in our monorepo setup, in most packages add an `index.js` that has: ```js module.exports = require('./dist'); // or './dist/lib' in some cases ``` And point `"main"` in `package.json` to `"./index.js"`. Despite what's indicated in npm's documentation for `package.json`, it's also necessary to add `"index.js"` to the `"files"` array. Make sure that all `.js` files that can and should be linted are in fact linted. For example, files in `packages/embark/src/cmd/` weren't being linted and many test suites weren't being linted. Bump all relevant packages to `eslint@6.8.0`. Fix all linter errors that arose after these changes. Implement a `check-yarn-lock` script that's run as part of `"ci:full"` and `"qa:full"`, and can manually be invoked via `yarn cylock` in the root of the monorepo. The script exits with error if any specifiers are found in `yarn.lock` for `embark[js][-*]` and/or `@embarklabs/*` (with a few exceptions, cf. `scripts/check-yarn-lock.js`).
74 lines
1.8 KiB
JSON
74 lines
1.8 KiB
JSON
{
|
|
"name": "embark-contracts-manager",
|
|
"version": "5.2.2",
|
|
"author": "Iuri Matias <iuri.matias@gmail.com>",
|
|
"contributors": [],
|
|
"description": "Smart contracts manager for Embark",
|
|
"homepage": "https://github.com/embarklabs/embark/tree/master/packages/stack/contracts-manager#readme",
|
|
"bugs": "https://github.com/embarklabs/embark/issues",
|
|
"keywords": [
|
|
"blockchain",
|
|
"dapps",
|
|
"ethereum",
|
|
"ipfs",
|
|
"serverless",
|
|
"solc",
|
|
"solidity"
|
|
],
|
|
"files": [
|
|
"dist",
|
|
"index.js"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"directory": "packages/stack/contracts-manager",
|
|
"type": "git",
|
|
"url": "https://github.com/embarklabs/embark.git"
|
|
},
|
|
"main": "./index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"embark-collective": {
|
|
"build:node": true,
|
|
"typecheck": true
|
|
},
|
|
"scripts": {
|
|
"_build": "npm run solo -- build",
|
|
"_typecheck": "npm run solo -- typecheck",
|
|
"ci": "npm run qa",
|
|
"clean": "npm run reset",
|
|
"lint": "npm-run-all lint:*",
|
|
"lint:js": "eslint src/",
|
|
"lint:ts": "tslint -c tslint.json \"src/**/*.ts\"",
|
|
"qa": "npm-run-all lint _typecheck _build",
|
|
"reset": "npx rimraf dist embark-*.tgz package",
|
|
"solo": "embark-solo"
|
|
},
|
|
"eslintConfig": {
|
|
"extends": "../../../.eslintrc.json"
|
|
},
|
|
"dependencies": {
|
|
"@babel/runtime-corejs3": "7.8.4",
|
|
"async": "2.6.1",
|
|
"core-js": "3.6.4",
|
|
"embark-core": "^5.2.2",
|
|
"embark-i18n": "^5.1.1",
|
|
"embark-logger": "^5.2.0",
|
|
"embark-utils": "^5.2.0",
|
|
"web3": "1.2.6",
|
|
"web3-utils": "1.2.6"
|
|
},
|
|
"devDependencies": {
|
|
"embark-solo": "^5.1.1",
|
|
"eslint": "6.8.0",
|
|
"npm-run-all": "4.1.5",
|
|
"rimraf": "3.0.0",
|
|
"tslint": "5.20.1",
|
|
"typescript": "3.7.2"
|
|
},
|
|
"engines": {
|
|
"node": ">=10.17.0",
|
|
"npm": ">=6.11.3",
|
|
"yarn": ">=1.19.1"
|
|
}
|
|
}
|