Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sveltejs/kit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @sveltejs/kit@2.20.0
Choose a base ref
...
head repository: sveltejs/kit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @sveltejs/kit@2.20.1
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 18, 2025

  1. fix: avoid using top-level await (#13607)

    Conduitry authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    da8b5dc View commit details
  2. Version Packages (#13608)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    55cc232 View commit details
Showing with 15 additions and 10 deletions.
  1. +6 −0 packages/kit/CHANGELOG.md
  2. +1 −1 packages/kit/package.json
  3. +7 −8 packages/kit/src/runtime/app/server/event.js
  4. +1 −1 packages/kit/src/version.js
6 changes: 6 additions & 0 deletions packages/kit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @sveltejs/kit

## 2.20.1
### Patch Changes


- fix: avoid using top-level await ([#13607](https://github.com/sveltejs/kit/pull/13607))

## 2.20.0
### Minor Changes

2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sveltejs/kit",
"version": "2.20.0",
"version": "2.20.1",
"description": "SvelteKit is the fastest way to build Svelte apps",
"keywords": [
"framework",
15 changes: 7 additions & 8 deletions packages/kit/src/runtime/app/server/event.js
Original file line number Diff line number Diff line change
@@ -6,14 +6,13 @@ let request_event = null;
/** @type {import('node:async_hooks').AsyncLocalStorage<RequestEvent | null>} */
let als;

try {
const hooks = await import('node:async_hooks');
als = new hooks.AsyncLocalStorage();
} catch {
// can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
// this isn't behind `supports` because it's basically just StackBlitz (i.e.
// in-browser usage) that doesn't support it AFAICT
}
import('node:async_hooks')
.then((hooks) => (als = new hooks.AsyncLocalStorage()))
.catch(() => {
// can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
// this isn't behind `supports` because it's basically just StackBlitz (i.e.
// in-browser usage) that doesn't support it AFAICT
});

/**
* Returns the current `RequestEvent`. Can be used inside `handle`, `load` and actions (and functions called by them).
2 changes: 1 addition & 1 deletion packages/kit/src/version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated during release, do not modify

/** @type {string} */
export const VERSION = '2.20.0';
export const VERSION = '2.20.1';