Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@changesets/changelog-github",
"../dist/src/dev/changelog-custom.js",
{
"repo": "sapientpants/deepsource-mcp-server"
}
Expand Down
5 changes: 5 additions & 0 deletions .changeset/fix-changelog-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'deepsource-mcp-server': patch
---

Fix changelog format configuration and add custom changelog generator for improved release notes formatting
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Minor Changes

- [#164](https://github.com/sapientpants/deepsource-mcp-server/pull/164) [`8939e69`](https://github.com/sapientpants/deepsource-mcp-server/commit/8939e6975ba7ef4f7c12fe6d72175b1dbee593bc) Thanks [@sapientpants](https://github.com/sapientpants)! - Add unified versioning system with single source of truth
- [#164](https://github.com/sapientpants/deepsource-mcp-server/pull/164) [`8939e69`](https://github.com/sapientpants/deepsource-mcp-server/commit/8939e6975ba7ef4f7c12fe6d72175b1dbee593bc) - Add unified versioning system with single source of truth
- Created central `version.ts` module that reads from package.json
- Added CLI support for `--version` and `-v` flags to display version
- Added `--help` and `-h` flags with comprehensive help text
Expand All @@ -26,7 +26,7 @@

### Patch Changes

- [#163](https://github.com/sapientpants/deepsource-mcp-server/pull/163) [`e181abc`](https://github.com/sapientpants/deepsource-mcp-server/commit/e181abcef0b30d442df5285a999f80b94b9e3ef4) Thanks [@sapientpants](https://github.com/sapientpants)! - Update Node.js to 22.19.0 and pnpm to 10.15.1
- [#163](https://github.com/sapientpants/deepsource-mcp-server/pull/163) [`e181abc`](https://github.com/sapientpants/deepsource-mcp-server/commit/e181abcef0b30d442df5285a999f80b94b9e3ef4) - Update Node.js to 22.19.0 and pnpm to 10.15.1
- Update Node.js from 22.0.0 to 22.19.0 (latest 22.x LTS)
- Update pnpm from 10.15.0 to 10.15.1 (latest version)
- Configure mise for version management
Expand All @@ -37,7 +37,7 @@

### Minor Changes

- [#162](https://github.com/sapientpants/deepsource-mcp-server/pull/162) [`56d4985`](https://github.com/sapientpants/deepsource-mcp-server/commit/56d4985bb76ef7753b59f34d215337d25ed46c9d) Thanks [@sapientpants](https://github.com/sapientpants)! - feat: implement true pagination for all list queries
- [#162](https://github.com/sapientpants/deepsource-mcp-server/pull/162) [`56d4985`](https://github.com/sapientpants/deepsource-mcp-server/commit/56d4985bb76ef7753b59f34d215337d25ed46c9d) - feat: implement true pagination for all list queries

Adds comprehensive cursor-based pagination support across all list endpoints to handle large datasets efficiently and provide deterministic, complete results.

Expand Down Expand Up @@ -126,7 +126,7 @@

### Patch Changes

- [#151](https://github.com/sapientpants/deepsource-mcp-server/pull/151) [`c7c4569`](https://github.com/sapientpants/deepsource-mcp-server/commit/c7c45697c4f3c9d07620614a47ff503c7e76015d) Thanks [@sapientpants](https://github.com/sapientpants)! - Update dependencies to latest versions
- [#151](https://github.com/sapientpants/deepsource-mcp-server/pull/151) [`c7c4569`](https://github.com/sapientpants/deepsource-mcp-server/commit/c7c45697c4f3c9d07620614a47ff503c7e76015d) - Update dependencies to latest versions
- Updated pino from 9.9.0 to 9.9.4 (production dependency)
- Updated @changesets/cli from 2.29.6 to 2.29.7
- Updated @cyclonedx/cdxgen from 11.6.0 to 11.7.0
Expand All @@ -144,7 +144,7 @@

### Patch Changes

- [#142](https://github.com/sapientpants/deepsource-mcp-server/pull/142) [`04f7440`](https://github.com/sapientpants/deepsource-mcp-server/commit/04f744073131e99d4613ba661ccb93b090001ffc) Thanks [@sapientpants](https://github.com/sapientpants)! - Fixed TypeScript strict mode compatibility and integrated agentic-node-ts-starter template
- [#142](https://github.com/sapientpants/deepsource-mcp-server/pull/142) [`04f7440`](https://github.com/sapientpants/deepsource-mcp-server/commit/04f744073131e99d4613ba661ccb93b090001ffc) - Fixed TypeScript strict mode compatibility and integrated agentic-node-ts-starter template
- Resolved hundreds of `exactOptionalPropertyTypes` errors across the codebase
- Migrated test suite from Jest to Vitest
- Enhanced CI/CD workflows with security scanning and validation
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@
"zod": "^3.25.76"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.1",
"@changesets/cli": "^2.29.7",
"@changesets/get-github-info": "0.6.0",
"@changesets/types": "6.1.0",
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@cyclonedx/cdxgen": "11.7.0",
Expand All @@ -110,10 +111,10 @@
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.43.0",
"@vitest/coverage-v8": "^3.2.4",
"eslint": "^9.35.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jsonc": "2.20.1",
"eslint-plugin-prettier": "^5.5.4",
"eslint": "^9.35.0",
"fast-check": "^4.2.0",
"husky": "^9.1.7",
"jest": "^30.0.5",
Expand All @@ -126,8 +127,8 @@
"rimraf": "^6.0.1",
"supertest": "^7.1.4",
"ts-jest": "^29.4.1",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.9.2",
"vite": "7.1.5",
"vitest": "^3.2.4",
Expand Down
26 changes: 6 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 110 additions & 0 deletions src/dev/changelog-custom.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// Adapted from https://github.com/changesets/changesets/blob/main/packages/changelog-github/src/index.ts
import type { ChangelogFunctions } from '@changesets/types';
import { getInfo, getInfoFromPullRequest } from '@changesets/get-github-info';

interface Options {
repo: string;
}

const changelogFunctions: ChangelogFunctions = {
getDependencyReleaseLine: async (changesets, dependenciesUpdated, options) => {
const opts = options as Options;
if (!opts.repo) {
throw new Error(
'Please provide a repo to this changelog generator like this:\n"changelog": ["<custom-changelog-generator>", { "repo": "org/repo" }]'
);
}
if (dependenciesUpdated.length === 0) return '';

const changesetLink = `- Updated dependencies [${(
await Promise.all(
changesets.map(async (cs) => {
if (cs.commit) {
const { links } = await getInfo({
repo: opts.repo,
commit: cs.commit,
});
return links.commit;
}
})
)
)
.filter((_) => _)
.join(', ')}]:`;

const updatedDependenciesList = dependenciesUpdated.map(
(dependency) => ` - ${dependency.name}@${dependency.newVersion}`
);

return [changesetLink, ...updatedDependenciesList].join('\n');
},
getReleaseLine: async (changeset, _type, options) => {
const opts = options as Options | undefined;
if (!opts?.repo) {
throw new Error(
'Please provide a repo to this changelog generator like this:\n"changelog": ["<custom-changelog-generator>", { "repo": "org/repo" }]'
);
}

let prFromSummary: number | undefined;
let commitFromSummary: string | undefined;

const replacedChangelog = changeset.summary
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr: string) => {
const num = Number(pr);
if (!isNaN(num)) prFromSummary = num;
return '';
})
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit: string) => {
commitFromSummary = commit;
return '';
})
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, () => {
return '';
})
.trim();

const [firstLine, ...futureLines] = replacedChangelog.split('\n').map((l) => l.trimRight());

const links = await (async () => {
if (prFromSummary !== undefined) {
let { links } = await getInfoFromPullRequest({
repo: opts.repo,
pull: prFromSummary,
});
if (commitFromSummary) {
const shortCommitId = commitFromSummary.slice(0, 7);
links = {
...links,
commit: `[\`${shortCommitId}\`](https://github.com/${opts.repo}/commit/${commitFromSummary})`,
};
}
return links;
}
const commitToFetchFrom = commitFromSummary || changeset.commit;
if (commitToFetchFrom) {
const { links } = await getInfo({
repo: opts.repo,
commit: commitToFetchFrom,
});
return links;
}
return {
commit: null,
pull: null,
user: null,
};
})();

const prefix = [
links.pull === null ? '' : ` ${links.pull}`,
links.commit === null ? '' : ` ${links.commit}`,
].join('');

return `\n\n-${prefix ? `${prefix} -` : ''} ${firstLine}\n${futureLines
.map((l) => ` ${l}`)
.join('\n')}`;
},
};

export default changelogFunctions;
Loading