Commit Graph

6134 Commits

Author SHA1 Message Date
Pascal Precht 3e3b4287a4 chore(stack/deployment): update dependencies 2020-02-06 13:19:10 -05:00
Jonathan Rainville 78fc7b6a90 fix(@embark/ens): fix tests erroring on FIFS contract deploy
Was caused by the contract being added in case another contract uses
it as a dependency, but it automatically tried to deploy with it, so
instead, set it as `deploy: false` until we see if we need to
register it
2020-02-06 13:17:20 -05:00
emizzle d5294203b7 fix(@embark/contracts-manager): Remove `logger` from serialized contract
For all instances where a `Contract` instance is serialized using `JSON.stringify`, the `logger` property was being stringified and written to logs and contract artifact files.

Add Serializer class that allows ignoring of class properties during serialization when using `JSON.stringify`.

NOTE: The `Serializer` relies on TypeScript’s decorators which are still listed as experimental (requiring the necessary compiler flag) despite being around for several years. Decorators are a stage 2 proposal for JavaScript.
2020-02-06 12:37:29 -05:00
Jonathan Rainville c7eb2744cd doc(@embark/ens): document $accounts for ENS configuration
Adds docs for $accounts in subdomain registers and improve the docs
2020-02-06 12:36:36 -05:00
Jonathan Rainville de0102223d feat(@mbark/ens): enable the use of $accounts in registrations
Enable putting `$accounts[i]` in subdomain registrations, where `i`
is the index of the `getAccounts` array.
This is the same behaviour we have for contract deployement
2020-02-06 12:36:36 -05:00
Iuri Matias c0042844a3 chore: update hooks examples to destructure dependencies object
chore: update hooks examples to destructure dependencies object

Update site/source/docs/contracts_configuration.md

Co-Authored-By: Michael Bradley <michaelsbradleyjr@gmail.com>

chore: update hooks examples to destructure dependencies object
2020-02-06 11:55:23 -05:00
EmbarkBot a71211e863 chore(prerelease): 5.1.2-nightly.1 2020-02-06 00:11:14 +00:00
Pascal Precht 88c8135d9c refactor(core/engine): make serviceMonitor a module group
`Engine`s internal `coreComponents()` API sets up a bunch of things like
a `ProcessManager` and the `ServiceMonitor`. The `ServiceMonitor` activates
itself on `embark:engine:started` and practically monitors registered services
until the process has been explicitly stopped.

There are some commands that don't actually need service monitoring like `build` and
a future `exec` command that's in the making. For those cases it's useful to have them
disable the service monitor when `coreComponents()` is used.

This commit moves the `ServiceMonitor` instantiation out of `coreComponents()` and introduces
a new module group instead. This then lets commands that need service monitoring instantiate it
explicitly.
2020-02-05 13:47:18 +01:00
EmbarkBot d4136ffa8a chore(prerelease): 5.1.2-nightly.0 2020-02-05 00:12:23 +00:00
Jonathan Rainville 5359cc63da fix(@embark/cmd-controller): exit build if afterDeploy is not array
Before, `embark build` would wait at the end if there was an
afterDeploy, because there was no way with the old string and array
syntax to know when the commands were done.
Now, with the function syntax, we can wait for the end.
This way, we can exit the build at the end if it is a function
afterDeploy.
Otherwise, we show a message saying that they should update
2020-02-04 12:46:49 -05:00
Jonathan Rainville f502650c17 fix: only show account warning when Geth will actually start
Before, we checked if the network was a testnet or mainnet and
warned if there were no account sconfigured to sync. However, that
didn't take into account that we could connect to an external node,
hence not starting Geth at all.
So to fix that, I moved the condition and message to the Geth module
and only log when we start the node and the condition is met.
2020-02-04 12:45:32 -05:00
Michael Bradley, Jr 63831f6110 fix(@embark/dashboard): update dashboard's `logEntry` to match core/logger's `logFunction`
`packages/embark/src/cmd/dashboard/dashboard.js` overwrites the logger
instance's `logFunction` method with a method named `logEntry` defined on the
class exported from `packages/embark/src/cmd/dashboard/monitor.js`. Update
`logEntry` in the same way as `logFunction` was revised in #2184.
2020-02-04 11:30:45 -06:00
Michael Bradley, Jr 5b988ead7a refactor(@embark/core): refactor logger to provide correct origins
Also make a few more revisions:

Revise the "write logs" testing strategy such that it's not necessary for the
logger functions to take an optional callback.

Drop unused `tmp` package from `packages/core/logger` since it's not used in
the tests.

Strip colors before writing to the log file, use a two-space delimiter between
sections of each logged line in the log file, and collapse whitespace in the
message section of each line. These changes make the log file more amenable to
being processed with cli tools such as awk, cut, etc. It's also possible in a
text editor to replace `'  '` with `\t` and then load the file in a spreadsheet,
with each line-section in its own column.

