-
Notifications
You must be signed in to change notification settings - Fork 4
Developer Workflow
We welcome contributions to the project from developers both internal and external to Reapit. If you are part of one of our internal teams, please contact one of the Platform Engineering team and we will get you added as a contributor. For external developers, please read the guide below, fork the repo into your own account and raise a pull request for us to review.
We attempt where possible to maintain standard semver versioning for the library. Practically, this means for Elements the following pattern:
- Major releases will contain breaking changes, some significant and may need re-work. This may include component re-naming, deprecation, markup changes, removal of props and changes in behaviour. We will release multiple betas coming up to a major version that will be relatively stable, to allow incremental upgrades.
- Minor releases will not contain changes that break your app fundamentally however, you may see some visual inaccuracies where CSS has changed, small behavioural changes, or warnings in the console about upcoming breaking changes you should look to address as soon as possible. Minor releases may also include additions, new components and behaviours.
- Patch releases will be totally safe and typically are minor bug fixes.
The latest stable release, including all minor and patch releases will always be published to NPM using the --latest flag, with no breaking changes, except at a major version.
You can install the latest stable using yarn add @reapit/elements or npm install @reapit/elements as normal.
Any incremental breaking changes will will be published to NPM using the --beta flag, and will have a -beta.x suffix on the version.
You can install the latest beta using yarn add @reapit/elements@beta or npm install @reapit/elements@beta, with the caveat that you will likely have to make some updates to your app.
There are two protected branches in the project, main and lts, mapping to the --beta & --latest release trains above.
- When contributing to the project, developers should consider if their feature or bug fix is a patch on the current stable v4 release. If so, they should check out and branch off
ltsand if not, they should branch offmain. - From there, having completed their code changes, developers should raise a PR against their originating branch for peer review. A Github Actions workflow will kick in to validate
test,lint,build, andcheckprocesses for the package as well as run Snyk code checks. - Assuming the PR is validated, merging into the protected branch will deploy to the appropriate dev environment (below), for validation by the Design & Product team ahead of release.
- Having been validated at the previous step, a member of the core team can create a release from the Github Releases page.
Important For --beta releases when creating the release, the base branch is main and they should be marked Set as a pre-release. For --latest releases, the base is lts and should be marked as Set as the latest release. This will determine whether the appropriate NPM flags and environment is specified in the Github workflow.
- Following a release, a PR will be raised to bump the version to the latest in the package.json of the appropriate originating branch - you should approve and merge this pr as part of your workflow. If any patches merged into
ltsare relevant to the currentbeta, you should also raise a PR against main having completed the work in theltsbranch.
Mentioned in the diagram are four separate deployed storybook environments, representative of the various stages of the process below:
-
Dev Latest. Changes merged into
mainwill be deployed here for validation and testing ahead of alatestrelease. -
Dev Beta. Changes merged into
betawill be deployed here for validation and testing ahead of abetarelease. -
Prod Latest. The main Elements storybook, with the latest prod version - will be deployed here after a
prodrelease. -
Prod Beta. The latest beta Elements storybook - will be deployed here after a
betarelease.