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
XHTMLvalues to work improperly with Webpack 5 (#1113) many thanks to @alexgwalley for contributing this fix! - SUSHI now honors the
NPM_CONFIG_REGISTRYenvironment 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.barto0..4is safe. The resulting cardinality onfoo[mySlice].barwill be1..4. - Constraining
foo.barto2..6is safe. The resulting cardinality onfoo[mySlice].barwill be2..5. - Constraining
foo.barto0..10is safe. The cardinality onfoo[mySlice].barwill remain1..5. - Constraining
foo.barto1..1is safe. The resulting cardinality onfoo[mySlice].barwill be1..1. - Constraining
foo.barto6..8is 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 fsh-sushi@2.6.1
To check or confirm what version of SUSHI you have installed, you can run the following command:
$ sushi -v