Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changelogensets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- run: corepack enable
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
branches:
- 2.x
- "!v[0-9]*"

# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
Expand All @@ -20,10 +19,9 @@ concurrency:
jobs:
setup:
runs-on: ubuntu-latest
if: github.event_name == 'push' || !((github.base_ref == '2.x') && github.head_ref == 'dev')

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # All history
- run: corepack enable
Expand Down Expand Up @@ -52,7 +50,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand All @@ -77,7 +75,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -105,7 +103,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand All @@ -130,7 +128,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -164,7 +162,7 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=4096"

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -195,7 +193,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -226,7 +224,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -257,7 +255,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -292,7 +290,7 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # All history

Expand Down Expand Up @@ -336,7 +334,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # All history

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
branches:
- 2.x
- "!v[0-9]*"

# Remove default permissions of GITHUB_TOKEN for security
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
Expand All @@ -20,14 +19,13 @@ concurrency:
jobs:
setup:
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || !((github.base_ref == '2.x') && github.head_ref == 'dev')

strategy:
matrix:
os: [windows-latest]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -58,7 +56,7 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=4096"

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -91,7 +89,7 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=4096"

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down Expand Up @@ -129,7 +127,7 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=4096"

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
Expand Down
2 changes: 1 addition & 1 deletion .iyarc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://github.com/nuxt/nuxt.js/issues/9284 for more information
# These advisories won't affect nuxt

GHSA-c2qf-rxjj-qqgw
GHSA-7fh5-64p2-3v2j
GHSA-2p57-rm9w-gvfp
GHSA-grv7-fg5c-xmjg
1 change: 0 additions & 1 deletion examples/async-data/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<template>
<div class="container">
<h1>User Agent</h1>
Expand Down
1 change: 0 additions & 1 deletion examples/async-data/pages/posts/_id.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<template>
<div class="container">
<h1>{{ post.title }}</h1>
Expand Down
1 change: 0 additions & 1 deletion examples/async-data/pages/posts/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<template>
<div class="container">
<h1>Blog</h1>
Expand Down
1 change: 0 additions & 1 deletion examples/jsx/pages/about.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import Test from '~/components/test.vue'

