diff --git a/lib/core/renderer.js b/lib/core/renderer.js index 16187ff93e..c7428b71be 100644 --- a/lib/core/renderer.js +++ b/lib/core/renderer.js @@ -226,7 +226,7 @@ module.exports = class Renderer { const _this = this if (this.options.debug && this.options.dev) { this.useMiddleware({ - path: '_open', + path: '__open-in-editor', handler(req, res) { // Lazy load open-in-editor const openInEditor = require('open-in-editor') diff --git a/package.json b/package.json index e4d4d733c6..e121316de2 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "npm": ">=5.0.0" }, "dependencies": { - "@nuxtjs/youch": "^3.1.0", + "@nuxtjs/youch": "^4.0.0", "ansi-html": "^0.0.7", "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", diff --git a/test/debug.test.js b/test/debug.test.js index 3a1ccf3ea6..a60b3c6cf8 100644 --- a/test/debug.test.js +++ b/test/debug.test.js @@ -25,18 +25,18 @@ test.serial('Init Nuxt.js', async t => { t.true(logSpy.calledWithMatch('OPEN')) }) -test.serial('/test/_open (open-in-editor)', async t => { +test.serial('/test/__open-in-editor (open-in-editor)', async t => { const logSpy = await interceptLog() - const { body } = await rp(url('/test/_open?file=pages/index.vue'), { resolveWithFullResponse: true }) + const { body } = await rp(url('/test/__open-in-editor?file=pages/index.vue'), { resolveWithFullResponse: true }) t.is(body, 'opened in editor!') release() t.is(logSpy.getCall(0).args[0], '[open in editor]') t.true(logSpy.calledOnce) }) -test.serial('/test/_open should return error (open-in-editor)', async t => { +test.serial('/test/__open-in-editor should return error (open-in-editor)', async t => { const logSpy = await interceptLog() - const { body } = await rp(url('/test/_open?file='), { resolveWithFullResponse: true }) + const { body } = await rp(url('/test/__open-in-editor?file='), { resolveWithFullResponse: true }) t.is(body, 'File is not specified') release() t.is(logSpy.getCall(0).args[0], '[open in editor]') diff --git a/test/fixtures/debug/nuxt.config.js b/test/fixtures/debug/nuxt.config.js index 8de5df3d80..3f41a73c62 100644 --- a/test/fixtures/debug/nuxt.config.js +++ b/test/fixtures/debug/nuxt.config.js @@ -2,7 +2,7 @@ module.exports = { router: { base: '/test/' }, - dev: true, // Needed for _open middleware + dev: true, // Needed for __open-in-editor middleware debug: true, editor: { cmd: 'echo', diff --git a/yarn.lock b/yarn.lock index f8ded0467f..3479e92e13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -97,9 +97,9 @@ dependencies: arrify "^1.0.1" -"@nuxtjs/youch@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@nuxtjs/youch/-/youch-3.1.0.tgz#0e4f38d1b9ede2a77b121c02cbd839937e8918ad" +"@nuxtjs/youch@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nuxtjs/youch/-/youch-4.0.0.tgz#74eb880f57a3f76f7684f69ba2753a815f308deb" dependencies: cookie "^0.3.1" mustache "^2.3.0"