Skip to content

Commit 2bfb143

Browse files
Remove unnecessary build-core-package job and workspace sharing
Since link-source scripts now handle building and yalc publishing: - Remove build-core-package job (no longer needed) - Remove all build-core-package dependencies from workflow - Remove workspace sharing (yalc handles package distribution) - Keep existing cache strategy for node_modules directories - Simplify CircleCI workflow to rely on preinstall hooks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 0dc461c commit 2bfb143

File tree

5 files changed

+12
-59
lines changed

5 files changed

+12
-59
lines changed

.circleci/config.yml

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -125,35 +125,13 @@ aliases:
125125
echo -e "\nInstalled $(google-chrome --version)"
126126
fi
127127
128-
# Build core React on Rails package for pro package to use
129-
- &build-core-package
130-
name: Build core React on Rails package
131-
command: |
132-
yarn install --frozen-lockfile --no-progress --no-emoji
133-
yarn run build
134-
135128
jobs:
136-
# Build core React on Rails package
137-
build-core-package:
138-
docker:
139-
- image: &docker_image cimg/ruby:3.3.7-browsers
140-
steps:
141-
- checkout
142-
- run: *print-system-info
143-
- run: *build-core-package
144-
- persist_to_workspace:
145-
root: .
146-
paths:
147-
- node_package/lib
148-
149129
# Lint all
150130
lint-js-and-ruby:
151131
docker:
152132
- image: &docker_image cimg/ruby:3.3.7-browsers
153133
steps:
154134
- checkout
155-
- attach_workspace:
156-
at: .
157135
- run: *print-system-info
158136
- restore_cache: *restore-package-node-modules-cache
159137
- restore_cache: *restore-package-gem-cache
@@ -180,8 +158,6 @@ jobs:
180158
- image: *docker_image
181159
steps:
182160
- checkout
183-
- attach_workspace:
184-
at: .
185161
- run: *print-system-info
186162
- restore_cache: *restore-package-node-modules-cache
187163
- run: *install-package-node-modules
@@ -197,8 +173,6 @@ jobs:
197173
- image: *docker_image
198174
steps:
199175
- checkout
200-
- attach_workspace:
201-
at: .
202176
- run: *print-system-info
203177
- restore_cache: *restore-dummy-app-node-modules-cache
204178
- run: *install-package-node-modules
@@ -215,8 +189,6 @@ jobs:
215189
- image: *docker_image
216190
steps:
217191
- checkout
218-
- attach_workspace:
219-
at: .
220192
- run: *print-system-info
221193
- restore_cache: *restore-package-gem-cache
222194
- run: *install-package-ruby-gems
@@ -232,8 +204,6 @@ jobs:
232204
- image: *docker_image
233205
steps:
234206
- checkout
235-
- attach_workspace:
236-
at: .
237207
- run: *print-system-info
238208
- restore_cache: *restore-dummy-app-gem-cache
239209
- run: *install-dummy-app-ruby-gems
@@ -251,8 +221,6 @@ jobs:
251221
- image: *docker_image
252222
steps:
253223
- checkout
254-
- attach_workspace:
255-
at: .
256224
- run: *print-system-info
257225
- restore_cache: *restore-package-node-modules-cache
258226
- restore_cache: *restore-dummy-app-node-modules-cache
@@ -278,8 +246,6 @@ jobs:
278246
- image: *docker_image
279247
steps:
280248
- checkout
281-
- attach_workspace:
282-
at: .
283249
- run: *print-system-info
284250
- restore_cache: *restore-package-node-modules-cache
285251
- run: rm -rf react_on_rails_pro/spec/dummy/public/webpack
@@ -302,8 +268,6 @@ jobs:
302268
- image: *docker_image
303269
steps:
304270
- checkout
305-
- attach_workspace:
306-
at: .
307271
- run: *print-system-info
308272
- restore_cache: *restore-package-gem-cache
309273
- run: *install-package-ruby-gems
@@ -327,8 +291,6 @@ jobs:
327291
- image: *docker_image
328292
steps:
329293
- checkout
330-
- attach_workspace:
331-
at: .
332294
- run: *print-system-info
333295
- restore_cache: *restore-package-gem-cache
334296
- restore_cache: *restore-package-node-modules-cache
@@ -385,42 +347,30 @@ workflows:
385347
version: 2
386348
build-and-test:
387349
jobs:
388-
- build-core-package
389-
- install-package-node-packages:
390-
requires:
391-
- build-core-package
392-
- install-package-ruby-gems:
393-
requires:
394-
- build-core-package
350+
- install-package-node-packages
351+
- install-package-ruby-gems
395352
- install-dummy-app-node-packages:
396353
requires:
397354
- install-package-node-packages
398-
- install-dummy-app-ruby-gems:
399-
requires:
400-
- build-core-package
355+
- install-dummy-app-ruby-gems
401356
- lint-js-and-ruby:
402357
requires:
403-
- build-core-package
404358
- install-package-node-packages
405359
- install-package-ruby-gems
406360
- install-dummy-app-node-packages
407361
- build-dummy-app-webpack-test-bundles:
408362
requires:
409-
- build-core-package
410363
- install-package-node-packages
411364
- install-dummy-app-node-packages
412365
- install-dummy-app-ruby-gems
413366
- package-js-tests:
414367
requires:
415-
- build-core-package
416368
- install-package-node-packages
417369
- build-dummy-app-webpack-test-bundles
418370
- rspec-package-specs:
419371
requires:
420-
- build-core-package
421372
- install-package-ruby-gems
422373
- rspec-dummy-app-node-renderer:
423374
requires:
424-
- build-core-package
425375
- install-package-ruby-gems
426376
- build-dummy-app-webpack-test-bundles

react_on_rails_pro/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"nps": "^5.9.12",
8686
"pino-pretty": "^13.0.0",
8787
"prettier": "^3.2.5",
88-
"react-on-rails": "file:../",
88+
"react-on-rails": "link:.yalc/react-on-rails",
8989
"redis": "^5.0.1",
9090
"release-it": "^17.6.0",
9191
"sentry-testkit": "^5.0.6",
@@ -114,8 +114,9 @@
114114
"packages/node-renderer/dist"
115115
],
116116
"scripts": {
117+
"preinstall": "yarn run link-source && yalc add --link react-on-rails",
117118
"postinstall": "test -f post-yarn-install.local && ./post-yarn-install.local || true",
118-
"link-source": "cd ../ && yarn && yarn run build && cd node_package && yalc publish && cd ../react_on_rails_pro && yarn && yarn run nps build && yalc publish",
119+
"link-source": "cd ../ && yarn && yalc publish",
119120
"test": "nps test",
120121
"prepack": "nps build.prepack",
121122
"prepare": "nps build.prepack",

react_on_rails_pro/spec/dummy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"test": "yarn run build:test && yarn run lint && rspec",
9797
"lint": "cd ../.. && nps lint",
9898
"preinstall": "yarn run link-source && yalc add --link react-on-rails && yalc add --link @shakacode-tools/react-on-rails-pro-node-renderer",
99-
"link-source": "cd ../../../ && yarn && yarn run build && cd node_package && yalc publish && cd ../react_on_rails_pro && yarn && yarn run nps build && yalc publish",
99+
"link-source": "cd ../.. && yarn && yarn run nps build && yalc publish",
100100
"postinstall": "test -f post-yarn-install.local && ./post-yarn-install.local || true",
101101
"build:test": "rm -rf public/webpack/test && rm -rf ssr-generated && RAILS_ENV=test NODE_ENV=test bin/shakapacker",
102102
"build:dev": "rm -rf public/webpack/development && rm -rf ssr-generated && RAILS_ENV=development NODE_ENV=development bin/shakapacker",

react_on_rails_pro/spec/dummy/yarn.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5353,8 +5353,9 @@ react-on-rails-rsc@^19.0.2:
53535353
neo-async "^2.6.1"
53545354
webpack-sources "^3.2.0"
53555355

5356-
"react-on-rails@file:..":
5356+
"react-on-rails@link:.yalc/react-on-rails":
53575357
version "0.0.0"
5358+
uid ""
53585359

53595360
react-proptypes@^1.0.0:
53605361
version "1.0.0"

react_on_rails_pro/yarn.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6843,8 +6843,9 @@ react-is@^18.0.0:
68436843
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
68446844
integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
68456845

6846-
"react-on-rails@file:..":
6847-
version "16.1.1"
6846+
"react-on-rails@link:.yalc/react-on-rails":
6847+
version "0.0.0"
6848+
uid ""
68486849

68496850
readable-stream@^2.2.2:
68506851
version "2.3.8"

0 commit comments

Comments
 (0)