Skip to content

Commit c4fee05

Browse files
authored
Fix streaming in dev (#3012)
Fix streaming implementation for React Router 7 in development mode. `preview` mode is still buffering due to a local workerd issue referenced on this PR - Add @mjackson/node-fetch-server dependency to mini-oxygen - Update server-middleware.ts to convert requests to MiniflareRequest format - Fix utils.ts pipeFromWeb function to use sendResponse for proper streaming
1 parent a37ec6c commit c4fee05

14 files changed

Lines changed: 1403 additions & 8788 deletions

File tree

.changeset/beige-carrots-rest.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@shopify/mini-oxygen": patch
3+
"skeleton": patch
4+
"@shopify/cli-hydrogen": patch
5+
---
6+
7+
Fix defer/streaming in development & preview

.github/workflows/ci.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
cache-dependency-path: '**/package-lock.json'
2222

2323
- name: 📥 Install dependencies
24-
run: npm ci
24+
run: |
25+
npm ci
26+
npm rebuild
2527
2628
- name: 🔬 Lint
2729
run: npm run lint
@@ -45,7 +47,9 @@ jobs:
4547
cache-dependency-path: '**/package-lock.json'
4648

4749
- name: 📥 Install dependencies
48-
run: npm ci
50+
run: |
51+
npm ci
52+
npm rebuild
4953
5054
- name: 🔬 Check Formatting
5155
run: npm run format:check
@@ -69,7 +73,9 @@ jobs:
6973
cache-dependency-path: '**/package-lock.json'
7074

7175
- name: 📥 Install dependencies
72-
run: npm ci
76+
run: |
77+
npm ci
78+
npm rebuild
7379
7480
# Enabling the turbo cache causes deployments to fail intermittently.
7581
# The build step fails with dependency issues. More investigation needed.
@@ -112,7 +118,9 @@ jobs:
112118
cache-dependency-path: '**/package-lock.json'
113119

114120
- name: 📥 Install dependencies
115-
run: npm ci
121+
run: |
122+
npm ci
123+
npm rebuild
116124
117125
- name: 📦 Build packages, templates, and examples
118126
run: SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK=false npm run build:all
@@ -139,14 +147,18 @@ jobs:
139147
cache-dependency-path: '**/package-lock.json'
140148

141149
- name: 📥 Install dependencies
142-
run: npm ci
150+
run: |
151+
npm ci
152+
npm rebuild
143153
144154
- name: 📦 Build packages
145155
run: SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK=false npm run build:pkg
146156

147157
- name: 📥 Install dependencies (cookbook)
148158
working-directory: cookbook
149-
run: npm ci
159+
run: |
160+
npm ci
161+
npm rebuild
150162
151163
- name: 📝 Validate schema
152164
working-directory: cookbook

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ out
9292
# Nuxt.js build / generate output
9393
.nuxt
9494
dist
95+
build
9596

9697
# public
9798

0 commit comments

Comments
 (0)