Package for building and integrating Commercetools Change History feature into your Merchant Center Applications.
This library takes into account that you are building a Merchant Center Applications which documentation you can find here.
The components follow the same principles of the UIKit components, but are more specific to Change History.
# npm
$ npm install --save @commercetools-frontend-extensions/change-history
# yarn
$ yarn add @commercetools-frontend-extensions/change-history
# pnpm
$ pnpm add @commercetools-frontend-extensions/change-history
This package uses changesets
in order to do releases to NPM.
In case you want to publish a new version with the latest changes you need to:
- Add a changeset with
pnpm exec changeset
and select@commercetools-frontend-extensions/change-history
as the modified package. - Some options would be appear in order to do the release:
-
patch
: use this release for fixes or small changes -
minor
: use this release for depenency upgrades or medium changes -
major
: use this release for breaking changes
-
- After selecting the option you will need to add a comment for the release notes. We recommend to use the same format as for the commits.
- e.g:
feat(utils): add utils for dates
- e.g:
- Push the
changeset
to your branch and GitHub actions will detect that the PR contains changes that affect the published library. - After the PR gets merged, another PR will be created called
Version Packages
which is the one that will be detected, again by GitHub Actions, to do a release to NPM. - Make sure that everything is correct and then merge
Version Packages
PR. - Wait until the new version is available in NPM and then deploy the custom in CircleCI.
The repo is configured with an integration with Transifex. The process for i18n is the same as the Merchant Center uses.
pnpm run i18n:build
for adding the new keys to transifex.
Once the PR gets merged to main
transifex will receive a notification with new keys that need to be translated (that's why is important that description
and defaultMessage
are descriptive enough).
Whenever the translators finish translations and mark them as done, the repo will receive a PR (per language) for adding translated messages.
Once we review that translated keys are correct and add a changeset
we can merge the PR. (Don't forget to deploy the custom app)
On main
branch, we automatically publish canary releases from CI to the canary
distribution channel, after the build runs successfully.
Canary releases are useful to test early changes that should not be released yet to next
or latest
. They are automatically triggered and released after a Pull Request merged into main
, unless the commit message contains [skip publish]
.
In order to generate a canary release, the code must be merged into main
with a changeset. To access the tag, you can either:
- Navigate to https://www.npmjs.com/package/@commercetools-frontend-extensions/change-history?activeTab=versions for the current and past versions.
- Run
pnpm info @commercetools-frontend-extensions/change-history
in the terminal.
Note that canary releases will not create git tags and version bump commits.