Skip to content

Commit d67c1aa

Browse files
Fix broken pnpm lock file for dummy apps (#2201)
### Summary Spec dummy apps (core and pro dummy apps) didn't set up well when we migrated to pnpm. `react_on_rails/spec/dummy` and `react_on_rails_pro/spec/dummy` apps were not part of the monorepo packages at `<root>/pnpm-workspace.yaml`. This configuration made some dependencies of dummy apps not installed. Also, it installed different versions of `react`, which caused a problem with the `react-redux` package. Also, we currently use yalc to make dummy apps use the packages. So, I added `pnpm-workspace.yaml` file to both dummy apps, so each of them have its own `pnpm-lock.yaml` file and fix all problems. In the future, if we add the dummy apps to the workspace, we can get rid of the yalc and make the dummy apps use packages directly. Seems that claude discovered that problem when it migrated to `pnpm`, but it made a work around at CI to make it pass. It used the `--ignore-workspace` argument while installing the dummy apps packages.
1 parent 945228d commit d67c1aa

File tree

11 files changed

+16728
-28
lines changed

11 files changed

+16728
-28
lines changed

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ jobs:
153153
# Use --link to maintain the link: protocol that matches pnpm-lock.yaml
154154
run: cd react_on_rails/spec/dummy && yalc add --link react-on-rails
155155
- name: Install Node modules with pnpm for dummy app
156-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
157156
# minimum config changes package.json (shakapacker version), so can't use frozen lockfile
158-
run: cd react_on_rails/spec/dummy && pnpm install --ignore-workspace ${{ matrix.dependency-level == 'minimum' && '--no-frozen-lockfile' || '' }}
157+
run: cd react_on_rails/spec/dummy && pnpm install ${{ matrix.dependency-level == 'minimum' && '--no-frozen-lockfile' || '--frozen-lockfile' }}
159158
- name: Save dummy app ruby gems to cache
160159
uses: actions/cache@v4
161160
with:
@@ -260,9 +259,8 @@ jobs:
260259
# Use --link to maintain the link: protocol that matches pnpm-lock.yaml
261260
run: cd react_on_rails/spec/dummy && yalc add --link react-on-rails
262261
- name: Install Node modules with pnpm for dummy app
263-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
264262
# minimum config changes package.json (shakapacker version), so can't use frozen lockfile
265-
run: cd react_on_rails/spec/dummy && pnpm install --ignore-workspace ${{ matrix.dependency-level == 'minimum' && '--no-frozen-lockfile' || '' }}
263+
run: cd react_on_rails/spec/dummy && pnpm install ${{ matrix.dependency-level == 'minimum' && '--no-frozen-lockfile' || '--frozen-lockfile' }}
266264
- name: Dummy JS tests
267265
run: |
268266
cd react_on_rails/spec/dummy

.github/workflows/lint-js-and-ruby.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ jobs:
135135
# Use --link to maintain the link: protocol that matches pnpm-lock.yaml
136136
run: cd react_on_rails/spec/dummy && yalc add --link react-on-rails
137137
- name: Install Node modules with pnpm for dummy app
138-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
139-
# The dummy app has its own dependencies and uses yalc links
140-
run: cd react_on_rails/spec/dummy && pnpm install --ignore-workspace
138+
run: cd react_on_rails/spec/dummy && pnpm install
141139

142140
- name: Install Ruby Gems for package
143141
run: cd react_on_rails && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3

.github/workflows/playwright.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,9 @@ jobs:
7676

7777
- name: Install dummy app dependencies
7878
working-directory: react_on_rails/spec/dummy
79-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
8079
run: |
8180
bundle install
82-
pnpm install --ignore-workspace
81+
pnpm install
8382
8483
- name: Install Playwright browsers
8584
working-directory: react_on_rails/spec/dummy

.github/workflows/precompile-check.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,9 @@ jobs:
113113
- name: yalc publish for react-on-rails
114114
run: cd packages/react-on-rails && yalc publish
115115
- name: yalc add react-on-rails
116-
run: cd react_on_rails/spec/dummy && yalc add react-on-rails
116+
run: cd react_on_rails/spec/dummy && yalc add --link react-on-rails
117117
- name: Install Node modules with pnpm for dummy app
118-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
119-
# The dummy app doesn't have a pnpm-lock.yaml
120-
run: cd react_on_rails/spec/dummy && pnpm install --ignore-workspace
118+
run: cd react_on_rails/spec/dummy && pnpm install
121119
- name: Save dummy app ruby gems to cache
122120
uses: actions/cache@v4
123121
with:

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ jobs:
136136
pnpm install --frozen-lockfile
137137
138138
- name: Install Node modules with pnpm for Pro dummy app
139-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
140-
# The Pro dummy app has its own dependencies and uses yalc links
141-
run: cd spec/dummy && pnpm install --ignore-workspace
139+
run: cd spec/dummy && pnpm install
142140

143141
- name: Install Ruby Gems for Pro dummy app
144142
run: |
@@ -266,9 +264,7 @@ jobs:
266264
pnpm install --frozen-lockfile
267265
268266
- name: Install Node modules with pnpm for Pro dummy app
269-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
270-
# The Pro dummy app has its own dependencies and uses yalc links
271-
run: cd spec/dummy && pnpm install --ignore-workspace
267+
run: cd spec/dummy && pnpm install
272268

273269
- name: Ensure minimum required Chrome version
274270
run: |
@@ -468,9 +464,7 @@ jobs:
468464
pnpm install --frozen-lockfile
469465
470466
- name: Install Node modules with pnpm for Pro dummy app
471-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
472-
# The Pro dummy app has its own dependencies and uses yalc links
473-
run: cd spec/dummy && pnpm install --ignore-workspace
467+
run: cd spec/dummy && pnpm install
474468

475469
- name: Ensure minimum required Chrome version
476470
run: |

.github/workflows/pro-lint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,10 @@ jobs:
154154
bundle _2.5.4_ check || bundle _2.5.4_ install --jobs=4 --retry=3
155155
156156
- name: Install Node modules with pnpm for Pro dummy app
157-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
158-
run: cd spec/dummy && pnpm install --ignore-workspace
157+
run: cd spec/dummy && pnpm install
159158

160159
- name: Install Node modules with pnpm for ExecJS dummy app
161-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
162-
run: cd spec/execjs-compatible-dummy && pnpm install --ignore-workspace
160+
run: cd spec/execjs-compatible-dummy && pnpm install
163161

164162
- name: Generate file-system based entrypoints
165163
run: cd spec/dummy && bundle exec rake react_on_rails:generate_packs

.github/workflows/pro-test-package-and-gem.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ jobs:
136136
pnpm install --frozen-lockfile
137137
138138
- name: Install Node modules with pnpm for Pro dummy app
139-
# --ignore-workspace prevents pnpm from treating this as part of the parent workspace
140-
run: cd spec/dummy && pnpm install --ignore-workspace
139+
run: cd spec/dummy && pnpm install
141140

142141
- name: Install Ruby Gems for Pro dummy app
143142
run: |

0 commit comments

Comments
 (0)