embark/packages/core/utils/src
Michael Bradley, Jr 3693ebd90d fix: ensure that packages properly specify their dependencies
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`).
2020-02-25 14:52:10 -06:00
..
solidity build: implement collective typecheck 2019-12-13 13:59:47 -05:00
accountParser.js chore: update site urls 2020-01-28 12:07:17 -05:00
addressUtils.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
check.js feat(@embark/nethermind): add Nethermind blockchain client plugin 2020-01-16 10:15:18 -05:00
collections.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
constants.ts move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
env.js build(deps): move deps needed by embark-basic-pipeline from packages/embark 2019-10-25 11:13:49 -05:00
file.ts fix(@embark/blockchain-api): add back contract event listen and log 2020-02-07 14:24:03 -05:00
host.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
index.ts feat: warn about packages not configured as plugins; make geth/parity full plugins 2020-02-13 11:48:43 -05:00
log-utils.js move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
logHandler.js refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
longRunningProcessTimer.ts refactor(@embark/core): move Engine into embark-core 2019-11-11 17:00:01 +01:00
monorepo.js fix: ensure that packages properly specify their dependencies 2020-02-25 14:52:10 -06:00
network.ts fix(@embark/proxy): fix conflict for WS port in the proxy 2019-12-11 11:05:12 -05:00
pathUtils.js move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
serialize.ts fix(@embark/contracts-manager): Remove `logger` from serialized contract 2020-02-06 12:37:29 -05:00
toposort.js move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00
web3Utils.ts move embarkjs packages & remove embark- prefix from some folders (#1879) 2019-09-06 18:26:08 -04:00