maintaining.md
Be kind to everyone. Read and adhere to the Code of Conduct.
npm test: Lint the code and run the entire test suite with coverage.npx tap test-tap/fork.js --bail: Run a specific test file and bail on the first failure (useful when hunting bugs).npx test-ava test/{file}.js: Run self-hosted tests.TypeScript itself does not follow SemVer. Consequently we may have to make changes to the type definition that, technically, are breaking changes for users with an older TypeScript version. That's OK, but we should be aware.
Only update the TypeScript dependency when truly necessary. This helps avoid accidental breakage. For instance we won't accidentally rely on newer TypeScript features.
Speaking of, using newer TypeScript features could be considered a breaking change. This needs to be assessed on a case-by-case basis.
Releases are triggered manually via the Release workflow.
mainmain).npm version increment (e.g. patch, minor, major, or an explicit version like 1.2.3).The workflow will:
main and that CI has passed for it.npm environment.main.npm version to update package.json and package-lock.json, commit the result, and push the commit and the resulting tag to main.If a version tag already exists on main (e.g. v1.2.3):
v1.2.3).The workflow will verify that the tag matches the version in package.json, check CI, then publish and create a draft release after approval.
Review and publish the draft GitHub release.
The npm package must have trusted publishing configured for this repository and the Release workflow so that OIDC-based publishing works.
The npm environment must have at least one required reviewer configured to gate the publish step behind manual approval.
The main branch has rulesets that prevent direct pushes, including from GITHUB_TOKEN. When releasing a new version from a commit ref, the workflow creates the version commit (updating package.json and package-lock.json) and the version tag via the GitHub API. The commit is created using a GitHub App token so that the App's identity can be granted a ruleset bypass. The App is also used for tagging and creating the release, but this isn't relevant for branch protections, it just looks pretty.
The App must be configured with:
Two repository configuration values are required:
LAUNCHBOT_ID — the numeric App ID (found in the App's settings page)LAUNCHBOT_PRIVATE_KEY — the App's private key in PEM format