Socket
Socket
Sign inDemoInstall

@nuxt/vue-app

Package Overview
Dependencies
Maintainers
3
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.7.1 to 2.8.0

template/components/nuxt-build-indicator.vue

5

dist/vue-app.js
/*!
* @nuxt/vue-app v2.7.1 (c) 2016-2019
* @nuxt/vue-app v2.8.0 (c) 2016-2019

@@ -17,3 +17,3 @@ * - All the amazing contributors

var dependencies = {
"node-fetch": "^2.5.0",
"node-fetch": "^2.6.0",
unfetch: "^4.1.0",

@@ -40,2 +40,3 @@ vue: "^2.6.10",

'empty.js',
'components/nuxt-build-indicator.vue',
'components/nuxt-error.vue',

@@ -42,0 +43,0 @@ 'components/nuxt-loading.vue',

4

package.json
{
"name": "@nuxt/vue-app",
"version": "2.7.1",
"version": "2.8.0",
"repository": "nuxt/nuxt.js",

@@ -15,3 +15,3 @@ "license": "MIT",

"dependencies": {
"node-fetch": "^2.5.0",
"node-fetch": "^2.6.0",
"unfetch": "^4.1.0",

@@ -18,0 +18,0 @@ "vue": "^2.6.10",

import Vue from 'vue'
<% if (loading) { %>import NuxtLoading from '<%= (typeof loading === "string" ? loading : "./components/nuxt-loading.vue") %>'<% } %>
<%if (buildIndicator) { %>import NuxtBuildIndicator from './components/nuxt-build-indicator'<% } %>
<% css.forEach((c) => { %>

@@ -52,6 +53,3 @@ import '<%= relativeToBuild(resolvePath(c.src || c, { isStyle: true })) %>'

}
}, [
<% if (loading) { %>loadingEl,<% } %>
transitionEl
])
}, [<% if (loading) { %>loadingEl, <% } %><%if (buildIndicator) { %>h(NuxtBuildIndicator), <% } %>transitionEl])
},

@@ -58,0 +56,0 @@ data: () => ({

@@ -23,2 +23,4 @@ import Vue from 'vue'

<% if (isDev) { %>consola.wrapConsole()<% } %>
// Component: <NuxtLink>

@@ -41,7 +43,10 @@ Vue.component(NuxtLink.name, NuxtLink)

<% if (isDev) { %>
const logger = consola.withScope('nuxt:ssr')
<% if (nuxtOptions.render.ssrLog) { %>
const logs = NUXT.logs || []
logs.forEach(logObj => logger[logObj.type](logObj))
delete NUXT.logs
if (logs.length > 0) {
console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %>("%c🚀 Nuxt SSR Logs", 'font-size: 110%')
logs.forEach(logObj => consola[logObj.type](logObj))
delete NUXT.logs
console.groupEnd()
}
<% } %>

@@ -90,9 +95,3 @@ <% if (debug) { %>

// Create and mount App
createApp()
.then(mountApp)
.catch((err) => {
const wrapperError = new Error(err)
wrapperError.message = '[nuxt] Error while mounting app: ' + wrapperError.message
errorHandler(wrapperError)
})
createApp().then(mountApp).catch(errorHandler)

@@ -134,3 +133,3 @@ function componentOption(component, key, ...args) {

// Check if route path changed (this._pathChanged), only if the page is not an error (for validate())
this._pathChanged = !!app.nuxt.err || from.path !== to.path
this._pathChanged = Boolean(app.nuxt.err) || from.path !== to.path
this._queryChanged = JSON.stringify(to.query) !== JSON.stringify(from.query)

@@ -274,3 +273,3 @@ this._diffQuery = (this._queryChanged ? getQueryDiff(to.query, from.query) : [])

this._dateLastError = app.nuxt.dateErr
this._hadError = !!app.nuxt.err
this._hadError = Boolean(app.nuxt.err)

@@ -384,3 +383,3 @@ // Get route's matched components

)
const hasFetch = !!Component.options.fetch
const hasFetch = Boolean(Component.options.fetch)
<% if (loading) { %>

@@ -493,9 +492,9 @@ const loadingIncrease = (hasAsyncData && hasFetch) ? 30 : 45

const matches = []
const instances = getMatchedComponentsInstances(to, matches)
const Components = getMatchedComponents(to, matches)
Vue.nextTick(() => {
const matches = []
const instances = getMatchedComponentsInstances(to, matches)
const Components = getMatchedComponents(to, matches)
instances.forEach((instance, i) => {
if (!instance) return
if (!instance || instance._isDestroyed) return
// if (

@@ -516,2 +515,7 @@ // !this._queryChanged &&

}
// Ensure to trigger scroll event after calling scrollBehavior
window.<%= globals.nuxt %>.$nextTick(() => {
window.<%= globals.nuxt %>.$emit('triggerScroll')
})
}

@@ -518,0 +522,0 @@ })

@@ -88,3 +88,6 @@ import Vue from 'vue'

for (const Component of Components) {
Component().catch(() => {})
const componentOrPromise = Component()
if (componentOrPromise instanceof Promise) {
componentOrPromise.catch(() => {})
}
Component.__prefetched = true

@@ -91,0 +94,0 @@ }<% if (router.linkPrefetchedClass) { %>

@@ -44,26 +44,15 @@ import Vue from 'vue'

const Component = this.$route.matched[0] && this.$route.matched[0].components.default
const [matchedRoute] = this.$route.matched
const Component = matchedRoute && matchedRoute.components.default
if (Component && Component.options) {
const { key, watchQuery } = Component.options
const { options } = Component
if (key) {
return (typeof key === 'function' ? key(this.$route) : key)
if (options.key) {
return (typeof options.key === 'function' ? options.key(this.$route) : options.key)
}
if (watchQuery) {
if (watchQuery.length) {
const pickedQuery = {}
for (const queryKey of watchQuery) {
pickedQuery[queryKey] = this.$route.query[queryKey]
}
return this.$router.resolve({
path: this.$route.path,
query: pickedQuery
}).href
}
return this.$route.fullPath
}
}
return this.$route.path
const strict = /\/$/.test(matchedRoute.path)
return strict ? this.$route.path : this.$route.path.replace(/\/$/, '')
}

@@ -70,0 +59,0 @@ },

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

err = err || null
app.context._errored = !!err
app.context._errored = Boolean(err)
err = err ? normalizeError(err) : null

@@ -94,0 +94,0 @@ const nuxt = this.nuxt || this.$options.nuxt

@@ -172,5 +172,5 @@ import Vue from 'vue'

app.context.next({
path: path,
query: query,
status: status
path,
query,
status
})

@@ -181,4 +181,4 @@ } else {

app.context.next({
path: path,
status: status
path,
status
})

@@ -220,3 +220,3 @@ }

app.context._errored = false
app.context.isHMR = !!context.isHMR
app.context.isHMR = Boolean(context.isHMR)
app.context.params = app.context.route.params || {}

@@ -316,3 +316,3 @@ app.context.query = app.context.route.query || {}

...err,
message: message,
message,
statusCode: (err.statusCode || err.status || (err.response && err.response.status) || 500)

@@ -391,7 +391,7 @@ }

prefix: prefix || '',
delimiter: delimiter,
optional: optional,
repeat: repeat,
partial: partial,
asterisk: !!asterisk,
delimiter,
optional,
repeat,
partial,
asterisk: Boolean(asterisk),
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')

@@ -566,4 +566,3 @@ })

if (parts.length === 2) {
path = parts[0]
hash = parts[1]
[path, hash] = parts
}

@@ -570,0 +569,0 @@

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