export default {
Expand Down
1 change: 0 additions & 1 deletion examples/storybook/stories/MyButton.story.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { storiesOf } from '@storybook/vue'
import Centered from '@storybook/addon-centered'
import MyButton from '~/components/Button.vue'
Expand Down
1 change: 0 additions & 1 deletion examples/storybook/stories/Welcome.story.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { storiesOf } from '@storybook/vue'
import { linkTo } from '@storybook/addon-links'

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"consola": "3.2.3",
"create-require": "1.1.1",
"cross-spawn": "7.0.3",
"esbuild": "0.21.4",
"esbuild": "0.21.5",
"eslint": "8.57.0",
"eslint-multiplexer": "2.0.0",
"eslint-plugin-jest": "28.6.0",
Expand All @@ -71,27 +71,27 @@
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-util": "29.7.0",
"jiti": "1.21.3",
"jiti": "1.21.6",
"jsdom": "24.1.0",
"jsonfile": "6.1.0",
"klaw-sync": "6.0.0",
"lerna": "8.1.3",
"lodash": "4.17.21",
"node-fetch-native": "1.6.4",
"ofetch": "1.3.4",
"puppeteer-core": "22.10.0",
"puppeteer-core": "22.11.0",
"request": "2.88.2",
"rimraf": "5.0.7",
"rollup": "4.18.0",
"rollup-plugin-esbuild": "6.1.1",
"rollup-plugin-license": "3.4.0",
"sass": "1.77.4",
"sass": "1.77.5",
"sass-loader": "^10.4.1",
"semver": "7.6.2",
"sort-package-json": "2.10.0",
"typescript": "5.4.5",
"vue-jest": "4.0.1",
"vue-tsc": "2.0.19"
"vue-tsc": "2.0.21"
},
"resolutions": {
"tar": "6.2.1"
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/command.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import path from 'path'
import consola from 'consola'
import minimist from 'minimist'
Expand Down
1 change: 0 additions & 1 deletion packages/cli/test/unit/list.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import chalk from 'chalk'

import listCommands from '../../src/list'
Expand Down
1 change: 0 additions & 1 deletion packages/config/src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import _app from './_app'
import _common from './_common'

Expand Down
1 change: 0 additions & 1 deletion packages/config/test/load.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { resolve } from 'path'
import { loadNuxtConfig } from '../src/load'

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/nuxt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { isPlainObject } from 'lodash'
import consola from 'consola'
import Hookable from 'hookable'
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"launch-editor-middleware": "^2.6.1",
"on-headers": "^1.0.2",
"pify": "^5.0.0",
"serve-placeholder": "^2.0.1",
"serve-placeholder": "^2.0.2",
"serve-static": "^1.15.0",
"server-destroy": "^1.0.1",
"ufo": "^1.5.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"create-require": "^1.1.1",
"fs-extra": "^11.2.0",
"hash-sum": "^2.0.0",
"jiti": "^1.21.3",
"jiti": "^1.21.6",
"lodash": "^4.17.21",
"proper-lockfile": "^4.1.2",
"semver": "^7.6.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/vue-app/template/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default {
// Wait for asyncData & old fetch to finish
await Promise.all(p)
// Cleanup refs
p = []
p = []

if (page.$fetch) {
p.push(page.$fetch())
Expand Down Expand Up @@ -244,6 +244,7 @@ export default {
<% if (splitChunks.layouts) { %>
await this.loadLayout(errorLayout)
<% } %>
this.nuxt.errPageReady = true
this.setLayout(errorLayout)
}
},
Expand Down
7 changes: 7 additions & 0 deletions packages/vue-app/template/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,12 @@ function setLayoutForNextPage(to) {
const layout = routeMap.get(to)
routeMap.delete(to)

const prevPageIsError = this._hadError && this._dateLastError === this.$options.nuxt.dateErr

if (prevPageIsError) {
this.$options.nuxt.err = null
}

this.setLayout(layout)
}
<% } %>
Expand Down Expand Up @@ -946,6 +952,7 @@ async function mountApp (__app) {
_app.$loading = {} // To avoid error while _app.$nuxt does not exist
if (NUXT.error) {
_app.error(NUXT.error)
_app.nuxt.errPageReady = true
}

// Add beforeEach router hooks
Expand Down
5 changes: 3 additions & 2 deletions packages/vue-app/template/components/nuxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ export default {
Vue.util.defineReactive(this, 'nuxt', this.$root.$options.nuxt)
},
render (h) {
// if there is no error
if (!this.nuxt.err) {
// if there is no error or
// error page has not been loaded yet on client
if (!this.nuxt.err || (process.client && !this.nuxt.errPageReady)) {
// Directly return nuxt child
return h('NuxtChild', {
key: this.routerViewKey,
Expand Down
2 changes: 2 additions & 0 deletions packages/vue-app/template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ async function createApp(ssrContext, config = {}) {
},
<% } %>
err: null,
errPageReady: false,
dateErr: null,
error (err) {
err = err || null
Expand All @@ -150,6 +151,7 @@ async function createApp(ssrContext, config = {}) {
}
nuxt.dateErr = Date.now()
nuxt.err = err
nuxt.errPageReady = false
// Used in src/server.js
if (ssrContext) {
ssrContext.nuxt.error = err
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"@nuxt/utils": "2.17.3",
"babel-loader": "^8.3.0",
"cache-loader": "^4.1.0",
"caniuse-lite": "^1.0.30001629",
"caniuse-lite": "^1.0.30001634",
"consola": "^3.2.3",
"css-loader": "^5.2.7",
"cssnano": "^6.1.2",
"cssnano": "^7.0.2",
"eventsource-polyfill": "^0.9.6",
"extract-css-chunks-webpack-plugin": "^4.10.0",
"file-loader": "^6.2.0",
Expand Down
1 change: 0 additions & 1 deletion test/dev/ssr.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { uniq } from 'lodash'
import { loadFixture, getPort, Nuxt, rp, sequence, parallel } from '../utils'

Expand Down
1 change: 0 additions & 1 deletion test/dev/wp.config.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import path from 'path'
import PerfLoader from '../../packages/webpack/src/utils/perf-loader'

Expand Down
Loading