Skip to content

feat: explicit environment variables#15934

Merged
Rich-Harris merged 77 commits into
mainfrom
explicit-env-vars
Jun 2, 2026
Merged

feat: explicit environment variables#15934
Rich-Harris merged 77 commits into
mainfrom
explicit-env-vars

Conversation

@Rich-Harris

@Rich-Harris Rich-Harris commented May 31, 2026

Copy link
Copy Markdown
Member

Today, environment variables are implicitly available: anything in process.env can be imported directly (as long as the name is a valid identifier) from $env/static/private, or accessed via env imported from $env/dynamic/private. Environment variables beginning with publicPrefix are available from the public counterparts.

This is... fine, but there is some room for improvement:

  • You get random auto-import suggestions — if I type H to begin importing Header.svelte, my editor will helpfully suggest that I meant HOMEBREW_CELLAR or something else improbable
  • There's inconsistency between static (named imports) and dynamic (env.BLAH), which feels weird. If for some reason you use both $env/dynamic/public and $env/dynamic/private in the same module, you will need to rename them since you can't have two imports called env
  • It's weird that you can reference a given env var both statically (inlined into the build) and dynamically (evaluated at runtime)
  • There's a lot of modules!
  • There's no central place that describes which environment variables are expected
  • No validation — if a critical env var is missing or malformed, you might not find out until you start seeing errors in your production logs
  • No type safety or inline documentation. Everything is just a string whose purpose you have to infer from the name

This PR presents an explicit alternative. Opt in by adding the following flag to your svelte.config.js...

export default {
  kit: {
    experimental: {
      explicitEnvironmentVariables: true
    }
  }
};

...and creating a src/env.ts (or src/env.js) that exports variables:

import { defineEnvVars } from '@sveltejs/kit/hooks';
import * as v from 'valibot';

export const variables = defineEnvVars({
  // by default, env vars are a) secret, b) evaluated when the app starts, and c) required
  POSTGRES_URL: {},

  // some environment variables are safe to be used in the client
  GOOGLE_ANALYTICS_ID: {
    public: true,

    // env vars can be validated, using any https://standardschema.dev library
    // (here, we're using https://valibot.dev)
    schema: v.pipe(v.string(), v.regex(/G-[A-Z0-9]+/))
  },

  // some can be evaluated at build time, meaning they can be used for dead code elimination
  SHOW_DEBUGGING_OVERLAY: {
    public: true,
    static: true,

    // if a description is provided, it will be visible when the imported variable is hovered
    description: 'If enabled, will show a FPS meter in the corner of the page',

    // validators can transform inputs, e.g. to a boolean
    schema: v.pipe(
      v.optional(v.string(), ''),
      v.transform((str) => str !== '')
    )
  }
});

The defineEnvVars helper just returns its argument, but is useful as it enforces the correct types (and provides autocomplete, etc). I'm tempted to add similar helpers for other hooks, though that's a conversation for another time.

With those variables defined, we can import them via two new modules — $app/env/private and $app/env/public. As with existing server-only modules, $app/env/private cannot be imported into code that can run in the client.

Types are inferred from validators, where provided, and inline documentation is attached to the variables:

image

If environment variables are missing, the app errors on startup (or build, for static env vars).

The validators (and indeed the entire src/env module) only ever run on the server. Public variables are sent to the client with the initial server rendered HTML, or (if the initial document is prerendered) by importing a generated module, the same as happens today.

