mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
feat(nuxt,schema): add compatibilityDate
flag for future (#27512)
This commit is contained in:
parent
11a79359b8
commit
cd95d99704
@ -388,7 +388,10 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
|
||||
}
|
||||
|
||||
// Init nitro
|
||||
const nitro = await createNitro(nitroConfig)
|
||||
const nitro = await createNitro(nitroConfig, {
|
||||
// @ts-expect-error this will be valid in a future version of Nitro
|
||||
compatibilityDate: nuxt.options.compatibilityDate,
|
||||
})
|
||||
|
||||
// Trigger Nitro reload when SPA loading template changes
|
||||
const spaLoadingTemplateFilePath = await spaLoadingTemplatePath(nuxt)
|
||||
|
@ -63,6 +63,7 @@
|
||||
"webpack-dev-middleware": "7.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"compatx": "^0.1.3",
|
||||
"consola": "^3.2.3",
|
||||
"defu": "^6.1.4",
|
||||
"hookable": "^5.5.3",
|
||||
@ -71,8 +72,8 @@
|
||||
"scule": "^1.3.0",
|
||||
"std-env": "^3.7.0",
|
||||
"ufo": "^1.5.3",
|
||||
"unimport": "^3.7.2",
|
||||
"uncrypto": "^0.1.3",
|
||||
"unimport": "^3.7.2",
|
||||
"untyped": "^1.4.2"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -20,6 +20,18 @@ export default defineUntypedSchema({
|
||||
*/
|
||||
extends: null,
|
||||
|
||||
/**
|
||||
* Specify a compatibility date for your app.
|
||||
*
|
||||
* This is used to control the behavior of presets in Nitro, Nuxt Image
|
||||
* and other modules that may change behavior without a major version bump.
|
||||
*
|
||||
* We plan to improve the tooling around this feature in the future.
|
||||
*
|
||||
* @type {typeof import('compatx').DateString | Record<string, typeof import('compatx').DateString>}
|
||||
*/
|
||||
compatibilityDate: undefined,
|
||||
|
||||
/**
|
||||
* Extend project from a local or remote source.
|
||||
*
|
||||
|
@ -457,6 +457,9 @@ importers:
|
||||
|
||||
packages/schema:
|
||||
dependencies:
|
||||
compatx:
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3
|
||||
consola:
|
||||
specifier: ^3.2.3
|
||||
version: 3.2.3
|
||||
@ -3578,6 +3581,9 @@ packages:
|
||||
commondir@1.0.1:
|
||||
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
|
||||
|
||||
compatx@0.1.3:
|
||||
resolution: {integrity: sha512-MWspQwvBk5xeLZMetIfjOozTAtmAIICz1mtol6NbBpCSllXOO+HvWMO87B18rcFtqjfrZ0tIFOH9gNG63ep+mw==}
|
||||
|
||||
compress-commons@6.0.2:
|
||||
resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==}
|
||||
engines: {node: '>= 14'}
|
||||
@ -10489,6 +10495,8 @@ snapshots:
|
||||
|
||||
commondir@1.0.1: {}
|
||||
|
||||
compatx@0.1.3: {}
|
||||
|
||||
compress-commons@6.0.2:
|
||||
dependencies:
|
||||
crc-32: 1.2.2
|
||||
|
Loading…
Reference in New Issue
Block a user