This workspace contains the following top-level npm scripts:
ci
: Run tests across the the whole repository and build all public packageslint
: Lint the source code across the whole repositorytest
: Run tests across the whole repository (or usetest:watch
to enable watch mode)verify
: Lint and run tests across the whole repositorycoverage
: Generate a test coverage report across the whole repositorybuild
: Build all public packagesclean
: Clean all build artifactsversion
: Retrieve the public package version (according to the source code within the repository)publish
: Publish all public packages to npm
This repository uses pnpm's Workspaces feature to manage internal dependencies between packages.
To add dependencies within a package, use one of the following methods:
- Edit the relevant package's
package.json
, then runpnpm install
anywhere within the repository cd
into the relevant package, then runpnpm add <dependency>
to install the dependency- run
pnpm add --filter <package> <dependency>
anywhere within the repository
See pnpm add --help
and the pnpm workspaces documentation for more details.
This workspace uses Prettier for code formatting, with rules enforced via ESLint.
This project uses Github pull requests (PRs) for merging code, and Github Actions for continuous integration (CI).
This repository contains the following long-lived branches:
main
: Branch containing the most recently published versiondevelop
: Stable development branch containing the upcoming 'next' release
Points to note:
- Branch protection rules and CI tests are in place for both these branches to prevent accidentally committing broken code changes
- Features not yet ready for release remain on short-lived feature branches until they are ready to be merged into the
develop
branch - Packages are automatically published by CI whenever a PR is successfully merged into the
main
branch
Changes are committed to the repository as follows:
- Create a new feature branch from the current
develop
branch, named with the relevant prefix:feature/...
- Branch contains new featuresfix/...
- Branch contains bugfixesdocs/...
- Branch contains documentation updateschore/...
- Branch contains routine admin tasks
Note that a
wip/...
prefix indicates a branch that is not intended to be merged - Commit code changes to the feature branch
- Rebase on the latest
develop
branch to incorporate upstream changes - Raise a PR that targets
develop
as its base branch - Wait for CI tests to pass
- Merge the PR using the 'rebase' merge strategy
When the contents of the develop
branch are ready to be released, follow these steps to publish a new version:
- Ensure that
@ag-grid-devtools/cli
package version has been incremented in thedevelop
branch:git diff origin/main..origin/develop -- ./packages/cli/package.json | grep '"version": ".*"' && echo "Ready to publish" || echo "Version already published"
- Raise a new PR that merges
develop
intomain
- Wait for CI tests to pass
- Merge the PR using the 'merge commit' merge strategy
This will cause CI to perform the following actions:
- Build and publish all public packages
- Tag the repository with the current package version
- Create a Github 'Release' page linked to the release commit