The $app/environment module is aliased as $app/env, to make everything feel a bit more cohesive. The goal is to remove $app/environment and the four $env/* modules (and the associated configuration) in SvelteKit 3.

TODO:

  • generateEnvModule for adapter-static
  • Populate %sveltekit.env% with this rather than the existing env vars, where appropriate
  • I just realised that public static vars don't work as advertised right now — need to fix that
  • Don't bother sending static vars from the server to the client
  • Make the docs nice

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@antony

antony commented Jun 2, 2026

Copy link
Copy Markdown
Member

Hi! I would change validate to schema (or maybe parse), as validate naively implies being a (val: string) => boolean predicate

Ah yes - this solves my concerns around validate parsing/coercing too. Nice :)

@Rich-Harris

Copy link
Copy Markdown
Member Author

@f-elix still not completely sure I understand — for the Vercel example, if you need env vars locally you don't need to manage anything yourself you can just do vc env pull, and if building/running on the platform they're just... there, so using vercel.environment.getSharedEnvVar (is that a real API? not familiar) seems unnecessary.

For the 1Password example, what's the advantage of calling the CLI from inside src/env.ts rather than in the pnpm dev/pnpm build command?

As for loadEnv, you'd miss out on the ability to configure the variable with public, static, etc.

Having said all that: if you do need to load variables directly inside src/env.ts then schema already gives you that flexibility. The one missing piece is that we currently disallow async schemas, but I actually don't think there'd be any problem allowing them:

import { defineEnvVars } from '@sveltejs/kit/hooks';
import * as v from 'valibot';
import { execSync } from 'child_process';

const mode = import.meta.env.MODE;
const value = (v: string | Promise<string>) => v.pipeAsync(v.unknown(), v.transformAsync(() => v));

export const variables = defineEnvVars({
  POSTGRES_URL: {
    // Could be a static value
    schema: value('postgresql://...'),
    // Can be derived from import.meta.env.MODE
    schema: value(mode === 'production' ? 'postgresql://...' : 'local-db-url')
    // The value can be async, so we can fetch the value from somewhere else
    schema: value(vercel.environment.getSharedEnvVar({
       id: "<id>",
       teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
       slug: "my-team-url-slug",
     }));
    // The 1Password CLI could be used like this, but it could be any CLI
    schema: value(execSync(`op read op://${mode}/postgresurl`))
  },
});

We should probably also expose $app/env (and $lib etc) so that you can import dev, making import.meta.env.MODE unnecessary.

It's also straightforward to configure (or, if desired) load things in bulk if necessary:

import { defineEnvVars } from '@sveltejs/kit/hooks';
import { systemEnvVars } from '@sveltejs/adapter-vercel/env'; // hypothetical!
import { load1PasswordEnvironment } from '$lib/server/1password';
import { dev } from '$app/env';

export const variables = defineEnvVars({
  ...systemEnvVars(), // VERCEL_URL etc
  ...load1PasswordEnvironment(dev ? 'development' : 'production'),
  MY_OTHER_STUFF: {...}
});

@Rich-Harris

Copy link
Copy Markdown
Member Author

Actually I take it back, we can't allow async validators right now as that would force generateEnvModule to be async which would be a breaking change (albeit a relative minor one). Should be possible in v3 though.

In the meantime you can of course await directly in src/env:

-schema: value(vercel.environment.getSharedEnvVar({
+schema: value(await vercel.environment.getSharedEnvVar({

@f-elix

f-elix commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Oh I see. I only saw schema as way to validate the value, not populate the variable, but you're right. Its actually much better.

To answer your question regarding calling a CLI or an SDK from env.ts (doesn't have to be Vercel, could be anything), its imo a cleaner and more flexible way than to hardcode that in a package.json script. You could have multiple environments (production, staging, tests, local dev, etc.) with different values, and that would become very messy to handle in package.json. In any case, I think schema gives me the flexibility I need for this.

I also wasn't clear with my loadEnv idea. That function would live next to defineEnvVars, its not meant to replace it. I saw defineEnvVars as a way to define a schema, and loadEnv as an alternative way to provide the values without needing local .env files.

So you can forget my first suggestion (the value property), schema already takes care of that. As for loadEnv, it would be a convenience function. I could for sure create a module, fetch my env vars, transform that into the defineEnvVars input and spread it like in your example, but it'd be nice if I didn't have to :).

Does that make more sense to you?

@Rich-Harris

Copy link
Copy Markdown
Member Author

What would loadEnv do exactly?

@f-elix

f-elix commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

I think I explained this poorly.

What I had in mind is a function that returns dotenv file contents as a string, e.g. FOO=bar\nPUBLIC_X=y. SvelteKit would then parse that exactly like an .env file, validate it against the defineEnvVars schema and feed the resulting values into the $env/* modules.

That loader determines where the dotenv contents come from. The schema remains the source of truth for what variables exist, whether they are public/private/static, docs, validation, etc.

The reason this seems useful to me is that it keeps src/env.ts as the central place where env is declared, while still allowing the raw values to come from userland tooling rather than package scripts or shared env files.

I’m not sure whether this belongs in core, especially since there are details around precedence, async loading, build-time vs runtime behavior, and whether it should mutate process.env. But that was the shape I meant. loadEnv is probably also the wrong name — it would be more like defineEnvSource, loadDotenv, or something along those lines.

@Rich-Harris

Copy link
Copy Markdown
Member Author

Ah, I think I understand — so basically this, without the pointlessly hard-coded string?

export const variables = defineEnvVars({
  FOO: {...},
  BAR: {...}
});

export const load = async () => `
  FOO=123
  BAR=456
`;

I think it's a candidate for a future addition, though probably not part of this PR

@f-elix

f-elix commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Yes exactly! But yeah agreed that its out of scope for this PR. Really looking forward to this one :)

@Rich-Harris Rich-Harris merged commit 0dc0548 into main Jun 2, 2026
29 checks passed
@Rich-Harris Rich-Harris deleted the explicit-env-vars branch June 2, 2026 23:37
@github-actions github-actions Bot mentioned this pull request Jun 2, 2026
@Rich-Harris Rich-Harris mentioned this pull request Jun 3, 2026
6 tasks
Rich-Harris pushed a commit that referenced this pull request Jun 4, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @sveltejs/kit@2.63.0

### Minor Changes


- feat: explicit env vars
([#15934](#15934))


### Patch Changes


- fix: remove check for svelte.config.js before running `sync`
([#15946](#15946))


- fix: generate a placeholder tsconfig.json to squelch sync-time
warnings ([#15948](#15948))


- fix: allow use of `$app/env/public` in service workers
([#15950](#15950))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@BCsabaEngine

Copy link
Copy Markdown
Contributor

Great! It works with zod4 too.

Rich-Harris pushed a commit that referenced this pull request Jun 5, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-3, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`version-3` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `version-3`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @sveltejs/adapter-auto@8.0.0-next.0

### Major Changes


- breaking: require SvelteKit 3
([#15506](#15506))


### Patch Changes

- Updated dependencies
[[`fa335bd`](fa335bd),
[`3031d89`](3031d89),
[`cb9d416`](cb9d416),
[`caf3a18`](caf3a18),
[`4777827`](4777827),
[`a2792e2`](a2792e2),
[`ba36148`](ba36148),
[`48e8710`](48e8710),
[`e2f3075`](e2f3075),
[`047d6a0`](047d6a0),
[`87603d1`](87603d1),
[`096962c`](096962c),
[`d545970`](d545970),
[`e2f3075`](e2f3075),
[`d06affc`](d06affc),
[`8af47eb`](8af47eb),
[`e2f3075`](e2f3075),
[`5c4d130`](5c4d130),
[`3f11f35`](3f11f35),
[`caf3a18`](caf3a18),
[`8823037`](8823037),
[`1d76212`](1d76212),
[`0dc0548`](0dc0548),
[`00d81fa`](00d81fa)]:
  - @sveltejs/kit@3.0.0-next.0
## @sveltejs/adapter-cloudflare@8.0.0-next.0

### Major Changes


- breaking: upgrade `@cloudflare/workers-types` to 4.20260219.0
([#15347](#15347))


- breaking: upgrade minimum `wrangler` version to ^4.67.0
([#15347](#15347))


- breaking: remove `platform.context` in favour of `platform.ctx`
([#15347](#15347))


- breaking: require SvelteKit 3
([#15506](#15506))


### Patch Changes


- chore: check the `WORKERS_CI` environment variable to determine if
we're building for Cloudflare Workers
([#13733](#13733))

- Updated dependencies
[[`fa335bd`](fa335bd),
[`3031d89`](3031d89),
[`cb9d416`](cb9d416),
[`caf3a18`](caf3a18),
[`4777827`](4777827),
[`a2792e2`](a2792e2),
[`ba36148`](ba36148),
[`48e8710`](48e8710),
[`e2f3075`](e2f3075),
[`047d6a0`](047d6a0),
[`87603d1`](87603d1),
[`096962c`](096962c),
[`d545970`](d545970),
[`e2f3075`](e2f3075),
[`d06affc`](d06affc),
[`8af47eb`](8af47eb),
[`e2f3075`](e2f3075),
[`5c4d130`](5c4d130),
[`3f11f35`](3f11f35),
[`caf3a18`](caf3a18),
[`8823037`](8823037),
[`1d76212`](1d76212),
[`0dc0548`](0dc0548),
[`00d81fa`](00d81fa)]:
  - @sveltejs/kit@3.0.0-next.0
## @sveltejs/adapter-netlify@7.0.0-next.0

### Major Changes


- chore: use `rolldown` for edge function bundling
([#15432](#15432))


- breaking: write output that conforms to the stable [Netlify Frameworks
API](https://docs.netlify.com/build/frameworks/frameworks-api/).
([#15294](#15294))
  
Deploying and previewing with Netlify CLI now requires
[v17.31.0](https://github.com/netlify/cli/releases/tag/v17.31.0) or
later. Run `npm i -g netlify-cli@latest` to upgrade.

- breaking: require SvelteKit 3
([#15506](#15506))


- breaking: edge function build target is now `es2022`
([#15432](#15432))


### Patch Changes

- Updated dependencies
[[`fa335bd`](fa335bd),
[`3031d89`](3031d89),
[`cb9d416`](cb9d416),
[`caf3a18`](caf3a18),
[`4777827`](4777827),
[`a2792e2`](a2792e2),
[`ba36148`](ba36148),
[`48e8710`](48e8710),
[`e2f3075`](e2f3075),
[`047d6a0`](047d6a0),
[`87603d1`](87603d1),
[`096962c`](096962c),
[`d545970`](d545970),
[`e2f3075`](e2f3075),
[`d06affc`](d06affc),
[`8af47eb`](8af47eb),
[`e2f3075`](e2f3075),
[`5c4d130`](5c4d130),
[`3f11f35`](3f11f35),
[`caf3a18`](caf3a18),
[`8823037`](8823037),
[`1d76212`](1d76212),
[`0dc0548`](0dc0548),
[`00d81fa`](00d81fa)]:
  - @sveltejs/kit@3.0.0-next.0
## @sveltejs/adapter-node@6.0.0-next.0

### Major Changes


- chore: migrate from rollup to rolldown
([#15297](#15297))


- breaking: require SvelteKit 3
([#15506](#15506))


### Patch Changes

- Updated dependencies
[[`fa335bd`](fa335bd),
[`3031d89`](3031d89),
[`cb9d416`](cb9d416),
[`caf3a18`](caf3a18),
[`4777827`](4777827),
[`a2792e2`](a2792e2),
[`ba36148`](ba36148),
[`48e8710`](48e8710),
[`e2f3075`](e2f3075),
[`047d6a0`](047d6a0),
[`87603d1`](87603d1),
[`096962c`](096962c),
[`d545970`](d545970),
[`e2f3075`](e2f3075),
[`d06affc`](d06affc),
[`8af47eb`](8af47eb),
[`e2f3075`](e2f3075),
[`5c4d130`](5c4d130),
[`3f11f35`](3f11f35),
[`caf3a18`](caf3a18),
[`8823037`](8823037),
[`1d76212`](1d76212),
[`0dc0548`](0dc0548),
[`00d81fa`](00d81fa)]:
  - @sveltejs/kit@3.0.0-next.0
## @sveltejs/adapter-static@4.0.0-next.0

### Major Changes


- breaking: require SvelteKit 3
([#15506](#15506))


### Patch Changes

- Updated dependencies
[[`fa335bd`](fa335bd),
[`3031d89`](3031d89),
[`cb9d416`](cb9d416),
[`caf3a18`](caf3a18),
[`4777827`](4777827),
[`a2792e2`](a2792e2),
[`ba36148`](ba36148),
[`48e8710`](48e8710),
[`e2f3075`](e2f3075),
[`047d6a0`](047d6a0),
[`87603d1`](87603d1),
[`096962c`](096962c),
[`d545970`](d545970),
[`e2f3075`](e2f3075),
[`d06affc`](d06affc),
[`8af47eb`](8af47eb),
[`e2f3075`](e2f3075),
[`5c4d130`](5c4d130),
[`3f11f35`](3f11f35),
[`caf3a18`](caf3a18),
[`8823037`](8823037),
[`1d76212`](1d76212),
[`0dc0548`](0dc0548),
[`00d81fa`](00d81fa)]:
  - @sveltejs/kit@3.0.0-next.0
## @sveltejs/adapter-vercel@7.0.0-next.0

### Major Changes


- chore: use `rolldown` for edge function bundling
([#15432](#15432))


- breaking: edge function build target is now `es2022`
([#15432](#15432))


### Patch Changes

- Updated dependencies
[[`fa335bd`](fa335bd),
[`3031d89`](3031d89),
[`cb9d416`](cb9d416),
[`caf3a18`](caf3a18),
[`4777827`](4777827),
[`a2792e2`](a2792e2),
[`ba36148`](ba36148),
[`48e8710`](48e8710),
[`e2f3075`](e2f3075),
[`047d6a0`](047d6a0),
[`87603d1`](87603d1),
[`096962c`](096962c),
[`d545970`](d545970),
[`e2f3075`](e2f3075),
[`d06affc`](d06affc),
[`8af47eb`](8af47eb),
[`e2f3075`](e2f3075),
[`5c4d130`](5c4d130),
[`3f11f35`](3f11f35),
[`caf3a18`](caf3a18),
[`8823037`](8823037),
[`1d76212`](1d76212),
[`0dc0548`](0dc0548),
[`00d81fa`](00d81fa)]:
  - @sveltejs/kit@3.0.0-next.0
## @sveltejs/enhanced-img@1.0.0-next.0

### Major Changes


- breaking: require Node 22 or newer
([#12548](#12548))


### Minor Changes


- breaking: require Vite 8 and `vite-plugin-svelte` 7
([#15542](#15542))
## @sveltejs/kit@3.0.0-next.0

### Major Changes


- breaking: TypeScript 6 is now the minimum required version
([#15930](#15930))


- breaking: upgrade to cookie v1. Cookie names must now contain only
ASCII characters ([#13386](#13386))


- breaking: require Node 22 or newer
([#12548](#12548))


- breaking: remove the `preloadStrategy` option. `modulepreload` will
always be used ([#15256](#15256))


- breaking: default the cookie `path` option to `'/'`
([#15398](#15398))


- breaking: remove `@sveltejs/kit/node/polyfills`
([#15430](#15430))


- breaking: add `config.kit.output.linkHeaderPreload` to preload using
the `Link` header ([#15939](#15939))


- breaking: require `@sveltejs/vite-plugin-svelte` v7
([#15371](#15371))


- breaking: remove `createEntries` from the `Builder` object passed to
adapter functions ([#15509](#15509))


- breaking: remove the deprecated CSRF `checkOrigin` option in favor of
`trustedOrigins` ([#15437](#15437))


- breaking: the `delta` property now only exists for `popstate`
navigation events ([#15522](#15522))


- breaking: remove deprecated `pragma` header in version polling for
improved CORS support
([#15428](#15428))


- breaking: require Svelte 5.48.0 or newer
([#15371](#15371))


- chore: change `error`, `isHttpError`, `redirect`, and `isRedirect` to
refer to public type instead of internal class
([#15250](#15250))


- breaking: require Vite 8. Provides new functionality even for existing
Vite 8 users such as faster builds with Vite hook filters and more
powerful SvelteKit adapters with the Vite environment API
([#15371](#15371))


- breaking: remove `data-sveltekit-*` option `'off'` in favour of
`false` ([#15907](#15907))


### Minor Changes


- feat: resolve paths using the Vite config `root` option instead of
`process.cwd()` to better support monorepo configurations such as Vitest
workspaces ([#15469](#15469))


- chore: deprecate `Response` helpers in favor of platform-provided
alternatives ([#15448](#15448))


- feat: explicit env vars
([#15934](#15934))


### Patch Changes


- fix: remove check for svelte.config.js before running `sync`
([#15946](#15946))


- fix: generate a placeholder tsconfig.json to squelch sync-time
warnings ([#15948](#15948))


- chore: remove dependency on kleur
([#12548](#12548))


- chore: remove dependency on `set-cookie-parser`
([#15384](#15384))


- fix: allow use of `$app/env/public` in service workers
([#15950](#15950))
## @sveltejs/package@3.0.0-next.0

### Major Changes


- breaking: require Node 22 or newer
([#12548](#12548))


### Patch Changes


- chore: remove dependency on kleur
([#12548](#12548))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@teemingc teemingc linked an issue Jun 6, 2026 that may be closed by this pull request
teemingc added a commit that referenced this pull request Jun 7, 2026
…vars (#15971)

When `experimental.explicitEnvironmentVariables` is enabled,
`$app/environment` throws and apps import from `$app/env` instead.
`$app/env` re-exports `version` from `internal.js` (`export const
version = __SVELTEKIT_APP_VERSION__`), but unlike `$app/environment` it
never references `import.meta.hot`, so Vite doesn't force its client to
load. If `$app/env` is imported before the Vite client has loaded,
`version` evaluates while the define is missing and the browser throws:

```
ReferenceError: __SVELTEKIT_APP_VERSION__ is not defined
```

This happens when `$app/env` is imported early, e.g. from
`hooks.client.js`. Importing it from a route component is too late to
hit it, since the client is already up by then, which is why it's
intermittent. I ran into it in a real app after enabling
`experimental.explicitEnvironmentVariables`.

It came in with #15934, which moved `version` onto the
`__SVELTEKIT_APP_VERSION__` define and added `import.meta.hot` to
`$app/environment`, but not to the newly split `$app/env`.

The fix mirrors `$app/environment`. I left that file's `import.meta.hot`
in place to keep this minimal, though it's now redundant with this one.

Added a regression test in `options-2`: an early `$app/env` import in
`hooks.client.js` plus a load of the page. It fails on `main` (the app
never finishes hydrating) and passes with this change.

---

### Please don't delete this checklist! Before submitting the PR, please
make sure you do the following:
- [ ] It's really useful if your PR references an issue where it is
discussed ahead of time. In many cases, features are absent for a
reason. For large changes, please create an RFC:
https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it
solves.
- [x] Ideally, include a test that fails without this PR but passes with
it.

### Tests
- [x] Run the tests with `pnpm test` and lint the project with `pnpm
lint` and `pnpm check`

### Changesets
- [x] If your PR makes a change that should be noted in one or more
packages' changelogs, generate a changeset by running `pnpm changeset`
and following the prompts. Changesets that add features should be
`minor` and those that fix bugs should be `patch`. Please prefix
changeset messages with `feat:`, `fix:`, or `chore:`.

### Edits

- [x] Please ensure that 'Allow edits from maintainers' is checked. PRs
without this option may be closed.

---------

Co-authored-by: Tee Ming Chew <chewteeming01@gmail.com>
Rich-Harris pushed a commit that referenced this pull request Jun 7, 2026
<!-- Explain the goal of the PR, why it is needed, and what has been
changed to achieve that goal -->

#15934 was created before Kit 2.62 got released, thus its docs updates
naturally indicated 2.62 as a target version. However, 2.62 got released
before merging this PR (or not including it). As a result, the "since
version" is erroneous.

This PR fixes this by bumping the numbers everywhere the original PR set
them to 2.63, which actually includes the change.

---

### Please don't delete this checklist! Before submitting the PR, please
make sure you do the following:
- [ ] It's really useful if your PR references an issue where it is
discussed ahead of time. In many cases, features are absent for a
reason. For large changes, please create an RFC:
https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it
solves.
- [ ] Ideally, include a test that fails without this PR but passes with
it.

### Tests
- [ ] Run the tests with `pnpm test` and lint the project with `pnpm
lint` and `pnpm check`

### Changesets
- [ ] If your PR makes a change that should be noted in one or more
packages' changelogs, generate a changeset by running `pnpm changeset`
and following the prompts. Changesets that add features should be
`minor` and those that fix bugs should be `patch`. Please prefix
changeset messages with `feat:`, `fix:`, or `chore:`.

### Edits

- [x] Please ensure that 'Allow edits from maintainers' is checked. PRs
without this option may be closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object with both private and public env vars