Commit Graph

6208 Commits

Author SHA1 Message Date
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
Pascal Precht d0d584a934 refactor(@embark/core): move console source out of lib folder 2020-01-23 10:11:58 -05:00
Pascal Precht 63e83dcfce refactor(@embark/core): migrate console module tests to jets and embark-testing 2020-01-23 10:11:58 -05:00
Pascal Precht bef582d312 feat(@embark/testing): add missing APIs to register console commands and API calls
This commit also introduces an IPC mock object, needed for Embark to work as a dependency
within the console module
2020-01-23 10:11:58 -05:00
EmbarkBot e8b5c7ab89 chore(prerelease): 5.1.0-nightly.4 2020-01-23 00:13:38 +00:00
dependabot-preview[bot] 6bc1687f81 build(deps): bump follow-redirects from 1.8.0 to 1.9.0
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.8.0...v1.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 15:04:49 -06:00
Michael Bradley, Jr db55d50b56 build(deps-dev): bump @monaco-editor/react from 1.2.1 to 3.0.1 2020-01-22 14:26:32 -06:00
dependabot-preview[bot] 422665a8db build(deps-dev): bump monaco-editor from 0.14.3 to 0.19.3
Bumps [monaco-editor](https://github.com/Microsoft/monaco-editor) from 0.14.3 to 0.19.3.
- [Release notes](https://github.com/Microsoft/monaco-editor/releases)
- [Changelog](https://github.com/microsoft/monaco-editor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Microsoft/monaco-editor/compare/v0.14.3...v0.19.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 14:26:32 -06:00
dependabot-preview[bot] 024799f161 build(deps-dev): bump gulp-useref from 4.0.0 to 4.0.1 in /site
Bumps [gulp-useref](https://github.com/jonkemp/gulp-useref) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/jonkemp/gulp-useref/releases)
- [Commits](https://github.com/jonkemp/gulp-useref/compare/v4.0.0...v4.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 13:45:23 -06:00
emizzle 9f7c6828a8 fix(@embark/proxy): Parse `rpcPort` from config as integer
## User reported error
i recently updated to embark 5.0 im having issues connecting to a local node each time i connect to it i get the following output from the embark console

```
Error during proxy setup: Port should be >= 0 and < 65536. Received 754510.. Use '--loglevel debug' for more detailed information.
```

This is what i have under the blockchain.js  file
```
localDev: {
    endpoint: "http://127.0.0.1:7545",
    accounts: [{
      nodeAccounts: true,
    }]
  }
```
### Problem
The port to start the proxy on is incremented by a constant value (using the `+` operator), however the port comes from the config and in the case where it is a string, the `+` operator acts as a string concatentation.

### Fix
Ensure the port from the config is always parsed to a number before attempting to add the constant proxy port offset.
2020-01-22 11:18:16 -05:00
EmbarkBot 99d629c8a0 chore(prerelease): 5.1.0-nightly.3 2020-01-22 00:13:43 +00:00
Michael Bradley, Jr 7e00786ee8 build(deps): bump ganache-cli from 6.7.0 to 6.8.2
Also, in `dapps/tests/contracts` move the `this.timeout(0);` inside the
`it(...)` for the expensive gas esimation (involving
`SimpleStorage.methods.set`) because it otherwise doesn't seem to have an
effect on the default 15 second timeout.
2020-01-21 15:13:01 -06:00
EmbarkBot bfda1b3124 chore(prerelease): 5.1.0-nightly.2 2020-01-21 00:12:55 +00:00
Jonathan Rainville e0ac539930 fix(@embark/ens): connect to web3 only with dappAutoEnable is true
When we introduced dappConnection to ENS, we didn't add the concept
of auto connection, like we do in the "normal" connection. This
means that when using $WEB3, the contracts connection waited for
the user to click on a button, but the ENS part called `ethereum.enable`
directly, which is confusing for the dev, because we specified to
NOT automatically connect to ethreum.

This fixes it by checking the dappAutoEnable property in contracts
config and adds it to the namesystemConfig artifact
2020-01-20 12:22:48 -06:00
Michael Bradley, Jr 3ceffa8454 chore(@embark/suggestions): include suggestions.json in the files to be packed by npm
And remove `suggestions.json` in the `"files"` list of
`packages/core/console/package.json` since it was moved to
`packages/plugins/suggestions/suggestions.json`.
2020-01-20 12:13:56 -06:00
Michael Bradley, Jr 0ca8635538 ci: adjust Nightlies/release job so NPM credentials are always removed
That is, the file `${HOME}/.npmrc` will be deleted by the "Remove NPM
credentials" step even if a previous step failed.
2020-01-20 11:44:26 -06:00
EmbarkBot c98e769d0d chore(prerelease): 5.1.0-nightly.1 2020-01-20 09:57:35 -06:00
Michael Bradley, Jr 7f0ab4390b chore(@embark/suggestions): remove `<12.0.0` restriction re: Node.js version 2020-01-20 08:37:10 -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
Pascal Precht a2244019c9 refactor(@embark/suggestions): move suggestions API into plugin 2020-01-20 11:35:29 +01:00
dependabot-preview[bot] 61bf7d5b16 build(deps): bump pretty-ms from 5.0.0 to 5.1.0
Bumps [pretty-ms](https://github.com/sindresorhus/pretty-ms) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/sindresorhus/pretty-ms/releases)
- [Commits](https://github.com/sindresorhus/pretty-ms/compare/v5.0.0...v5.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-19 17:02:37 -06:00
dependabot-preview[bot] f88da2e343 build(deps): bump uuid from 3.3.3 to 3.4.0 in /site
Bumps [uuid](https://github.com/uuidjs/uuid) from 3.3.3 to 3.4.0.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-19 16:22:11 -06:00
dependabot-preview[bot] 0cacc8d37b build(deps-dev): bump react-copy-to-clipboard from 5.0.1 to 5.0.2
Bumps [react-copy-to-clipboard](https://github.com/nkbt/react-copy-to-clipboard) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/nkbt/react-copy-to-clipboard/releases)
- [Commits](https://github.com/nkbt/react-copy-to-clipboard/compare/v5.0.1...v5.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-19 16:17:06 -06:00
Michael Bradley, Jr dbf209de0d ci: disable PR triggers in Azure Pipelines config
Whenever a PR is opened and commits are force-/pushed to the corresponding
branch, up to present the behavior has been that two sets of Azure Pipelines
builds are run: one is caused by the default PR trigger and the other is caused
by the default commits trigger. With the changes in this commit, the goal is to
retain the behavior of builds running for every commit to any branch (including
PR branches) but to disable the PR trigger. That will be helpful when our Azure
Pipelines cofig is soon updated with a build matrix that includes Node v12.x
and v13.x, i.e. instead of 18 builds any time a PR is opened or updated there
will be 9.

This change may not achieve the desired outcome; if it does not then it will be
undone.
2020-01-19 14:11:11 -06:00
EmbarkBot 4d44e29b3c chore(prerelease): 5.1.0-nightly.0 2020-01-17 00:15:31 +00:00
Michael Bradley, Jr 4c7fc6d8cc ci: implement a nightlies GitHub Actions workflow
Implement a GitHub Actions workflow in `.github/workflows/nightlies.yml` named
*Nightlies*, which is scheduled to run once daily at 00:00 UTC.

At present the workflow includes one job named *release*, which is responsible
for publishing prerelease GitHub releases and NPM packages. Each prerelease
created (per package) will have a `nightly` [semver identifier][preid], and
each successive nightly release will be paired with the `nightly`
[dist-tag][dist-tag] on the NPM registry (per package).

During the release job, actions taken in this GitHub repository (commits, tags,
releases) and on the NPM registry (package publication) will be performed using
credentials associated with the following accounts:

* https://github.com/embarkbot
* https://www.npmjs.com/~embarkbot

For that purpose, corresponding [secrets][secrets] (link requires admin access)
were created in this repository consisting of API tokens generated for the
@embarkbot GitHub and NPM accounts. Logins for the @embarkbot accounts
themselves are protected by 2FA.

Implement `scripts/nightly-release.js` (`npm run release:nightly`), which is
responsible for running `lerna publish` in the GitHub Actions workflow. Also
implement `scripts/stable-release.js` (`npm run release:stable`), which is
intended to be run locally by someone on the Embark Team. Both scripts borrow
heavily from the existing `scripts/release.js`, and the process of authoring
and experimenting with them influenced refactors to the latter.

Use a `--force-publish` major-release strategy to prevent major-version drift
between packages in the monorepo. How it works: when the stable-release script
is run (`npm run release:stable`), if the current prerelease version involves a
major version increase relative to the most recent stable release then **all**
packages are bumped to the new major stable version. Otherwise, only the
packages currently in prerelease are graduated to the new minor/patch stable
version. In either case, the `nightly` dist-tag of each package published is
updated to resolve to the new stable version.

The reason for adopting this strategy *(a decision which can be revisited and
changed any time in the future)* is based on a concern that downstream users
would have a confusing developer UX if across `embark-*` packages there are
differing major versions.

To understand how the major-version drift would happen, consider the following
hypothetical scenario where `--force-publish` *isn't* used in stable releases
and `nightly` dist-tags aren't updated to resolve to the latest stable version:
assume the current stable version is `6.5.4`. A breaking change lands for
`embark-core`. The next nightly release bumps `embark-core` and about 40 other
packages to `7.0.0-nightly.0`. However, `embark-utils` (and others) isn't
bumped because it doesn't depend on `embark-core`. Later, without any
intervening changes to `embark-utils`, the prerelease is graduated so that
`embark-core`, etc. bump to `7.0.0`. So then some `embark-*` packages are at
major version `7` while others are still at `6`. *Note* that this is the case
even though this monorepo uses Lerna's *"fixed"* versioning mode. Inside the
monorepo, `lerna` makes sure that everything is okay, i.e. with respect to
automatically updating dependents' version specifiers for their dependencies
that are within the monorepo. But for downstream users things are a bit more
complex. If someone wanted to use `embark-utils` on its own and specified
`^7.0.0` as the version range (after observing that `embark` itself is in a
`7.x` series) it won't work because `embark-utils` is still in `6.x`. In the
general case, users may have to manually cross-check major versions of various
`embark-*` packages that they specify in their projects' `package.json`
files. There are tools like [npm-check-updates][ncu] that can make the task
easier, but there is still likely to be some confusion, especially given the
large and growing number of packages in this monorepo. Another area of
confusion would exist around the `nightly` dist-tag. In the scenario above,
`embark-core@nightly` (and/or `@nightly` of its dependents, e.g. `embark`)
would resolve to `7.0.0-nightly.0` but `embark-utils@nightly` would resolve to
some `6.5.4-nightly.N` (💣), i.e. a prerelease version that predates the
current stable `6.5.4` release of `embark-utils` (and *might* not include all
changes that landed in `embark-utils` prior to that stable release).

By bumping all packages each time there is a major stable release, and by
having the `nightly` dist-tag always point to a package's most recent
release (whether stable or prerelease), the problems described above are
avoided.

To see the `--force-publish` major-release strategy in action take a look at
the [commit history][history] for the
[nightly-release-workflow-tester][mb-nrwt] repo together with the *Versions*
tab of the NPM pages for the [foo][foo], [bar][bar], [baz][baz], and
[quux][quux] packages. Ignore the version history for `<= 2.0.1` because those
pre/releases were made with a different strategy than the current one.

Refactor the existing `scripts/release.js` to make it more flexible generally
and with respect to options that can be forwarded to `lerna`. In particular,
it's now possible to run `lerna version` instead of `lerna publish` (the
default behavior) by using the `--version-only` cli option; when combining that
usage with `--skip-qa` and `--no-push` it's possible to conveniently and
quickly experiment with the [`bump` positional][bump] and additional options
such as `--force-publish`, `--conventional-prerelease`, and
`--conventional-graduate`, i.e. to better understand how `lerna` will update
package versions. That ability should make it much simpler to figure out the
best course of action to take locally (manually) when a nightly release
completely or partially failed (which could happen for a number of reasons), as
well for other scenarios such as making a minor/patch release in a previous
line of major releases, or when making two/more successive stable releases
without a nightly release having happened in the meantime.

An important change to `scripts/release.js` is that by default it makes use of
the `--create-release github` option for `lerna version|publish`. For that to
work, an environment variable named `GH_TOKEN` must be defined with a properly
[scoped][scopes] GitHub [personal access token][pa-token] (`public_repo` scope
is sufficient for creating releases). The same is true for
`scripts/stable-release.js`.

Delete the `.github/PULL_REQUEST_TEMPLATE` directory and the templates it
contained. Unlike for GitHub issue creation, there is no prompt-page for
picking from a repo's PR templates; to use a PR template a `template=[name]`
[query parameter][template-query] must be appended to the URL of the PR
creation page. So the PR templates ended up unused by the Embark Team and
external contributors because it's not convenient to use them. Restore the
default PR template we had in place some time ago (with some small revisions)
since it seems like a helpful starting point, especially for external
contributors. Consistently use all-lowercase filenames for ISSUE/PR templates.

[preid]: https://semver.org/#spec-item-9
[dist-tag]: https://docs.npmjs.com/cli/dist-tag
[secrets]: https://github.com/embarklabs/embark/settings/secrets
[ncu]: https://www.npmjs.com/package/npm-check-updates
[history]: https://github.com/michaelsbradleyjr/nightly-release-workflow-tester/commits/master
[mb-nrwt]: https://github.com/michaelsbradleyjr/nightly-release-workflow-tester/
[foo]: https://www.npmjs.com/package/nightly-release-workflow-tester-foo?activeTab=versions
[bar]: https://www.npmjs.com/package/nightly-release-workflow-tester-bar?activeTab=versions
[baz]: https://www.npmjs.com/package/nightly-release-workflow-tester-baz?activeTab=versions
[quux]: https://www.npmjs.com/package/nightly-release-workflow-tester-quux?activeTab=versions
[bump]: https://github.com/lerna/lerna/tree/master/commands/version#semver-bump
[scopes]: https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/
[pa-token]: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
[template-query]: https://help.github.com/en/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository
2020-01-16 17:45:26 -06:00
Iuri Matias 82b12fd470
update azure links 2020-01-16 16:28:49 -05:00