Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4bf91db
Migrate from Yarn Classic to pnpm (#2120)
justin808 Nov 25, 2025
2a74aae
Fix pnpm/action-setup version conflict
justin808 Nov 25, 2025
3b98806
Fix CI failures after pnpm migration
justin808 Nov 25, 2025
3ae666b
Fix knip config, ESLint errors, and lefthook scripts
justin808 Nov 25, 2025
0f74293
Add CHANGELOG entry for pnpm migration
justin808 Nov 25, 2025
70cfbf6
Fix knip configuration for pnpm migration
justin808 Nov 25, 2025
149011f
Revert LazyApolloGraphQL.tsx to master version
justin808 Nov 25, 2025
b23dc0d
Reset knip.ts to master version
justin808 Nov 25, 2025
0b91b0a
Update knip.ts for pnpm compatibility
justin808 Nov 25, 2025
6a3d6d3
Fix remaining knip issues for pnpm migration
justin808 Nov 25, 2025
60e75c1
Fix knip config: add worker.ts as entry point
justin808 Nov 25, 2025
05a1852
Add @babel/runtime and mini-css-extract-plugin back to ignoreDependen…
justin808 Nov 25, 2025
1464424
Fix lint workflow to use nps eslint command
justin808 Nov 25, 2025
45f92eb
Fix package.json scripts for pnpm compatibility
justin808 Nov 25, 2025
1768e2e
Add .npmrc to prettierignore
justin808 Nov 25, 2025
10cafc1
Fix markdown formatting for prettier
justin808 Nov 25, 2025
0a26774
Fix lint:scss path for monorepo structure
justin808 Nov 25, 2025
1fa0de9
Fix ESLint no-base-to-string error in LazyApolloGraphQL
justin808 Nov 25, 2025
0b160a5
Fix ESLint no-base-to-string with JSON.stringify
justin808 Nov 25, 2025
33c5127
Update dummy app Babel to ^7.22.0 for pnpm compatibility
justin808 Nov 25, 2025
722b532
Fix Prettier formatting in LazyApolloGraphQL
justin808 Nov 25, 2025
8001b3d
Fix Pro lint workflow Check TypeScript working directory
justin808 Nov 25, 2025
283298b
Fix check-typescript to use pnpm instead of yarn workspace
justin808 Nov 25, 2025
a0f62cd
Fix release.rake to use pnpm instead of yarn
justin808 Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .claude/commands/update-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ You are helping to add an entry to the CHANGELOG.md file for the React on Rails
## Critical Requirements

1. **User-visible changes only**: Only add changelog entries for user-visible changes:

- New features
- Bug fixes
- Breaking changes
Expand Down Expand Up @@ -118,21 +117,18 @@ When a new version is released:
### For Regular Changelog Updates

1. **ALWAYS fetch latest changes first**:

- **CRITICAL**: Run `git fetch origin master` to ensure you have the latest commits
- The workspace may be behind origin/master, causing you to miss recently merged PRs
- After fetching, use `origin/master` for all comparisons, NOT local `master` branch

2. **Determine the correct version tag to compare against**:

- First, check the tag dates: `git log --tags --simplify-by-decoration --pretty="format:%ai %d" | head -10`
- Find the latest version tag and its date
- Compare origin/master branch date to the tag date
- If the tag is NEWER than origin/master, it means the branch needs to be updated to include the tag's commits
- **CRITICAL**: Always use `git log TAG..BRANCH` to find commits that are in the tag but not in the branch, as the tag may be ahead

3. **Check commits and version boundaries**:

- **IMPORTANT**: Use `origin/master` in all commands below, not local `master`
- Run `git log --oneline LAST_TAG..origin/master` to see commits since the last release
- Also check `git log --oneline origin/master..LAST_TAG` to see if the tag is ahead of origin/master
Expand All @@ -148,20 +144,17 @@ When a new version is released:
5. **Read the current CHANGELOG.md** to understand the existing structure and formatting.

6. **Determine where entries should go**:

- If the latest version tag is NEWER than origin/master branch, move entries from "Unreleased" to that version section
- If origin/master is ahead of the latest tag, add new entries to "Unreleased"
- Always verify the version date in CHANGELOG.md matches the actual tag date

7. **Add or move entries** to the appropriate section under appropriate category headings.

- **CRITICAL**: When moving entries from "Unreleased" to a version section, merge them with existing entries under the same category heading
- **NEVER create duplicate section headings** (e.g., don't create two "### Fixed" sections)
- If the version section already has a category heading (e.g., "### Fixed"), add the moved entries to that existing section
- Maintain the category order as defined above

8. **Verify formatting**:

- Bold description with period
- Proper PR link (NO hash symbol)
- Proper author link
Expand All @@ -181,12 +174,10 @@ When a new version is released:
When releasing from beta to a stable version (e.g., v16.1.0-beta.3 → v16.1.0):

1. **Remove all beta version labels** from the changelog:

- Change `### [v16.1.0-beta.1]`, `### [v16.1.0-beta.2]`, etc. to a single `### [v16.1.0]` section
- Combine all beta entries into the stable release section

2. **Consolidate duplicate entries**:

- If bug fixes or changes were made to features introduced in earlier betas, keep only the final state
- Remove redundant changelog entries for fixes to beta features
- Keep the most recent/accurate description of each change
Expand Down
16 changes: 0 additions & 16 deletions .claude/docs/analysis/MONOREPO_MIGRATION_ANALYSIS.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,10 @@ task node_package: "node_package:build"
**Critical**: When migrating from `node_package/` to `packages/react-on-rails/`:

1. **package-scripts.yml** references:

- ❌ `[ -f node_package/lib/ReactOnRails.full.js ]` → ✅ `[ -f lib/ReactOnRails.full.js ]`
- ❌ `[ -f packages/node-renderer/dist/ReactOnRailsProNodeRenderer.js ]` (already correct in Pro)

2. **package.json** "main" and "files" fields:

- Master: `"main": "node_package/lib/ReactOnRails.full.js"`
- Target: `"main": "lib/ReactOnRails.full.js"` (in packages/react-on-rails)

Expand All @@ -282,13 +280,11 @@ task node_package: "node_package:build"
#### Workspace Integration Tasks

1. **Yarn workspaces validation**

- Verify all workspace commands work correctly
- Test cross-workspace dependencies
- Validate yalc publish chain

2. **CI/CD Integration**

- Update GitHub Actions for workspace structure
- Verify separate package versioning works
- Test independent package publishing
Expand Down Expand Up @@ -375,28 +371,24 @@ task node_package: "node_package:build"
⚠️ **Critical Path Issues**:

1. **Path References** (HIGHEST PRIORITY)

- [ ] Update all hardcoded `node_package/lib/` references
- [ ] Verify `package-scripts.yml` paths after migration
- [ ] Test `yalc publish` with new paths
- **Impact**: Breaking yalc publish silently (as happened in Sept 2024)

2. **Workspace Integration** (HIGH)

- [ ] Validate `yarn workspaces run yalc:publish`
- [ ] Test cross-workspace dependency resolution
- [ ] Verify package version management
- **Impact**: Package installation failures for users

3. **CI/CD Consolidation** (HIGH)

- [ ] Merge CircleCI into GitHub Actions workflow
- [ ] Test all CI jobs with workspace structure
- [ ] Update caching strategies for workspaces
- **Impact**: Unpredictable CI behavior, missing test coverage

4. **Pro Package Migration** (MEDIUM)

- [ ] Consolidate `react_on_rails_pro/` with `packages/react-on-rails-pro/`
- [ ] Remove redundant configurations
- [ ] Update build scripts
Expand Down Expand Up @@ -491,13 +483,11 @@ GitHub Actions
### Phase 3: Pre-Monorepo Structure Preparation

1. **Validate Current State**

- [ ] Run full test suite on surabaya-v1
- [ ] Verify yalc publish works with workspace structure
- [ ] Test clean install scenarios

2. **Path Migration Checklist**

- [ ] Update all `package-scripts.yml` paths
- [ ] Update all CI workflow paths
- [ ] Search codebase for hardcoded `node_package/` references
Expand All @@ -511,13 +501,11 @@ GitHub Actions
### Phase 4: Final Monorepo Restructuring

1. **Consolidate Pro Package**

- [ ] Merge `react_on_rails_pro/` into monorepo structure
- [ ] Remove redundant configurations
- [ ] Update gemspec files

2. **CI/CD Consolidation**

- [ ] Move CircleCI jobs to GitHub Actions
- [ ] Update workspace cache strategies
- [ ] Verify all test jobs pass
Expand All @@ -534,27 +522,23 @@ GitHub Actions
✅ **Migration will be complete when**:

1. **Structure**

- All JavaScript packages in `packages/` directory
- Yarn workspaces configured and working
- No references to `node_package/src/` in documentation

2. **Build & Package**

- `yarn build` compiles all packages
- `yarn yalc:publish` publishes all packages
- `yarn run prepack` passes pre-publication checks
- All build artifacts in expected locations

3. **Testing**

- All RSpec tests pass (Ruby)
- All Jest tests pass (JavaScript)
- CI/CD pipeline fully operational
- Clean install works for all package types

4. **Documentation**

- All developer instructions updated
- Path references accurate
- Release process documented
Expand Down
8 changes: 0 additions & 8 deletions .claude/docs/analysis/PHASE_5_COMPLETION_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,26 @@
### ✅ Successfully Completed

1. **Created package structure**

- `packages/react-on-rails-pro-node-renderer/` directory
- package.json with correct dependencies
- tsconfig.json configurations

2. **Moved all files with git history preserved**

- 29 source files moved from `react_on_rails_pro/packages/node-renderer/src/`
- 43 test files moved from `react_on_rails_pro/packages/node-renderer/tests/`
- All files tracked as renames (preserves git blame/history)

3. **Updated workspace configuration**

- Added `packages/react-on-rails-pro-node-renderer` to root package.json workspaces
- Updated build script to include node-renderer
- Workspace recognizes all 3 packages with correct dependencies

4. **Fixed .gitignore**

- Removed blanket `packages/` ignore
- Now only ignores `packages/*/lib/` (build outputs)
- Source code is properly tracked

5. **Updated LICENSE.md**

- Added `packages/react-on-rails-pro-node-renderer/` to Pro license section
- License boundaries clear

Expand All @@ -51,18 +46,15 @@
The node-renderer package has **pre-existing TypeScript errors** unrelated to the file move:

1. **Missing .js extensions in imports** (ESM requirement)

- ~30+ imports need `.js` extension added
- Example: `import { foo } from './bar'` → `import { foo } from './bar.js'`

2. **Missing type declarations**

- `fastify` - needs `@types/fastify`
- `@sentry/node` - needs `@sentry/node` installed
- `@honeybadger-io/js` - needs `@honeybadger-io/js` installed

3. **Module export format issues**

- Some files use `export =` which doesn't work with ESM
- Need to convert to `export default`

Expand Down
10 changes: 0 additions & 10 deletions .claude/docs/analysis/claude-md-improvements.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ Based on the CI breakage analysis, here are specific additions to prevent simila
**CRITICAL: When working on PRs that change directory structure or move files:**

1. **Create a comprehensive checklist** of all places that reference the old paths:

- Search for hardcoded paths in all config files (grep -r "old/path" .)
- Check package.json, package-scripts.yml, webpack configs, CI workflows
- Check documentation and example code
- Check generator templates

2. **Run ALL test suites** after directory changes:

- `rake` (all tests)
- `rake run_rspec:example_basic` (generator tests)
- Manual test of `yalc publish` if changing package structure
- Build and test in a fresh clone to catch path issues

3. **Add temporary validation** in CI:

- Add a CI job that explicitly tests the changed paths
- Keep this validation for 2-3 releases after the refactor

Expand All @@ -38,7 +35,6 @@ Based on the CI breakage analysis, here are specific additions to prevent simila
**CRITICAL: Build scripts in package.json and package-scripts.yml need validation:**

1. **The prepack/prepare scripts are CRITICAL** - they run during:

- `npm install` / `yarn install` (for git dependencies)
- `yalc publish`
- `npm publish`
Expand All @@ -59,7 +55,6 @@ Based on the CI breakage analysis, here are specific additions to prevent simila
```

3. **If you change directory structure:**

- Update ALL path checks in package-scripts.yml
- Test with a clean install: `rm -rf node_modules && yarn install`
- Test yalc publish to ensure it works for users
Expand All @@ -73,13 +68,11 @@ Based on the CI breakage analysis, here are specific additions to prevent simila
**CRITICAL: Don't let master stay broken:**

1. **If CI fails on master after your PR merges:**

- Check GitHub Actions within 30 minutes of merge
- Run `gh pr view <pr-number> --json statusCheckRollup` after merge
- Set up GitHub notifications for master branch failures

2. **If you discover master is broken:**

- Investigate IMMEDIATELY - don't assume "someone else will fix it"
- Use `gh run list --branch master --limit 10` to see recent failures
- Check if it's a recurring failure or a new issue
Expand All @@ -88,7 +81,6 @@ Based on the CI breakage analysis, here are specific additions to prevent simila
- Consider reverting your PR and re-submitting with the fix

3. **Silent failures are the most dangerous:**

- yalc publish failures won't show up in most CI runs
- Build artifact path issues may only surface during actual usage
- Always test the actual use case (yalc publish, npm install from git, etc.)
Expand Down Expand Up @@ -135,13 +127,11 @@ Based on the CI breakage analysis, here are specific additions to prevent simila
**CRITICAL: Hardcoded paths are a major source of bugs:**

1. **Before committing changes to any config file with paths:**

- Verify the path actually exists: `ls -la <path>`
- Test that operations using the path work
- If changing package structure, search for ALL references to old paths

2. **Common files with path references:**

- `package-scripts.yml` - build artifact paths
- `package.json` - "files", "main", "types" fields
- Webpack configs - output.path, resolve.modules
Expand Down
1 change: 0 additions & 1 deletion .claude/docs/analysis/github-issue-1765-status-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ react_on_rails/
```

2. **Create Workspace Scripts** (20 minutes)

- Add to root `package.json`:

```json
Expand Down
2 changes: 0 additions & 2 deletions .claude/docs/analysis/github-issue-1765-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ The monorepo merger has been successfully completed with full git history preser
### ⚠️ Critical Issues Requiring Immediate Attention

1. **YALC Publishing - Not All Packages Published**

- Currently only publishes main package
- Need to publish: `react-on-rails`, `react-on-rails-pro`, `react-on-rails-pro-rsc`
- Path mismatch in `package-scripts.yml` could cause silent failures

2. **Directory Structure Confusion**

- Pro package nested inside main package (`react_on_rails_pro/` subdirectory)
- Should be siblings under `/packages/` for clearer separation
- Affects mental model and license boundaries
Expand Down
3 changes: 0 additions & 3 deletions .claude/docs/avoiding-ci-failure-cycles.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ commit: "Fix bundle commands" → CI fails (...)
### Why This Happens

1. **Large-scale changes made without comprehensive testing**

- Directory structure changes affect MANY files
- Not understanding full scope of impact

2. **Using CI as the test environment**

- Treating CI like a linter that tells you what to fix
- Not running equivalent tests locally first

3. **Incremental fixing without holistic testing**

- Fix one thing, break another
- Each fix tested in isolation
- Missing interaction effects
Expand Down
Loading
Loading