mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
chore(nuxt): update nuxi (#23145)
Co-authored-by: Pooya Parsa <pooya@pi0.io>
This commit is contained in:
parent
a4cf8a0c24
commit
842a2e5cf9
@ -64,7 +64,7 @@
|
|||||||
"jiti": "1.20.0",
|
"jiti": "1.20.0",
|
||||||
"markdownlint-cli": "^0.33.0",
|
"markdownlint-cli": "^0.33.0",
|
||||||
"nitropack": "2.6.3",
|
"nitropack": "2.6.3",
|
||||||
"nuxi": "3.7.3",
|
"nuxi": "3.8.3",
|
||||||
"nuxt": "workspace:*",
|
"nuxt": "workspace:*",
|
||||||
"nuxt-vitest": "0.10.4",
|
"nuxt-vitest": "0.10.4",
|
||||||
"ofetch": "1.3.3",
|
"ofetch": "1.3.3",
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
"magic-string": "^0.30.3",
|
"magic-string": "^0.30.3",
|
||||||
"mlly": "^1.4.2",
|
"mlly": "^1.4.2",
|
||||||
"nitropack": "^2.6.3",
|
"nitropack": "^2.6.3",
|
||||||
"nuxi": "^3.7.3",
|
"nuxi": "^3.8.3",
|
||||||
"nypm": "^0.3.3",
|
"nypm": "^0.3.3",
|
||||||
"ofetch": "^1.3.3",
|
"ofetch": "^1.3.3",
|
||||||
"ohash": "^1.1.3",
|
"ohash": "^1.1.3",
|
||||||
|
@ -13,8 +13,9 @@ const kit: typeof _kit = _kit.default || _kit
|
|||||||
export async function startServer () {
|
export async function startServer () {
|
||||||
const ctx = useTestContext()
|
const ctx = useTestContext()
|
||||||
await stopServer()
|
await stopServer()
|
||||||
const port = ctx.options.port || await getRandomPort()
|
const host = '127.0.0.1'
|
||||||
ctx.url = 'http://127.0.0.1:' + port
|
const port = ctx.options.port || await getRandomPort(host)
|
||||||
|
ctx.url = `http://${host}:${port}`
|
||||||
if (ctx.options.dev) {
|
if (ctx.options.dev) {
|
||||||
const nuxiCLI = await kit.resolvePath('nuxi/cli')
|
const nuxiCLI = await kit.resolvePath('nuxi/cli')
|
||||||
ctx.serverProcess = execa(nuxiCLI, ['_dev'], {
|
ctx.serverProcess = execa(nuxiCLI, ['_dev'], {
|
||||||
@ -22,13 +23,13 @@ export async function startServer () {
|
|||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
env: {
|
env: {
|
||||||
...process.env,
|
...process.env,
|
||||||
_PORT: String(port),
|
_PORT: String(port), // Used by internal _dev command
|
||||||
PORT: String(port),
|
PORT: String(port),
|
||||||
NITRO_PORT: String(port),
|
HOST: host,
|
||||||
NODE_ENV: 'development'
|
NODE_ENV: 'development'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
await waitForPort(port, { retries: 32 })
|
await waitForPort(port, { retries: 32, host }).catch(() => {})
|
||||||
let lastError
|
let lastError
|
||||||
for (let i = 0; i < 150; i++) {
|
for (let i = 0; i < 150; i++) {
|
||||||
await new Promise(resolve => setTimeout(resolve, 100))
|
await new Promise(resolve => setTimeout(resolve, 100))
|
||||||
@ -51,11 +52,11 @@ export async function startServer () {
|
|||||||
env: {
|
env: {
|
||||||
...process.env,
|
...process.env,
|
||||||
PORT: String(port),
|
PORT: String(port),
|
||||||
NITRO_PORT: String(port),
|
HOST: host,
|
||||||
NODE_ENV: 'test'
|
NODE_ENV: 'test'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
await waitForPort(port, { retries: 8 })
|
await waitForPort(port, { retries: 20, host })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ importers:
|
|||||||
specifier: 2.6.3
|
specifier: 2.6.3
|
||||||
version: 2.6.3
|
version: 2.6.3
|
||||||
nuxi:
|
nuxi:
|
||||||
specifier: 3.7.3
|
specifier: 3.8.3
|
||||||
version: 3.7.3
|
version: 3.8.3
|
||||||
nuxt:
|
nuxt:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:packages/nuxt
|
version: link:packages/nuxt
|
||||||
@ -336,8 +336,8 @@ importers:
|
|||||||
specifier: ^2.6.3
|
specifier: ^2.6.3
|
||||||
version: 2.6.3
|
version: 2.6.3
|
||||||
nuxi:
|
nuxi:
|
||||||
specifier: ^3.7.3
|
specifier: ^3.8.3
|
||||||
version: 3.7.3
|
version: 3.8.3
|
||||||
nypm:
|
nypm:
|
||||||
specifier: ^0.3.3
|
specifier: ^0.3.3
|
||||||
version: 0.3.3
|
version: 0.3.3
|
||||||
@ -2526,6 +2526,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
micromatch: 4.0.5
|
micromatch: 4.0.5
|
||||||
|
napi-wasm: 1.1.0
|
||||||
bundledDependencies:
|
bundledDependencies:
|
||||||
- napi-wasm
|
- napi-wasm
|
||||||
|
|
||||||
@ -7927,6 +7928,9 @@ packages:
|
|||||||
engines: {node: ^14 || ^16 || >=18}
|
engines: {node: ^14 || ^16 || >=18}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
/napi-wasm@1.1.0:
|
||||||
|
resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==}
|
||||||
|
|
||||||
/natural-compare@1.4.0:
|
/natural-compare@1.4.0:
|
||||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||||
|
|
||||||
@ -8140,8 +8144,8 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
boolbase: 1.0.0
|
boolbase: 1.0.0
|
||||||
|
|
||||||
/nuxi@3.7.3:
|
/nuxi@3.8.3:
|
||||||
resolution: {integrity: sha512-Cg+ygRmhonE6PwAtDeKvKU/0VRqEyzmSSoJYfr0MzwIxQYrBSnLvw0z3UgJl/8MgFKjiZ5Y4wBUEiRsUw8O6uw==}
|
resolution: {integrity: sha512-LS1KlxQhQDt+WREENAG44zfO91uiPYDcorQ7xlcaV0ejV65v7Eub94FTmJ6JNXL2boHhc+raODtJBClW2uYyJw==}
|
||||||
engines: {node: ^14.18.0 || >=16.10.0}
|
engines: {node: ^14.18.0 || >=16.10.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
Loading…
Reference in New Issue
Block a user