Releases: assetgraph/assetgraph
Cyclic graph warning when renaming
v5.11.0
v5.11.0 (2019-07-24)
Pull requests
- #988 subsetFonts: Allow passing in per-page font traces (Andreas Lind)
- #1002 Avoid preloading the unused variants (Andreas Lind)
- #998 subsetFonts: Implement omitFallbacks:true mode (Andreas Lind)
- #1000 subsetFonts: Consistently issue root-relative urls instead of relative ones (Andreas Lind)
- #999 subsetFonts: Async load the original @font-face declarations for self-hosted fonts (Andreas Lind)
- #1039 Upgrade lodash to version 4.17.15 (depfu[bot])
- #1038 Upgrade eslint-plugin-mocha to version 6.0.0 (depfu[bot])
- #1036 Upgrade lodash to version 4.17.14 (depfu[bot])
- #1034 Upgrade iconv-lite to version 0.5.0 (depfu[bot])
- #1032 Upgrade eslint-config-prettier to version 6.0.0 (depfu[bot])
- #1029 Upgrade httpception to version 3.0.0 (depfu[bot])
- #1030 Upgrade magicpen-prism to version 3.0.2 (depfu[bot])
- #1031 Upgrade unexpected-set to version 2.0.0 (depfu[bot])
Commits to master
- Properly detach the <style> when removing an empty inline stylesheet (Andreas Lind)
- prettier --write test/transforms/subsetFonts.js (Andreas Lind)
- Fix lint (Andreas Lind)
- Update eslint-config-standard to version 13.0.1 (depfu[bot])
- Revert "Try asking for fonttools 3.43.1 (Travis picks up 3.43.0 still)" (Andreas Lind)
- +8 more
HTTP Referer header
Assetgraph will now include an HTTP Referer header when populating HTTP --> HTTP relations
Subsetting improvements
Minor changes
- Replace existing font preload hints with hints to subset
- Warn about missing chars in the original font that was subset locally
- Support
text-transform
in text analysis - Added Firefox default stylesheet styles
Patches
- Don't break when pre-existing preload hints point at a font
Local webfont subsetting
This version has massive improvements of the webfont subsetting.
Major changes:
Yeah, it's a minor release and this is going against semver, but you weren't using this feature anyway and we have a new major in progress for a long time.
transforms/subsetGoogleFonts
has been renamed totransforms/subsetFonts
because of the extended ability to handle local fonts as well.
Features:
- Ability to subset local fonts using python fonttools
- Font subsetting now reates
.woff2
and.woff
files as fallback, where previously you had to chose one format - Massively improved text extraction algorithm, guaranteeing higher quality data for which glyphs need to go into what font subset
Google font subsetting
This release adds a new feature for subsetting google fonts on sites that use <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=...">
directly in their Html without any other optimizations.
The subsetGoogleFonts
transform will find what fonts are included from google, use these to inform a getComputedStyle
-like traversal of all text-nodes, pseudo-elements and other visible text instances, resulting in a full mapping of what font styles apply to which characters on all pages in the graph.
Using this knowledge the transform will request the relevant font subsets from google and insert a new @font-face
-declaring CSS file in the Html-pages, pointing at the now local font subsets.
In order to ensure a sane fallback in case dynamic content appears later on the page, or if the getComputedStyle
extraction has flaws, the original google font CSS is kept on the page, but loaded at the end of the page with the Filament group loadCSS approach. The local font subset will get a new font name, which is prepended to all uses of the original font. This ensures an automatic load of the original google font files if a glyph is missing in the subset of the font.
All font subsets are resource hinted for the browser with <link rel="preload">
in order to maximize time to first meaningful paint (including web fonts!).
The original google font CSS is hinted with <link rel="prefetch">
and a connection to https://fonts.gstatic.com
, where the original fonts are located, is set up with <link rel="preconnect">
This is a comparison of a blog page with raw google fonts usage versus the same page after subsetGoogleFonts
has run on the page: https://www.webpagetest.org/video/compare.php?tests=170823_TC_055b0c5ad91e7cbf995d5c2a2129363e%2C170823_FQ_d10b134614053bfec27ceeecc32617da&thumbSize=200&ival=500&end=visual
Tail end script bundles
Features
- A bundle referenced from several script tags on the same page will now be inserted at the position of the last referencing script tag rather than the first. Fixes errors where a script at the end of the page references dom that is in between it and a previous script tag
v3.0.0
- Many bug fixes
- Redid the require.js support so that the require.js optimizer is used and require.js plugins are supported
- Webpack support
- Improved systemjs-builder support, including conditionals
- Removed built in opinionated i18n support (parts of it moved to assetgraph-i18n)
- Changed the internal representation of relations, removed support for assetGraph.(add|remove)Relation in favor of asset.(add|remove)Relation
GETSTATICURL('...')
changed to'...'.toString('url')
, removed wildcard support. Use the wildcard support of your script loader plugins instead.- Dropped support for transpilation (sass, coffeescript, less, stylus, dart). Use webpack or system.js instead.
- Add
crossorigin
getter to relations - Removed support for INCLUDE
- Removed specific support for (old) angular.js templates
- Update many dependencies, most notably jsdom
- Drop support for node.js < 4
- Web worker and service worker support (including support for building system.js endpoints inside the workers)
- Disallow relative hrefs from HTML fragments and get rid of the stupid
fixBaseAssetsOfUnresolvedOutgoingRelationsFromHtmlFragments
andassumeThatAllHtmlFragmentAssetsWithoutIncomingRelationsAreNotTemplates
transforms. - Fix the very complex situation with base assets. This will remove a lot of complexity and means that we cannot support behavior:
url(relative/path/to/foo.htc)
,AlphaImageLoader(src='relative/path/to/foo.bar')
- webmanifest asset and relation modeling
- Modelling of resource hint relations
- Avoid relative links in source maps. Fixes resolution when the application uses pushState
- Modelling of open graph relations
- Canonical root setting, which allows resolving canonical urls to local files