Fixes#12149.
Although remotedev.io was the official URL for https://github.com/zalmoxisus/remote-redux-devtools, it looks like a phishing/adult website has taken it over.
I've replaced the link with the homepage Redux Devtools Extension in the `redux-devtools` monorepo,
(same link as on the Chrome extension page)
since that has a link to install `remote-redux-devtools` if need be.
This rationalizes how arguments are passed to and parsed by the build system. To accomplish this, everything that isn't an environment variable from `.metamaskrc` or our CI environment is now passed as an argument on the command line.
Of such arguments, the `entryTask` is still expected as a positional argument in the first position (i.e. `process.argv[2]`), but everything else must be passed as a named argument. We use `minimist` to parse the arguments, and set defaults to preserve existing behavior.
Arguments are parsed in a new function, `parseArgv`, in `development/build/index.js`. They are assigned to environment variables where convenient, and otherwise returned from `parseArgv` to be passed to other functions invoked in the same file.
This change is motivated by our previous inconsistent handling of arguments to the build system, which will grow increasingly problematic as the build system grows in complexity. (Which it will very shortly, as we introduce Flask builds.)
Miscellaneous changes:
- Adds a build system readme at `development/build/README.md`
- Removes the `beta` package script. Now, we can instead call: `yarn dist --build-type beta`
- Fixes the casing of some log messages and reorders some parameters in the build system
The contributor documentation in the README has been improved in
various ways:
* There is now a dedicated section for development builds under
'Contributing', rather than this being under 'Building locally'
* Additional unit test and linting commands have been documented
* Instructions for running e2e tests have been added
* Instructions on how to handle dependency changes have been added,
to accommodate recent changes relating to `allow-scripts` and
`LavaMoat`.
The Community Forum is now linked in the README. The sections for
general questions, feature requests, and developer questions are
directly linked as well, to help users discover that we want those type
of inquiries in the forum from now on instead of on GitHub.
Closes#3484
Our JSDoc documentation has not been updated in a very long time, and
we don't use JSDoc in enough places for the docs to have been
especially useful. The tools and scripts used to generate and publish
these docs have been removed.
References to this documentation have also been removed from the
README.
Hopefully once the TypeScript migration has made substantial progress,
we can generate more useful documentation using something like TypeDoc.
We have recently dropped support for certain older browsers, and we're
planning to have a larger conversation soon about which browsers to
support going forward. In preparation for this, it might be worth
recommending that users use the latest browser version.
As a solution to the constant lockfile churn issues we've had with
`npm`, the project now uses `yarn` to manage dependencies.
The `package-lock.json` file has been replaced with `yarn.lock`, which
was created using `yarn import`. It should approximate the contents of
`package-lock.json` fairly well, though there may be some changes due to
deduplication. The codeowners file has been updated to reference this
new lockfile.
All documentation and npm scripts have been updated to reference `yarn`
rather than `npm`. Note that running scripts using `npm run` still works
fine, but it seemed better to switch those to `yarn` as well to avoid
confusion.
The `npm-audit` Bash script has been replaced with `yarn-audit`. The
output of `yarn audit` is a bit different than `npm audit` in that it
returns a bitmask to describe which severity issues were found. This
made it simpler to check the results directly from the Bash script, so
the associated `npm-audit-check.js` script was no longer required. The
output should be exactly the same, and the information is still sourced
from the same place (the npm registry).
The new `yarn-audit` script does have an external dependency: `jq`.
However, `jq` is already assumed to be present by another CI script, and
is present on all CI images we use. `jq` was not added to `package.json`
as a dependency because there is no official package on the npm
registry, just wrapper scripts. We don't need it anywhere exept on CI
anyway.
The section in `CONTRIBUTING` about how to develop inside the
`node_modules` folder was removed, as the advice was a bit dated, and
wasn't specific to this project anyway.
These files were referencing npm scripts that no longer existed. Notices
appear to no longer exist, and the `ui-dev.js` module is no longer
actively used.
The `mock-dev.js` module is still used for certain integration tests, so
I've just removed the reference to the non-existent script.
* Add React and Redux DevTools
* Conditionally load react-devtools
* Add start:dev npm script to run the app with devtools
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
Omit requiring mocha to be installed globally; this is not required
for any of the listed commands. Also update the `lint` command to use
the npm script, as the gulp command referenced doesn't exist.