Upgrading
From 1.0 on, ktor-svelte follows semantic versioning: only a major release can break your build, and patch releases only fix bugs. Before 1.0, a minor release such as 0.8.0 to 0.9.0 could change behaviour. Each release that changes what your app does, or what you need to write, has a guide with the steps to adopt it. The changelog links each release to its guide.
To upgrade across several releases, follow the guides in order.
| Release | What changes for you |
|---|---|
| 1.0 | Enum constants use one casing, the deprecated SvelteSecurityHeaders alias is removed, and configuration classes lose their public constructors |
| 0.11 | Generated Kotlin moves to io.github.nijasc.ktorsvelte, and apps serve a generated sitemap.xml and robots.txt |
| 0.10 | publicConfig is inlined into pages, API responses carry a build header, and svelteDevAll opens the browser |
| 0.9 | Wrong methods on pages answer 405, JSON request bodies have a nesting limit, and every request gets an X-Request-Id |
| 0.8 | API responses of 1 KiB or more are compressed |
| 0.7 | API writes are rate limited per client |
| 0.6 | Security headers, a strict Content-Security-Policy, an origin check and a body size limit |
Releases before 0.6 only added features, so they need no steps.
Bump the version
The Gradle plugin adds the matching runtime library for you, so one version change upgrades both:
plugins {
id("io.github.nijasc.ktor-svelte") version "<new version>"
}If you set addRuntimeDependency = false and declare ktor-svelte-server yourself, bump it to the same version. Then run ./gradlew svelteSync once, because generated files and frontend library setup can change between releases. If your app uses generateTs, also run ./gradlew svelteGenerateTs and commit the result, because the generated client can change too. Until you do, check stops at svelteVerifyTs and names the files that are out of date.
Afterwards, ./gradlew svelteConfig shows every setting with its new default and suggests what to turn on, so you notice new options. See Review your configuration.