Commit fffa737
Rename bundlePath to serverBundleCachePath in node renderer (#2008)
## Summary
This PR renames the `bundlePath` configuration option to
`serverBundleCachePath` in the node renderer to better describe its
purpose and avoid confusion with Shakapacker's public bundle path.
## Changes
- **Config interface**: Added `serverBundleCachePath` as the new
property, deprecated `bundlePath`
- **Deprecation handling**: Added warning messages when the old name is
used (both config and env var)
- **Environment variables**: Support both
`RENDERER_SERVER_BUNDLE_CACHE_PATH` (new) and `RENDERER_BUNDLE_PATH`
(deprecated)
- **Internal code**: Updated all internal code to use
`serverBundleCachePath`
- **Documentation**: Updated all docs and examples to use the new name
- **Tests**: Updated test files and helper functions to use the new name
- **Backwards compatibility**: The old `bundlePath` option continues to
work with deprecation warnings
## Why this change?
The name `bundlePath` was confusing because:
1. It could be confused with Shakapacker's public bundle path (where
client-side assets are served)
2. It didn't clearly indicate that this is a **cache directory** for
**uploaded server bundles**
3. The new name `serverBundleCachePath` makes the purpose explicit
## Migration guide
Users can update their configuration:
**Before:**
```js
const config = {
bundlePath: path.resolve(__dirname, './.node-renderer-bundles'),
};
```
**After:**
```js
const config = {
serverBundleCachePath: path.resolve(__dirname, './.node-renderer-bundles'),
};
```
**Environment variable:**
- Old: `RENDERER_BUNDLE_PATH`
- New: `RENDERER_SERVER_BUNDLE_CACHE_PATH`
Both the old config option and env var will continue to work with
deprecation warnings.
## Test plan
- [x] ESLint passes
- [x] RuboCop passes
- [x] All documentation updated
- [x] Backwards compatibility maintained
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/shakacode/react_on_rails/2008)
<!-- Reviewable:end -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7bdf4eb commit fffa737
File tree
12 files changed
+290
-133
lines changed- react_on_rails_pro
- docs
- node-renderer
- packages/node-renderer
- src
- worker
- tests
- spec/dummy/client
12 files changed
+290
-133
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | | - | |
14 | | - | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| 54 | + | |
49 | 55 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | | - | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
64 | | - | |
65 | 73 | | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| 82 | + | |
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
| |||
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
89 | | - | |
| 99 | + | |
90 | 100 | | |
91 | | - | |
| 101 | + | |
92 | 102 | | |
93 | 103 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | | - | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | | - | |
| 110 | + | |
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
| |||
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
135 | | - | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
141 | | - | |
| 149 | + | |
142 | 150 | | |
143 | 151 | | |
144 | | - | |
| 152 | + | |
145 | 153 | | |
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
| 158 | + | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
| |||
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
162 | | - | |
| 171 | + | |
163 | 172 | | |
164 | 173 | | |
| 174 | + | |
165 | 175 | | |
166 | 176 | | |
167 | | - | |
| 177 | + | |
168 | 178 | | |
169 | 179 | | |
| 180 | + | |
170 | 181 | | |
171 | 182 | | |
172 | 183 | | |
| 184 | + | |
173 | 185 | | |
174 | 186 | | |
175 | 187 | | |
| 188 | + | |
176 | 189 | | |
177 | 190 | | |
178 | 191 | | |
| 192 | + | |
179 | 193 | | |
180 | 194 | | |
181 | | - | |
| 195 | + | |
182 | 196 | | |
183 | 197 | | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | | - | |
| 201 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | | - | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | | - | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | | - | |
76 | | - | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
0 commit comments