Rearrange the sections of each logged line so that it's easier to read, and
only include the origin if the loglevel is debug or trace.
2020-02-03 20:47:23 -06:00
Pascal Precht 60cbb9fa3e refactor(@embark/core): make logger async when writing to log file 2020-02-03 20:47:23 -06:00
Pascal Precht 8c9e6b11c8 refactor(@embark/core): refactor logger to use modern JS APIs
This also removes `parseLogFile()` as it's not used anywhere inside Embark.
2020-02-03 20:47:23 -06:00
Pascal Precht 6b4052ee7b test(@embark/core): add tests for logger module 2020-02-03 20:47:23 -06:00
Michael Bradley, Jr 58608db3d6 build: do not use the `--all` option with `lerna changed` in the stable release script 2020-02-03 14:56:05 -06:00
Michael Bradley, Jr 110957f273 chore(release): 5.1.1 2020-02-03 13:59:08 -06:00
Michael Bradley, Jr 56071c5151 build: update "qa:full" script in same manner as revised "ci:full"
The `"qa:full"` script comes into play in the contexts of
`scripts/release.js` (`npm run release`) and `scripts/stable-release.js`
(`npm run release:stable`).
2020-02-03 12:39:26 -06:00
Jonathan Rainville a5354df1ee docs(@embark/site): improve documentation on global test function
Add docs for mineAtTimestamp and getEvmVersion and improve the
other ones a bit (typos, format, etc)
2020-02-03 13:00:33 -05:00
Michael Bradley, Jr 030fb4acc6 build(deps): bump web3[-*] from 1.2.4 to 1.2.6
Remove `bignumber.js` workaround (in the root, from PR #2152) because it's no
longer needed (verified locally).

Remove the `"skipLibCheck"` workaround (in `packages/plugins/solidity-tests`,
from PR #2152) because it's no longer needed (verified locally).

Refactor a typing in `packages/plugins/geth`. What's happening is that in web3
v1.2.4 `sendTransaction` has a return type of `PromiEvent<TransactionReceipt>`
but in v1.2.6 it has a return type of `PromiEvent<TransactionReceipt |
TransactionRevertInstructionError>`.

Compare:
* [v1.2.4/packages/web3-eth/types/index.d.ts#L291-L294](https://github.com/ethereum/web3.js/blob/v1.2.4/packages/web3-eth/types/index.d.ts#L291-L294)
* [v1.2.6/packages/web3-eth/types/index.d.ts#L295-L298](https://github.com/ethereum/web3.js/blob/v1.2.6/packages/web3-eth/types/index.d.ts#L295-L298)

The problem is that the `TransactionRevertInstructionError` type doesn't have a
`transactionHash` property. Since at present the code in
`packages/plugins/geth/src/devtxs.ts` only deals with the success case re:
`sendTransaction`, import the `TransactionReceipt` type from `web3-eth` and
cast the resolved return value's type using TypeScript's `as` operator.
2020-02-03 10:17:07 -06:00
Jonathan Rainville 5fc96c089f chore(@embarkens): update ENS Registry mainnet address
Change address to the updated one because of a flaw found in the old
2020-02-03 09:34:11 -06:00
Michael Bradley, Jr 7b16e834e5 build(deps): remove unused package node-http-proxy-json 2020-02-03 09:26:06 -06:00
EmbarkBot 6b502e14d8 chore(prerelease): 5.1.1-nightly.4 2020-02-03 00:13:02 +00:00
dependabot-preview[bot] abfba2d829 build(deps-dev): bump history from 4.7.2 to 4.10.1
Bumps [history](https://github.com/ReactTraining/history) from 4.7.2 to 4.10.1.
- [Release notes](https://github.com/ReactTraining/history/releases)
- [Changelog](https://github.com/ReactTraining/history/blob/master/createBrowserHistory.js)
- [Commits](https://github.com/ReactTraining/history/compare/v4.7.2...v4.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-02 13:52:49 -06:00
dependabot-preview[bot] b973a36fec build(deps): bump babel-plugin-module-resolver from 3.2.0 to 4.0.0
Bumps [babel-plugin-module-resolver](https://github.com/tleunen/babel-plugin-module-resolver) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/tleunen/babel-plugin-module-resolver/releases)
- [Changelog](https://github.com/tleunen/babel-plugin-module-resolver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tleunen/babel-plugin-module-resolver/compare/v3.2.0...v4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-02 13:42:54 -06:00
dependabot-preview[bot] 58bc342c1c build(deps-dev): bump velocity-react from 1.4.1 to 1.4.3
Bumps [velocity-react](https://github.com/twitter-fabric/velocity-react) from 1.4.1 to 1.4.3.
- [Release notes](https://github.com/twitter-fabric/velocity-react/releases)
- [Changelog](https://github.com/google-fabric/velocity-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/twitter-fabric/velocity-react/compare/v1.4.1...v1.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-02 13:32:07 -06:00
EmbarkBot 12e2665abf chore(prerelease): 5.1.1-nightly.3 2020-02-01 00:11:58 +00:00
Jonathan Rainville 39919f264c fix(@embark/demo): fix ethereum not available in browser in the demo
This only affected the demo. We somehow put the `enableEthereum()`
call right before the Demo `set` function, so since we now throw
when it's not available, it stopped the `set`. But it was never
needed because demo has `autoEnadble` on, meaning that `enable` is
called at the start.
2020-01-31 11:10:30 -05:00
EmbarkBot a9807b77f5 chore(prerelease): 5.1.1-nightly.2 2020-01-31 00:12:28 +00:00
Michael Bradley, Jr c4ad3d63e7 build(deps-dev): update other @storybook packages to 5.3.9
This follows on PR #2227.

Satisfy new peer dependencies following the bumps: `@storybook/core`,
`regenerator-runtime`.

Follow storybook's instructions to add `@storybook/preset-create-react-app` as
a dependency and also add the needed `.storybook/main.js` in
`packages/cockpit/ui/`.

Storybook is sensitive to presets being in the immediate project's
`node_modules` so add a `"nohoist"` in the root `package.json` for
`"embark-ui/@storybook/**"`.

After making the changes above, problems related to babel were observed when
running `yarn start`. It has been known for some time that having the root
babel config's dependencies spec'd in
`packages/utils/collective/package.json` (which is the package that actually
drives the babel cli) could lead to problems related to deduping, but such
problems hadn't been experienced until now. Move the dependencies relevant to
the root `babel.config.js` into the root `package.json` and update the
explanatory comment in the config.
2020-01-30 17:21:47 -06:00
EmbarkBot a5c7527d68 chore(prerelease): 5.1.1-nightly.1 2020-01-30 00:12:57 +00:00
Iuri Matias 12057c4141 chore: update phantom siteId 2020-01-29 14:36:41 -05:00
Jonathan Rainville 3ceac534e1 fix(@embark/ens): fix registerSubDomain in tests and add test
registerSubDomain  didn't work in tests because it used the old way
of checking the env, which is checking the `this.env` string, but in
tests, we use the `test` env. So instead, we now check if it is a
known network using the network ID (like we do for other place)
2020-01-29 12:54:10 -05:00
dependabot-preview[bot] 3f583761bd build(deps-dev): bump @storybook/addon-links from 5.2.7 to 5.3.9
Bumps [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/addons/links) from 5.2.7 to 5.3.9.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v5.3.9/addons/links)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 12:52:09 -05:00
Jonathan Rainville 2f5c16b8cd fix(@embark/contracts): fix ENS contracts not being resolved as deps
This was caused by the fact that we add the ENS contract to the
manager when before they deploy, but the dependency resolution was
done while building the contracts, so even before.
So the solution was to add a "before build" action so that the ENS
module could add its contracts to the manager if needed.
2020-01-29 10:15:48 -05: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
Pascal Precht f5db7fe88d chore(stack/communication): update module dependencies 2020-01-28 11:36:24 -05:00
Michael Bradley, Jr 0d1da2971c chore(release): 5.1.0 2020-01-27 12:33:50 -06:00
Jonathan Rainville 0a4d13f64c fix(@embark/pipeline): make generateAll async so it completes tasks
generateAll was async, but it called the write functions with a sync
loop, so at the end of the function, the files were not written yet.
This is a problem in `embark build` because the process ends after
genrateAll is done, so no artifacts were written
2020-01-27 09:26:25 -05:00
EmbarkBot c891c2de95 chore(prerelease): 5.1.0-nightly.6 2020-01-25 00:12:13 +00:00
Iuri Matias 292331f229 bugfix(@embark/console): fix included package files 2020-01-24 15:21:58 -05:00
Michael Bradley, Jr 6313c2ee30 ci: revise "ci:full" script to run some steps collectively
This results in faster completions on Azure Pipelines. For an individual
build (OS/Node.js combination) it shaves off ~10 or more minutes, depending on
the OS.

Once the `lint` and `test` steps have collective implementations we should be
able to shave another couple of minutes off of the completion times.

The steps that take the longest are `yarn install` (~4 minutes), collective
`typecheck` (~4 minutes), and `ci:dapps` (~3 minutes).
2020-01-24 13:50:25 -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
Jinho Jang 42d343712c update the footer 2020-01-23 14:02:20 -05:00
Jonathan Rainville b6856b2083 fix(@embark/test): increase default gas limit to 8M so tests support bigger contracts
Was needed for the Teller Dapp as its Escrow contract is too big for the other default
2020-01-23 14:01:20 -05:00
Marc b8f93ea2ad fix(@embark/embarkjs): change enableEthereum to not rely on returned accounts array
Some ethereum providers (e.g. Opera implementation) do not return the accounts array in the 'enable' call.
2020-01-23 11:49:24 -06:00
Jonathan Rainville df2aaabfc3 refactor(@embark/transaction-logger): change log storage and read
Changes the way the logs are stored to straight up be logged as an
array and then reads it as such. It also removes the reverse from
the read and puts it in the UI instead since it's the UI that needs
it reversed.
2020-01-23 11:49:09 -05:00