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: 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.
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
o-colors as an example.
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-colors@^2.3.4, it will be compatible with any version between
v2.3.4 and below
o-typography dependency required
o-colors@^1.2.3, any version above and including
firstname.lastname@example.org 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.
Releasing a new version of a component impacts other projects and teams, as updates may be needed to projects which consume the component .
Before releasing a new major version of a component, notify maintainers of dependent projects. This allows time for feedback and for teams to plan for the migration from one major version to another. This migration process can be complex, especially when making a major change to a component which is widely used across many other components and end products. It is therefore important to plan for a release and communicate with stakeholders ahead of time.
For minor or patch releases, notify maintainers of dependent projects to encourage adoption of the new fix or feature. A Slack message, blog post, or newsletter is a good way to do this.
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.
Follow these steps to deprecate an existing component:
origami.json, change its supportStatus to either “dead” or “deprecated” – see the origami.json manifest specification for a definition of each status.
README.mdto include a paragraph at the top, outlining the component’s deprecation status. Explain what any remaining users should do. Link to any replacement.
@deprecated, followed by text which describes the deprecation.