@sveltejs/kit 2.69.1 → 2.69.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "2.69.1",
3
+ "version": "2.69.2",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -482,6 +482,23 @@ async function kit({ svelte_config }) {
482
482
  ];
483
483
  }
484
484
 
485
+ // Vite's `define` is a compile-time text replacement, but Vitest strips
486
+ // user `define` from the server config and reinstalls the values only as
487
+ // `globalThis` properties inside test workers, so anything
488
+ // that runs outside of a test will freak out over
489
+ // them not being defined
490
+ if (process.env.VITEST === 'true') {
491
+ for (const key in new_config.define) {
492
+ const value = new_config.define[key];
493
+ try {
494
+ /** @type {Record<string, any>} */ (globalThis)[key] = JSON.parse(value);
495
+ } catch {
496
+ // `kit_global` isn't JSON, so don't try to parse it. We may one day
497
+ // need to define it in Vitest somehow but for now, ignore it
498
+ }
499
+ }
500
+ }
501
+
485
502
  warn_overridden_config(config, new_config);
486
503
 
487
504
  return new_config;
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.69.1';
4
+ export const VERSION = '2.69.2';