Skip to content
Open
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
2 changes: 1 addition & 1 deletion example/svelte-kit/jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"extends": "$app/tsconfig",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
Expand Down
5 changes: 3 additions & 2 deletions example/svelte-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"@exceptionless/browser": "3.0.0-dev"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^7.0.1",
"@sveltejs/kit": "^2.70.3",
"@sveltejs/adapter-auto": "^8.0.0",
"@sveltejs/kit": "^3.1.0",
Comment on lines +16 to +17

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Document the SvelteKit 3 setup in the README and SDK skill

This migration changes framework setup and the error-hook contract, but neither example/svelte-kit/README.md nor .agents/skills/exceptionless-javascript/ is updated. Document the SvelteKit 3 requirements and integration changes, including the Vite-based adapter configuration and new hook imports, so developers and agents have guidance matching this example. AGENTS.md explicitly requires relevant documentation and SDK skill updates in the same change when framework setup changes.

AGENTS.md reference: AGENTS.md:L56-L56

Useful? React with 👍 / 👎.

"@sveltejs/vite-plugin-svelte": "^7.3.1",
"cookie": "^2.0.1",
"svelte": "^5.57.1",
"svelte-check": "^4.7.6",
"typescript": "^6.0.3",
Expand Down
16 changes: 9 additions & 7 deletions example/svelte-kit/src/hooks.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ Exceptionless.startup((c) => {
c.defaultTags.push("Example", "svelte-kit", "client");
});

/** @type {import('@sveltejs/kit').HandleClientError} */
export async function handleError({ error, event, message, status }) {
console.warn({ error, event, message, source: "client error handler", status });
await Exceptionless.createException(toError(error ?? message))
.setProperty("status", status)
.submit();
}
/** @type {import('@sveltejs/kit/hooks').HandleClientError} */
export const handleError = async ({ error, event, kind }) => {
console.warn({ error, event, kind, source: "client error handler" });
const builder = Exceptionless.createException(toError(error));
if (kind !== "unknown" && error.status != null) {
builder.setProperty("status", error.status);
}
await builder.submit();
};
6 changes: 3 additions & 3 deletions example/svelte-kit/src/hooks.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Exceptionless.startup((c) => {
c.defaultTags.push("Example", "svelte-kit", "server");
});

/** @type {import("@sveltejs/kit").HandleServerError} */
export async function handleError({ error, event }) {
/** @type {import("@sveltejs/kit/hooks").HandleServerError} */
export const handleError = async ({ error, event }) => {
console.log("server error handler");
await Exceptionless.submitException(toError(error));
}
};
10 changes: 0 additions & 10 deletions example/svelte-kit/svelte.config.js

This file was deleted.

3 changes: 2 additions & 1 deletion example/svelte-kit/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import adapter from "@sveltejs/adapter-auto";
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [sveltekit()]
plugins: [sveltekit({ adapter: adapter() })]
});
109 changes: 60 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
"fsevents@2.3.3": false
},
"overrides": {
"@sveltejs/kit": {
"cookie": "0.7.2"
},
"xcode": {
"uuid": "11.1.1"
}
Expand Down
Loading