Socket
Socket
Sign inDemoInstall

@nuxt/vue-app

Package Overview
Dependencies
Maintainers
6
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/vue-app - npm Package Compare versions

Comparing version 2.17.3 to 2.17.4

6

dist/vue-app.js
/*!
* @nuxt/vue-app v2.17.3 (c) 2016-2024
* @nuxt/vue-app v2.17.4 (c) 2016-2024
* Released under the MIT License

@@ -12,4 +12,4 @@ * Repository: https://github.com/nuxt/nuxt.js

var dependencies = {
"node-fetch-native": "^1.6.1",
ufo: "^1.3.2",
"node-fetch-native": "^1.6.4",
ufo: "^1.5.3",
unfetch: "^5.0.0",

@@ -16,0 +16,0 @@ vue: "^2.7.16",

{
"name": "@nuxt/vue-app",
"version": "2.17.3",
"version": "2.17.4",
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt/nuxt.js.git"
"url": "git+https://github.com/nuxt/nuxt.git",
"directory": "packages/vue-app"
},

@@ -19,4 +20,4 @@ "license": "MIT",

"dependencies": {
"node-fetch-native": "^1.6.1",
"ufo": "^1.3.2",
"node-fetch-native": "^1.6.4",
"ufo": "^1.5.3",
"unfetch": "^5.0.0",

@@ -23,0 +24,0 @@ "vue": "^2.7.16",

@@ -204,3 +204,3 @@ import Vue from 'vue'

// Cleanup refs
p = []
p = []

@@ -248,2 +248,3 @@ if (page.$fetch) {

<% } %>
this.nuxt.errPageReady = true
this.setLayout(errorLayout)

@@ -250,0 +251,0 @@ }

@@ -652,3 +652,4 @@ import Vue from 'vue'

<% if (features.layouts) { %>
<% if (splitChunks.layouts) { %>async <% } %>function setLayoutForNextPage (to) {
const routeMap = new WeakMap()
<% if (splitChunks.layouts) { %>async <% } %>function getLayoutForNextPage (to, from, next) {
// Set layout

@@ -666,5 +667,21 @@ let hasError = Boolean(this.$options.nuxt.err)

}
routeMap.set(to, layout);
<% if (splitChunks.layouts) { %>
await this.loadLayout(layout)
<% } %>
if (next) next();
}
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)

@@ -908,2 +925,3 @@ }

<% if (features.layouts) { %>
router.beforeResolve(getLayoutForNextPage.bind(_app))
router.afterEach(setLayoutForNextPage.bind(_app))

@@ -940,2 +958,3 @@ <% } %>

_app.error(NUXT.error)
_app.nuxt.errPageReady = true
}

@@ -970,6 +989,11 @@

const clientFirstLayoutSet = <% if (splitChunks.layouts) { %>async<% } %> () => {
<% if (splitChunks.layouts) { %>await<% } %> getLayoutForNextPage.call(_app, router.currentRoute)
setLayoutForNextPage.call(_app, router.currentRoute)
}
// First render on client-side
const clientFirstMount = () => {
normalizeComponents(router.currentRoute, router.currentRoute)
setLayoutForNextPage.call(_app, router.currentRoute)
clientFirstLayoutSet()
checkForErrors(_app)

@@ -976,0 +1000,0 @@ // Don't call fixPrepatch.call(_app, router.currentRoute, router.currentRoute) since it's first render

@@ -77,4 +77,5 @@ import Vue from 'vue'

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

@@ -81,0 +82,0 @@ return h('NuxtChild', {

@@ -142,2 +142,3 @@ import Vue from 'vue'

err: null,
errPageReady: false,
dateErr: null,

@@ -154,2 +155,3 @@ error (err) {

nuxt.err = err
nuxt.errPageReady = false
// Used in src/server.js

@@ -156,0 +158,0 @@ if (ssrContext) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc