mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
v2.6.3
This commit is contained in:
parent
8d14cd4781
commit
2108cd669c
@ -94,7 +94,7 @@ jobs:
|
|||||||
at: ~/project
|
at: ~/project
|
||||||
- run:
|
- run:
|
||||||
name: Security Audit
|
name: Security Audit
|
||||||
command: yarn audit
|
command: yarn audit || true
|
||||||
|
|
||||||
build:
|
build:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt-start",
|
"name": "nuxt-start",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"description": "Starts Nuxt.js Application in production mode",
|
"description": "Starts Nuxt.js Application in production mode",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"nuxt",
|
"nuxt",
|
||||||
@ -55,13 +55,13 @@
|
|||||||
"main": "dist/nuxt-start.js",
|
"main": "dist/nuxt-start.js",
|
||||||
"bin": "bin/nuxt-start.js",
|
"bin": "bin/nuxt-start.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/cli": "2.6.2",
|
"@nuxt/cli": "2.6.3",
|
||||||
"@nuxt/core": "2.6.2",
|
"@nuxt/core": "2.6.3",
|
||||||
"node-fetch": "^2.3.0",
|
"node-fetch": "^2.3.0",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-meta": "^1.6.0",
|
"vue-meta": "^1.6.0",
|
||||||
"vue-no-ssr": "^1.1.1",
|
"vue-no-ssr": "^1.1.1",
|
||||||
"vue-router": "^3.0.5",
|
"vue-router": "^3.0.6",
|
||||||
"vuex": "^3.1.0"
|
"vuex": "^3.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt-ts",
|
"name": "nuxt-ts",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"description": "Nuxt With Runtime Typescript Support",
|
"description": "Nuxt With Runtime Typescript Support",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"nuxt",
|
"nuxt",
|
||||||
@ -59,14 +59,14 @@
|
|||||||
"nuxts": "bin/nuxt-ts.js"
|
"nuxts": "bin/nuxt-ts.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/builder": "2.6.2",
|
"@nuxt/builder": "2.6.3",
|
||||||
"@nuxt/cli": "2.6.2",
|
"@nuxt/cli": "2.6.3",
|
||||||
"@nuxt/core": "2.6.2",
|
"@nuxt/core": "2.6.3",
|
||||||
"@nuxt/generator": "2.6.2",
|
"@nuxt/generator": "2.6.3",
|
||||||
"@nuxt/loading-screen": "^0.3.0",
|
"@nuxt/loading-screen": "^0.5.0",
|
||||||
"@nuxt/opencollective": "^0.2.2",
|
"@nuxt/opencollective": "^0.2.2",
|
||||||
"@nuxt/typescript": "2.6.2",
|
"@nuxt/typescript": "2.6.3",
|
||||||
"@nuxt/webpack": "2.6.2"
|
"@nuxt/webpack": "2.6.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0",
|
"node": ">=6.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt",
|
"name": "nuxt",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"description": "A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)",
|
"description": "A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"nuxt",
|
"nuxt",
|
||||||
@ -57,13 +57,13 @@
|
|||||||
"postinstall": "opencollective || exit 0"
|
"postinstall": "opencollective || exit 0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/builder": "2.6.2",
|
"@nuxt/builder": "2.6.3",
|
||||||
"@nuxt/cli": "2.6.2",
|
"@nuxt/cli": "2.6.3",
|
||||||
"@nuxt/core": "2.6.2",
|
"@nuxt/core": "2.6.3",
|
||||||
"@nuxt/generator": "2.6.2",
|
"@nuxt/generator": "2.6.3",
|
||||||
"@nuxt/loading-screen": "^0.3.0",
|
"@nuxt/loading-screen": "^0.5.0",
|
||||||
"@nuxt/opencollective": "^0.2.2",
|
"@nuxt/opencollective": "^0.2.2",
|
||||||
"@nuxt/webpack": "2.6.2"
|
"@nuxt/webpack": "2.6.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.0.0",
|
"node": ">=8.0.0",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"conventionalCommits": true,
|
"conventionalCommits": true,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/babel-preset-app",
|
"name": "@nuxt/babel-preset-app",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"description": "babel-preset-app for nuxt.js",
|
"description": "babel-preset-app for nuxt.js",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/builder",
|
"name": "@nuxt/builder",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -9,8 +9,8 @@
|
|||||||
"main": "dist/builder.js",
|
"main": "dist/builder.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/devalue": "^1.2.3",
|
"@nuxt/devalue": "^1.2.3",
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"@nuxt/vue-app": "2.6.2",
|
"@nuxt/vue-app": "2.6.3",
|
||||||
"chokidar": "^2.1.5",
|
"chokidar": "^2.1.5",
|
||||||
"consola": "^2.6.0",
|
"consola": "^2.6.0",
|
||||||
"fs-extra": "^7.0.1",
|
"fs-extra": "^7.0.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/cli",
|
"name": "@nuxt/cli",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -12,8 +12,8 @@
|
|||||||
"nuxt-cli": "bin/nuxt-cli.js"
|
"nuxt-cli": "bin/nuxt-cli.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/config": "2.6.2",
|
"@nuxt/config": "2.6.3",
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"boxen": "^3.1.0",
|
"boxen": "^3.1.0",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"consola": "^2.6.0",
|
"consola": "^2.6.0",
|
||||||
|
@ -21,11 +21,13 @@ export async function loadNuxtConfig(argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nuxtConfigFile) {
|
if (nuxtConfigFile) {
|
||||||
|
// Clear cache
|
||||||
|
clearRequireCache(nuxtConfigFile)
|
||||||
|
|
||||||
if (nuxtConfigFile.endsWith('.ts')) {
|
if (nuxtConfigFile.endsWith('.ts')) {
|
||||||
options = require(nuxtConfigFile) || {}
|
options = require(nuxtConfigFile) || {}
|
||||||
} else {
|
} else {
|
||||||
clearRequireCache(nuxtConfigFile)
|
options = esm(module)(nuxtConfigFile) || {}
|
||||||
options = esm(module, { cache: false, cjs: { cache: false } })(nuxtConfigFile) || {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.default) {
|
if (options.default) {
|
||||||
@ -49,6 +51,9 @@ export async function loadNuxtConfig(argv) {
|
|||||||
|
|
||||||
// Keep all related files for watching
|
// Keep all related files for watching
|
||||||
options._nuxtConfigFiles = Array.from(scanRequireTree(nuxtConfigFile))
|
options._nuxtConfigFiles = Array.from(scanRequireTree(nuxtConfigFile))
|
||||||
|
if (!options._nuxtConfigFiles.includes(nuxtConfigFile)) {
|
||||||
|
options._nuxtConfigFiles.unshift(nuxtConfigFile)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof options.rootDir !== 'string') {
|
if (typeof options.rootDir !== 'string') {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/config",
|
"name": "@nuxt/config",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -10,7 +10,7 @@
|
|||||||
"main": "dist/config.js",
|
"main": "dist/config.js",
|
||||||
"typings": "types/index.d.ts",
|
"typings": "types/index.d.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"consola": "^2.6.0",
|
"consola": "^2.6.0",
|
||||||
"std-env": "^2.2.1"
|
"std-env": "^2.2.1"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/core",
|
"name": "@nuxt/core",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -8,11 +8,11 @@
|
|||||||
],
|
],
|
||||||
"main": "dist/core.js",
|
"main": "dist/core.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/config": "2.6.2",
|
"@nuxt/config": "2.6.3",
|
||||||
"@nuxt/devalue": "^1.2.3",
|
"@nuxt/devalue": "^1.2.3",
|
||||||
"@nuxt/server": "2.6.2",
|
"@nuxt/server": "2.6.3",
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"@nuxt/vue-renderer": "2.6.2",
|
"@nuxt/vue-renderer": "2.6.3",
|
||||||
"consola": "^2.6.0",
|
"consola": "^2.6.0",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"esm": "3.2.20",
|
"esm": "3.2.20",
|
||||||
|
@ -18,7 +18,7 @@ export default class Resolver {
|
|||||||
this.requireModule = this.requireModule.bind(this)
|
this.requireModule = this.requireModule.bind(this)
|
||||||
|
|
||||||
// ESM Loader
|
// ESM Loader
|
||||||
this.esm = esm(module, {})
|
this.esm = esm(module)
|
||||||
}
|
}
|
||||||
|
|
||||||
resolveModule(path) {
|
resolveModule(path) {
|
||||||
|
@ -31,7 +31,6 @@ describe('core: resolver', () => {
|
|||||||
expect(resolver.requireModule).toBeInstanceOf(Function)
|
expect(resolver.requireModule).toBeInstanceOf(Function)
|
||||||
expect(resolver.esm).toEqual(expect.any(Function))
|
expect(resolver.esm).toEqual(expect.any(Function))
|
||||||
expect(esm).toBeCalledTimes(1)
|
expect(esm).toBeCalledTimes(1)
|
||||||
expect(esm).toBeCalledWith(expect.any(Object), {})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should call _resolveFilename in resolveModule', () => {
|
test('should call _resolveFilename in resolveModule', () => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/generator",
|
"name": "@nuxt/generator",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -8,7 +8,7 @@
|
|||||||
],
|
],
|
||||||
"main": "dist/generator.js",
|
"main": "dist/generator.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"consola": "^2.6.0",
|
"consola": "^2.6.0",
|
||||||
"fs-extra": "^7.0.1",
|
"fs-extra": "^7.0.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/server",
|
"name": "@nuxt/server",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -8,8 +8,8 @@
|
|||||||
],
|
],
|
||||||
"main": "dist/server.js",
|
"main": "dist/server.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/config": "2.6.2",
|
"@nuxt/config": "2.6.3",
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"@nuxtjs/youch": "^4.2.3",
|
"@nuxtjs/youch": "^4.2.3",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/typescript",
|
"name": "@nuxt/typescript",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/utils",
|
"name": "@nuxt/utils",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -5,10 +5,7 @@ export function clearRequireCache(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (entry.parent) {
|
if (entry.parent) {
|
||||||
const i = entry.parent.children.findIndex(e => e.id === id)
|
entry.parent.children = entry.parent.children.filter(e => e.id !== id)
|
||||||
if (i > -1) {
|
|
||||||
entry.parent.children.splice(i, 1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const child of entry.children) {
|
for (const child of entry.children) {
|
||||||
|
@ -1,7 +1,37 @@
|
|||||||
import serialize from 'serialize-javascript'
|
import serialize from 'serialize-javascript'
|
||||||
|
|
||||||
|
export function normalizeFunctions(obj) {
|
||||||
|
if (typeof obj !== 'object' || Array.isArray(obj) || obj === null) {
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
for (const key in obj) {
|
||||||
|
if (key === '__proto__' || key === 'constructor') {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
const val = obj[key]
|
||||||
|
if (val !== null && typeof val === 'object' && !Array.isArray(obj)) {
|
||||||
|
obj[key] = normalizeFunctions(val)
|
||||||
|
}
|
||||||
|
if (typeof obj[key] === 'function') {
|
||||||
|
const asString = obj[key].toString()
|
||||||
|
const match = asString.match(/^([^{(]+)=>\s*(.*)/s)
|
||||||
|
if (match) {
|
||||||
|
const fullFunctionBody = match[2].match(/^{?(\s*return\s+)?(.*?)}?$/s)
|
||||||
|
let functionBody = fullFunctionBody[2].trim()
|
||||||
|
if (fullFunctionBody[1] || !match[2].trim().match(/^\s*{/s)) {
|
||||||
|
functionBody = `return ${functionBody}`
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line no-new-func
|
||||||
|
obj[key] = new Function(...match[1].split(',').map(arg => arg.trim()), functionBody)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
export function serializeFunction(func) {
|
export function serializeFunction(func) {
|
||||||
let open = false
|
let open = false
|
||||||
|
func = normalizeFunctions(func)
|
||||||
return serialize(func)
|
return serialize(func)
|
||||||
.replace(serializeFunction.assignmentRE, (_, spaces) => {
|
.replace(serializeFunction.assignmentRE, (_, spaces) => {
|
||||||
return `${spaces}: function (`
|
return `${spaces}: function (`
|
||||||
|
@ -1,6 +1,29 @@
|
|||||||
import { serializeFunction } from '../src/serialize'
|
import { serializeFunction, normalizeFunctions } from '../src/serialize'
|
||||||
|
|
||||||
describe('util: serialize', () => {
|
describe('util: serialize', () => {
|
||||||
|
test('should normalize arrow functions', () => {
|
||||||
|
const obj = {
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn1: foobar => {},
|
||||||
|
fn2: foobar => 1,
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn3: foobar => {
|
||||||
|
return 3
|
||||||
|
},
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn4: arg1 =>
|
||||||
|
2 * arg1
|
||||||
|
}
|
||||||
|
expect(normalizeFunctions(obj).fn1.toString())
|
||||||
|
.toEqual('function anonymous(foobar\n) {\n\n}')
|
||||||
|
expect(normalizeFunctions(obj).fn2.toString())
|
||||||
|
.toEqual('function anonymous(foobar\n) {\nreturn 1\n}')
|
||||||
|
expect(normalizeFunctions(obj).fn3.toString())
|
||||||
|
.toEqual('function anonymous(foobar\n) {\nreturn 3;\n}')
|
||||||
|
expect(normalizeFunctions(obj).fn4.toString())
|
||||||
|
.toEqual('function anonymous(arg1\n) {\nreturn 2 * arg1\n}')
|
||||||
|
})
|
||||||
|
|
||||||
test('should serialize normal function', () => {
|
test('should serialize normal function', () => {
|
||||||
const obj = {
|
const obj = {
|
||||||
fn: function () {}
|
fn: function () {}
|
||||||
@ -22,6 +45,33 @@ describe('util: serialize', () => {
|
|||||||
expect(serializeFunction(obj.fn)).toEqual('() => {}')
|
expect(serializeFunction(obj.fn)).toEqual('() => {}')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('should serialize arrow function with ternary in parens', () => {
|
||||||
|
const obj = {
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn: foobar => (foobar ? 1 : 0)
|
||||||
|
}
|
||||||
|
expect(serializeFunction(obj.fn)).toEqual('foobar => foobar ? 1 : 0')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('should serialize arrow function with single parameter', () => {
|
||||||
|
const obj = {
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn1: foobar => {},
|
||||||
|
fn2: foobar => 1,
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn3: foobar => {
|
||||||
|
return 3
|
||||||
|
},
|
||||||
|
// eslint-disable-next-line arrow-parens
|
||||||
|
fn4: arg1 =>
|
||||||
|
2 * arg1
|
||||||
|
}
|
||||||
|
expect(serializeFunction(obj.fn1)).toEqual('foobar => {}')
|
||||||
|
expect(serializeFunction(obj.fn2)).toEqual('foobar => 1')
|
||||||
|
expect(serializeFunction(obj.fn3)).toEqual('foobar => {\n return 3;\n }')
|
||||||
|
expect(serializeFunction(obj.fn4)).toEqual('arg1 => 2 * arg1')
|
||||||
|
})
|
||||||
|
|
||||||
test('should not replace custom scripts', () => {
|
test('should not replace custom scripts', () => {
|
||||||
const obj = {
|
const obj = {
|
||||||
fn() {
|
fn() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/vue-app",
|
"name": "@nuxt/vue-app",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-meta": "^1.6.0",
|
"vue-meta": "^1.6.0",
|
||||||
"vue-no-ssr": "^1.1.1",
|
"vue-no-ssr": "^1.1.1",
|
||||||
"vue-router": "^3.0.5",
|
"vue-router": "^3.0.6",
|
||||||
"vue-template-compiler": "^2.6.10",
|
"vue-template-compiler": "^2.6.10",
|
||||||
"vuex": "^3.1.0"
|
"vuex": "^3.1.0"
|
||||||
},
|
},
|
||||||
|
19
packages/vue-app/types/index.d.ts
vendored
19
packages/vue-app/types/index.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueRouter, { Route } from 'vue-router'
|
import VueRouter, { Route } from 'vue-router'
|
||||||
import { Store } from 'vuex'
|
import { Store } from 'vuex'
|
||||||
|
import { IncomingMessage, ServerResponse } from 'http'
|
||||||
|
|
||||||
// augment typings of NodeJS.Process
|
// augment typings of NodeJS.Process
|
||||||
import './process'
|
import './process'
|
||||||
@ -17,15 +18,15 @@ export interface Context {
|
|||||||
/**
|
/**
|
||||||
* @deprecated Use process.client instead
|
* @deprecated Use process.client instead
|
||||||
*/
|
*/
|
||||||
isClient: boolean;
|
isClient: boolean
|
||||||
/**
|
/**
|
||||||
* @deprecated Use process.server instead
|
* @deprecated Use process.server instead
|
||||||
*/
|
*/
|
||||||
isServer: boolean;
|
isServer: boolean
|
||||||
/**
|
/**
|
||||||
* @deprecated Use process.static instead
|
* @deprecated Use process.static instead
|
||||||
*/
|
*/
|
||||||
isStatic: boolean;
|
isStatic: boolean
|
||||||
isDev: boolean
|
isDev: boolean
|
||||||
isHMR: boolean
|
isHMR: boolean
|
||||||
route: Route
|
route: Route
|
||||||
@ -34,13 +35,13 @@ export interface Context {
|
|||||||
params: Route['params']
|
params: Route['params']
|
||||||
payload: any
|
payload: any
|
||||||
query: Route['query']
|
query: Route['query']
|
||||||
req: Request
|
req: IncomingMessage
|
||||||
res: Response
|
res: ServerResponse
|
||||||
redirect (status: number, path: string, query?: Route['query']): void
|
redirect(status: number, path: string, query?: Route['query']): void
|
||||||
redirect (path: string, query?: Route['query']): void
|
redirect(path: string, query?: Route['query']): void
|
||||||
error (params: ErrorParams): void
|
error(params: ErrorParams): void
|
||||||
nuxtState: NuxtState
|
nuxtState: NuxtState
|
||||||
beforeNuxtRender (fn: (params: { Components: VueRouter['getMatchedComponents'], nuxtState: NuxtState }) => void): void
|
beforeNuxtRender(fn: (params: { Components: VueRouter['getMatchedComponents'], nuxtState: NuxtState }) => void): void
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Middleware = string | ((ctx: Context, cb: Function) => Promise<void> | void)
|
export type Middleware = string | ((ctx: Context, cb: Function) => Promise<void> | void)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/vue-renderer",
|
"name": "@nuxt/vue-renderer",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -9,7 +9,7 @@
|
|||||||
"main": "dist/vue-renderer.js",
|
"main": "dist/vue-renderer.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/devalue": "^1.2.3",
|
"@nuxt/devalue": "^1.2.3",
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"consola": "^2.6.0",
|
"consola": "^2.6.0",
|
||||||
"fs-extra": "^7.0.1",
|
"fs-extra": "^7.0.1",
|
||||||
"lru-cache": "^5.1.1",
|
"lru-cache": "^5.1.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nuxt/webpack",
|
"name": "@nuxt/webpack",
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"repository": "nuxt/nuxt.js",
|
"repository": "nuxt/nuxt.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
@ -9,9 +9,9 @@
|
|||||||
"main": "dist/webpack.js",
|
"main": "dist/webpack.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.4.3",
|
"@babel/core": "^7.4.3",
|
||||||
"@nuxt/babel-preset-app": "2.6.2",
|
"@nuxt/babel-preset-app": "2.6.3",
|
||||||
"@nuxt/friendly-errors-webpack-plugin": "^2.4.0",
|
"@nuxt/friendly-errors-webpack-plugin": "^2.4.0",
|
||||||
"@nuxt/utils": "2.6.2",
|
"@nuxt/utils": "2.6.3",
|
||||||
"babel-loader": "^8.0.5",
|
"babel-loader": "^8.0.5",
|
||||||
"cache-loader": "^2.0.1",
|
"cache-loader": "^2.0.1",
|
||||||
"caniuse-lite": "^1.0.30000959",
|
"caniuse-lite": "^1.0.30000959",
|
||||||
@ -48,7 +48,7 @@
|
|||||||
"webpack-dev-middleware": "^3.6.2",
|
"webpack-dev-middleware": "^3.6.2",
|
||||||
"webpack-hot-middleware": "^2.24.3",
|
"webpack-hot-middleware": "^2.24.3",
|
||||||
"webpack-node-externals": "^1.7.2",
|
"webpack-node-externals": "^1.7.2",
|
||||||
"webpackbar": "^3.1.5"
|
"webpackbar": "^3.2.0"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
@ -60,6 +60,17 @@ export default class VueSSRClientPlugin {
|
|||||||
const id = m.identifier.replace(/\s\w+$/, '') // remove appended hash
|
const id = m.identifier.replace(/\s\w+$/, '') // remove appended hash
|
||||||
const files = manifest.modules[hash(id)] = chunk.files.map(fileToIndex)
|
const files = manifest.modules[hash(id)] = chunk.files.map(fileToIndex)
|
||||||
|
|
||||||
|
// In production mode, modules may be concatenated by scope hoisting
|
||||||
|
// Include ConcatenatedModule for not losing module-component mapping
|
||||||
|
if (Array.isArray(m.modules)) {
|
||||||
|
for (const concatenatedModule of m.modules) {
|
||||||
|
const id = hash(concatenatedModule.identifier.replace(/\s\w+$/, ''))
|
||||||
|
if (!manifest.modules[id]) {
|
||||||
|
manifest.modules[id] = files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Find all asset modules associated with the same chunk
|
// Find all asset modules associated with the same chunk
|
||||||
assetModules.forEach((m) => {
|
assetModules.forEach((m) => {
|
||||||
if (m.chunks.some(id => id === cid)) {
|
if (m.chunks.some(id => id === cid)) {
|
||||||
|
@ -35,8 +35,12 @@ async function main() {
|
|||||||
// Get last git tag
|
// Get last git tag
|
||||||
const lastGitTag = await getLastGitTag()
|
const lastGitTag = await getLastGitTag()
|
||||||
|
|
||||||
// Get all commits from last release to current dev
|
// Get current branch
|
||||||
let commits = await getGitDiff(lastGitTag, 'dev')
|
const currentGitBranch = await getCurrentGitBranch()
|
||||||
|
|
||||||
|
// Get all commits from last release to current branch
|
||||||
|
consola.log(`${currentGitBranch}...${lastGitTag}`)
|
||||||
|
let commits = await getGitDiff(currentGitBranch, lastGitTag)
|
||||||
|
|
||||||
// Parse commits as conventional commits
|
// Parse commits as conventional commits
|
||||||
commits = parseCommits(commits)
|
commits = parseCommits(commits)
|
||||||
@ -63,6 +67,11 @@ async function getLastGitTag() {
|
|||||||
return /^[^-]+/.exec(r)[0]
|
return /^[^-]+/.exec(r)[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getCurrentGitBranch() {
|
||||||
|
const r = await execCommand('git', ['rev-parse', '--abbrev-ref', 'HEAD'])
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
async function getGitDiff(from, to) {
|
async function getGitDiff(from, to) {
|
||||||
// # https://git-scm.com/docs/pretty-formats
|
// # https://git-scm.com/docs/pretty-formats
|
||||||
const r = await execCommand('git', ['--no-pager', 'log', `${from}...${to}`, '--pretty=%s|%h|%an|%ae'])
|
const r = await execCommand('git', ['--no-pager', 'log', `${from}...${to}`, '--pretty=%s|%h|%an|%ae'])
|
||||||
|
@ -13,14 +13,7 @@ const stub = {
|
|||||||
es: `export * from '../src/index'`,
|
es: `export * from '../src/index'`,
|
||||||
cjs: `const esm = require('esm')
|
cjs: `const esm = require('esm')
|
||||||
|
|
||||||
const _require = esm(module, {
|
const _require = esm(module)
|
||||||
cache: false,
|
|
||||||
cjs: {
|
|
||||||
cache: true,
|
|
||||||
vars: true,
|
|
||||||
namedExports: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const execa = require('execa')
|
const execa = require('execa')
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
yarn lerna version --no-changelog
|
|
||||||
yarn build
|
|
14
scripts/release-publish
Executable file
14
scripts/release-publish
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! "$1" ]; then
|
||||||
|
echo "Usage $0 [version]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
./scripts/workspace-run npm publish -q
|
||||||
|
|
||||||
|
git tag -a v$1 -m v$1
|
||||||
|
git push --tags
|
4
scripts/release-version
Executable file
4
scripts/release-version
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
yarn lerna version --no-changelog --no-git-tag-version --no-push --force-publish "*"
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
./scripts/workspace-run npm publish -q
|
|
57
yarn.lock
57
yarn.lock
@ -1493,10 +1493,10 @@
|
|||||||
error-stack-parser "^2.0.0"
|
error-stack-parser "^2.0.0"
|
||||||
string-width "^2.0.0"
|
string-width "^2.0.0"
|
||||||
|
|
||||||
"@nuxt/loading-screen@^0.3.0":
|
"@nuxt/loading-screen@^0.5.0":
|
||||||
version "0.3.0"
|
version "0.5.0"
|
||||||
resolved "https://registry.npmjs.org/@nuxt/loading-screen/-/loading-screen-0.3.0.tgz#ec438337690efffea9508cebcca35675f5445110"
|
resolved "https://registry.npmjs.org/@nuxt/loading-screen/-/loading-screen-0.5.0.tgz#b2c9289fe5247c222125e87f1df3cac19735096d"
|
||||||
integrity sha512-h0Z5g2MxJCXyeRmzx3Niwkv+/HRQEkKYpL54cN9cHYc4FUG/NBxeIIJgqbh1ih7y5cg0jdDboL0izZrbFsBtiA==
|
integrity sha512-rMQfCywYklVUpeWvIGzRrqT1odsH1LvmisWwORNyqPaMpKxX8bBxFZ56FZUT5HS9xRRlUy37KvBHiirWfIpVEw==
|
||||||
dependencies:
|
dependencies:
|
||||||
connect "^3.6.6"
|
connect "^3.6.6"
|
||||||
fs-extra "^7.0.1"
|
fs-extra "^7.0.1"
|
||||||
@ -2173,11 +2173,18 @@ ansi-colors@^3.0.0:
|
|||||||
resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf"
|
resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf"
|
||||||
integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==
|
integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==
|
||||||
|
|
||||||
ansi-escapes@^3.0.0, ansi-escapes@^3.1.0, ansi-escapes@^3.2.0:
|
ansi-escapes@^3.0.0, ansi-escapes@^3.2.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
|
resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
|
||||||
integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
|
integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
|
||||||
|
|
||||||
|
ansi-escapes@^4.1.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.1.0.tgz#62a9e5fa78e99c5bb588b1796855f5d729231b53"
|
||||||
|
integrity sha512-2VY/iCUZTDLD/qxptS3Zn3c6k2MeIbYqjRXqM8T5oC7N2mMjh3xIU3oYru6cHGbldFa9h5i8N0fP65UaUqrMWA==
|
||||||
|
dependencies:
|
||||||
|
type-fest "^0.3.0"
|
||||||
|
|
||||||
ansi-html@0.0.7:
|
ansi-html@0.0.7:
|
||||||
version "0.0.7"
|
version "0.0.7"
|
||||||
resolved "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
|
resolved "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
|
||||||
@ -4824,6 +4831,13 @@ figures@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
|
|
||||||
|
figures@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.npmjs.org/figures/-/figures-3.0.0.tgz#756275c964646163cc6f9197c7a0295dbfd04de9"
|
||||||
|
integrity sha512-HKri+WoWoUgr83pehn/SIgLOMZ9nAWC6dcGj26RY2R4F50u4+RTUz0RCrUlOV3nKRAICW1UGzyb+kcX2qK1S/g==
|
||||||
|
dependencies:
|
||||||
|
escape-string-regexp "^1.0.5"
|
||||||
|
|
||||||
file-entry-cache@^5.0.1:
|
file-entry-cache@^5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
|
resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
|
||||||
@ -11094,10 +11108,10 @@ vue-property-decorator@^8.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
vue-class-component "^7.0.1"
|
vue-class-component "^7.0.1"
|
||||||
|
|
||||||
vue-router@^3.0.5:
|
vue-router@^3.0.6:
|
||||||
version "3.0.5"
|
version "3.0.6"
|
||||||
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.0.5.tgz#24636923c7f1a62da3a577cf75a058f9fa328581"
|
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.0.6.tgz#2e4f0f9cbb0b96d0205ab2690cfe588935136ac3"
|
||||||
integrity sha512-DGU+7+eeiSq/oNZ6epA/rcNkAd0m2+uugR5i4Eh4KBvclUmorvNJ6iForYjQkgvKi9GdamybaMpl85eDgxM2eQ==
|
integrity sha512-Ox0ciFLswtSGRTHYhGvx2L44sVbTPNS+uD2kRISuo8B39Y79rOo0Kw0hzupTmiVtftQYCZl87mwldhh2L9Aquw==
|
||||||
|
|
||||||
vue-server-renderer@^2.6.10:
|
vue-server-renderer@^2.6.10:
|
||||||
version "2.6.10"
|
version "2.6.10"
|
||||||
@ -11278,19 +11292,19 @@ webpack@^4.30.0:
|
|||||||
watchpack "^1.5.0"
|
watchpack "^1.5.0"
|
||||||
webpack-sources "^1.3.0"
|
webpack-sources "^1.3.0"
|
||||||
|
|
||||||
webpackbar@^3.1.5:
|
webpackbar@^3.2.0:
|
||||||
version "3.1.5"
|
version "3.2.0"
|
||||||
resolved "https://registry.npmjs.org/webpackbar/-/webpackbar-3.1.5.tgz#71f9de2d8b897785a3b3291cb6c8beecdf06542b"
|
resolved "https://registry.npmjs.org/webpackbar/-/webpackbar-3.2.0.tgz#bdaad103fad11a4e612500e72aaae98b08ba493f"
|
||||||
integrity sha512-ayCxwj0m3lw8TMkbBBRl3XNiCIHqXYaQus8sNL+jX0lsp4LrYO9OmijsPeuu91cd/oUgK66c0AKQovPtJ1qDsA==
|
integrity sha512-PC4o+1c8gWWileUfwabe0gqptlXUDJd5E0zbpr2xHP1VSOVlZVPBZ8j6NCR8zM5zbKdxPhctHXahgpNK1qFDPw==
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-escapes "^3.1.0"
|
ansi-escapes "^4.1.0"
|
||||||
chalk "^2.4.1"
|
chalk "^2.4.1"
|
||||||
consola "^2.3.0"
|
consola "^2.6.0"
|
||||||
figures "^2.0.0"
|
figures "^3.0.0"
|
||||||
pretty-time "^1.1.0"
|
pretty-time "^1.1.0"
|
||||||
std-env "^2.2.1"
|
std-env "^2.2.1"
|
||||||
text-table "^0.2.0"
|
text-table "^0.2.0"
|
||||||
wrap-ansi "^4.0.0"
|
wrap-ansi "^5.1.0"
|
||||||
|
|
||||||
whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5:
|
whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
@ -11380,15 +11394,6 @@ wrap-ansi@^2.0.0:
|
|||||||
string-width "^1.0.1"
|
string-width "^1.0.1"
|
||||||
strip-ansi "^3.0.1"
|
strip-ansi "^3.0.1"
|
||||||
|
|
||||||
wrap-ansi@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz#b3570d7c70156159a2d42be5cc942e957f7b1131"
|
|
||||||
integrity sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==
|
|
||||||
dependencies:
|
|
||||||
ansi-styles "^3.2.0"
|
|
||||||
string-width "^2.1.1"
|
|
||||||
strip-ansi "^4.0.0"
|
|
||||||
|
|
||||||
wrap-ansi@^5.1.0:
|
wrap-ansi@^5.1.0:
|
||||||
version "5.1.0"
|
version "5.1.0"
|
||||||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
|
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
|
||||||
|
Loading…
Reference in New Issue
Block a user