Skip to content

Conversation

@nicolethoen
Copy link
Collaborator

No description provided.

nicolethoen and others added 2 commits December 18, 2025 17:17
The CI workflow was failing because npm ci requires a package-lock.json file,
but it was excluded in .gitignore. This commit:

- Removes package-lock.json from .gitignore to allow it to be committed
- Adds the package-lock.json file to ensure consistent dependency versions across CI/CD

This enables immutable installs in CI/CD using npm ci, which is faster and
more reliable than npm install.

Fixes the error: "The npm ci command can only install with an existing
package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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]>
@nicolethoen nicolethoen force-pushed the fix/add-package-lock-json branch from 80d0bac to 3c27114 Compare December 18, 2025 22:29
@nicolethoen nicolethoen merged commit 5060ae0 into patternfly:main Dec 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant