Skip to content

Commit 5dd9f3e

Browse files
justin808claude
andcommitted
Remove --frozen-lockfile from dummy app install after yalc
The yalc workflow modifies yarn.lock when adding packages, so we cannot use --frozen-lockfile after yalc has run. Keep --ignore-scripts to skip the preinstall hook (since yalc already ran in the previous step). This allows the install to succeed after yalc has modified the lockfile. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cb12f42 commit 5dd9f3e

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

.github/workflows/pro-integration-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
yarn && yalc publish
101101
102102
- name: Install Node modules with Yarn for Pro dummy app
103-
run: cd spec/dummy && yarn install --frozen-lockfile --ignore-scripts --no-progress --no-emoji
103+
run: cd spec/dummy && yarn install --ignore-scripts --no-progress --no-emoji
104104

105105
- name: Install Ruby Gems for Pro dummy app
106106
run: |
@@ -226,7 +226,7 @@ jobs:
226226
yarn && yalc publish
227227
228228
- name: Install Node modules with Yarn for Pro dummy app
229-
run: cd spec/dummy && yarn install --frozen-lockfile --ignore-scripts --no-progress --no-emoji
229+
run: cd spec/dummy && yarn install --ignore-scripts --no-progress --no-emoji
230230

231231
- name: Ensure minimum required Chrome version
232232
run: |
@@ -424,7 +424,7 @@ jobs:
424424
yarn && yalc publish
425425
426426
- name: Install Node modules with Yarn for Pro dummy app
427-
run: cd spec/dummy && yarn install --frozen-lockfile --ignore-scripts --no-progress --no-emoji
427+
run: cd spec/dummy && yarn install --ignore-scripts --no-progress --no-emoji
428428

429429
- name: Ensure minimum required Chrome version
430430
run: |

lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
default: &default
55
source_path: app/javascript
66

7+
# Hook to run before compilation (e.g., for ReScript builds, pack generation)
8+
# See: https://github.com/shakacode/shakapacker/blob/main/docs/precompile_hook.md
9+
precompile_hook: bin/shakapacker-precompile-hook
10+
711
# You can have a subdirectory of the source_path, like 'packs' (recommended).
812
# Alternatively, you can use '/' to use the whole source_path directory.
913
# Notice that this is a relative path to source_path

lib/react_on_rails/dev/server_manager.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -432,34 +432,18 @@ def run_static_development(procfile, verbose: false, route: nil)
432432
route: route
433433
)
434434

435-
build_rescript_if_needed
436435
PackGenerator.generate(verbose: verbose)
437436
ProcessManager.ensure_procfile(procfile)
438437
ProcessManager.run_with_process_manager(procfile)
439438
end
440439

441440
def run_development(procfile, verbose: false, route: nil)
442441
print_procfile_info(procfile, route: route)
443-
build_rescript_if_needed
444442
PackGenerator.generate(verbose: verbose)
445443
ProcessManager.ensure_procfile(procfile)
446444
ProcessManager.run_with_process_manager(procfile)
447445
end
448446

449-
def build_rescript_if_needed
450-
# Check for both old (bsconfig.json) and new (rescript.json) config files
451-
return unless File.exist?("bsconfig.json") || File.exist?("rescript.json")
452-
453-
print "🔧 Building ReScript... "
454-
success = system("yarn build:rescript > /dev/null 2>&1")
455-
puts success ? "✅" : "❌"
456-
457-
return if success
458-
459-
puts "❌ ReScript build failed"
460-
exit 1
461-
end
462-
463447
def print_server_info(title, features, port = 3000, route: nil)
464448
puts title
465449
features.each { |feature| puts " - #{feature}" }

0 commit comments

Comments
 (0)