SUSHI 2.6.1
SUSHI 2.6.1 includes the following enhancements and bug fixes:
- SUSHI now allows for cardinality changes to child elements of sliced elements if the new cardinality is compatible with the existing cardinalities on child elements of the parent's slices (#1120) (details below)
- Fixes a bug causing minified
XHTML
values to work improperly with Webpack 5 (#1113) many thanks to @alexgwalley for contributing this fix! - SUSHI now honors the
NPM_CONFIG_REGISTRY
environment variable when checking for the most recent SUSHI version (#1082) many thanks to @bkaney for contributing this fix!
Allow cardinality constraints to be applied to connected elements
When constraining cardinality, previous versions of SUSHI would not allow cardinality rules if the element’s new cardinality is narrower than the cardinality on any equivalent child elements of the slices of the parent (e.g. foo.bar
and foo:slice.bar
). Now, if all equivalent child elements can safely have the new cardinality constraint applied to them, the cardinality constraint is applied. Likewise, if any equivalent child elements can not safely accept the new cardinality constraint, the cardinality constraint is not applied to the rule’s element or any equivalent child elements.
As an example, consider a case where foo[mySlice].bar
currently has a cardinality of 1..5
foo.bar
currently has a cardinality of 0..*
, and a cardinality constraint is being applied to foo.bar
:
- Constraining
foo.bar
to0..4
is safe. The resulting cardinality onfoo[mySlice].bar
will be1..4
. - Constraining
foo.bar
to2..6
is safe. The resulting cardinality onfoo[mySlice].bar
will be2..5
. - Constraining
foo.bar
to0..10
is safe. The cardinality onfoo[mySlice].bar
will remain1..5
. - Constraining
foo.bar
to1..1
is safe. The resulting cardinality onfoo[mySlice].bar
will be1..1
. - Constraining
foo.bar
to6..8
is not safe. An error will be logged, and no cardinalities will change.
Full Documentation
For additional documentation, refer to FSH School's SUSHI documentation and/or the FSH Specification.
Install or Update
To install or update to this release, run the following command:
$ npm install -g fsh-sushi
To revert to a previous release, run a command like the following:
$ npm install -g [email protected]
To check or confirm what version of SUSHI you have installed, you can run the following command:
$ sushi -v