One long term "bug/feature" has been that the budget message was passed late
(in the render phase). By adding a phase "prepareToRender", we can pass on
te budget message in that phase and the HTML plugin can use that message instead
of the old "context" hack. This also opens up for some really cool features
coming soon :)
* Remove unused gzip parameter for writing html.
* Simplify storagemanager.
* Simplify how promises are handled, and directories created.
* Move out gzip handling to the plugins that use it, so storagemanager just writes strings and buffers unmodified.
* Make argument order consistent for write methods.
* Switch from hooks to messages
This is the first step to get rid off hooks:
* Introduce two new messages: setup and final
* Logs a warning messages for all plugins that uses old hooks
The setup message will make it possible for plugins to pass
configuration to each other (send pugs to the HTML plugin,
send javascript (that collects metrics) to Browsertime and can
hopefully remove the post/preOpen hooks. The final message
replaces the postClose and final hook (or do we need more messages?).
Keep the hoosk deperecated through 6 and remove them in 7.0.
* lint
* more messages, let take of hooks later
* renaming
* rename summarize to sitespeedio.summarize
* Avoid name collisions for stored analysis files.
Summary messages can be different based on group (most often per domain). Include group in file name, if present to avoid overwriting data in an existing file.
* Remove redundant summary messages.
The ”largestassets.summary” message with group:’total’ was sent with different structure for message data from what was sent earlier in this function.
* Additional validation of summary and pageSummary.
Check that url and group are specified correctly for all messages.
* Use ES6 template strings instead of util.format.
* Warn about duplicated summary messages.
This will be an error later, but need to update the assets plugin first.
* Only put summary data on index and detailed page.
Summaries with group=’total’ is data for the entire test (i.e. all url and domains). Previously the last group message (which might be just a subset of all data) would be used.
* No duplicate largestassets.summary messages.
Change so there’s only one largestassets.summary message per group, with data for all content types. Then enforce this for all summary messages.