This library is intended for use in development of Polarity Integrations.
Documentation for this library can be found at: https://polarityio.github.io/polarity-integration-utils/
| Tool | Version | Notes |
|---|---|---|
| Node | 18.x | nvm install 18 && nvm use 18 recommended |
| npm | 9.x | Ships with Node 18 |
npm ci
npm run build
npm test
npm run lint
npm run lint:fix
npm run format
npm run format:check
npm run docs
All pull requests run the build → lint → test pipeline via GitHub Actions. Ensure local runs are green before opening a PR.
Pull requests targeting develop, main, or any support/* branch trigger the shared build workflow which runs linting, tests with coverage, and uploads results to Codecov.
Pushes to main trigger the full release workflow:
- Build & test — runs the shared build pipeline.
- Release — creates a GitHub Release tagged with the package version (e.g.,
v3.1.6), marks it as the latest release, and publishes to npm under thelatestdist-tag. - Deploy docs — after a successful release, builds TypeDoc documentation and deploys to GitHub Pages.
Pushes to support/* branches (e.g., support/1.0, support/2.0) trigger the same release workflow with the following differences:
- Docs are not deployed — only
mainpublishes documentation to GitHub Pages. - GitHub Release is not marked as latest — the release is still created with the full version tag (e.g.,
v2.0.9) but will not appear as the "Latest" release in the GitHub UI. - npm publish uses a version-specific dist-tag — instead of
latest, support branches publish underv{major}-latest(e.g.,v2-latest,v1-latest). This ensuresnpm install polarity-integration-utilscontinues to resolve to the current major version while older versions remain installable via their dist-tag (e.g.,npm install polarity-integration-utils@v2-latest).