0.0.0-master-0986e3a1 โ€ข Published 4 years ago

@payfit/midnight v0.0.0-master-0986e3a1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

๐Ÿ’ฟ Installation

First, make sure to have react and react-dom (or react-native depending on the targeted ecosystem) installed:

npm install react react-dom --save
# or
yarn add react react-dom

Then, install @payfit/midnight inside your project:

npm install @payfit/midnight --save
# or
yarn add @payfit/midnight

โœ๏ธ Usage

import ReactDOM from 'react-dom'
import { Button } from '@payfit/midnight'

ReactDOM.render(
  <MidnightProvider locale="en-GB">
    <Button>I am using Midnight!</Button>
  </MidnightProvider>,
  document.getElementById('root'),
)

๐Ÿง‘โ€๐Ÿ’ป Development

Setup & Code contribution

Read through our contributing guidelines to learn more about the local setup, our review process, coding rules and more.

๐Ÿš€ Release

โš ๏ธ Only a Midnight collaborator can release a new version. Please note that you must not run the yarn release command if you don't know how to proceed. If you have any doubt, ask one of your teammate to help you in the process, even if it is described below.

Since Midnight host some content on AWS before starting you have to make sure your logged in to aws with SSO to the prod-design-system profile with this command:

aws --profile prod-design-system sso login

The release process is fully interactive: it starts by running yarn release in the root monorepo level and follow required steps. This is what you should see:

$ yarn release

