Repository navigation
Prepare 0.27.7-next.0 release - #461
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR introduces next-track release support for the ChangesPrerelease versioning and next-track release support
Sequence Diagram(s)No sequence diagram is necessary for this change. The PR modifies release configuration, documentation, and validation logic without introducing new component interactions or control flows that would benefit from visualization. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unit/release-hygiene.test.ts (1)
101-140: 💤 Low valueConsider extracting the shared fixture setup to reduce duplication.
This prerelease test is a near-copy of the stable-version fixture test at Lines 52-91 (same package.json/README/CHANGELOG scaffolding and
execFileSyncinvocation). A small helper parameterized byversion, the README link, and the CHANGELOG heading would keep the two cases in sync as the hygiene script evolves.Separately, both cases only assert the failure path. A positive assertion (a prerelease README linking
blob/next/...passes verification) would more directly prove thenextrouting rather than just that amainlink fails.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/unit/release-hygiene.test.ts` around lines 101 - 140, The two tests in tests/unit/release-hygiene.test.ts (the "requires prerelease README changelog links to target next" case and the stable-version fixture) duplicate fixture setup; extract a small helper (e.g., createReleaseFixture or makeFixture) that accepts parameters version, readmeLink, and changelogHeading and performs the mkdtempSync/writeFileSync setup and teardown to reduce duplication, then call execFileSync(process.execPath, [releaseVerifyScriptPath()], { cwd: fixtureDir, encoding: 'utf8', stdio: 'pipe' }) as before; also add a positive assertion variant for the prerelease case that uses a README linking to blob/.../CHANGELOG.md#...-next... and expects no throw (i.e., verification passes) to prove the `next` routing works. Ensure references to the test names, execFileSync call, and releaseVerifyScriptPath are updated to use the helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/unit/release-hygiene.test.ts`:
- Around line 101-140: The two tests in tests/unit/release-hygiene.test.ts (the
"requires prerelease README changelog links to target next" case and the
stable-version fixture) duplicate fixture setup; extract a small helper (e.g.,
createReleaseFixture or makeFixture) that accepts parameters version,
readmeLink, and changelogHeading and performs the mkdtempSync/writeFileSync
setup and teardown to reduce duplication, then call
execFileSync(process.execPath, [releaseVerifyScriptPath()], { cwd: fixtureDir,
encoding: 'utf8', stdio: 'pipe' }) as before; also add a positive assertion
variant for the prerelease case that uses a README linking to
blob/.../CHANGELOG.md#...-next... and expects no throw (i.e., verification
passes) to prove the `next` routing works. Ensure references to the test names,
execFileSync call, and releaseVerifyScriptPath are updated to use the helper.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d7bb6ba3-7dd6-4895-a728-a6154a25ecaf
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
.github/scripts/verify-release-hygiene.mjsCHANGELOG.mdREADME.mddocs/mcp-registry/server.jsondocs/release.mdpackage.jsontests/unit/release-hygiene.test.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the CodeRabbit note by extracting the temporary release-hygiene fixture setup and adding a positive prerelease case that proves blob/next changelog links pass verification. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unit/release-hygiene.test.ts (1)
108-138: 💤 Low valueOptional: fold the repeated
execFileSyncinvocation into the helper.The same
execFileSync(process.execPath, [releaseVerifyScriptPath()], { cwd, encoding, stdio })block is now duplicated across the three fixture-based tests. SincewithReleaseFixturealready owns the fixture dir, it could hand the caller a pre-bound runner so each test only declares itstoThrow/not.toThrowexpectation.♻️ Sketch
function withReleaseFixture( version: string, readmeLink: string, - runAssertion: (fixtureDir: string) => void, + runAssertion: (runVerify: () => void) => void, ): void { const fixtureDir = mkdtempSync(join(tmpdir(), 'madar-release-hygiene-')) try { // ...write fixture files... - runAssertion(fixtureDir) + runAssertion(() => + execFileSync(process.execPath, [releaseVerifyScriptPath()], { + cwd: fixtureDir, + encoding: 'utf8', + stdio: 'pipe', + }), + ) } finally { rmSync(fixtureDir, { recursive: true, force: true }) } }Each test then becomes
withReleaseFixture(version, link, (runVerify) => expect(runVerify).toThrow(...)).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/unit/release-hygiene.test.ts` around lines 108 - 138, The tests duplicate the long execFileSync call; update withReleaseFixture to accept/provide a pre-bound runner (e.g., runVerify) that encapsulates execFileSync(process.execPath, [releaseVerifyScriptPath()], { cwd: fixtureDir, encoding: 'utf8', stdio: 'pipe' }) so callers only call expect(runVerify).toThrow()/not.toThrow(); change the tests to use the new callback signature (withReleaseFixture(version, link, (runVerify) => ...)) and reference the existing helpers releaseVerifyScriptPath and execFileSync when implementing the runner in withReleaseFixture.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/unit/release-hygiene.test.ts`:
- Around line 108-138: The tests duplicate the long execFileSync call; update
withReleaseFixture to accept/provide a pre-bound runner (e.g., runVerify) that
encapsulates execFileSync(process.execPath, [releaseVerifyScriptPath()], { cwd:
fixtureDir, encoding: 'utf8', stdio: 'pipe' }) so callers only call
expect(runVerify).toThrow()/not.toThrow(); change the tests to use the new
callback signature (withReleaseFixture(version, link, (runVerify) => ...)) and
reference the existing helpers releaseVerifyScriptPath and execFileSync when
implementing the runner in withReleaseFixture.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0152afa3-816c-4885-962b-6a363f29e84b
📒 Files selected for processing (1)
tests/unit/release-hygiene.test.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the follow-up nit by moving the repeated release verifier invocation into the shared fixture helper, so the fixture-based tests now only assert pass/fail expectations. |
Summary
Verification
Summary by CodeRabbit
New Features
Documentation
Chores
Tests