Commit d2eeda9
fix: let next-server handle SWR behavior (#206)
* chore: add local repro of failing test
* fix: return stale values for cache entries
* fix: give blob a couple seconds to propagate back
* fix: ensure lambda doesn't die before the revalidate is done
* chore: turn test page into js to prevent it from installing typescript
* chore: remove .only
* fix: also adjust date header for stale cache serves
* fix: set cache-status header for SWR
* chore: update route handler test to capture SWR
* similar fixes for page router with static revalidate
* aaand another test
* fix: another test
* remove .only
* fix first test
* fix: route handlers are also cacheable!
* test: cache-handler test for page router updated for SWR behavior
* chore: remove no longer used CacheHandler helper method
* chore remove unused imports and variables used in previously removed method
* test: cache-handler test for route handler updated for SWR behavior
* test: invoke functions in integration tests in sandboxed child process
* test: move request mocking to lambda runner and mock just purge API
* Revert "test: move request mocking to lambda runner and mock just purge API"
This reverts commit c773508bd1fc1398711fe242e791123642cc5688.
* Revert "test: invoke functions in integration tests in sandboxed child process"
This reverts commit a834f622b3fd6829032c53654d3600ceeb9492e3.
* chore: update msw/node setup to get rid of bunch of warnings
* test: split cache-handler tests into 3 separate test suites, one for each fixture
* adjust sequencer to run all 3 cache-handler tests in same shard
* adjust tests
* upgrade vitest
* run test suites sequentially
* maybe fix lock file
* add delay to app router cachehandler tests
* test: update fetch-handdler integration tests
* Revert "add delay to app router cachehandler tests"
This reverts commit b4112c4a53bf2d34086ca349944dfe3a588abbdd.
* Revert "maybe fix lock file"
This reverts commit db186688fd3f035176176fd76b4b7710ec46436b.
* Revert "run test suites sequentially"
This reverts commit 548f81d222eb5729e963a494d6a5ebf09dae68e9.
* Revert "upgrade vitest"
This reverts commit d65ed1a64f16dca2e328fd2fc2d9b79b9ae48448.
* Revert "adjust tests"
This reverts commit bc620eee8455336e98feeaea83dda5dbe250ddaf.
* Revert "adjust sequencer to run all 3 cache-handler tests in same shard"
This reverts commit 23f65d3797c69bff58fa24fd6b3ffd9430a31099.
* Revert "test: split cache-handler tests into 3 separate test suites, one for each fixture"
This reverts commit 6cb1422e5883964a7cf4bfd04b76fb0dbbb902d9.
* test: readd delay after reverting setup changes
* test: add some debug logs
* Revert "test: add some debug logs"
This reverts commit 35e92a5b3b0198de9a951aa97f7543839a72a62c.
* fix: fix bad merge conflict resolution
---------
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: Michal Piechowiak <[email protected]>1 parent 8b17f09 commit d2eeda9
File tree
11 files changed
+497
-163
lines changed- src/run
- handlers
- tests
- e2e
- fixtures
- revalidate-fetch/app
- dynamic-posts/[id]
- posts/[id]
- simple-next-app/app/stale-cache-serving/app-page
- integration
- utils
11 files changed
+497
-163
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 18 | | |
32 | 19 | | |
33 | 20 | | |
| |||
65 | 52 | | |
66 | 53 | | |
67 | 54 | | |
68 | | - | |
69 | | - | |
70 | 55 | | |
71 | 56 | | |
72 | | - | |
73 | | - | |
| 57 | + | |
| 58 | + | |
74 | 59 | | |
75 | 60 | | |
76 | 61 | | |
| |||
194 | 179 | | |
195 | 180 | | |
196 | 181 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 182 | | |
228 | 183 | | |
229 | 184 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 56 | + | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
64 | | - | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments