Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
866bb1c
feat: add website-template-svkit-v2-legacy submodule
gamesguru Jan 10, 2026
9fdd7c5
docs: add legacy guides, manuals, and workspace config
gamesguru Jan 10, 2026
f0f7405
ci: add workflow to test legacy template build and deployment
gamesguru Jan 10, 2026
d862a41
fixup! ci: add workflow to test legacy template build and deployment
gamesguru Jan 11, 2026
ca50fbd
chore: add post-receive hook template
gamesguru Jan 11, 2026
b6a41a2
fixup! docs: add legacy guides, manuals, and workspace config
gamesguru Jan 11, 2026
ea528c1
rebase! feat: add website-template-svkit-v2-legacy submodule
gamesguru Jan 11, 2026
ac9275c
rebase! fix(kit): support @vitejs/plugin-legacy multi-output and conf…
gamesguru Jan 11, 2026
66b79fe
fix(ci): disable pkg-pr-new job
gamesguru Jan 11, 2026
5c3ddea
fix(ci): re-enable pkg-pr-new
gamesguru Jan 11, 2026
7ef34e7
chore: bump src/version.js to 2.49.4-rc.0
gamesguru Jan 11, 2026
7b61efe
style: apply prettier formatting to packages/kit
gamesguru Jan 11, 2026
ee52a54
fix: lint errors in legacy tests (floating promises, tsconfig)
gamesguru Jan 11, 2026
07fc2c3
fix: resolve remaining lint errors (escape char, imports)
gamesguru Jan 11, 2026
507a212
fix: revert ci skip and increase test timeout
gamesguru Jan 11, 2026
d875a4e
fix(types): update type generation to use @tg-svelte/kit scope
gamesguru Jan 11, 2026
476beb0
refactor(tests): replace @sveltejs/kit with @tg-svelte/kit in test fi…
gamesguru Jan 11, 2026
812e709
more renames, install/sync lockfile
gamesguru Jan 11, 2026
192c7bb
fix(all): globally replace @sveltejs/kit with @tg-svelte/kit in all p…
gamesguru Jan 11, 2026
9d87e96
fix: add build script to kit and update root build filter
gamesguru Jan 11, 2026
991695b
revert
gamesguru Jan 11, 2026
a302c89
fix(build): include @tg-svelte/* in root build script
gamesguru Jan 11, 2026
25b62e7
fixes?
gamesguru Jan 11, 2026
d327686
fix: resolve regressions in legacy init script generation
gamesguru Jan 11, 2026
6249a33
update name
gamesguru Jan 15, 2026
eec1d35
run:
gamesguru Jan 15, 2026
7b5f200
add sample site to workspace; lockfile updates
gamesguru Jan 15, 2026
93c15e5
rename some back to sveltejs/kit
gamesguru Jan 15, 2026
ff73c7d
hash-bashed-route lib: "@sveltejs/kit": "npm:@tg-svelte/kit@workspace:^"
gamesguru Jan 15, 2026
7d272db
throw another @ts-ignore up on hash-bashed routing
gamesguru Jan 15, 2026
92c07af
silence ts lint warniings in 2 legacy packages
gamesguru Jan 15, 2026
06a560c
Revert "revert"
gamesguru Jan 15, 2026
53b9b3c
adjust hiearchy test for Svelte 5:
gamesguru Jan 15, 2026
9083a4b
remove noisy console log
gamesguru Jan 15, 2026
9b4ffc9
use supported node
gamesguru Jan 15, 2026
bae9cf0
use GitHub submodule (not GitLab)
gamesguru Jan 15, 2026
ea734b5
fixup! use supported node
gamesguru Jan 15, 2026
432c691
fix test
gamesguru Jan 15, 2026
540f06a
idk wip
gamesguru Jan 15, 2026
1eca518
test/lint fixes
gamesguru Jan 16, 2026
bf08c53
fixup! test/lint fixes
gamesguru Jan 16, 2026
713822b
restore toward origin/main (regression to mean)
gamesguru Jan 16, 2026
b3f96e4
add local ci sim script
gamesguru Jan 16, 2026
c562dfe
small fix
gamesguru Jan 16, 2026
2cf805c
restore more stuff for tests/lint
gamesguru Jan 16, 2026
f6df5fa
more ssr/ci stuff?
gamesguru Jan 16, 2026
d63f841
more ssr fixes?
gamesguru Jan 16, 2026
8d59cab
update/fix. track ci failures using script:
gamesguru Jan 16, 2026
ff42982
only run legacy-build-verification on PR or push to main
gamesguru Jan 16, 2026
bdb5d13
fix: resolve embedded regression and ci issues
gamesguru Jan 17, 2026
151d2cb
update ci logging/error counting scripts
gamesguru Jan 17, 2026
6f9f29a
update local testing ci-sim err count scripts
gamesguru Jan 17, 2026
8400fd1
tweak/update ci sim more
gamesguru Jan 17, 2026
1123a67
tweak/update ci sim more
gamesguru Jan 17, 2026
80a1295
update script
gamesguru Jan 17, 2026
ebd0d7f
"ci sim tally csv failure count" script updates
gamesguru Jan 17, 2026
6adcf43
fix: SSRR (server-sided) test and src code
gamesguru Jan 17, 2026
f745878
fixup! "ci sim tally csv failure count" script updates
gamesguru Jan 17, 2026
edbdfb0
squash! fix: SSRR (server-sided) test and src code
gamesguru Jan 17, 2026
4607cfa
fix types
gamesguru Jan 17, 2026
62fe096
lint
gamesguru Jan 17, 2026
7178ef4
fix some failures
gamesguru Jan 17, 2026
07f44e8
allegedly fixed
gamesguru Jan 17, 2026
9893069
fixes
gamesguru Jan 17, 2026
4f8bb01
working
gamesguru Jan 17, 2026
bf8a188
wip maybe fixed
gamesguru Jan 17, 2026
ceac7b7
lint/format
gamesguru Jan 20, 2026
62b9a20
updates/fixes?
gamesguru Jan 20, 2026
c167da0
hydrate fix
gamesguru Jan 20, 2026
1438652
fix: remove debug logs from test setup
gamesguru Jan 25, 2026
ec8236c
fix: enable hydration for embedded apps
gamesguru Jan 25, 2026
196ebf9
fix(vite): correctly populate client manifest for single bundle strategy
gamesguru Jan 25, 2026
f72ea90
fix(kit): correct handling of single bundle strategy in render.js
gamesguru Jan 25, 2026
2457544
fix(kit): support inline bundle strategy via IIFE and restore options…
gamesguru Jan 25, 2026
1369f18
cubic lints
gamesguru Jan 25, 2026
4ac077f
fix: handle single bundle strategy signature in render.js
gamesguru Jan 25, 2026
e5fcab0
fix: inline bundle strategy hydration (IIFE context, global init, kit…
gamesguru Jan 26, 2026
b2942cc
fix: resolve regressions in embed, options-2, and options-3 support
gamesguru Jan 26, 2026
53bcb29
fix: resolve legacy build named register collision
gamesguru Jan 26, 2026
5c443bd
fix(ci): update template submodule with Windows fit
gamesguru Jan 26, 2026
d848f98
fix(test): update legacy-polyfills-loading deps to match workspace
gamesguru Jan 26, 2026
7854984
chore: update lockfile
gamesguru Jan 26, 2026
95e0c28
fix(test): update legacy-polyfills-loading deps and skip modern polyf…
gamesguru Jan 26, 2026
1c0d7b2
fix(test): restore legacy-polyfills-loading with hijack strategy and …
gamesguru Jan 26, 2026
92f6a50
fix(test): use additionalModernPolyfills for custom modern polyfill i…
gamesguru Jan 26, 2026
3d03cbc
fix(ci): upgrade website-template-svkit-v2-legacy to use workspace ca…
gamesguru Jan 26, 2026
15b24b8
chore(ci): update website-template-svkit-v2-legacy submodule (add git…
gamesguru Jan 26, 2026
eeaa383
cubic: resolve ssr context, render duplicates, and embed regex issues
gamesguru Jan 26, 2026
9ba6327
fix(types): ensure consistent RedirectStatus ordering via typedef
gamesguru Jan 26, 2026
9f08439
chore: regenerate types to satisfy CI whitespace strictness
gamesguru Jan 26, 2026
93c58ee
fix: address PR feedback (SSR manifests, strict mode compatibility)
gamesguru Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslint/no-runtime-to-exports-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
schema: [],
messages: {
noRuntimeToExportsImport:
'Relative imports from src/runtime to src/exports are not allowed because they can cause Vite to resolve the same module both via regular Node and internal Vite. Use internal import maps or `@sveltejs/kit/internal` instead.'
'Relative imports from src/runtime to src/exports are not allowed because they can cause Vite to resolve the same module both via regular Node and internal Vite. Use internal import maps or `@tg-svelte/kit/internal` instead.'
}
},

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: audit

on:
schedule:
- cron: "0 5 * * *" # daily 5AM
- cron: '0 5 * * *' # daily 5AM

env:
# not needed for audit
Expand Down
57 changes: 49 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm install --frozen-lockfile ${{ matrix.node-version < 20 && '--config.engine-strict=false' || '' }}
- run: pnpm playwright install ${{ matrix.e2e-browser }}
- run: pnpm run sync-all
- run: pnpm test:kit
Expand All @@ -99,27 +99,27 @@ jobs:
fail-fast: false
matrix:
include:
- node-version: 18
- node-version: 20
os: windows-latest
e2e-browser: 'chromium'
mode: 'dev'
- node-version: 18
- node-version: 20
os: ubuntu-latest
e2e-browser: 'firefox'
mode: 'dev'
- node-version: 18
- node-version: 20
os: macOS-latest
e2e-browser: 'webkit'
mode: 'dev'
- node-version: 18
- node-version: 20
os: windows-latest
e2e-browser: 'chromium'
mode: 'build'
- node-version: 18
- node-version: 20
os: ubuntu-latest
e2e-browser: 'firefox'
mode: 'build'
- node-version: 18
- node-version: 20
os: macOS-latest
e2e-browser: 'webkit'
mode: 'build'
Expand Down Expand Up @@ -230,9 +230,50 @@ jobs:
with:
node-version: ${{matrix.node-version}}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm install --frozen-lockfile ${{ matrix.node-version < 20 && '--config.engine-strict=false' || '' }}
- run: pnpm playwright install chromium
- run: cd packages/kit && pnpm prepublishOnly
- run: pnpm run test:others
env:
NODE_OPTIONS: ${{matrix.node-version == 22 && '--experimental-strip-types' || ''}} # allows loading svelte.config.ts
test-legacy-template:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: pnpm/action-setup@v2
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install Root Dependencies
run: pnpm install

- name: Build/Check Kit
run: |
cd packages/kit
pnpm build
pnpm check

- name: Install Template Dependencies
working-directory: website-template-svkit-v2-legacy
run: |
pnpm install
npx playwright install --with-deps

- name: Sync SvelteKit
working-directory: website-template-svkit-v2-legacy
run: pnpm run prepare

- name: Run E2E Tests (Builds & Previews)
working-directory: website-template-svkit-v2-legacy
run: pnpm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ vite.config.js.timestamp-*
symlink-from
.idea/
_tmp_flaky_test_output.txt

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "website-template-svkit-v2-legacy"]
path = website-template-svkit-v2-legacy
url = https://github.com/gamesguru/website-template-svkit-v2-legacy.git
26 changes: 13 additions & 13 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ pnpm run check

```bash
# Unit tests only (fastest - ~6 seconds)
pnpm -F @sveltejs/kit test:unit
pnpm -F @tg-svelte/kit test:unit

# Run a single unit test file
pnpm -F @sveltejs/kit test:unit:dev path/to/test.spec.js
pnpm -F @tg-svelte/kit test:unit:dev path/to/test.spec.js

# Integration tests (10-30 minutes, set 60+ min timeout)
pnpm test:kit
Expand All @@ -52,22 +52,22 @@ pnpm test:others
1. `pnpm run format` - Auto-format code
2. `pnpm run lint` - Check code style (don't cancel early)
3. `pnpm run check` - Type checking (don't cancel early)
4. `pnpm -F @sveltejs/kit test:unit` - Run unit tests
5. For @sveltejs/kit changes: `pnpm -F @sveltejs/kit prepublishOnly` - Generate types
4. `pnpm -F @tg-svelte/kit test:unit` - Run unit tests
5. For @tg-svelte/kit changes: `pnpm -F @tg-svelte/kit prepublishOnly` - Generate types
6. Run `pnpm changeset` to document changes (prefix with `fix`, `feat`, `breaking`, or `chore`)

## Code Style Examples

The coding style guidelines are in `CONTRIBUTING.md`. Here are additional examples:

### Imports

### Common Imports
```javascript
// JSDoc type imports at the top
/** @import { Handle, RequestEvent } from '@sveltejs/kit' */

