Skip to content

Commit b4da9e2

Browse files
Copilothuangyiirene
andcommitted
docs: add lockfile automation documentation to CONTRIBUTING.md
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 0e9632f commit b4da9e2

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Thank you for your interest in contributing to Object UI! This document provides
1414
- [Pull Request Process](#pull-request-process)
1515
- [Documentation](#documentation)
1616
- [Adding Components](#adding-components)
17+
- [Troubleshooting](#troubleshooting)
1718
- [Questions & Support](#questions--support)
1819

1920
## Getting Started
@@ -368,6 +369,24 @@ Our repository includes several automated GitHub workflows that will run when yo
368369
- **Auto-labeling**: Automatically labels PRs based on changed files
369370
- **Bundle Size**: Reports bundle size changes in PR comments
370371
- **PR Checks**: Validates PR requirements and posts status
372+
- **Lockfile Auto-fix**: Automatically resolves `pnpm-lock.yaml` merge conflicts
373+
374+
#### Lockfile Conflict Resolution
375+
376+
When you create a PR that has merge conflicts in `pnpm-lock.yaml`, our automation will:
377+
378+
1. **Detect the conflict** automatically
379+
2. **Regenerate the lockfile** by running `pnpm install`
380+
3. **Commit the fix** back to your PR branch
381+
4. **Notify you** with a comment explaining what happened
382+
383+
**What this means for you:**
384+
- No need to manually resolve `pnpm-lock.yaml` conflicts
385+
- Your PR will be automatically updated with the resolved lockfile
386+
- You can focus on code changes, not dependency conflicts
387+
388+
**When manual resolution is needed:**
389+
If your PR has conflicts in files **other than** `pnpm-lock.yaml`, the automation will notify you with instructions for manual resolution.
371390

372391
#### What to Expect
373392
1. All checks must pass before merging
@@ -569,6 +588,62 @@ git push origin feat/add-date-picker
569588

570589
5. **Add documentation** in `docs/components/my-component.md`
571590

591+
## Troubleshooting
592+
593+
### pnpm-lock.yaml Conflicts
594+
595+
**Problem**: You have merge conflicts in `pnpm-lock.yaml`
596+
597+
**Solution**: Our automated workflow will resolve this for you! Just wait for the bot to regenerate and commit the lockfile.
598+
599+
**Manual Resolution** (if needed):
600+
```bash
601+
# Update your branch with the latest changes from main
602+
git fetch origin
603+
git merge origin/main
604+
605+
# If only pnpm-lock.yaml has conflicts, regenerate it
606+
pnpm install --no-frozen-lockfile
607+
608+
# Commit and push
609+
git add pnpm-lock.yaml
610+
git commit -m "chore: resolve pnpm-lock.yaml conflicts"
611+
git push
612+
```
613+
614+
### Dependency Issues
615+
616+
**Problem**: `pnpm install` fails or dependencies are missing
617+
618+
**Solution**:
619+
```bash
620+
# Clear cache and reinstall
621+
rm -rf node_modules
622+
rm -rf .pnpm-store
623+
pnpm store prune
624+
pnpm install
625+
```
626+
627+
### Build Failures
628+
629+
**Problem**: `pnpm build` fails with errors
630+
631+
**Solution**:
632+
1. Check TypeScript errors: Run `pnpm build` in the specific package
633+
2. Ensure dependencies are installed: `pnpm install`
634+
3. Clear build artifacts: `rm -rf dist` in the package directory
635+
4. Rebuild: `pnpm build`
636+
637+
### Test Failures
638+
639+
**Problem**: Tests are failing locally but pass in CI
640+
641+
**Solution**:
642+
1. Ensure you're on the correct Node.js version (18.x or 20.x)
643+
2. Clear test cache: `pnpm test --clearCache` (if using Jest)
644+
3. Update snapshots if needed: `pnpm test -u`
645+
4. Ensure all dependencies are installed: `pnpm install`
646+
572647
## Questions & Support
573648

574649
### Where to Ask Questions

0 commit comments

Comments
 (0)