Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lemon-turkeys-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/kit": patch
---

fix: make `paths.origin` type looser
2 changes: 1 addition & 1 deletion documentation/docs/25-build-and-deploy/40-adapter-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default defineConfig({
sveltekit({
adapter: adapter(),
paths: {
origin: /** @type {`https://${string}`} */ (process.env.ORIGIN)
origin: process.env.ORIGIN
}
})
]
Expand Down
3 changes: 0 additions & 3 deletions packages/kit/src/core/config/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ test('fails if paths.origin is not a valid origin', () => {
validate_config({
kit: {
paths: {
// @ts-expect-error
origin: 'not an origin'
}
}
Expand All @@ -309,7 +308,6 @@ test('fails if paths.origin uses an unsupported protocol', () => {
paths: {
// ftp:// is a parseable URL whose origin equals the input, so without
// a protocol check it would slip through validation.
// @ts-expect-error
origin: 'ftp://example.com'
}
}
Expand Down Expand Up @@ -350,7 +348,6 @@ test('fails if paths.origin is the empty string', () => {
validate_config({
kit: {
paths: {
// @ts-expect-error - empty string is no longer a valid value
origin: ''
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ export interface KitConfig {
* @default undefined
* @since 3.0
*/
origin?: `http://${string}` | `https://${string}`;
origin?: string;
/**
* Whether to use relative asset paths.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ declare module '@sveltejs/kit' {
* @default undefined
* @since 3.0
*/
origin?: `http://${string}` | `https://${string}`;
origin?: string;
/**
* Whether to use relative asset paths.
*
Expand Down
Loading