@nuxt/schema-nightly 4.4.0-29532553.297e4e52 → 4.4.0-29533707.0a5a5c19

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/dist/index.d.mts CHANGED
@@ -2123,6 +2123,23 @@ interface ConfigSchema {
2123
2123
  useAsyncData: {
2124
2124
  deep: boolean;
2125
2125
  };
2126
+ /**
2127
+ * Options that apply to `useState` and `clearNuxtState`.
2128
+ * @default { resetOnClear: false }
2129
+ * @default { resetOnClear: true } with compatibilityVersion >= 5
2130
+ */
2131
+ useState: {
2132
+ /**
2133
+ * When `true`, `clearNuxtState` will reset state to its initial value (provided by the `init`
2134
+ * function of `useState`) instead of setting it to `undefined`.
2135
+ *
2136
+ * This aligns `clearNuxtState` behavior with `clearNuxtData`, which already resets to defaults.
2137
+ *
2138
+ * @default false
2139
+ * @default true with compatibilityVersion >= 5
2140
+ */
2141
+ resetOnClear: boolean;
2142
+ };
2126
2143
  useFetch: Pick<FetchOptions, "timeout" | "retry" | "retryDelay" | "retryStatusCodes">;
2127
2144
  };
2128
2145
  /**
package/dist/index.mjs CHANGED
@@ -598,6 +598,9 @@ var experimental_default = defineResolvers({
598
598
  prefetchOn: { visibility: true }
599
599
  },
600
600
  useAsyncData: { deep: false },
601
+ useState: { resetOnClear: { $resolve: async (val, get) => {
602
+ return typeof val === "boolean" ? val : await get("future.compatibilityVersion") >= 5;
603
+ } } },
601
604
  useFetch: {}
602
605
  },
603
606
  clientNodeCompat: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/schema-nightly",
3
- "version": "4.4.0-29532553.297e4e52",
3
+ "version": "4.4.0-29533707.0a5a5c19",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",