- Fix issue where the internal lasso context data was missing for image/resource assets.
- Fix issue with caching page results in production mode.
- Fix regression with the
getImageInfo
api.
- BREAKING: Requires a minimum of node 16
- Upgrades internal dependencies (biggest user facing change being JS/CSS parsing and minification of newer features).
- Switches from esprima to espree to parse JavaScript (supports more modern JavaScript).
- Adds
.webp
to the list of browser-refresh extensions.
- use terser instead uglify-js because it's no longer maintained.
- Fix regression with inline scripts with
externalScriptAttrs
.
- Improve support for
defer
andasync
attributes on inline bundles.
- BREAKING: Remove support for Node 4
- Significant refactors. Move to async/await internally.
- Traspile for Node 4 support using Babel
- BREAKING: API methods no longer expose callbacks.
- Plugins should no longer expect a callback
- Plugins should return promises for async tasks
- BREAKING: Marko taglib and taglib-v2 removed
- Use
@lasso/marko-taglib
instead
- Use
- Support for passing
cacheKey
property to lasso config - Merge
lasso-require
into Lasso- Lasso config
lassoConfig.require.resolver
property has been split out into its own propertylassoConfig.resolver
- Lasso config
const lassoConfig: {
require: {
transforms: ...
},
resolver: {
builtins: {
...
}
}
}
const lasso = lasso.create(lassoConfig);
- Lasso writers now support async
init
functions
module.exports = function(lasso, config) {
lasso.config.writer = {
async init (lassoContext) {
await Promise.resolve();
},
async writeBundle (reader, lassoContext) {
const bundle = lassoContext.bundle;
bundle.url = 'test.com';
},
async writeResource (reader, lassoContext) {
return { url: 'test.com' };
}
};
};
- Fixes #186 - Allow custom require handler to implement getDependencies
- Use resolve-from to first try and resolve
browser.json
- Fixes #185 - DependencyRegistry has an undefined stream when using
mask-define
for AMD dependencies - Increasing default timeout to 10s
- Other minor internal changes
- Fixed #180 - Defining bundles with "intersection" does not work for "require" dependencies
- Fixed #180 - Defining bundles with "intersection" does not work for "require" dependencies
- Fixed #178 - Cache key changes when lasso is reconfigured even if config did not change
- Fixed #173 - Bundle attributes
- Restored Marko v2 compatibility
- Fixes #171 - Write cache key information to disk for debugging purposes
- Added support for a new
relativeUrlsEnabled
configuration option (PR #167 by @reid) - Upgraded glob version (PR #166 by @yomed)
- Docs: various improvements to documentation by (@yomed)
- Added tests for #160 - lastSlot configuration option for the require plugin
- Upgraded to
raptor-util@2.0.0
- Fixed #156 - Lasso is generating very long names in development triggering
ENAMETOOLONG
error PR #157 from @mlrawlings
- Fixes #147 - EPERM 'operation not permitted' on rename
- Fixes #148 - css urls resolved incorrectly with multiple pages when bundling disabled
- Testing: Don't actually read external URLs when running tests
- Fixes #149 - if-flag is ignored in async section of browser.json
- Updated taglib type and autocomplete information for tooling
- Docs: Added Michael Rawlings as a maintainer
- Added
null
/undefined
when building async loader metadata
- Fixed #146 - Slot timeout causes other slots to timeout
- Loader metadata for lazily loading packages is no longer stored in a global variable and is instead integrated with the lasso modules client runtime. This change prevents separate lasso builds of JavaScript libraries from conflicting with each other when both added to the same web page.
- Code cleanup for base64 encoding
- Fixes #143 - Only encode new lines when using utf8 encoding for data uri
- Fixes #141 - Add support for UTF8 encoding inline images in CSS files
- Fixes #137 - Don't allow double callbacks in case of multiple errors on the same read stream
- Fixes #136 - Just use a unique ID for packages if calculateKey() is not implemented
- Added new events:
beforeAddDependencyToAsyncPageBundle
,beforeAddDependencyToSyncPageBundle
Example plugin:
module.exports = exports = function(lasso, config) {
lasso.on('beforeBuildPage', (event) => {
var context = event.context;
context.on('beforeAddDependencyToSyncPageBundle', (event) => {
var dependency = event.dependency;
});
context.on('beforeAddDependencyToAsyncPageBundle', (event) => {
var dependency = event.dependency;
});
});
};
- Fixed #135 - Incorrect key is calculated for require dependencies in
browser.json
files in some situations
- Fixed #134 - The
<lasso-img>
tag breaks bundling when included in a template sent to the browser - Fixed #133 - The dependency chain should be included in error messages when walking a dependency graph
- Fixed #130 - check inline minification config value (@yomed)
- Updated docs and tests
- Minor cleanup
- Fixes #84 - Allow minification to only be enabled for inline resources
- Switched from
jsonminify
tostrip-json-comments
- Fixes #128 - getLastModified is broken when using registerRequireType
- JavaScript comments are now stripped before parsing JSON config files
- Significant improvements to performance and stability
- Resolved issues related to caching and development mode
- Fixes #116 - Conditional requireRemap is broken
- Fixes #115 - Allow conditional dependencies to be grouped
registerRequireType
, switch condition blocks PR #113
- Marko v3 compatibility
- Adds support for fingerprinting inline code blocks for purpose of creating Content Security Policy (CSP) that secures statically built app.
- Added support for custom attributes on script and style tags for slots
- Adds support for injecting a Content Security Policy nonce into inline script and style tags. Fixes Issue #93
- Fixed #100 - Removed type attributes from
<script>
,<link>
and<style>
tags, as recommended for HTML5 best practices.
- Allow dependencies to choose default bundle name by implementing getDefaultBundleName(pageBundleName, lassoContext)
- Added test for lasso-js/lasso-require#21
- Fixed #95 - Further sanitize relative bundle paths that are used to determine output file
- Improved name generation for unbundled dependencies
- Better OS file separator handling
- Adds support for
noConflict
lasso configuration option
- Fixes lasso-js/lasso-minify-js#1 - Upgrade to the latest version of UglifyJS
- Fixes #82 - Make lasso a true singleton
- Minor correction in calculateConfigFingerprint code
- Added mask-define option for resource dependencies
- Changes to keep Lasso taglib compatible with older versions of
marko
- Upgraded the marko dev dependency
- Documentation: Improved docs
- Documentation: Improved docs
- Fixesd #77 - now works on the server and in the browser
- Builtin es6 support for
.es6
files - Documentation: Added docs for #77
- Only enable the browser-refresh special reloads once
- Add web fonts to browser-refresh
- Fixed circular require issues for browser-refresh
- browser-refresh is now auto enabled.
- Code and docs cleanup
- Fixed #76 Auto switch to development mode when browser-refresh is enabled
- Fixed #75 - Generate config cache key in a stable way
- Documentation: new plugin: lasso-autoprefixer: Autoprefix CSS with vendor prefixes using autoprefixer-core
- Documentation: Fixed #61 - Improve documentation for external resource dependencies
- Documentation: new third party plugin: lasso-clean-css
- Fixed #62 - Invalidate the default lasso instance on configure
- Fixed #57 - Allow non-JavaScript modules to be required:
require('lasso/node-require-no-op').enable('.less', '.css');
// ...
require('./style.less');
- Internal: Switched from "raptor-async/DataHolder" (deprecated) to "raptor-async/AsyncValue"
- Issue #48: Do not mangle bundle names
- Issue #49: Enhance LassoPageResult to fetch info by bundle name
- Renamed Optimizer to Lasso