// Named imports (no default exports)
import { HttpError, SvelteKitError } from '@sveltejs/kit/internal';
/** @import { Handle, RequestEvent } from '@tg-svelte/kit' */
import { error, redirect, json } from '@tg-svelte/kit';
import { env } from '$env/dynamic/private';
import { building } from '$app/environment';
import { page, navigating, updated } from '$app/stores';
import { HttpError, SvelteKitError } from '@tg-svelte/kit/internal';
```

### Functions
Expand Down Expand Up @@ -145,7 +145,7 @@ const content_type = request.headers.get('content-type')?.split(';', 1)[0];

## Key Packages

- `@sveltejs/kit` - Main framework (`packages/kit/`)
- `@tg-svelte/kit` - Main framework (`packages/kit/`)
- `adapter-*` - Platform adapters (node, cloudflare, netlify, vercel, static, auto)
- `@sveltejs/package` - Package building utilities
- `@sveltejs/enhanced-img` - Enhanced image component
Expand All @@ -155,5 +155,5 @@ const content_type = request.headers.get('content-type')?.split(';', 1)[0];

- **Browser tests fail**: `pnpm playwright install chromium`
- **Build failures**: Ensure `pnpm install --frozen-lockfile` completed
- **Type errors**: Run `pnpm -F @sveltejs/kit prepublishOnly`
- **Type errors**: Run `pnpm -F @tg-svelte/kit prepublishOnly`
- **Lint issues**: Run `pnpm run format` first
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you want to test against an existing project, you can use [pnpm `overrides`](
// ...
"pnpm": {
"overrides": {
"@sveltejs/kit": "link:../path/to/svelte-kit/packages/kit",
"@tg-svelte/kit": "link:../path/to/svelte-kit/packages/kit",
// additionally/optional the adapter you're using
"@sveltejs/adapter-auto": "link:../path/to/svelte-kit/packages/adapter-auto"
}
Expand All @@ -44,7 +44,7 @@ If you want to test against an existing project, you can use [pnpm `overrides`](
Each pull request will be built and published via [pkg.pr.new/](https://pkg.pr.new/). You can test the change by installing the package with your PR number:

```
npm add https://pkg.pr.new/sveltejs/kit/@sveltejs/kit@YOUR_PR_NUMBER_GOES_HERE
npm add https://pkg.pr.new/sveltejs/kit/@tg-svelte/kit@YOUR_PR_NUMBER_GOES_HERE
```

## Code structure
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Web development, streamlined. Read the [documentation](https://svelte.dev/docs/k

### Packages

| Package | Changelog |
| --------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [@sveltejs/kit](packages/kit) | [Changelog](packages/kit/CHANGELOG.md) |
| Package | Link |
| --------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [@tg-svelte/kit](packages/kit) | [Changelog](packages/kit/CHANGELOG.md) |
| [@sveltejs/adapter-auto](packages/adapter-auto) | [Changelog](packages/adapter-auto/CHANGELOG.md) |
| [@sveltejs/adapter-cloudflare](packages/adapter-cloudflare) | [Changelog](packages/adapter-cloudflare/CHANGELOG.md) |
| [@sveltejs/adapter-netlify](packages/adapter-netlify) | [Changelog](packages/adapter-netlify/CHANGELOG.md) |
Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/10-getting-started/30-project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If you added [Playwright](https://playwright.dev/) for browser testing when you

### package.json

Your `package.json` file must include `@sveltejs/kit`, `svelte` and `vite` as `devDependencies`.
Your `package.json` file must include `@tg-svelte/kit`, `svelte` and `vite` as `devDependencies`.

When you create a project with `npx sv create`, you'll also notice that `package.json` includes `"type": "module"`. This means that `.js` files are interpreted as native JavaScript modules with `import` and `export` keywords. Legacy CommonJS files need a `.cjs` file extension.

Expand All @@ -87,7 +87,7 @@ This file (or `jsconfig.json`, if you prefer type-checked `.js` files over `.ts`

### vite.config.js

A SvelteKit project is really just a [Vite](https://vitejs.dev) project that uses the [`@sveltejs/kit/vite`](@sveltejs-kit-vite) plugin, along with any other [Vite configuration](https://vitejs.dev/config/).
A SvelteKit project is really just a [Vite](https://vitejs.dev) project that uses the [`@tg-svelte/kit/vite`](@tg-svelte-kit-vite) plugin, along with any other [Vite configuration](https://vitejs.dev/config/).

## Other files

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/10-getting-started/40-web-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) interf
```js
// @errors: 2461
/// file: src/routes/what-is-my-user-agent/+server.js
import { json } from '@sveltejs/kit';
import { json } from '@tg-svelte/kit';

