The Origami team maintains and improves the components regularly. This means that we release new versions of the components frequently, and a component’s new version numbers follow the semver specification.
The version numbers are in the following format: 1.2.3
, which is representative of MAJOR.MINOR.PATCH
.
MAJOR
: When a major is released, we refer to it as a breaking change. This usually means that we have made a drastic visual change, or a change that breaks backwards compatibility. When this changes, we will communicate the change and offer help with migration.MINOR
: When this number changes , we’ll have made an improvement, added a feature or made a noticeable design tweak, for example.PATCH
: When we release patches, we are usually releasing a bug fix that does not affect the components overall functionality.When a new MAJOR
release affects many dependent components and projects we call this a major cascade. It may require extra consideration and support before release.
We recommend requesting an Origami component by requesting a particular version range, which is indicated by a caret (^
). That syntax will specify a version but will also fetch minor and patch releases in the future. So if you request o-message@^2.3.0
, you will get v2.3.0
. But when we release a minor (v2.4.0
) of that component further down the line, it means you’ll automatically get that, too.
By requesting a component’s version range, you’ll have an up-to-date component as soon as we release it.
Almost all Origami components are built on top of other Origami components.
o-message, for example, relies on o-buttons, o-colors, o-icons and o-typography, which in turn have Origami dependencies of their own, which generates an elaborate dependency tree:
o-message
├── o-buttons
│ ├── o-colors
│ ├── o-icons
│ │ ├── fticons
│ │ └── o-assets
│ └── o-normalise
│ └── o-colors
├── o-colors
├── o-icons
│ ├── fticons
│ └── o-assets
└── o-typography
├── o-colors
├── o-fonts
├── o-grid
└── o-icons
├── fticons
└── o-assets
Let’s use o-colors
as an example.
The full o-message
dependency tree requires o-colors
four times. In order to avoid downloading four different versions of o-colors
, we will flatten the dependencies and try to find a version of o-colors
that all of the components requiring it can use. This is possible because Origami components use semver ranges to specify the versions of their dependencies.
However, this can also lead to situations where there is no single version that satisfies all semver ranges. This happens primarily when different ranges for the same component are specified.
If, for instance, o-message
requires o-colors@^2.3.4
, it will be compatible with any version between v2.3.4
and below v3.0.0
.
If the o-typography
dependency required o-colors@^1.2.3
, any version above and including o-colors@2.0.0
won’t be compatible with the direct o-colors
dependency (which is v2.3.4
and above), and will cause a conflict.
The only way to fix these conflicts is to ensure that the dependencies and the dependencies within those dependencies are all requiring the same ranges.