Skip to content

Commit 4fe693c

Browse files
committed
chore(docs): add codemods, getting started guides
1 parent 175057c commit 4fe693c

3 files changed

Lines changed: 72 additions & 10 deletions

File tree

src/__tests__/__snapshots__/tool.searchPatternFlyDocs.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ exports[`searchPatternFlyDocsTool should have a consistent return structure: str
1010

1111
exports[`searchPatternFlyDocsTool, callback should parse parameters, default: search 1`] = `"# Search results for "Button". Showing 2 exact matches."`;
1212

13-
exports[`searchPatternFlyDocsTool, callback should parse parameters, with "*" searchQuery all: search 1`] = `"# Search results for "all" resources. Only showing the first 10 results. There are 732 potential match variations. Try searching with a more specific query."`;
13+
exports[`searchPatternFlyDocsTool, callback should parse parameters, with "*" searchQuery all: search 1`] = `"# Search results for "all" resources. Only showing the first 10 results. There are 764 potential match variations. Try searching with a more specific query."`;
1414

15-
exports[`searchPatternFlyDocsTool, callback should parse parameters, with "all" searchQuery all: search 1`] = `"# Search results for "all" resources. Only showing the first 10 results. There are 732 potential match variations. Try searching with a more specific query."`;
15+
exports[`searchPatternFlyDocsTool, callback should parse parameters, with "all" searchQuery all: search 1`] = `"# Search results for "all" resources. Only showing the first 10 results. There are 764 potential match variations. Try searching with a more specific query."`;
1616

1717
exports[`searchPatternFlyDocsTool, callback should parse parameters, with explicit valid version: search 1`] = `"# Search results for "Button". Showing 2 exact matches."`;
1818

src/__tests__/docs.json.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ describe('docs.json', () => {
1313

1414
if (entry.path.includes('documentation:')) {
1515
baseHashes.add('documentation:');
16-
} else if (entry.path.includes('/patternfly/patternfly-org/')) {
17-
baseHashes.add(entry.path.split('/patternfly/patternfly-org/')[1]?.split('/')[0]);
18-
} else if (entry.path.includes('/patternfly/patternfly-react/')) {
19-
baseHashes.add(entry.path.split('/patternfly/patternfly-react/')[1]?.split('/')[0]);
16+
} else if (/^https:\/\/raw\.githubusercontent\.com\/patternfly\/p[a-zA-Z0-9-]+\//.test(entry.path)) {
17+
baseHashes.add(entry.path.split(/\/patternfly\/p[a-zA-Z0-9-]+\//)[1]?.split('/')[0]);
2018
} else {
2119
baseHashes.add(`new-resource-${entry.path}`);
2220
}
@@ -31,7 +29,7 @@ describe('docs.json', () => {
3129
* If this increases, hashes need to be realigned. Do not randomly change this value.
3230
* 1 (v6 org) + 1 (v6 react) + 1 (v5 org) + 1 (local)
3331
*/
34-
expect(baseHashes.size).toBe(4);
32+
expect(baseHashes.size).toBe(5);
3533

3634
/**
3735
* Confirm total docs count matches metadata

src/docs.json

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"version": "1",
33
"generated": "2026-03-05T00:00:00.000Z",
44
"meta": {
5-
"totalEntries": 128,
6-
"totalDocs": 305,
5+
"totalEntries": 130,
6+
"totalDocs": 311,
77
"source": "patternfly-mcp-internal"
88
},
99
"docs": {
@@ -3306,12 +3306,76 @@
33063306
"displayName": "Open UI Automation",
33073307
"description": "Open UI Automation (OUIA) is a specification for standardizing how UIs expose attributes for automated testing.",
33083308
"pathSlug": "openui-automation",
3309-
"section": "components",
3309+
"section": "upgrade",
33103310
"category": "react",
33113311
"source": "github",
33123312
"path": "https://raw.githubusercontent.com/patternfly/patternfly-react/476782a298df81cb78de7f3cd804f3ff8f33993c/packages/react-core/src/helpers/OUIA/OUIA.md",
33133313
"version": "v6"
33143314
}
3315+
],
3316+
"UpgradeGuide": [
3317+
{
3318+
"displayName": "PatternFly 6 upgrade guide",
3319+
"description": "PatternFly 6 introduces exciting new features and functionality. Before you upgrade, familiarize yourself with these significant changes.",
3320+
"pathSlug": "upgrade-guide-pf6",
3321+
"section": "upgrade",
3322+
"category": "react",
3323+
"source": "github",
3324+
"path": "https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/site/src/content/get-started/upgrade.mdx",
3325+
"version": "v6"
3326+
},
3327+
{
3328+
"displayName": "Codemods PatternFly 3 to PatternFly 4",
3329+
"description": "pf-codemods is an eslint wrapper to update @patternfly/react-core@3.x.x code to 4.x.x.",
3330+
"pathSlug": "codemods-pf4",
3331+
"section": "upgrade",
3332+
"category": "react",
3333+
"source": "github",
3334+
"path": "https://raw.githubusercontent.com/patternfly/pf-codemods/63df51df5cc6af2f3d83de4c0991c9e65625675f/packages/pf-codemods/v4-README.md",
3335+
"version": "v4"
3336+
},
3337+
{
3338+
"displayName": "Codemods PatternFly 4 to PatternFly 5",
3339+
"description": "pf-codemods is an eslint wrapper to update @patternfly/react-core@4.x.x code to 5.x.x.",
3340+
"pathSlug": "codemods-pf5",
3341+
"section": "upgrade",
3342+
"category": "react",
3343+
"source": "github",
3344+
"path": "https://raw.githubusercontent.com/patternfly/pf-codemods/63df51df5cc6af2f3d83de4c0991c9e65625675f/packages/pf-codemods/v5-README.md",
3345+
"version": "v5"
3346+
},
3347+
{
3348+
"displayName": "Codemods PatternFly 5 to PatternFly 6",
3349+
"description": "pf-codemods is an eslint wrapper to update @patternfly/react-core@5.x.x code to 6.x.x.",
3350+
"pathSlug": "codemods-pf6",
3351+
"section": "upgrade",
3352+
"category": "react",
3353+
"source": "github",
3354+
"path": "https://raw.githubusercontent.com/patternfly/pf-codemods/63df51df5cc6af2f3d83de4c0991c9e65625675f/packages/pf-codemods/README.md",
3355+
"version": "v6"
3356+
}
3357+
],
3358+
"GettingStarted": [
3359+
{
3360+
"displayName": "Design with PatternFly 6",
3361+
"description": "To start designing with PatternFly 6 you will need to install our PatternFly 6 design kit.",
3362+
"pathSlug": "design-with-patternfly",
3363+
"section": "getting-started",
3364+
"category": "design-guidelines",
3365+
"source": "github",
3366+
"path": "https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/get-started/design.md",
3367+
"version": "v6"
3368+
},
3369+
{
3370+
"displayName": "Develop with PatternFly 6",
3371+
"description": "To start developing with PatternFly 6 learn about our design system and tokens.",
3372+
"pathSlug": "develop-with-patternfly",
3373+
"section": "getting-started",
3374+
"category": "development-guidelines",
3375+
"source": "github",
3376+
"path": "https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/get-started/develop.md",
3377+
"version": "v6"
3378+
}
33153379
]
33163380
}
33173381
}

0 commit comments

Comments
 (0)