/** @type {import('./$types').RequestHandler} */
export function GET({ request }) {
Expand All @@ -56,7 +56,7 @@ When dealing with HTML native form submissions you'll be working with [`FormData
```js
// @errors: 2461
/// file: src/routes/hello/+server.js
import { json } from '@sveltejs/kit';
import { json } from '@tg-svelte/kit';

/** @type {import('./$types').RequestHandler} */
export async function POST(event) {
Expand Down
12 changes: 6 additions & 6 deletions documentation/docs/20-core-concepts/10-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Often, a page will need to load some data before it can be rendered. For this, w

```js
/// file: src/routes/blog/[slug]/+page.js
import { error } from '@sveltejs/kit';
import { error } from '@tg-svelte/kit';

/** @type {import('./$types').PageLoad} */
export function load({ params }) {
Expand Down Expand Up @@ -107,7 +107,7 @@ export {};

// @filename: index.js
// ---cut---
import { error } from '@sveltejs/kit';
import { error } from '@tg-svelte/kit';

/** @type {import('./$types').PageServerLoad} */
export async function load({ params }) {
Expand Down Expand Up @@ -283,7 +283,7 @@ For example we could create an `/api/random-number` route with a `GET` handler:

```js
/// file: src/routes/api/random-number/+server.js
import { error } from '@sveltejs/kit';
import { error } from '@tg-svelte/kit';

/** @type {import('./$types').RequestHandler} */
export function GET({ url }) {
Expand All @@ -304,7 +304,7 @@ export function GET({ url }) {

The first argument to `Response` can be a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream), making it possible to stream large amounts of data or create server-sent events (unless deploying to platforms that buffer responses, like AWS Lambda).

You can use the [`error`](@sveltejs-kit#error), [`redirect`](@sveltejs-kit#redirect) and [`json`](@sveltejs-kit#json) methods from `@sveltejs/kit` for convenience (but you don't have to).
You can use the [`error`](@sveltejs-kit#error), [`redirect`](@sveltejs-kit#redirect) and [`json`](@sveltejs-kit#json) methods from `@tg-svelte/kit` for convenience (but you don't have to).

If an error is thrown (either `error(...)` or an unexpected error), the response will be a JSON representation of the error or a fallback error page — which can be customised via `src/error.html` — depending on the `Accept` header. The [`+error.svelte`](#error) component will _not_ be rendered in this case. You can read more about error handling [here](errors).

Expand Down Expand Up @@ -345,7 +345,7 @@ By exporting `POST`/`PUT`/`PATCH`/`DELETE`/`OPTIONS`/`HEAD` handlers, `+server.j

```js
/// file: src/routes/api/add/+server.js
import { json } from '@sveltejs/kit';
import { json } from '@tg-svelte/kit';

/** @type {import('./$types').RequestHandler} */
export async function POST({ request }) {
Expand All @@ -364,7 +364,7 @@ Exporting the `fallback` handler will match any unhandled request methods, inclu

```js
/// file: src/routes/api/add/+server.js
import { json, text } from '@sveltejs/kit';
import { json, text } from '@tg-svelte/kit';

/** @type {import('./$types').RequestHandler} */
export async function POST({ request }) {
Expand Down
10 changes: 5 additions & 5 deletions documentation/docs/20-core-concepts/20-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export async function load({ params, parent }) {

## Errors

If an error is thrown during `load`, the nearest [`+error.svelte`](routing#error) will be rendered. For [_expected_](errors#Expected-errors) errors, use the `error` helper from `@sveltejs/kit` to specify the HTTP status code and an optional message:
If an error is thrown during `load`, the nearest [`+error.svelte`](routing#error) will be rendered. For [_expected_](errors#Expected-errors) errors, use the `error` helper from `@tg-svelte/kit` to specify the HTTP status code and an optional message:

```js
/// file: src/routes/admin/+layout.server.js
Expand All @@ -441,7 +441,7 @@ declare namespace App {

// @filename: index.js
// ---cut---
import { error } from '@sveltejs/kit';
import { error } from '@tg-svelte/kit';

/** @type {import('./$types').LayoutServerLoad} */
export function load({ locals }) {
Expand All @@ -463,7 +463,7 @@ If an [_unexpected_](errors#Unexpected-errors) error is thrown, SvelteKit will i

## Redirects

To redirect users, use the `redirect` helper from `@sveltejs/kit` to specify the location to which they should be redirected alongside a `3xx` status code. Like `error(...)`, calling `redirect(...)` will throw an exception, making it easy to stop execution from inside helper functions.
To redirect users, use the `redirect` helper from `@tg-svelte/kit` to specify the location to which they should be redirected alongside a `3xx` status code. Like `error(...)`, calling `redirect(...)` will throw an exception, making it easy to stop execution from inside helper functions.

```js
/// file: src/routes/user/+layout.server.js
Expand All @@ -478,7 +478,7 @@ declare namespace App {

// @filename: index.js
// ---cut---
import { redirect } from '@sveltejs/kit';
import { redirect } from '@tg-svelte/kit';

/** @type {import('./$types').LayoutServerLoad} */
export function load({ locals }) {
Expand Down Expand Up @@ -734,7 +734,7 @@ declare namespace App {

// @filename: index.ts
// ---cut---
import { redirect } from '@sveltejs/kit';
import { redirect } from '@tg-svelte/kit';
import { getRequestEvent } from '$app/server';

export function requireLogin() {
Expand Down
8 changes: 4 additions & 4 deletions documentation/docs/20-core-concepts/30-form-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ declare module '$lib/server/db';

// @filename: index.js
// ---cut---
+++import { fail } from '@sveltejs/kit';+++
+++import { fail } from '@tg-svelte/kit';+++
import * as db from '$lib/server/db';

/** @satisfies {import('./$types').Actions} */
Expand Down Expand Up @@ -236,7 +236,7 @@ declare module '$lib/server/db';

// @filename: index.js
// ---cut---
import { fail, +++redirect+++ } from '@sveltejs/kit';
import { fail, +++redirect+++ } from '@tg-svelte/kit';
import * as db from '$lib/server/db';

/** @satisfies {import('./$types').Actions} */
Expand Down Expand Up @@ -297,7 +297,7 @@ export {};

// @filename: index.js
// ---cut---
/** @type {import('@sveltejs/kit').Handle} */
/** @type {import('@tg-svelte/kit').Handle} */
export async function handle({ event, resolve }) {
event.locals.user = await getUser(event.cookies.get('sessionid'));
return resolve(event);
Expand Down Expand Up @@ -447,7 +447,7 @@ We can also implement progressive enhancement ourselves, without `use:enhance`,
body: data
});

/** @type {import('@sveltejs/kit').ActionResult} */
/** @type {import('@tg-svelte/kit').ActionResult} */
const result = deserialize(await response.text());

if (result.type === 'success') {
Expand Down
Loading
Loading