Skip to content

SUSHI 2.6.1

Compare
Choose a tag to compare
@julianxcarter julianxcarter released this 11 Aug 16:35
· 223 commits to master since this release
f67b4ea

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 to 0..4 is safe. The resulting cardinality on foo[mySlice].bar will be 1..4.
  • Constraining foo.bar to 2..6 is safe. The resulting cardinality on foo[mySlice].bar will be 2..5.
  • Constraining foo.bar to 0..10 is safe. The cardinality on foo[mySlice].bar will remain 1..5.
  • Constraining foo.bar to 1..1 is safe. The resulting cardinality on foo[mySlice].bar will be 1..1.
  • Constraining foo.bar to 6..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