Skip to main content

Overview

Contributing to Gesso

Before adding functionality to Gesso it's important to gauge with the team whether that change is generic enough to be worthwhile adding it to Gesso, or is it a more specific usecase to your project. If your work is not approved by Gesso team it may not get merged in.

Backwards Compatibility

Gesso maintains compatibility through 1 entire major version, meaning if you deprecate something in v4 it must stay in place through the entire lifetime of v5, when we release v6 deprecations and any functionality to maintain backwards compatibility will be removed.

When deprecating something you must flag it using the @deprecated annotation The message should let users know what the replacement is, and also what version the deprecation was added.

/*
* @deprecated Use X instead.
*
* Remove V6
*/

In the above example we are current on v4 so the removal comment is for v6. This helps developers at each major release find and remove any deprecations that are to be removed in the next major release.

When deprecating something you will often need to add some logic in order to handle backwards compatibility with the old way AND the new way. Any functionality that is used for backwards compatibility should also have a comment explaining it's use for backwards compatibility and what version it should be removed.

// Handles backwards compatibility for X
// Remove V6
const myCompatibilityHandler = () => {
// Do some things to handle both cases.
}

Committing your changes

Prior to pushing your merge request for review you need to create a changeset.

Before following the steps below ensure you run this from the root of the project.

danger

You should NEVER tag a major release. This is handled by Gesso team only.

  • pnpm changeset: this will ask you some questions about your changes.
    • Select minor if you are adding a new feature.
    • Select patch if you are fixing a bug, or making minor changes to something.
    • Enter a meaningul message that clearly explains what your change entail. But keep it short... These messages will appear on the changelog.
  • git add .changeset
  • Commit your code and push.