Commit b19127f
committed
Support Next.js specific IO semantics
Adds an export map for `next-js` condition and a new `index.next-js.ts` entrypoint for TSUP. converts the default test fixture to Next.js with cache components which will use the new entrypoint. Renames the existing test fixtures to use the latest Next.js release and not have cache components enabled which will continue to use the default entrypoint.
To support cache components we use "use cache". However rather than actually caching all edge config reads we use cacheLife to determine whether the particular API call should be dynamic (zero expiration) or cached (default cache life). by default "use cache" will not ever reach out over the network so this should add minimal overhead to all edge config reads. However there is some serialization overhead. We will be updating Next.js to optimize cache reads that end up not caching the result (expiration zero) so that we can skip serialization and key generation. For now there may be a minor degredation in the fastest reads due to this additional overhead howevcer it will only affect users who are using Cache Components wiht Next.js and won't have any impact on other users.1 parent b864cf4 commit b19127f
File tree
117 files changed
+467105
-36
lines changed- .changeset
- packages/edge-config
- src
- test/next-legacy
- images
- public
- src
- app
- api/vercel
- edge-config
- postgres-kysely/app
- edge
- node
- postgres/app
- client
- edge
- node
- pool
- edge
- node
- vercel
- blob
- api/app
- body
- edge
- serverless
- clean
- delete
- formdata
- edge
- serverless
- handle-blob-upload
- edge
- serverless
- head
- list
- app
- body
- edge
- serverless
- client-multipart
- client-webworker
- client
- formdata
- edge
- serverless
- list
- test
- client
- edge
- serverless
- edge-config
- app
- edge
- node
- kv
- postgres-kysely
- app
- edge
- node
- postgres
- app
- client
- edge
- node
- pool
- edge
- node
- lib
- test
- pages
- api/vercel
- blob/pages
- postgres-kysely/pages
- postgres/pages
- client
- pool
- vercel/pages/blob
- test/@vercel
- blob
- blob.visual.test.ts-snapshots
- edge-config
- kv
- postgres-kysely
- postgres
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
117 files changed
+467105
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| |||
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| 62 | + | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| |||
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
64 | | - | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
0 commit comments