-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kit,nuxt,schema,vite,webpack): nitropack v3 nightly (nuxt#27702)
- Loading branch information
Showing
48 changed files
with
950 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,9 @@ | |
"typecheck:docs": "DOCS_TYPECHECK=true pnpm nuxi prepare && nuxt-content-twoslash verify --content-dir docs" | ||
}, | ||
"resolutions": { | ||
"nitro": "npm:[email protected]", | ||
"typescript": "5.5.2", | ||
"h3": "npm:[email protected]", | ||
"@nuxt/kit": "workspace:*", | ||
"@nuxt/schema": "workspace:*", | ||
"@nuxt/ui-templates": "workspace:*", | ||
|
@@ -69,11 +72,11 @@ | |
"eslint-typegen": "0.2.4", | ||
"execa": "9.3.0", | ||
"globby": "14.0.1", | ||
"h3": "1.12.0", | ||
"h3": "npm:[email protected]", | ||
"happy-dom": "14.12.3", | ||
"jiti": "1.21.6", | ||
"markdownlint-cli": "0.41.0", | ||
"nitropack": "2.9.6", | ||
"nitro": "npm:[email protected]", | ||
"nuxi": "3.12.0", | ||
"nuxt": "workspace:*", | ||
"nuxt-content-twoslash": "0.0.10", | ||
|
@@ -95,5 +98,10 @@ | |
"engines": { | ||
"node": "^16.10.0 || >=18.0.0" | ||
}, | ||
"version": "" | ||
"version": "", | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ | |
"devDependencies": { | ||
"@types/hash-sum": "1.0.2", | ||
"@types/semver": "7.5.8", | ||
"nitropack": "2.9.6", | ||
"nitro": "npm:[email protected]", | ||
"unbuild": "latest", | ||
"vite": "5.3.1", | ||
"vitest": "1.6.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,15 +80,15 @@ | |
"escape-string-regexp": "^5.0.0", | ||
"estree-walker": "^3.0.3", | ||
"globby": "^14.0.1", | ||
"h3": "^1.12.0", | ||
"h3": "npm:[email protected]", | ||
"hookable": "^5.5.3", | ||
"ignore": "^5.3.1", | ||
"jiti": "^1.21.6", | ||
"klona": "^2.0.6", | ||
"knitwork": "^1.1.0", | ||
"magic-string": "^0.30.10", | ||
"mlly": "^1.7.1", | ||
"nitropack": "^2.9.6", | ||
"nitro": "npm:[email protected]", | ||
"nuxi": "^3.12.0", | ||
"nypm": "^0.3.8", | ||
"ofetch": "^1.3.4", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import type { H3Event } from 'h3' | ||
import { klona } from 'klona' | ||
|
||
// @ts-expect-error virtual file | ||
import _inlineAppConfig from '#internal/nuxt/app-config' | ||
|
||
// App config | ||
const _sharedAppConfig = _deepFreeze(klona(_inlineAppConfig)) | ||
export function useAppConfig (event?: H3Event) { | ||
// Backwards compatibility with ambient context | ||
if (!event) { | ||
return _sharedAppConfig | ||
} | ||
if (!event.context.nuxt) { | ||
event.context.nuxt = {} | ||
} | ||
// Reuse cached app config from event context | ||
if (event.context.nuxt.appConfig) { | ||
return event.context.nuxt.appConfig | ||
} | ||
// Prepare app config for event context | ||
const appConfig = klona(_inlineAppConfig) | ||
event.context.nuxt.appConfig = appConfig | ||
return appConfig | ||
} | ||
|
||
// --- Utils --- | ||
|
||
function _deepFreeze (object: Record<string, any>) { | ||
const propNames = Object.getOwnPropertyNames(object) | ||
for (const name of propNames) { | ||
const value = object[name] | ||
if (value && typeof value === 'object') { | ||
_deepFreeze(value) | ||
} | ||
} | ||
return Object.freeze(object) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.