- Quick start
- Requirements
- Versioning
- Commit convention
- Branches
- Releases
- Security
- Development Environment
- Pipelines
- Documentation
- Branch of
main
- Make your changes, using conventional commits messages
- Create a MR and assign one of the maintainers as reviewer
- Make sure all checks are green & resolve all discussions
- Merge!
- Ask maintainers to run the release pipeline
pnpm install
- Install dependenciespnpm build
- Build distribution assetspnpm dev
- Run build in watch modepnpm test
- Run tests oncepnpm test:watch
- Start test runner in watch modepnpm lint
- Lint with ESLintpnpm type-check
- Run typescript type check
Runtime & package manager:
- Node.js 20+, because it supports the ‘fetch’ API and ESM natively
- PNPM 9+, if you have Corepack enabled this should be automatically picked up.
We follow Semver and will use Semantic Release to automate releases based on this assumption.
We follow conventional commits which helps us automate releases as described in releases
We utilize Husky to set up commit hooks to run linting when committing.
main
- This is the default branch of the repository.next/**
- This is a branch pattern you can use to merge multiple related changes into and do a prerelease.x.x.x
- These are the branches for making hotfixes of previous versions. For example, if version 1.2.0 needs to be patched, a branch1.2.x
is created and the patch is applied to that branch.
We are using Semantic Release tool to automatically release and version the package. There is a manual Github Action available to trigger in the Actions tab.
The package assets are published to the npm registry under the
@bloomreach
scope as @bloomreach/discovery-web-sdk
.
We will setup integration with SonarQube as well as Dependabot and pnpm audit
to scan for and
catch security vulnerabilities in the project and its dependencies.
Vite, is currently one of the most popular build tools out there boasting fast build times and a compatible tool called ‘vitest’ that ensures using the exact same configuration.
Vitest, its like Jest but integrates with Vite seamlessly. A performant unit / integration test runner which also supports snapshot testing (although we probably do not need that at the moment).
Using the industry standard ESLint with the ‘Airbnb’ style guide ESLint config for both javascript and typescript.
Using the industry standard Prettier for formatting.
This is an ESM ("type": "module"
) package and it outputs an ESM bundle and a types bundle for
Typescript users.
Vite supports a specific set of browsers and this default set of browsers and their versions should be good enough for most clients to support. A consumer of the SDK can always opt for compiling the code to an older standard if needed in their own project build tooling.
There are currently Github Action pipelines for:
- builds - This runs the standard
install
,build
,lint
,test
steps - releases - This runs a build step and then a release using Semantic Release. Requires manual trigger as described in releases.
We will setup an integration with Readme through Github Actions to push pages to the Bloomreach Documentation website. This way this repository will remain the single source of truth of documentation spread out through npmjs, github and the Bloomreach Documenation website.