Skip to content

Commit 35016cb

Browse files
fix: use correct relative path for dependency links (../ not ../../)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 72e491b commit 35016cb

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ismaelmartinez/generator-atlassian-compass-event-catalog",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Atlassian Compass generator for Event Catalog",
55
"scripts": {
66
"build": "tsup",

src/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const defaultMarkdown = (
143143

144144
const dependencyLines =
145145
dependencies && dependencies.length > 0
146-
? dependencies.map((dep) => `* [${sanitizeMarkdownText(dep.name)}](../../${dep.id}/)`).join('\n')
146+
? dependencies.map((dep) => `* [${sanitizeMarkdownText(dep.name)}](../${dep.id}/)`).join('\n')
147147
: 'No known dependencies.';
148148

149149
return `

src/test/compass-api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ describe('Compass API client', () => {
351351
const { getService } = utils(catalogDir);
352352
const serviceA = await getService('service-a');
353353
expect(serviceA).toBeDefined();
354-
expect(serviceA.markdown).toContain('[service-b](../../service-b/)');
354+
expect(serviceA.markdown).toContain('[service-b](../service-b/)');
355355

356356
const serviceB = await getService('service-b');
357357
expect(serviceB).toBeDefined();

src/test/plugin.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,8 @@ describe('Atlassian Compass generator tests', () => {
649649
expect(service).toBeDefined();
650650
// my-service depends on my-application and my-library
651651
expect(service.markdown).toContain('## Dependencies');
652-
expect(service.markdown).toContain('[my-application](../../my-application/)');
653-
expect(service.markdown).toContain('[my-library](../../my-library/)');
652+
expect(service.markdown).toContain('[my-application](../my-application/)');
653+
expect(service.markdown).toContain('[my-library](../my-library/)');
654654
});
655655

656656
it('resolves partial dependencies when only some targets are processed', async () => {
@@ -664,7 +664,7 @@ describe('Atlassian Compass generator tests', () => {
664664

665665
const service = await getService('my-service');
666666
expect(service).toBeDefined();
667-
expect(service.markdown).toContain('[my-application](../../my-application/)');
667+
expect(service.markdown).toContain('[my-application](../my-application/)');
668668
// my-library was not processed, so it should not appear as a resolved dependency link
669669
expect(service.markdown).not.toContain('[my-library]');
670670
});
@@ -699,7 +699,7 @@ describe('Atlassian Compass generator tests', () => {
699699
const service = await getService('my-other-component');
700700
expect(service).toBeDefined();
701701
// Should resolve the one that exists
702-
expect(service.markdown).toContain('[my-application](../../my-application/)');
702+
expect(service.markdown).toContain('[my-application](../my-application/)');
703703
// Should not crash due to the non-existent dependency
704704
});
705705

@@ -718,8 +718,8 @@ describe('Atlassian Compass generator tests', () => {
718718
const service = await getService('custom-service');
719719
expect(service).toBeDefined();
720720
// Dependencies should use custom IDs
721-
expect(service.markdown).toContain('[my-application](../../custom-app/)');
722-
expect(service.markdown).toContain('[my-library](../../custom-lib/)');
721+
expect(service.markdown).toContain('[my-application](../custom-app/)');
722+
expect(service.markdown).toContain('[my-library](../custom-lib/)');
723723
});
724724

725725
it('includes resolved dependencies in service markdown within a domain', async () => {
@@ -746,8 +746,8 @@ describe('Atlassian Compass generator tests', () => {
746746
const service = await getService('my-service');
747747
expect(service).toBeDefined();
748748
expect(service.markdown).toContain('## Dependencies');
749-
expect(service.markdown).toContain('[my-application](../../my-application/)');
750-
expect(service.markdown).toContain('[my-library](../../my-library/)');
749+
expect(service.markdown).toContain('[my-application](../my-application/)');
750+
expect(service.markdown).toContain('[my-library](../my-library/)');
751751
});
752752
});
753753

0 commit comments

Comments
 (0)