Neutrino 4 configures `file-loader` as the loader for HTML (rather than
the more usual `html-loader`), which means the HTML is not parsed to
look for further dependencies such as `<img src="...">` tags. Our
custom Neutrino config overrode that to `raw-loader` (presumably to
work around bugs caused by the use of `file-loader`), which doesn't
parse HTML either.
Instead, these assets were being manually copied to `dist/img/` by
`neutrino-custom/production.js`'s `CopyPlugin` rule, effectively
circumventing the webpack build process.
Newer Neutrino correctly uses `html-loader`, causing our HTML to be
parsed during the webpack build for the first time. However now that
the images are being resolved at build time rather than runtime, the
relative paths need to be updated to account for the directory layout
differences between `src/` and `dist/`, to prevent build errors.
A significant benefit of this change is that images referenced from
HTML will now be output with hashed filenames, meaning they get given
long-lived `Cache-Control` headers by WhiteNoise.
See:
https://webpack.js.org/loaders/file-loader/https://webpack.js.org/loaders/raw-loader/https://webpack.js.org/loaders/html-loader/
It wasn't unvendored at the time of the switch to Neutrino/webpack
due to the official `flot` NPM package being out of date. However
there are now unofficial up to date flot packages on NPM that we can
use instead - which avoids the clutter and grep false-positives of
vendoring.
I've diffed the vendored files with those in `jquery.flot` and they
are identical, so this change should be a no-op in terms of
functionality.
The issue seen with the old Grunt+babel build process no longer
occurs, so we don't need the modified vendored version. As an added
bonus, the upstream version supports the ES6 import style which we
want to start using soon:
https://github.com/omichelsen/angular-clipboard#use-with-a-module-loader
This reverts commit b37ef957a2.
There appears to be a bug with the webpack module resolution, such that Treeherder's upgraded Hawk 7 is being used by taskcluster-client, even though that has a separate dependency on Hawk 6, and so should be using its own copy of Hawk.
For now, let's roll back to Hawk 7 for Treeherder's direct dependency (used by the login flow), to work around this.
Modify the code to:
* share assets and global settings wherever possible
* update links going both directions
* other small UI tweaks for uniformity with Treeherder
* Fixed a few routing dead-ends on the react side
* Removed the dead TestDetail file we weren't using anyway
* fix production domain urls
Since the node minor/patch versions are reliable enough that it's
not worth the hassle of pinning to an exact version. This only
affects Heroku/Travis, since Vagrant was already always using the
latest 8 series release via the APT repo.
This effectively upgrades node on Heroku/Travis from 8.9.0 to 8.9.1,
since it's the latest release at the moment:
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.9.1
The yarn version specifier has been adjusted to use the `.x` format,
which gives the same end result as the caret range, given Heroku
doesn't cache binaries from one build to the next (only `node_modules`).
Also upgrade Enzyme from 2.7.1 to 3.1.1
Most notable change here is that React.PropTypes is now
moved to a separate package and referenced just by
PropTypes. So this needed some import and linting changes.
This adds the upgrade to Bootstrap 4, and some basic changes and
some CSS tweaks we needed to keep out UI consistent.
The simpler changes are things like:
* Classes that were renamed
* Adding classes that are now needed (dropdown-item, etc)
* Change an item from a button to a span
* Changing order of items (modal header close button, etc)
* CSS class syntax changes
The other changes are lots of CSS padding, margin, font and
other spacing tweaks.
Typically the `package.json` commands call scripts that exist in the
top-level `node_modules/.bin/` directory, which are (a) already on
`PATH` when invoked by yarn, and (b) on Windows have `.cmd` script
shims that work around Windows' lack of shebang support.
However due to symlinks being problematic inside Virtualbox, we have
to use `--no-bin-links` with `yarn install`, which means the top-level
`.bin/` directory doesn't exist. As such, the `<package>/bin/` scripts
have to be used directly, which require prefixing with `node` to work
around lack of shebang support on Windows.
See:
https://shapeshed.com/writing-cross-platform-node/#scripts-in-package-json
Note that even with these changes, the `start:stage` command will not
work due to the environment variable prefix. This will be solved by
the switch to newer Neutrino, which supports setting environment
variables using the `--options` command line parameter instead.
The `angular-marked` package is already listed in `package.json`,
which itself has a dependency on `marked`, so we don't need to list
it explicitly ourselves.