Skip to content

Commit

Permalink
chore: remove kit.svelte.dev (#12856)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored Oct 22, 2024
1 parent 57ba428 commit e6c1c1e
Show file tree
Hide file tree
Showing 93 changed files with 29 additions and 4,139 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
"eslint": "^9.6.0",
"playwright": "^1.44.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"typescript-eslint": "^8.0.0"
},
"packageManager": "pnpm@9.12.1",
Expand Down
11 changes: 5 additions & 6 deletions packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ export interface ActionFailure<T extends Record<string, unknown> | undefined = u
[uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure
}

type UnpackValidationError<T> =
T extends ActionFailure<infer X>
? X
: T extends void
? undefined // needs to be undefined, because void will corrupt union type
: T;
type UnpackValidationError<T> = T extends ActionFailure<infer X>
? X
: T extends void
? undefined // needs to be undefined, because void will corrupt union type
: T;

/**
* This object is passed to the `adapt` function of adapters.
Expand Down
5 changes: 2 additions & 3 deletions packages/kit/src/runtime/server/page/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,8 @@ function get_data(event, options, nodes, csp, global) {
str = devalue.uneval({ id, data, error }, replacer);
}

push(
`<script${csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : ''}>${global}.resolve(${str})</script>\n`
);
const nonce = csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : '';
push(`<script${nonce}>${global}.resolve(${str})</script>\n`);
if (count === 0) done();
}
);
Expand Down
11 changes: 5 additions & 6 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ declare module '@sveltejs/kit' {
[uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure
}

type UnpackValidationError<T> =
T extends ActionFailure<infer X>
? X
: T extends void
? undefined // needs to be undefined, because void will corrupt union type
: T;
type UnpackValidationError<T> = T extends ActionFailure<infer X>
? X
: T extends void
? undefined // needs to be undefined, because void will corrupt union type
: T;

/**
* This object is passed to the `adapt` function of adapters.
Expand Down
1 change: 0 additions & 1 deletion packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"@types/node": "^18.19.48",
"@types/prompts": "^2.4.9",
"@types/semver": "^7.5.6",
"prettier": "^3.1.1",
"svelte": "^4.2.10",
"vitest": "^2.0.1"
},
Expand Down
Loading

0 comments on commit e6c1c1e

Please sign in to comment.