Skip to content

Commit 3c27114

Browse files
nicolethoenclaude
andcommitted
fix(ci): Fix CI/CD pipeline and update package configuration
This commit resolves the npm ci failure and prepares the package for publishing to npm. - Remove package-lock.json from .gitignore to enable npm ci - Regenerate package-lock.json with correct dependencies - Update .gitignore to exclude dist/ and *.tgz files - Add proper peer dependencies for React 17-19 and PatternFly 5-7 - Use range syntax (>=5.0.0 <7.0.0) to support prerelease versions - Update repository URLs to github.com/patternfly/context-for-ai - Update package name references from @kelseamann/semantic-ui-layer to @patternfly/context-for-ai - Rename rollup.config.js to rollup.config.mjs for ES module support - Add CSS files to rollup externals to prevent bundling errors - Rename jest.config.js to jest.config.cjs for CommonJS compatibility - Update npm scripts for ESLint 9 compatibility (remove --ext flag) - Remove non-existent isFlat prop from Card component (use isPlain in inference) - Fix addContext() function calls to use correct signature (context, semanticName, isQualified) - Fix React Hooks rule violation in MenuToggle (move useSemanticContext outside try-catch) - Add Modal.displayName to satisfy ESLint react/display-name rule - Fix Modal ref type to use any instead of HTMLDivElement - Remove unused inferCategory imports - Rename unused aiMetadata params to _aiMetadata to satisfy linting rules - Fix inferLinkPurpose parameter type from React.ReactNode to unknown - Update all references to new package name in README.md - Update ARCHITECTURE.md with new package name - Update src/index.ts comment All CI/CD steps now pass locally: ✅ npm ci - Works with new package-lock.json ✅ Type check - All TypeScript errors resolved ✅ Linter - All ESLint errors fixed ✅ Tests - All 10 tests passing ✅ Build - Successfully builds CJS and ESM bundles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 406230e commit 3c27114

File tree

17 files changed

+1725
-1773
lines changed

17 files changed

+1725
-1773
lines changed

.eslintrc.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ module.exports = {
1717
'react/react-in-jsx-scope': 'off',
1818
'react/prop-types': 'off',
1919
'@typescript-eslint/no-explicit-any': 'warn',
20-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
20+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
21+
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
2122
},
2223
settings: {
2324
react: {

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ yarn-debug.log*
55
yarn-error.log*
66

77
# Build outputs
8-
# dist/ # Temporarily commented out to include built files
8+
dist/
99
build/
10+
*.tgz
1011

1112
# Environment variables
1213
.env

ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## File Structure
44

55
```
6-
semantic-ui-layer/
6+
@patternfly/context-for-ai/
77
├── src/
88
│ ├── index.ts # Main entry point
99
│ ├── types/index.ts # Core type definitions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **⚠️ Important**: This is a **codemod tool only**. You do NOT need to import or use any library components. Simply install the package and run the codemod to transform your existing PatternFly components. The library code in this repository is for reference/development purposes only.
44
5-
**📦 Install from npm**: `npm install -D @patternfly/context-for-ai`
5+
**📦 Install from npm**: `npm install -D @patternfly/context-for-ai`
66
**🔗 Package**: [@patternfly/context-for-ai on npm](https://www.npmjs.com/package/@patternfly/context-for-ai)
77

88
A codemod tool that automatically adds standardized semantic `data-*` attributes to **all PatternFly components** in your codebase, making them AI-friendly and easier for AI tools to understand.
@@ -188,7 +188,7 @@ npm outdated @patternfly/context-for-ai
188188

189189
```bash
190190
npm update @patternfly/context-for-ai
191-
# or
191+
# or for latest version
192192
npm install -D @patternfly/context-for-ai@latest
193193
```
194194

@@ -224,19 +224,19 @@ Check the commit history or GitHub releases to see what improvements were made i
224224
### Transform Entire Directory
225225

226226
```bash
227-
jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --extensions=ts,tsx,js,jsx --parser=tsx src/
227+
npx jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --extensions=ts,tsx,js,jsx --parser=tsx src/
228228
```
229229

230230
### Transform Specific File
231231

232232
```bash
233-
jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js src/components/MyComponent.tsx
233+
npx jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js src/components/MyComponent.tsx
234234
```
235235

236236
### Preview Changes (Dry Run)
237237

238238
```bash
239-
jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --dry src/
239+
npx jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --dry src/
240240
```
241241

242242
### Using the Bash Script
File renamed without changes.

0 commit comments

Comments
 (0)