- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Ensure you have added suitable tests and the test suite is passing(
npm test
) - Push the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Make sure the tests are passing in CI for main
- Add a new commit using Semantic Versioning rules.
- Semantic Versioning guidelines entail a format of M.m.p, for example 1.2.3, where:
- The first number represents a major release, which lets users know a breaking change has occurred that will require action from them.
- A major update in the AblyJS SDK will also require a major update in the Chat SDK.
- The second number represents a minor release, which lets users know new functionality or features have been added.
- The third number represents a patch release, which represents bug-fixes and may be used when no action should be required from users.
- The commit should update
package.json
andpackage-lock.json
. Runningnpm install
after changingpackage.json
will updatepackage-lock.json
. - The commit should also update
version.ts
to set the agent headers. - Update the
CHANGELOG.md
with any customer-affecting changes since the last release. - Update the README.md for any references to the new version.
- Semantic Versioning guidelines entail a format of M.m.p, for example 1.2.3, where:
- Merge the commit into main.
- Tag a release using Github releases. The version needs to match the one from the commit. Use the "Generate release notes" button to add changelog notes and update as required.
- Ensure that the NPM Publish and CDN Deploy actions have run successfully.
To run the tests, just run:
npm run test
By default, the test suite runs against Ably's sandbox environment using short-lived credentials. If you just want to run the test suite, then you don't need to do anything to get set up.
If you're developing against a local build of the realtime system, please copy the .env.test.example
file to .env.test
and fill
in the blanks. This will allow you run the unit tests against your local development environment, or the production cluster if you wish.
This repository makes use of Prettier and ESLint for formatting and linting respectively. The rules are enforced in CI, so please make sure you run the checks before pushing your code. You can do this by running:
npm run format # Format all files
npm run format:check # Check for formatting errors but do not fix
npm run lint # Check for linting errors but do not fix
npm run lint:fix # Check for linting errors and fix