What's new?
- pull request name (#XXXX) hash
- pull request name (#XXXX) hash

? Current version: X.XX.X
Choose a new version: (Use arrow keys)
โฏ experimental (0.0.0-master-[hash])
  patch (X.XX.X)
  minor (X.XX.0)
  major (X.0.0)

Depending on the needs you can make 2 types of release:

  • ๐Ÿ‘ทโ€โ™‚๏ธ Experimental release: a new experimental version of Midnight for testing and feedback loop purposes.
  • โœจ Stable release: a new stable version of Midnight following its versioning policy to deploy new updates on a bi-weekly basis

๐Ÿ‘ทโ€โ™‚๏ธ How to make an experimental release?

The purpose of the experimental version is to test a future version to avoid breaking changes, bugs and so on. It can be useful as well to get feedbacks on early updates (canary release).

After running yarn release select experimental.

If there is no error the experimental version is published to NPM following this format 0.0.0-[branch-name]-[hash] under the experimental NPM distribution tag.

You can check the availability of the release by running npm view @payfit/midnight (and checking the experimental distribution tag value):

npm view dist-tags part screenshot

You can then consume the released version in your stack to get feedbacks or test any incoming changes. If you need to test it in the admin/employee application space, you can follow the "How to test a Midnight release in the PayFit application" section.

โœจ How to make a stable release?

This is the main release process to deliver new versions of Midnight following this versioning strategy.

  1. Checkout master branch
  2. After running yarn release select one of patch | minor | major proposition depending on the type of release you have to do
  3. It will check if your local repository is in a clean state (eg. no staged files)
  4. Then it will check if the current branch name is master because a stable release can only be performed from master
  5. Finally, it will publish a new NPM version (to the latest distribution tag) and, unlike experimental versions, will also push a new tag and commit on the Midnight GIT repository.
  6. You will be redirected on Github release page on you browser.

You can check the availability of the release by running npm view @payfit/midnight (and checking the latest tag value):

npm view dist-tags part screenshot

After these steps you have to write the release note.

The description area should be already filled with commit metadata between the previous and newest tag but make sure to follow the same template as previous releases, like this one:

Midnight (depending on the update target, other sections can also be added such as Playground, Documentation and other tools)

โœจ New:

    [here what's new]

โš™๏ธ Update:

    [here what was updated]

๐Ÿ› Fix:

    [here what was fixed]

๐Ÿงน Chore:

    [here what was improved in the codebase]

https://github.com/payfit/midnight/compare/[new tag]...[old tag]

In each section add a list of all Pull requests concerned by the release with their id ( e.g: Awesome component: doing amazing things (#0000)). Delete the sections with no changes.

Now you can click on "Publish" and it will deploy the Midnight documentation with the last changes.

Tip: To check the progress of the deployment you can watch the circle CI job "deployment" on the master branch.

The last release step is to share a message in the #announcements-midnight slack channel. A little summary of the main changements done and a link to the release note for more details (to help you formatting the message, you can take some inspiration from previous announcements).

How to test a Midnight release in the PayFit application

To test a Midnight release in the PayFit application, you will need to create a ToDD.

A ToDD (Testing on DemanD) is useful when it comes to test, consumer side, Midnight early updates. More specifically (but not only) checking regressions or showcasing product changes in real application conditions.

Before creating a ToDD, let's update hr-apps codebase:

  • Create a new branch on hr-apps to update a midnight component.
  • When your happy with your changes you can push your branch on the remote repository
  • On the Github Checks of your branch you can access the circle-ci jobs, click on one of them to access the docker_build_and_deploy workflow
  • Wait the CI to complete and click on the build-trigger job to release a new helm chart and make it available for ToDD deployment

Then you can create a ToDD following this documentation (to access the payfit portal you have to be connected to the VPN).

Generally you only have to fill the following informations:

  • The name of the ToDD (less than 15 characters) automatically prefixed by todd- (e.g: todd-name)
  • Your Payfit email
  • Edit the channel (branch) column with your branch for the right service (e.g: branch-name in hr-apps). You can use the search input to find the right service directly and then edit the branch name by clicking in the action column. Then you can validate the changes and deploy the ToDD.

It will take around 20-30 minutes before being fully deployed. You can retrieve your ToDD in the list section.

By clicking the details button you will be able to check the status, the action history and have access to all links available for your Todd (application url, processor url...).

If all steps goes well and you can access the ToDD urls, you can now share them for testing (eg. in your pull request).

Troubleshooting If you cannot access the details of your ToDD you will have to find its catalog here: https://github.com/PayFit/testing.payfit.net/tree/main/todd-manager/catalog, just copy paste the github url of the file named after your ToDD (e.g: todd-name.catalog-info.yaml).

Then go to this page and paste the url to import it.

โš ๏ธ Don't forget that your ToDD is ephemeral, you will have to click on the "Resume" button of your ToDD's details page to redeploy it if it's no longer available.

2.31.0

2 years ago

2.30.0

2 years ago

2.29.0

2 years ago

2.28.0

2 years ago

2.27.1

2 years ago

2.25.0

2 years ago

2.23.1

2 years ago

2.22.0

2 years ago

2.10.0

3 years ago

2.21.0

2 years ago

2.21.1

2 years ago

2.20.0

2 years ago

2.19.0

2 years ago

2.18.0

2 years ago

2.17.2

2 years ago

2.17.0

2 years ago

2.16.0

2 years ago

2.15.0

3 years ago

2.14.0

3 years ago

2.13.0

3 years ago

2.24.0

2 years ago

2.23.0

2 years ago

2.8.1

3 years ago

2.9.1

3 years ago

2.9.0

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.8.0

3 years ago

2.7.0

3 years ago

2.6.1

3 years ago

2.6.0

3 years ago

2.5.0-beta.0

3 years ago

2.5.0-beta.1

3 years ago

2.1.0

3 years ago

1.85.0

3 years ago

1.85.1

3 years ago

1.85.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.0.0-beta.2

3 years ago

2.0.0-beta.1

3 years ago

2.0.0-beta.4

3 years ago

2.0.0-beta.3

3 years ago

1.83.0

3 years ago

1.84.0

3 years ago

1.82.0

3 years ago

1.82.1

3 years ago

1.70.1

3 years ago

1.80.0

3 years ago

1.81.0

3 years ago

1.70.0

3 years ago

1.63.0

3 years ago

1.62.4

3 years ago

1.62.3

3 years ago

1.62.2

3 years ago

1.62.1

4 years ago

1.62.0

4 years ago

1.61.0

4 years ago

1.60.0

4 years ago

1.59.0

4 years ago

1.57.4

4 years ago

1.57.3

4 years ago

1.57.2

4 years ago

1.57.1

4 years ago

1.57.0

4 years ago

1.56.0

4 years ago

1.55.3

4 years ago

1.55.2

4 years ago

1.55.1

4 years ago

1.55.0

4 years ago

1.54.1

4 years ago

1.54.0

4 years ago

1.53.0

4 years ago

1.52.0

4 years ago

1.51.0

4 years ago

1.50.0

4 years ago

1.49.0

4 years ago

1.48.0

4 years ago

1.47.0

4 years ago

1.46.1

4 years ago

1.46.0

4 years ago

1.45.0

4 years ago

1.44.0

4 years ago

1.43.0

4 years ago

1.42.0

4 years ago

1.41.0

5 years ago

1.40.2

5 years ago

1.40.1

5 years ago

1.40.0

5 years ago

1.39.0

5 years ago

1.38.0

5 years ago

1.37.0

5 years ago

1.36.0

5 years ago

1.35.0

5 years ago

1.34.1

5 years ago

1.34.0

5 years ago

1.33.0

5 years ago

1.32.1

5 years ago

1.32.0

5 years ago

1.31.3

5 years ago

1.31.2

5 years ago

1.31.1

5 years ago

1.31.0

5 years ago

1.30.0

5 years ago

1.29.1

5 years ago

1.29.0

5 years ago

1.28.1

5 years ago

1.28.0

5 years ago

1.27.0

5 years ago

1.26.1

5 years ago

1.26.0

5 years ago

1.25.0

5 years ago

1.24.0

5 years ago

1.23.0

5 years ago

1.22.0

5 years ago

1.21.0

5 years ago

1.20.0

5 years ago

1.19.0

5 years ago

1.18.1

5 years ago

1.18.0

5 years ago

1.17.0

6 years ago

1.16.0

6 years ago

1.15.0

6 years ago

1.14.0

6 years ago

1.13.0

6 years ago

1.12.1

6 years ago

1.12.0

6 years ago

1.11.0

6 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.8.1

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-rc.10

6 years ago

1.0.0-rc.9

6 years ago

1.0.0-rc.8

6 years ago

1.0.0-rc.7

6 years ago

1.0.0-rc.6

6 years ago

1.0.0-rc.5

6 years ago

1.0.0-rc.4

6 years ago

1.0.0-rc.3

6 years ago

1.0.0-rc.2

6 years ago

1.0.0-rc.1

6 years ago

1.0.0-rc.0

6 years ago

0.33.4

6 years ago

0.33.3

6 years ago

0.33.2

6 years ago

0.33.1

6 years ago

0.33.0

6 years ago

0.32.2

6 years ago

0.32.1

6 years ago

0.32.0

6 years ago

0.31.3

6 years ago

0.31.2

6 years ago

0.31.2-beta.0

6 years ago

0.31.1

6 years ago

0.31.0

6 years ago

0.30.0

6 years ago

0.29.0-static.0

6 years ago

0.29.0

6 years ago

0.28.1

6 years ago

0.28.0

6 years ago

0.27.3

6 years ago

0.27.2

6 years ago

0.27.1

6 years ago

0.27.0

6 years ago

0.26.1

6 years ago

0.26.0

6 years ago

0.25.0

6 years ago

0.24.3

6 years ago

0.24.2

6 years ago

0.24.1

6 years ago

0.24.0

6 years ago

0.23.1-0

7 years ago

0.22.3-0

7 years ago

0.23.0

7 years ago

0.22.2

7 years ago

0.22.2-beta.0

7 years ago

0.22.1

7 years ago

0.22.1-beta.0

7 years ago

0.22.0

7 years ago

0.21.1

7 years ago

0.21.0

7 years ago

0.20.0

7 years ago

0.19.0

7 years ago

0.19.0-beta.1

7 years ago

0.18.2

7 years ago

0.18.1

7 years ago

0.18.0

7 years ago

0.17.1

7 years ago

0.17.0

7 years ago

0.16.1

7 years ago

0.16.0

7 years ago

0.15.0

7 years ago

0.14.1

7 years ago

0.14.0

7 years ago

0.13.2

7 years ago

0.14.0-modal.2

7 years ago

0.14.0-modal.1

7 years ago

0.14.0-modal.0

7 years ago

0.13.1

7 years ago

0.13.0

7 years ago

0.12.7

7 years ago

0.12.6

7 years ago

0.12.5

7 years ago

0.12.4

7 years ago

0.12.3

7 years ago

0.12.2

7 years ago

0.12.1

7 years ago

0.12.0

7 years ago

0.11.1-icons.5

7 years ago

0.11.1-icons.4

7 years ago

0.11.1-icons.3

7 years ago

0.11.1-icons.2

7 years ago

0.11.1-icons.1

7 years ago

0.11.1-icons.0

7 years ago

0.11.1

7 years ago

0.11.0

7 years ago

0.11.0-icons.2

7 years ago

0.11.0-icons.1

7 years ago

0.11.0-icons.0

7 years ago

0.10.1

7 years ago

0.10.0

7 years ago

0.9.0

7 years ago