Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.10.2 #6601

Merged
merged 21 commits into from
Oct 21, 2019
Merged

v2.10.2 #6601

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ed4a222
chore(deps): update dependency postcss-import-resolver to v2 (#6552)
renovate[bot] Oct 13, 2019
a42453b
chore(deps): update all non-major dependencies (#6550)
renovate[bot] Oct 14, 2019
e99d5f6
chore: add saucelabs logo
Atinux Oct 15, 2019
3cde4c7
chore(deps): update all non-major dependencies (#6568)
renovate[bot] Oct 15, 2019
bda4a81
chore(deps): lock file maintenance (#6560)
renovate[bot] Oct 15, 2019
2b6589c
chore(deps): update all non-major dependencies (#6573)
renovate[bot] Oct 17, 2019
b031fac
fix: collapsed ssr log (#6590)
pimlie Oct 18, 2019
b8e1a71
examples(with-sockets): fix cannot read property 'app' of undefined o…
reskume Oct 18, 2019
99aba87
chore: lint error
clarkdo Oct 18, 2019
257ae22
fix(config): typo in `unsafeInlineCompatibility` name (#6583)
PedroD Oct 19, 2019
8391753
fix(webpack): normalize devtool for terser compatibility (#6566)
clarkdo Oct 19, 2019
de93484
fix(webpack): enable devtool for dev mode (#6495)
clarkdo Oct 19, 2019
ff6e6ef
chore(deps): update all non-major dependencies (#6591)
renovate[bot] Oct 19, 2019
a3f1957
chore(deps): update dependency execa to v3 (#6563)
renovate[bot] Oct 19, 2019
ec7428a
chore(deps): update devdependency rollup to ^1.25.1 (#6595)
renovate[bot] Oct 20, 2019
01e447e
chore(deps): update all non-major dependencies (#6599)
renovate[bot] Oct 21, 2019
92405b3
chore: sort changelog tags by date
pi0 Oct 21, 2019
9276c09
test: ssr log (#6596)
clarkdo Oct 21, 2019
437af14
chore(deps): lock file maintenance (#6598)
renovate[bot] Oct 21, 2019
3d51c03
chore(deps): update dependency glob to ^7.1.5 (#6602)
renovate[bot] Oct 21, 2019
f6aa45d
v2.10.2 [release]
pi0 Oct 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,16 @@ Please refer to our [Contribution Guide](https://nuxtjs.org/guide/contribution-g

## Cross-browser testing

Thanks to BrowserStack!
Thanks to [BrowserStack](http://browserstack.com)!

<a href="http://browserstack.com"><img height="70" src="https://nuxtjs.org/browserstack.svg" alt="BrowserStack"></a>

## Automated testing

Thanks to [SauceLabs](https://saucelabs.com) for supporting Open Source <3

<a href="https://saucelabs.com"><img height="70" src="https://nuxtjs.org/saucelabs.svg" alt="SauceLabs"></a>

## Security

If you discover a security vulnerability regarding Nuxt.js, please send an e-mail to the team via security@nuxtjs.org! All security vulnerabilities will be promptly addressed.
Expand Down
6 changes: 3 additions & 3 deletions distributions/nuxt-start/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-start",
"version": "2.10.1",
"version": "2.10.2",
"description": "Starts Nuxt.js Application in production mode",
"keywords": [
"nuxt",
Expand Down Expand Up @@ -55,8 +55,8 @@
"main": "dist/nuxt-start.js",
"bin": "bin/nuxt-start.js",
"dependencies": {
"@nuxt/cli": "2.10.1",
"@nuxt/core": "2.10.1",
"@nuxt/cli": "2.10.2",
"@nuxt/core": "2.10.2",
"node-fetch": "^2.6.0",
"vue": "^2.6.10",
"vue-client-only": "^2.0.0",
Expand Down
12 changes: 6 additions & 6 deletions distributions/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt",
"version": "2.10.1",
"version": "2.10.2",
"description": "A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)",
"keywords": [
"nuxt",
Expand Down Expand Up @@ -57,13 +57,13 @@
"postinstall": "opencollective || exit 0"
},
"dependencies": {
"@nuxt/builder": "2.10.1",
"@nuxt/cli": "2.10.1",
"@nuxt/core": "2.10.1",
"@nuxt/generator": "2.10.1",
"@nuxt/builder": "2.10.2",
"@nuxt/cli": "2.10.2",
"@nuxt/core": "2.10.2",
"@nuxt/generator": "2.10.2",
"@nuxt/loading-screen": "^1.2.0",
"@nuxt/opencollective": "^0.3.0",
"@nuxt/webpack": "2.10.1"
"@nuxt/webpack": "2.10.2"
},
"engines": {
"node": ">=8.9.0",
Expand Down
32 changes: 17 additions & 15 deletions examples/with-sockets/io/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ import http from 'http'
import socketIO from 'socket.io'

export default function () {
const server = http.createServer(this.nuxt.renderer.app)
const io = socketIO(server)
this.nuxt.hook('render:before', (renderer) => {
const server = http.createServer(this.nuxt.renderer.app)
const io = socketIO(server)

// overwrite nuxt.server.listen()
this.nuxt.server.listen = (port, host) => new Promise(resolve => server.listen(port || 3000, host || 'localhost', resolve))
// close this server on 'close' event
this.nuxt.hook('close', () => new Promise(server.close))
// overwrite nuxt.server.listen()
this.nuxt.server.listen = (port, host) => new Promise(resolve => server.listen(port || 3000, host || 'localhost', resolve))
// close this server on 'close' event
this.nuxt.hook('close', () => new Promise(server.close))

// Add socket.io events
const messages = []
io.on('connection', (socket) => {
socket.on('last-messages', function (fn) {
fn(messages.slice(-50))
})
socket.on('send-message', function (message) {
messages.push(message)
socket.broadcast.emit('new-message', message)
// Add socket.io events
const messages = []
io.on('connection', (socket) => {
socket.on('last-messages', function (fn) {
fn(messages.slice(-50))
})
socket.on('send-message', function (message) {
messages.push(message)
socket.broadcast.emit('new-message', message)
})
})
})
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.10.1",
"version": "2.10.2",
"npmClient": "yarn",
"useWorkspaces": true,
"conventionalCommits": true,
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@
"eslint": "6.5.1",
"eslint-multiplexer": "^2.0.0",
"esm": "^3.2.25",
"execa": "^2.1.0",
"execa": "^3.2.0",
"express": "^4.17.1",
"finalhandler": "^1.1.2",
"fork-ts-checker-webpack-plugin": "^1.5.0",
"fork-ts-checker-webpack-plugin": "^1.5.1",
"fs-extra": "^8.1.0",
"get-port": "^5.0.0",
"glob": "^7.1.4",
"glob": "^7.1.5",
"is-wsl": "^2.1.1",
"jest": "^24.9.0",
"jest-junit": "^8.0.0",
"jsdom": "^15.1.1",
"jsdom": "^15.2.0",
"klaw-sync": "^6.0.0",
"lerna": "^3.17.0",
"lerna": "^3.18.1",
"lodash": "^4.17.15",
"node-fetch": "^2.6.0",
"node-sass": "^4.12.0",
"puppeteer-core": "^1.20.0",
"request": "^2.88.0",
"request-promise-native": "^1.0.7",
"rimraf": "^3.0.0",
"rollup": "^1.23.1",
"rollup-plugin-alias": "^2.0.1",
"rollup": "^1.25.1",
"rollup-plugin-alias": "^2.2.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/babel-preset-app",
"version": "2.10.1",
"version": "2.10.2",
"description": "babel-preset-app for nuxt.js",
"repository": "nuxt/nuxt.js",
"license": "MIT",
Expand Down
10 changes: 5 additions & 5 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/builder",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
Expand All @@ -9,12 +9,12 @@
"main": "dist/builder.js",
"dependencies": {
"@nuxt/devalue": "^1.2.4",
"@nuxt/utils": "2.10.1",
"@nuxt/vue-app": "2.10.1",
"chokidar": "^3.2.1",
"@nuxt/utils": "2.10.2",
"@nuxt/vue-app": "2.10.2",
"chokidar": "^3.2.2",
"consola": "^2.10.1",
"fs-extra": "^8.1.0",
"glob": "^7.1.4",
"glob": "^7.1.5",
"hash-sum": "^2.0.0",
"ignore": "^5.1.4",
"lodash": "^4.17.15",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/cli",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
Expand All @@ -12,13 +12,13 @@
"nuxt-cli": "bin/nuxt-cli.js"
},
"dependencies": {
"@nuxt/config": "2.10.1",
"@nuxt/utils": "2.10.1",
"@nuxt/config": "2.10.2",
"@nuxt/utils": "2.10.2",
"boxen": "^4.1.0",
"chalk": "^2.4.2",
"consola": "^2.10.1",
"esm": "^3.2.25",
"execa": "^2.1.0",
"execa": "^3.2.0",
"exit": "^0.1.2",
"fs-extra": "^8.1.0",
"hable": "^2.3.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/config",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
Expand All @@ -10,7 +10,7 @@
"main": "dist/config.js",
"typings": "index.d.ts",
"dependencies": {
"@nuxt/utils": "2.10.1",
"@nuxt/utils": "2.10.2",
"consola": "^2.10.1",
"std-env": "^2.2.1"
},
Expand Down
9 changes: 8 additions & 1 deletion packages/config/src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,16 @@ export function getNuxtConfig (_options) {
allowedSources: undefined,
policies: undefined,
addMeta: Boolean(options._generate),
unsafeInlineCompatiblity: false,
unsafeInlineCompatibility: false,
reportOnly: options.debug
})

// TODO: Remove this if statement in Nuxt 3, we will stop supporting this typo (more on: https://github.com/nuxt/nuxt.js/pull/6583)
if (options.render.csp.unsafeInlineCompatiblity) {
consola.warn('Using `unsafeInlineCompatiblity` is deprecated and will be removed in Nuxt 3. Use `unsafeInlineCompatibility` instead.')
options.render.csp.unsafeInlineCompatibility = options.render.csp.unsafeInlineCompatiblity
delete options.render.csp.unsafeInlineCompatiblity
}
}

// cssSourceMap
Expand Down
16 changes: 15 additions & 1 deletion packages/config/test/options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,21 @@ describe('config: options', () => {
expect(csp).toEqual({
hashAlgorithm: 'sha256',
addMeta: false,
unsafeInlineCompatiblity: false,
unsafeInlineCompatibility: false,
allowedSources: true,
policies: undefined,
reportOnly: false,
test: true
})
})

// TODO: Remove this test in Nuxt 3, we will stop supporting this typo (more on: https://github.com/nuxt/nuxt.js/pull/6583)
test('should enable csp with old typo property name, avoiding breaking changes', () => {
const { render: { csp } } = getNuxtConfig({ render: { csp: { allowedSources: true, test: true, unsafeInlineCompatiblity: true } } })
expect(csp).toEqual({
hashAlgorithm: 'sha256',
addMeta: false,
unsafeInlineCompatibility: true,
allowedSources: true,
policies: undefined,
reportOnly: false,
Expand Down
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "@nuxt/core",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
"dist"
],
"main": "dist/core.js",
"dependencies": {
"@nuxt/config": "2.10.1",
"@nuxt/config": "2.10.2",
"@nuxt/devalue": "^1.2.4",
"@nuxt/server": "2.10.1",
"@nuxt/utils": "2.10.1",
"@nuxt/vue-renderer": "2.10.1",
"@nuxt/server": "2.10.2",
"@nuxt/utils": "2.10.2",
"@nuxt/vue-renderer": "2.10.2",
"consola": "^2.10.1",
"debug": "^4.1.1",
"esm": "^3.2.25",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@nuxt/generator",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
"dist"
],
"main": "dist/generator.js",
"dependencies": {
"@nuxt/utils": "2.10.1",
"@nuxt/utils": "2.10.2",
"chalk": "^2.4.2",
"consola": "^2.10.1",
"fs-extra": "^8.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@nuxt/server",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
"dist"
],
"main": "dist/server.js",
"dependencies": {
"@nuxt/config": "2.10.1",
"@nuxt/utils": "2.10.1",
"@nuxt/config": "2.10.2",
"@nuxt/utils": "2.10.2",
"@nuxtjs/youch": "^4.2.3",
"chalk": "^2.4.2",
"compression": "^1.7.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/utils",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/vue-app",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-app/template/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Object.assign(Vue.config, <%= serialize(vue.config) %>)<%= isTest ? '// eslint-d
const logs = NUXT.logs || []
if (logs.length > 0) {
const ssrLogSyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;'
console.group && console.group <%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ("%cNuxt SSR", ssrLogSyle)
console.group && console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ("%cNuxt SSR", ssrLogSyle)
logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args))
delete NUXT.logs
console.groupEnd && console.groupEnd()
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/vue-renderer",
"version": "2.10.1",
"version": "2.10.2",
"repository": "nuxt/nuxt.js",
"license": "MIT",
"files": [
Expand All @@ -9,7 +9,7 @@
"main": "dist/vue-renderer.js",
"dependencies": {
"@nuxt/devalue": "^1.2.4",
"@nuxt/utils": "2.10.1",
"@nuxt/utils": "2.10.2",
"consola": "^2.10.1",
"fs-extra": "^8.1.0",
"lru-cache": "^5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-renderer/src/renderers/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class SSRRenderer extends BaseRenderer {
if (csp) {
// Only add the hash if 'unsafe-inline' rule isn't present to avoid conflicts (#5387)
const containsUnsafeInlineScriptSrc = csp.policies && csp.policies['script-src'] && csp.policies['script-src'].includes(`'unsafe-inline'`)
if (csp.unsafeInlineCompatiblity || !containsUnsafeInlineScriptSrc) {
if (csp.unsafeInlineCompatibility || !containsUnsafeInlineScriptSrc) {
const hash = crypto.createHash(csp.hashAlgorithm)
hash.update(serializedSession)
cspScriptSrcHashes.push(`'${csp.hashAlgorithm}-${hash.digest('base64')}'`)
Expand Down