Skip to content

Development ​

INFO

Want to contribute? Please read the CONTRIBUTING.md and CODE_OF_CONDUCT.md.

Install ​

To develop Hybrid Compute, fork it, and then in the project root:

sh
npm i

Build ​

sh
npm run build

Test the code ​

sh
npm test

npm run test:ci runs the same tests with coverage, and fails when a package's own source falls below 99% of lines, 100% of functions or 95% of branches. Besides example-based tests, each package has property-based tests (*.property.spec.ts, with fast-check) that check a rule against many generated inputs: dispatch against a model of the strategy rules, the local task registry against a Set, and that any input round-trips through the remote server and a worker thread.

Commit ​

To commit, we use semantic git commits with Commitizen. So please run this when you are ready to commit your staged files:

sh
npm run commit

When you are done with your development, create a PR with the original repository 😃

Releases ​

Releases run automatically when a pull request is merged. Each package is versioned on its own, and only packages with something to release get a new version. What counts is the conventional commits that touch what a package publishes (its source without tests, package.json, README.md and LICENSE) since its last release:

CommitRelease
Breaking change (feat!: or BREAKING CHANGE:)Major (minor while below 1.0)
featMinor
fix, perf, revertPatch
chore, docs, ci, test, style, refactorNone

A package that depends on a sibling gets a patch when the sibling's new version falls outside its ^ range. To see what the next release would be:

sh
npm run release:dry-run

Before publishing anything, the release builds the packages and runs the same check as CI. Each package is packed as npm would publish it (dist, src without tests, and CHANGELOG.md, listed in files) and linted with publint and @arethetypeswrong/cli. The tarballs are then installed into an empty project, every source map is checked to point at published files, and every package is imported. Run it yourself after a build:

sh
npm run build && npm run check:pack

Clean code ​

ESLint, Prettier and Putout is used