When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Please note we have a code of conduct, please follow it in all your interactions with the project.
TABLE OF CONTENTS
The current monorepo setup is based on:
- Lerna used mostly for task running and versioning.
- npm workspaces used for package linking.
The processes required for Lerna to manage releases and changelogs is done through the conventional-commits specification.
To set up your development environment, please follow these steps:
-
Clone the repo
git clone https://github.com/clerkinc/javascript
-
Change into the directory and install dependencies
cd javascript npm install
-
Build all the packages in the monorepo by running:
npm run build
You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by submitting an issue on GitHub. Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed!
Please try to create bug reports that are:
- Reproducible. Include steps to reproduce the problem.
- Specific. Include as much detail as possible: which version, what environment, etc.
- Unique. Do not duplicate existing opened issues.
- Scoped to a Single Bug. One bug per report.
Even better: Submit a pull request with a fix or new feature!
- Search our repository for open or closed Pull Requests that relate to your submission. You don't want to duplicate effort.
- Fork the project
- Create your feature branch (
git checkout -b feat/amazing_feature
) - Commit your changes (
git commit -m 'feat: Add amazing_feature'
). Clerk uses conventional commits, so please follow the specification in your commit messages. - Push to the branch (
git push origin feat/amazing_feature
) - Open a Pull Request
Version updates and publishing is managed using Lerna.
npm run bump
npm run release
After all the features have been merged and we want to create a new release, we use npm run bump
.
This script will use lerna version
to check which packages need to be updated and in what way based on the updates since the previous release.
The command will guide you through the version changes that are detected and will:
- Bump the package versions.
- Run the
version
hook updating the version info files. - Create new tags and a "release" commit.
- Push the commit and tags to the origin.
After that is done, and all seems valid, you can run npm run release
which will go through the publish process of the packages included in the release commit.
For more info you can check the lerna version and lerna publish documentation.
@next
version updates and publishing is managed using Lerna.
Install the @next
version using npm install @clerk/{package_name}@next
.
npm run bump:next
npm run release:next
To graduate* the version pointed by the @next
tag:
npm run graduate:next
npm run release
The bump:next
command will create an alpha
version update on the packages changed. Next if you want to release this version on npm to be installed, you would run the npm run release:next
which would publish the version under the @next
tag.
* By 'graduate' we mean publishing the @next
tagged versions, which in actual versions result in x.y.z-alpha.a.b.c
, to the stable one x.y.z
.
By contributing to Clerk, you agree that your contributions will be licensed under its MIT License.