Skip to content

Commit d541c9f

Browse files
Add CHANGELOG requirement to PR guidelines (#112)
* Add server-level icons with light and dark theme support Implements MCP server icons at the correct architectural level (server initialization) instead of at the tool level. Adds both light and dark theme variants of the Mapbox logo using base64-encoded SVG data URIs. - Add mapbox-logo-black.svg for light theme backgrounds - Add mapbox-logo-white.svg for dark theme backgrounds - Update server initialization to include icons array with theme property - Use 800x180 SVG logos embedded as base64 data URIs This replaces the previous incorrect approach of adding icons to individual tools, which was not aligned with the MCP specification. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Update @modelcontextprotocol/sdk to 1.25.2 Updates the MCP SDK from 1.25.1 to 1.25.2 and recreates the output validation patch for the new version. The patch continues to convert strict output schema validation errors to warnings, allowing tools to gracefully handle schema mismatches. Changes: - Update @modelcontextprotocol/sdk from ^1.25.1 to ^1.25.2 - Recreate SDK patch for version 1.25.2 - Remove obsolete 1.25.1 patch file - All 397 tests pass with new SDK version Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add CHANGELOG requirement to PR guidelines Document that all PRs should update CHANGELOG.md with: - Description of what changed and why - Any breaking changes - PR number and brief summary - Entry under "Unreleased" section This ensures consistent changelog maintenance and helps track changes across releases. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Update CHANGELOG for PR #112 * Add automated CHANGELOG release preparation script Created scripts/prepare-changelog-release.cjs to automate CHANGELOG updates during releases: - Replaces "Unreleased" with version number and date - Adds new empty "Unreleased" section at top - Validates version format and CHANGELOG structure - Added as npm script: changelog:prepare-release Updated CLAUDE.md with release process documentation showing how to use the new script. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add build artifacts to .gitignore --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent de29efc commit d541c9f

6 files changed

Lines changed: 133 additions & 1 deletion

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,7 @@ dist
151151

152152
# Test results
153153
test-results.xml
154+
155+
# Build artifacts
156+
*.tsbuildinfo
157+
PR_DESCRIPTION.md

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## Unreleased
2+
3+
### Documentation
4+
5+
- **PR Guidelines**: Added CHANGELOG requirement to CLAUDE.md (#112)
6+
- All pull requests must now update CHANGELOG.md
7+
- Document what changed, why, and any breaking changes
8+
- Add entry under "Unreleased" section with PR number
9+
10+
### Developer Experience
11+
12+
- **Release Process**: Added automated CHANGELOG preparation script (#112)
13+
- New `npm run changelog:prepare-release <version>` command
14+
- Automatically replaces "Unreleased" with version and date
15+
- Adds new empty "Unreleased" section for next changes
16+
- Includes validation for version format and CHANGELOG structure
17+
118
## 0.8.3
219

320
### Security

CLAUDE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,36 @@ npx plop create-tool "Search" "search_tool"
8282
- Husky hooks auto-run linting and formatting
8383
- All checks must pass before commit
8484

85+
### Pull Requests
86+
87+
When creating pull requests:
88+
89+
- **Always update CHANGELOG.md** - Document what changed, why, and any breaking changes
90+
- Follow the existing changelog format (check recent entries for examples)
91+
- Add your entry under the "Unreleased" section at the top
92+
- Include the PR number and a brief description of the change
93+
94+
### Release Process
95+
96+
When preparing a new release:
97+
98+
```bash
99+
# Prepare CHANGELOG for release (replaces "Unreleased" with version and date)
100+
npm run changelog:prepare-release 1.0.0
101+
102+
# Review changes, then commit and tag
103+
git add CHANGELOG.md
104+
git commit -m "Release v1.0.0"
105+
git tag v1.0.0
106+
git push && git push --tags
107+
```
108+
109+
The `changelog:prepare-release` script automatically:
110+
111+
- Replaces "## Unreleased" with "## {version} - {date}"
112+
- Adds a new empty "## Unreleased" section at the top
113+
- Validates version format and CHANGELOG structure
114+
85115
## Important Constraints
86116

87117
- **Dependency Injection**: Tools must accept `httpRequest` parameter for testability

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"scripts": {
1313
"build": "npm run prepare && tshy && npm run generate-version && node scripts/add-shebang.cjs",
14+
"changelog:prepare-release": "node scripts/prepare-changelog-release.cjs",
1415
"format": "prettier --check \"./src/**/*.{ts,tsx,js,json,md}\" \"./test/**/*.{ts,tsx,js,json,md}\"",
1516
"format:fix": "prettier --write \"./src/**/*.{ts,tsx,js,json,md}\" \"./test/**/*.{ts,tsx,js,json,md}\"",
1617
"generate-version": "node scripts/build-helpers.cjs generate-version",
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/usr/bin/env node
2+
// Copyright (c) Mapbox, Inc.
3+
// Licensed under the MIT License.
4+
5+
/**
6+
* Prepares CHANGELOG.md for a new release by:
7+
* 1. Replacing "## Unreleased" with "## {version}"
8+
* 2. Adding current date to the version heading
9+
* 3. Adding a new empty "## Unreleased" section at the top
10+
*
11+
* Usage:
12+
* node scripts/prepare-changelog-release.cjs <version>
13+
* npm run changelog:prepare-release <version>
14+
*
15+
* Example:
16+
* node scripts/prepare-changelog-release.cjs 1.0.0
17+
*/
18+
19+
const fs = require('node:fs');
20+
const path = require('node:path');
21+
const process = require('node:process');
22+
23+
function prepareChangelogRelease(version) {
24+
if (!version) {
25+
console.error('Error: Version number is required');
26+
console.error('Usage: node scripts/prepare-changelog-release.cjs <version>');
27+
process.exit(1);
28+
}
29+
30+
// Validate version format (basic semver check)
31+
if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?$/.test(version)) {
32+
console.error(`Error: Invalid version format: ${version}`);
33+
console.error('Expected format: X.Y.Z or X.Y.Z-prerelease');
34+
process.exit(1);
35+
}
36+
37+
const changelogPath = path.join(process.cwd(), 'CHANGELOG.md');
38+
39+
// Check if CHANGELOG.md exists
40+
if (!fs.existsSync(changelogPath)) {
41+
console.error('Error: CHANGELOG.md not found');
42+
process.exit(1);
43+
}
44+
45+
// Read CHANGELOG.md
46+
const content = fs.readFileSync(changelogPath, 'utf8');
47+
48+
// Check if "## Unreleased" exists
49+
if (!content.includes('## Unreleased')) {
50+
console.error('Error: No "## Unreleased" section found in CHANGELOG.md');
51+
console.error('Nothing to release - add changes under "## Unreleased" first');
52+
process.exit(1);
53+
}
54+
55+
// Get current date in YYYY-MM-DD format
56+
const date = new Date().toISOString().split('T')[0];
57+
58+
// Replace "## Unreleased" with "## {version} - {date}"
59+
// and add a new "## Unreleased" section at the top
60+
const updatedContent = content.replace(
61+
'## Unreleased',
62+
`## Unreleased\n\n## ${version} - ${date}`
63+
);
64+
65+
// Write updated content back to CHANGELOG.md
66+
fs.writeFileSync(changelogPath, updatedContent, 'utf8');
67+
68+
console.log(`✓ CHANGELOG.md updated successfully`);
69+
console.log(` - Released version ${version} (${date})`);
70+
console.log(` - Added new "Unreleased" section`);
71+
console.log('');
72+
console.log('Next steps:');
73+
console.log(' 1. Review CHANGELOG.md');
74+
console.log(' 2. Commit changes: git add CHANGELOG.md && git commit -m "Release v' + version + '"');
75+
console.log(' 3. Create tag: git tag v' + version);
76+
console.log(' 4. Push: git push && git push --tags');
77+
}
78+
79+
// Process command line arguments
80+
const version = process.argv[2];
81+
prepareChangelogRelease(version);

tsconfig.src.tsbuildinfo

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)