-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Overhaul adapter API #2931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Overhaul adapter API #2931
Changes from all commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
2ba38e8
start fiddling about with code-split server code
Rich-Harris 0f62263
generate build data
Rich-Harris 78652d9
Merge branch 'master' into function-per-page
Rich-Harris 7301352
working, minus adapters
Rich-Harris 2dda44a
prerendering
Rich-Harris be773cb
WIP
Rich-Harris e04303e
tidy some stuff up
Rich-Harris 3fcbdad
fix prefixes
Rich-Harris 9b82b0b
adapter-node working
Rich-Harris 89420d4
tidy up
Rich-Harris 0d13e4c
tidy
Rich-Harris 0ac7c8d
make copy opts optional
Rich-Harris 44f53c7
tidy
Rich-Harris 17e24fc
netlify working albeit with single function
Rich-Harris f0ee8fa
expose route data to adapters
Rich-Harris ea3eee1
some progress
Rich-Harris a0a66d1
lint
Rich-Harris c36c55f
remove sandbox example from PR
Rich-Harris 785153b
implement createEntries API
Rich-Harris b3b1c3c
fix some tests
Rich-Harris 5466250
AMP fix
Rich-Harris e51deba
tests all passing
Rich-Harris 8828f11
update gitignore
Rich-Harris 1407e57
disable adapter-node tests for now
Rich-Harris 11e3b91
typechecking
Rich-Harris 4328dae
always create prerendered output directory
Rich-Harris 158964b
manifest -> generateManifest, add utils-level method
Rich-Harris a1a2e70
spread -> rest
Rich-Harris 3a63cbb
finesse return value of copy helper
Rich-Harris 786f5b0
no need to pass config through to adapter
Rich-Harris 1f6f45a
Update packages/kit/src/core/build/index.js
Rich-Harris 1fc9ab4
Merge branch 'function-per-page' of github.com:sveltejs/kit into func…
Rich-Harris 4b18f16
fix
Rich-Harris 53e05b4
refactor out method extraction
Rich-Harris 078be6c
add comment to resolve separate routes/components entry point detection
Rich-Harris 5895f75
remove out of date comment
Rich-Harris 4a158f0
nicer rollup output types
Rich-Harris 1158649
actually that caused chaos, doing this instead
Rich-Harris 80256a1
fix tests
Rich-Harris 39c83af
update adapter-cloudflare
Rich-Harris 0b6e0c8
merge master -> funtion-per-page
Rich-Harris 0b04e81
refactor build functions into client/server/service worker modules
Rich-Harris 4f2ae17
make build_server more readable
Rich-Harris b58eb43
oops
Rich-Harris 32006b4
gah
Rich-Harris 5d12522
windows fix
Rich-Harris 28a5054
split manifest into public and private parts, so we can use manifest.…
Rich-Harris 317111e
lint
Rich-Harris 9c45146
prevent duplication of asset list in functions
Rich-Harris dc6314f
exclude prerendered pages from functions
Rich-Harris 9f3ee18
lint
Rich-Harris c0e6abf
get vercel adapter working (with v1 filesystem API)
Rich-Harris 2f68be1
target node14
Rich-Harris d2dc49d
rename utils -> builder
Rich-Harris bd03083
add methods for getting directories instead of hardcoding .svelte-kit…
Rich-Harris 22ffd4d
fix lockfile
Rich-Harris d758024
update cloudflare adapters
Rich-Harris 485bb27
update readmes
Rich-Harris 4f12eb4
tidy up
Rich-Harris 31dd184
tweak docs
Rich-Harris d4a9c12
remove sandbox from workspace
Rich-Harris b2e2d4f
try pinning version
373a165
Update packages/kit/src/core/build/build_server.js
Rich-Harris 150ee18
remove redundant strict fs stuff
6836f42
Merge branch 'function-per-page' of github.com:sveltejs/kit into func…
628f625
remove sandbox from gitignore
91de58a
merge master -> function-per-page
Rich-Harris 17d3fea
merge master -> function-per-page
Rich-Harris ebf1f1f
lint
Rich-Harris f7a8115
fix cloudflare pages handling of prerendered pages
Rich-Harris bdc64ff
support esm and cjs manifests
Rich-Harris 608fd3d
force createEntries to follow prerender
Rich-Harris fc17a67
fix types
Rich-Harris 275628e
fix adapter-netlify
Rich-Harris a522611
separate App from InternalApp
Rich-Harris d257702
Update packages/kit/types/internal.d.ts
Rich-Harris 64be780
expose SSRManifest
Rich-Harris c7958ba
fall back to HTTP fetch if endpoint is missing
Rich-Harris c49e4cd
app.render should not be passed a host string
Rich-Harris 5233b25
default hostHeader to host in config
Rich-Harris dd40079
fix types
Rich-Harris 21dfb9b
replace page.host with page.origin
Rich-Harris e7aaf32
fix host stuff
Rich-Harris 57a8464
make SSR route splitting optional
Rich-Harris 0d20729
simplify createEntries
Rich-Harris 351674c
these are no longer generic
Rich-Harris c32df77
implement .json heuristic
Rich-Harris d057b0d
lint
Rich-Harris b459265
changesets
Rich-Harris 7ebc950
changeset
Rich-Harris 6f4c36e
merge master -> function-per-page
Rich-Harris a9093c8
Update packages/adapter-netlify/index.js
Rich-Harris d481e09
Update packages/adapter-node/README.md
Rich-Harris de897a2
this.server -> this.vite
Rich-Harris b6613c9
Merge branch 'function-per-page' of github.com:sveltejs/kit into func…
Rich-Harris ace5f35
give a bare-bones description of createEntries
Rich-Harris 246b88c
lint
Rich-Harris 5d810ec
merge master -> function-per-page
Rich-Harris c51641b
add missing origin
Rich-Harris c096dfa
remove TODO
Rich-Harris ed75d52
replace ts-ignore with ts-expect-error
Rich-Harris f1c84a6
Update packages/kit/src/core/adapt/builder.js
Rich-Harris cd60fae
document AdapterEntry
Rich-Harris 77486c0
Merge branch 'function-per-page' of github.com:sveltejs/kit into func…
Rich-Harris 052dbf7
Update packages/kit/types/config.d.ts
Rich-Harris 53d0007
merge master -> function-per-page
Rich-Harris d4d071e
oops
Rich-Harris 0de1aa3
manifest -> vite_manifest
Rich-Harris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@sveltejs/adapter-auto': patch | ||
'@sveltejs/adapter-cloudflare': patch | ||
'@sveltejs/adapter-cloudflare-workers': patch | ||
'@sveltejs/adapter-netlify': patch | ||
'@sveltejs/adapter-node': patch | ||
'@sveltejs/adapter-static': patch | ||
'@sveltejs/adapter-vercel': patch | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Overhaul adapter API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@sveltejs/adapter-cloudflare': patch | ||
'@sveltejs/adapter-cloudflare-workers': patch | ||
'@sveltejs/adapter-vercel': patch | ||
--- | ||
|
||
Remove esbuild options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Replace config.kit.hostHeader with config.kit.headers.host, add config.kit.headers.protocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Replace page.host with page.origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/adapter-netlify': patch | ||
--- | ||
|
||
Add experimental function splitting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@sveltejs/adapter-netlify': patch | ||
'@sveltejs/adapter-node': patch | ||
--- | ||
|
||
Don't bundle final output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6 | ||
version: 6.23.2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
|
@@ -41,7 +41,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6 | ||
version: 6.23.2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
@@ -75,7 +75,7 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6 | ||
version: 6.23.2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
fetch-depth: 0 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6 | ||
version: 6.23.2 | ||
- name: Setup Node.js 12.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
import { Adapter } from '@sveltejs/kit'; | ||
import { BuildOptions } from 'esbuild'; | ||
|
||
interface AdapterOptions { | ||
esbuild?: (options: BuildOptions) => Promise<BuildOptions> | BuildOptions; | ||
} | ||
|
||
declare function plugin(options?: AdapterOptions): Adapter; | ||
declare function plugin(): Adapter; | ||
export = plugin; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.