mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-15 17:31:46 -10:00
* [ci] Version packages and generate changelogs with changesets PRs now add a changeset in .changeset/ instead of editing CHANGELOG.md. The manual release workflow runs scripts/src/versionPackages.ts, which runs `changeset version` for one fixed group of all packages, writes the root CHANGELOG.md section with the existing emoji categories, and then commits, tags, and pushes vX.Y.Z. The tag-driven publish is unchanged, except that it reads the changelog section from the tagged commit. The PR check validates changesets with @changesets/parse and rejects direct CHANGELOG.md edits. The "no changelog" label still skips it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Correct "no changelog" documentation in .changeset/README.md * [ci] Fail on CHANGELOG.md edits even with the "no changelog" label Co-Authored-By: Claude Opus 5.5 <[email protected]> * [ci] Skip the changeset check for Dependabot PRs Dependabot PRs only update dependencies, so they need no changeset, and their read-only token cannot post the PR comment. The job skips both for them. The CHANGELOG.md check still runs. The workflow now sets explicit token permissions. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Remove the "## main" block from CHANGELOG.md Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import { describe, it } from 'node:test';
|
|
|
|
import { formatEntry } from '../../../.changeset/formatEntry.mjs';
|
|
|
|
const ATTRIBUTION =
|
|
'([#1](https://github.com/expo/eas-cli/pull/1) by [@user](https://github.com/user))';
|
|
|
|
describe(formatEntry.name, () => {
|
|
it('capitalizes the summary, adds a period, and appends the attribution', () => {
|
|
assert.equal(formatEntry('add a flag', ATTRIBUTION), `Add a flag. ${ATTRIBUTION}`);
|
|
});
|
|
|
|
it('keeps an existing period', () => {
|
|
assert.equal(formatEntry('Add a flag.', ATTRIBUTION), `Add a flag. ${ATTRIBUTION}`);
|
|
});
|
|
|
|
it('trims surrounding whitespace', () => {
|
|
assert.equal(formatEntry('\n Add a flag \n\n', ATTRIBUTION), `Add a flag. ${ATTRIBUTION}`);
|
|
});
|
|
|
|
it('indents later lines and keeps blank lines', () => {
|
|
assert.equal(
|
|
formatEntry('Add a flag\n\nDetails here.\n- item', ATTRIBUTION),
|
|
`Add a flag. ${ATTRIBUTION}\n\n Details here.\n - item`
|
|
);
|
|
});
|
|
|
|
it('throws on an empty summary', () => {
|
|
assert.throws(() => formatEntry(' \n ', ATTRIBUTION), /summary is empty/);
|
|
});
|
|
});
|