Commit Graph

66 Commits

Author SHA1 Message Date
Michael Bradley, Jr 6dbdf63aeb chore(release): 6.0.0 2020-04-27 16:04:43 -05:00
Michael Bradley, Jr 5fc315409b chore(release): 5.3.0 2020-04-24 12:06:40 -05:00
EmbarkBot 0450e8291f chore(prerelease): 5.3.0-nightly.17 2020-04-11 00:16:02 +00:00
EmbarkBot 1278365768 chore(prerelease): 5.3.0-nightly.16 2020-04-03 00:14:04 +00:00
EmbarkBot 1a61bc6b8d chore(prerelease): 5.3.0-nightly.15 2020-03-26 00:15:45 +00:00
EmbarkBot d578e548cf chore(prerelease): 5.3.0-nightly.14 2020-03-25 00:18:59 +00:00
EmbarkBot 7ae17612dd chore(prerelease): 5.3.0-nightly.13 2020-03-24 00:15:01 +00:00
EmbarkBot 7f52634331 chore(prerelease): 5.3.0-nightly.12 2020-03-21 00:15:48 +00:00
EmbarkBot d5e0897231 chore(prerelease): 5.3.0-nightly.11 2020-03-20 00:17:02 +00:00
EmbarkBot 444b9eae87 chore(prerelease): 5.3.0-nightly.10 2020-03-14 00:16:39 +00:00
EmbarkBot db8282c52c chore(prerelease): 5.3.0-nightly.9 2020-03-13 00:16:27 +00:00
EmbarkBot 34f4b0cf1a chore(prerelease): 5.3.0-nightly.7 2020-03-10 00:18:09 +00:00
EmbarkBot 7287eda651 chore(prerelease): 5.3.0-nightly.6 2020-03-07 00:14:47 +00:00
dependabot-preview[bot] afa1d14fa0 build(deps): bump async from 2.6.1 to 3.2.0
Bumps [async](https://github.com/caolan/async) from 2.6.1 to 3.2.0.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.1...v3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 12:51:09 -06:00
EmbarkBot b19a58b007 chore(prerelease): 5.3.0-nightly.5 2020-03-06 00:15:50 +00:00
EmbarkBot 838d421eac chore(prerelease): 5.3.0-nightly.4 2020-03-05 00:15:25 +00:00
dependabot-preview[bot] cb8ece8db5 build(deps): bump @babel/runtime-corejs3 from 7.7.4 to 7.8.4
Bumps [@babel/runtime-corejs3](https://github.com/babel/babel) from 7.7.4 to 7.8.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.7.4...v7.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 12:05:18 -06:00
EmbarkBot a7b8f0d141 chore(prerelease): 5.3.0-nightly.3 2020-03-04 00:15:48 +00:00
EmbarkBot 8de6cf9fe0 chore(prerelease): 5.3.0-nightly.2 2020-03-03 00:14:47 +00:00
EmbarkBot 719faeebdd chore(prerelease): 5.3.0-nightly.1 2020-02-29 00:14:15 +00:00
EmbarkBot 1675019f44 chore(prerelease): 5.3.0-nightly.0 2020-02-27 00:13:54 +00:00
EmbarkBot c54cc77e01 chore(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
Michael Bradley, Jr 8e945a2caa chore(release): 5.2.3 2020-02-25 15:09:29 -06:00
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
Michael Bradley, Jr e271cebbe3 chore(release): 5.2.2 2020-02-18 19:06:59 -06:00
Michael Bradley, Jr f5db3f61b6 chore(release): 5.2.0 2020-02-18 11:45:33 -06:00
EmbarkBot b4286bf59a chore(prerelease): 5.2.0-nightly.4 2020-02-15 00:15:19 +00:00
EmbarkBot 414de52203 chore(prerelease): 5.2.0-nightly.3 2020-02-14 00:14:39 +00:00
EmbarkBot 1a4f63df7e chore(prerelease): 5.2.0-nightly.2 2020-02-13 00:14:05 +00:00
EmbarkBot e29a93bde5 chore(prerelease): 5.2.0-nightly.1 2020-02-08 00:12:06 +00:00
EmbarkBot a016fa8fb9 chore(prerelease): 5.2.0-nightly.0 2020-02-07 00:12:17 +00:00
EmbarkBot d4136ffa8a chore(prerelease): 5.1.2-nightly.0 2020-02-05 00:12:23 +00:00
Michael Bradley, Jr 110957f273 chore(release): 5.1.1 2020-02-03 13:59:08 -06:00
EmbarkBot a9807b77f5 chore(prerelease): 5.1.1-nightly.2 2020-01-31 00:12:28 +00:00
EmbarkBot 03ca790ffd chore(prerelease): 5.1.1-nightly.0 2020-01-29 00:12:23 +00:00
Iuri Matias d328b9953a chore: update site urls 2020-01-28 12:07:17 -05:00
Michael Bradley, Jr 0d1da2971c chore(release): 5.1.0 2020-01-27 12:33:50 -06:00
EmbarkBot 84448f8732 chore(prerelease): 5.1.0-nightly.5 2020-01-24 00:10:58 +00:00
dependabot-preview[bot] 9caa424aeb build(deps): bump solc from 0.5.0 to 0.6.1
Make various related changes to templates, tests, etc. The methodology for
finding files that needed changes was to search through the whole monorepo for
the strings "solc" and "solidity" and then inspect the hits to see whether
changes were needed/appropriate.

Remove `solc` as a dependency in `packages/embark/package.json` so that it's
only a proper dependency in `packages/plugins/solidity/package.json`. Adjust
how the "bundled" `solc` package's version is determined, i.e. inspect the
`package.json` of `embark-solidity` instead of `embark`.

When `solc`'s version is `>=0.6.0` use the [new callback API][api].

[api]: https://github.com/ethereum/solc-js/blob/master/README.md#example-usage-with-import-callback
2020-01-23 14:20:42 -05:00
EmbarkBot e8b5c7ab89 chore(prerelease): 5.1.0-nightly.4 2020-01-23 00:13:38 +00:00
EmbarkBot c98e769d0d chore(prerelease): 5.1.0-nightly.1 2020-01-20 09:57:35 -06:00
Michael Bradley, Jr c093cf88ea feat: support Node.js v12.x and newer
Remove the `<12.0.0` restriction re: Node.js version in the `"engines"`
settings for all the packages in the monorepo that had that restriction.

Add missing `"engines"` settings in `packages/plugins/snark/package.json`.

Adjust the Azure Pipelines config to include builds for Node.js v12.x and
v13.x.

Bump `solc` to `0.4.26` in `dapps/tests/app` and `dapps/tests/contracts`. It
was discovered that older versions suffered a fatal `Maximum call stack size
exceeded` error when run on Windows with Node.js v12.x or newer. Display a
warning re: the bad combo (solc version + Windows + Node version) if it's
detected at runtime.

Adjust the root `yarn.lock` so that the `sha3` transitive dependency resolves
to a newer version that is compatible with Node v13.x.
2020-01-20 08:28:24 -06:00
EmbarkBot 4d44e29b3c chore(prerelease): 5.1.0-nightly.0 2020-01-17 00:15:31 +00:00
Iuri Matias 9aeddaa998 chore: rename org references from embark-framework to embarklabs 2020-01-16 15:36:29 -05:00
Iuri Matias c395826c53 feature(@packages/solidity): include ast in compiled object 2020-01-15 09:58:17 -05:00
Michael Bradley, Jr ba0d6d17f3 chore(release): 5.0.0 2020-01-07 12:14:37 -06:00
Iuri Matias 472efbbf6e chore(release): 5.0.0-alpha.9 2019-12-20 18:13:47 -05:00
Iuri Matias 4091296924 chore(release): 5.0.0-alpha.8 2019-12-19 14:14:23 -05:00
Iuri Matias 78a06c9d76 chore(release): 5.0.0-alpha.5 2019-12-16 13:49:41 -05:00
Michael Bradley, Jr ee56f37713 build: implement collective typecheck
This PR replaces #2057.

Implement a collective typecheck action that can be invoked in the root of the
monorepo with `yarn typecheck` or in watch-mode with `yarn watch:typecheck`.
Include the watch-mode typecheck action as part of `yarn start` (a.k.a
`yarn watch`).

To activate collective typecheck for a package in the monorepo, its
`package.json` file should specify:

```
{
  "embark-collective": {
    "typecheck": true
  }
}
```
*-or-*
```
{
  "embark-collective": {
    "typecheck": {...}
  }
}
```

Where `{...}` above is a `tsconfig.json` fragment that will be merged into the
config generated for the package according the same rules that `tsc` applies
when merging [configs][config].

When collective typecheck begins, it generates a `tsconfig.json` for the root
of the monorepo and for each package that is activated for the action. If the
generated JSON is different than what's on disk for the respective root/package
config, or if the config is not present on disk, then it will be
written. Changes to generated `tsconfig.json` files should be committed; such
changes will arise when there are structural changes to the monorepo, e.g. a
package is added, removed, moved and/or the directory containing it is
renamed. Since the configs are only generated at the beginning of collective
typecheck, when structural changes are made in the monorepo `yarn typecheck`
(or `yarn start` or `yarn watch:typecheck`) should be restarted.

Nearly all of the packages in the monorepo (i.e. all those for which it makes
sense) have been activated for collective typecheck. Even those packages that
don't contain `.ts` sources are activated because `tsc` can make better sense
of the code base as a whole owing to the project references included in the
generated `tsconfig.json` files. Also, owing to the fully cross-referenced
`tsconfig.json` files, it's possible for `tsc` to type check the whole code
base without babel (`yarn build` or `yarn watch:build`) having been run
beforehand.

**NOTE** that a *"cold typecheck"* of the whole monorepo is resource intensive:
on this author's 2019 MacBook Pro it takes around three minutes, the fans spin
up, and `tsc` uses nearly 0.5 GB of RAM. However, once a full typecheck has
completed, the next full typecheck will complete in a few seconds or less; and
when running in watch-mode there is likewise a *big* speedup once a full
typecheck has completed, whether that full check happened before it's running
in watch-mode or when watch-mode itself resulted in a full check before
switching automatically to incremental check, as well a corresponding *big*
reduction in resource consumption. A full check will be needed any time
`yarn typecheck` (or `yarn start` or `yarn watch:typecheck`) is run in a fresh
clone plus `yarn install`, or after doing `yarn reboot[:full]` or `yarn reset`.

The combination of options in each generated package-level `tsconfig.json` and
the root `tsconfig.base.json` result in `tsc` writing `.d.ts` files (TypeScript
declaration files) into the `dist/` directory of each package. That
output is intended to live side-by-side with babel's output, and therefore the
`"rootDir"` option in each generated config is set to `"./src"`.

In projects activated for collective typecheck, `.js` may be converted to `.ts`
and/or `.ts` sources may be added without any additional changes needed in
package-level `package.json`.

---

Reorganize types in `packages/core/typings` (a.k.a `@types/embark`) into
`packages/core/core` (`embark-core`), refactor other packages' imports
accordingly, and delete `packages/core/typings` from the monorepo. This results
in some similarly named but incompatible types exported from `embark-core`
(e.g. `Events` and `EmbarkEvents`, the latter being the one from
`packages/core/typings`); future refactoring should consolidate those types. To
avoid circular dependency relationships it's also necessary to split out
`Engine` from `embark-core` into its own package (`embark-engine`) and to
introduce a bit of duplication, e.g. the `Maybe` type that's now defined in
both `embark-i18n` and `embark-core`.

In the process of the types reorg, move many dependencies spec'd in various
`package.json` to the `package.json` of the package/s that actually depend on
them, e.g. many are moved from `packages/embark/package.json` to
`packages/core/engine/package.json`. Related to those moves, fix some Node.js
`require`-logic related to bug-prone dependency resolution.

Fix all type errors that appeared as a result of activating collective
typecheck across the whole monorepo.

Reactivate `tslint` in `packages/core/core` and fix the remaining linter errors.

Tidy up and add a few items in the root `package.json` scripts.

Bump lerna from `3.16.4` to `3.19.0`.

Bumpt typescript from `3.6.3` to `3.7.2`.

Bumpt tslint from `5.16.0` to `5.20.1`.

Make various changes related to packages' `import`/`require`ing packages that
weren't spec'd in their respective `package.json`. More refactoring is needed
in this regard, but changes were made as the problems were observed in the
process of authoring this PR.

[config]: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
2019-12-13 13:59:47 -05:00