The library MUST give the one command of the release, releasing.ts (bun run release at the root), whose plan writes nothing and says what a release does and whose apply does it. In single distribution mode (commons 0036-distribution FR-019) the release is one release of the package commons, with the tag commons-v<version>, raised by the greatest Impact: of the commits that touched any library since its last tag and by the floor of FR-027 read from the keys of the single package's exports (commons 0036-distribution FR-027), and the library versions are not raised; in per-library mode (--distribution per-library or IFC_DISTRIBUTION) the rules below apply to each library, and are those of commons 0026-works-versioning FR-041: from the tags of each library and its files since its last tag (its folder and the paths its record adds) a library MUST be raised by the greatest of the Impact: of its commits since the tag (a patch where none states one) and the floor of FR-027, a breaking impact (major) raising the minor while the major version is 0 (SemVer 2.0.0 item 4) and the major from 1.0.0, a library that imports a library that is raised MUST be raised by at least a patch, a version that has no tag, or is ahead of its tag, MUST be released as it is only where npm does not hold it or holds it with the same files (the sources the package carries by their SHA-256, and the keys of its exports), and MUST be raised like a changed library where npm holds it with other files, or, where npm cannot be asked (--offline, or no answer), where files changed since the commit that raised its version; --raise NAME[=IMPACT] MUST raise a library whatever its state says, and plan MUST say for each library whether it is released as it is, raised, left alone or not released, and why (FR-026), a version tagged and unchanged MUST be left alone, a version below its last tag and a cycle of imports MUST be errors, and the steps MUST be in the order of the imports. A library with no record of its own is released by its manifest and its package.
Enforced (check): .github: cd commons/libraries && bun test suite/ — releasing.test.ts: each rule of the plan on facts, a breaking impact raising the minor while the major version is 0, and on a real repository with tags and commits
Tests: passed: suite/releasing.test.ts on a real repository of tags and commits: the plan reads the tags, the files since each an; passed: suite/releasing.test.ts --raise raises a library whatever its state says, by an impact or by its commits', refuses; passed: suite/releasing.test.ts a library changed since its tag is raised by its impact, one that imports it by a patch an; passed: suite/releasing.test.ts a tarball is read for the hash of each file and its package.json, and its sources are comp; passed: suite/releasing.test.ts a version that is below its last tag, in a real repository, stops the plan with the exit s and 1 more
Cited by: Libraries, releasing, How works are versioned, Libraries by concern, Distribution