Skip to content

Commit 978fbf3

Browse files
Step 1 Complete: Create React-on-Rails-Pro Package Structure
✅ Checkpoint 1.1: Created directory structure - Created packages/react-on-rails-pro/ directory - Created packages/react-on-rails-pro/src/ directory - Created packages/react-on-rails-pro/tests/ directory - Verified directory structure matches target ✅ Checkpoint 1.2: Created package.json - Created packages/react-on-rails-pro/package.json with proper configuration - Set "license": "UNLICENSED" for Pro license - Added "dependencies": { "react-on-rails": "^16.1.0" } - Configured pro-specific exports and main export "." pointing to ./lib/index.js - Added independent build scripts (build, test, type-check) - Tested yarn install works correctly - Verified dependency resolution works ✅ Checkpoint 1.3: Created TypeScript configuration - Created packages/react-on-rails-pro/tsconfig.json - Configured proper import resolution for core package types - Set output directory to lib/ matching package.json exports - Verified TypeScript compilation setup works ✅ All Success Validation criteria met: - yarn install succeeds in pro package directory - TypeScript can resolve core package imports - Directory structure ready for implementation Updated implementation plan checklist to reflect completion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 58e1408 commit 978fbf3

File tree

4 files changed

+106
-14
lines changed

4 files changed

+106
-14
lines changed

docs/JS_PRO_PACKAGE_SEPARATION_PLAN.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,34 +60,34 @@ Based on commit `4dee1ff3cff5998a38cfa758dec041ece9986623` analysis:
6060

6161
**Checkpoint 1.1**: Create directory structure
6262

63-
- [ ] Create `packages/react-on-rails-pro/` directory
64-
- [ ] Create `packages/react-on-rails-pro/src/` directory
65-
- [ ] Create `packages/react-on-rails-pro/tests/` directory
66-
- [ ] Verify directory structure matches target
63+
- [x] Create `packages/react-on-rails-pro/` directory
64+
- [x] Create `packages/react-on-rails-pro/src/` directory
65+
- [x] Create `packages/react-on-rails-pro/tests/` directory
66+
- [x] Verify directory structure matches target
6767

6868
**Checkpoint 1.2**: Create package.json
6969

70-
- [ ] Create `packages/react-on-rails-pro/package.json` with:
70+
- [x] Create `packages/react-on-rails-pro/package.json` with:
7171
- `"name": "react-on-rails-pro"`
7272
- `"license": "UNLICENSED"`
7373
- `"dependencies": { "react-on-rails": "^16.1.0" }`
7474
- Pro-specific exports configuration matching current pro exports
7575
- Independent build scripts (`build`, `test`, `type-check`)
76-
- [ ] Test that `yarn install` works in pro package directory
77-
- [ ] Verify dependency resolution works correctly
76+
- [x] Test that `yarn install` works in pro package directory
77+
- [x] Verify dependency resolution works correctly
7878

7979
**Checkpoint 1.3**: Create TypeScript configuration
8080

81-
- [ ] Create `packages/react-on-rails-pro/tsconfig.json`
82-
- [ ] Configure proper import resolution for core package types
83-
- [ ] Set output directory to `lib/`
84-
- [ ] Verify TypeScript compilation setup works
81+
- [x] Create `packages/react-on-rails-pro/tsconfig.json`
82+
- [x] Configure proper import resolution for core package types
83+
- [x] Set output directory to `lib/`
84+
- [x] Verify TypeScript compilation setup works
8585

8686
**Success Validation**:
8787

88-
- [ ] `cd packages/react-on-rails-pro && yarn install` succeeds
89-
- [ ] TypeScript can resolve core package imports
90-
- [ ] Directory structure is ready for code
88+
- [x] `cd packages/react-on-rails-pro && yarn install` succeeds
89+
- [x] TypeScript can resolve core package imports
90+
- [x] Directory structure is ready for code
9191

9292
### Step 2: Create Simple MIT Registries for Core Package
9393

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "react-on-rails-pro",
3+
"version": "16.1.1",
4+
"description": "React on Rails Pro package with React Server Components support",
5+
"type": "module",
6+
"scripts": {
7+
"build": "yarn run clean && yarn run tsc --declaration",
8+
"build-watch": "yarn run clean && yarn run tsc --watch",
9+
"clean": "rm -rf ./lib",
10+
"test": "jest tests",
11+
"type-check": "yarn run tsc --noEmit --noErrorTruncation",
12+
"prepack": "nps build.prepack",
13+
"prepare": "nps build.prepack",
14+
"prepublishOnly": "yarn run build"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/shakacode/react_on_rails.git"
19+
},
20+
"keywords": [
21+
"react",
22+
"react-server-components",
23+
"rsc",
24+
"server-components",
25+
"react-on-rails",
26+
"pro"
27+
],
28+
"author": "[email protected]",
29+
"license": "UNLICENSED",
30+
"exports": {
31+
".": "./lib/index.js",
32+
"./registerServerComponent/client": "./lib/registerServerComponent/client.js",
33+
"./registerServerComponent/server": {
34+
"react-server": "./lib/registerServerComponent/server.rsc.js",
35+
"default": "./lib/registerServerComponent/server.js"
36+
},
37+
"./wrapServerComponentRenderer/client": "./lib/wrapServerComponentRenderer/client.js",
38+
"./wrapServerComponentRenderer/server": {
39+
"react-server": "./lib/wrapServerComponentRenderer/server.rsc.js",
40+
"default": "./lib/wrapServerComponentRenderer/server.js"
41+
},
42+
"./RSCRoute": "./lib/RSCRoute.js",
43+
"./RSCProvider": "./lib/RSCProvider.js",
44+
"./ServerComponentFetchError": "./lib/ServerComponentFetchError.js"
45+
},
46+
"dependencies": {
47+
"react-on-rails": "^16.1.0"
48+
},
49+
"peerDependencies": {
50+
"react": ">= 16",
51+
"react-dom": ">= 16",
52+
"react-on-rails-rsc": "19.0.2"
53+
},
54+
"peerDependenciesMeta": {
55+
"react-on-rails-rsc": {
56+
"optional": true
57+
}
58+
},
59+
"files": [
60+
"lib"
61+
],
62+
"bugs": {
63+
"url": "https://github.com/shakacode/react_on_rails/issues"
64+
},
65+
"homepage": "https://github.com/shakacode/react_on_rails#readme"
66+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./lib",
5+
"rootDir": "./src",
6+
"baseUrl": ".",
7+
"paths": {
8+
"react-on-rails": ["../react-on-rails/src"],
9+
"react-on-rails/*": ["../react-on-rails/src/*"]
10+
},
11+
"declaration": true,
12+
"declarationMap": true,
13+
"sourceMap": true,
14+
"allowSyntheticDefaultImports": true
15+
},
16+
"include": ["src/**/*"],
17+
"exclude": ["node_modules", "lib", "tests"]
18+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
react-on-rails@^16.1.0:
6+
version "16.1.1"
7+
resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-16.1.1.tgz#bf5e752c44381252204482342ae5722d9f45f715"
8+
integrity sha512-Ntw/4HSB/p9QJ1V2kc0aETzK0W0Vy0suSh0Ugs3Ctfso2ovIT2YUegJJyPtFzX9jUZSR6Q/tkmkgNgzASkO0pw==

0 commit comments

Comments
 (0)