Commit bf69357f authored by JJ Kasper's avatar JJ Kasper Committed by Tim Neutkens

Remove onDemandEntries WebSocket server in favor of EventSource connection (#6354)

After talking with @timneutkens it was decided it'd be more streamlined to replace the onDemandEntries WebSocket with an alternative. Using the EventSource connection gives us these benefits over the WebSocket one:

- less code needed
- no extra server running
- no extra config for onDemandEntries
parent 3db53610
# onDemandEntries WebSocket unavailable
#### Why This Error Occurred
By default Next.js uses a random port to create a WebSocket to receive pings from the client letting it know to keep pages active. For some reason when the client tried to connect to this WebSocket the connection fails.
#### Possible Ways to Fix It
If you don't mind the fetch requests in your network console then you don't have to do anything as the fallback to fetch works fine. If you do, then depending on your set up you might need configure settings using the below config options from `next.config.js`:
```js
module.exports = {
onDemandEntries: {
// optionally configure a port for the onDemandEntries WebSocket, not needed by default
websocketPort: 3001,
// optionally configure a proxy path for the onDemandEntries WebSocket, not need by default
websocketProxyPath: '/hmr',
// optionally configure a proxy port for the onDemandEntries WebSocket, not need by default
websocketProxyPort: 7002,
},
}
```
If you are using a custom server with SSL configured, you might want to take a look at [the example](https://github.com/zeit/next.js/tree/canary/examples/custom-server-proxy-websocket) showing how to proxy the WebSocket connection through your custom server
### Useful Links
- [onDemandEntries config](https://github.com/zeit/next.js#configuring-the-ondemandentries)
- [Custom server proxying example](https://github.com/zeit/next.js/tree/canary/examples/custom-server-proxy-websocket)
\ No newline at end of file
# Custom server with Proxying onDemandEntries WebSocket
## How to use
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/segmentio/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
```bash
npx create-next-app --example custom-server-proxy-websocket custom-server-proxy-websocket
# or
yarn create next-app --example custom-server-proxy-websocket custom-server-proxy-websocket
```
### Download manually
Download the example:
```bash
curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/custom-server-proxy-websocket
cd custom-server-proxy-websocket
```
Install it and run:
```bash
npm install
npm run ssl
npm run dev
# or
yarn
yarn ssl
yarn dev
```
## The idea behind the example
The example shows how you can use SSL with a custom server and still use onDemandEntries WebSocket from Next.js using [node-http-proxy](https://github.com/nodejitsu/node-http-proxy#readme) and [ExpressJS](https://github.com/expressjs/express).
#!/bin/sh
# Generate self-signed certificate (only meant for testing don't use in production...)
# requires openssl be installed and in the $PATH
openssl genrsa -out localhost.key 2048
openssl req -new -x509 -key localhost.key -out localhost.cert -days 3650 -subj /CN=localhost
module.exports = {
onDemandEntries: {
websocketPort: 3001,
websocketProxyPort: 3000
}
}
{
"name": "custom-server-proxy-websocket",
"version": "1.0.0",
"main": "server.js",
"license": "MIT",
"scripts": {
"dev": "node server.js",
"build": "next build",
"ssl": "./genSSL.sh",
"start": "NODE_ENV=production node server.js"
},
"dependencies": {
"express": "4.16.4",
"next": "8.0.1",
"react": "16.8.2",
"react-dom": "16.8.2"
},
"devDependencies": {
"http-proxy": "1.17.0"
}
}
import Link from 'next/link'
export default () => (
<div>
<h3>Another</h3>
<Link href='/'>
<a>Index</a>
</Link>
</div>
)
import Link from 'next/link'
export default () => (
<div>
<h3>Index</h3>
<Link href='/another'>
<a>Another</a>
</Link>
</div>
)
const express = require('express')
const Next = require('next')
const https = require('https')
const fs = require('fs')
const app = express()
const port = 3000
const isDev = process.env.NODE_ENV !== 'production'
const next = Next({ dev: isDev })
// Set up next
next.prepare()
// Set up next handler
app.use(next.getRequestHandler())
// Set up https.Server options with SSL
const options = {
key: fs.readFileSync('./localhost.key'),
cert: fs.readFileSync('./localhost.cert')
}
// Create http server using express app as requestHandler
const server = https.createServer(options, app)
// Set up proxying for Next's onDemandEntries WebSocket to allow
// using our SSL
if (isDev) {
const CreateProxyServer = require('http-proxy').createProxyServer
const proxy = CreateProxyServer({
target: {
host: 'localhost',
port: 3001
}
})
server.on('upgrade', (req, socket, head) => {
proxy.ws(req, socket, head)
})
}
server.listen(port, () => {
console.log(`Server listening at http://localhost:${port}`)
})
......@@ -60,6 +60,7 @@
"@zeit/next-css": "1.0.2-canary.2",
"@zeit/next-sass": "1.0.2-canary.2",
"@zeit/next-typescript": "1.1.2-canary.0",
"abort-controller": "2.0.2",
"amphtml-validator": "1.0.23",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
......@@ -79,7 +80,7 @@
"lerna": "^3.4.0",
"lint-staged": "4.2.3",
"mkdirp": "0.5.1",
"node-fetch": "1.7.3",
"node-fetch": "2.3.0",
"node-notifier": "5.1.2",
"node-sass": "4.9.2",
"pre-commit": "1.2.2",
......
......@@ -18,10 +18,7 @@ const defaultConfig = {
target: 'server',
onDemandEntries: {
maxInactiveAge: 60 * 1000,
pagesBufferLength: 2,
websocketPort: 0,
websocketProxyPath: '/',
websocketProxyPort: null
pagesBufferLength: 2
},
experimental: {
amp: false
......
......@@ -1437,13 +1437,7 @@ module.exports = {
// period (in ms) where the server will keep pages in the buffer
maxInactiveAge: 25 * 1000,
// number of pages that should be kept simultaneously without being disposed
pagesBufferLength: 2,
// optionally configure a port for the onDemandEntries WebSocket, not needed by default
websocketPort: 3001,
// optionally configure a proxy path for the onDemandEntries WebSocket, not need by default
websocketProxyPath: '/hmr',
// optionally configure a proxy port for the onDemandEntries WebSocket, not need by default
websocketProxyPort: 7002,
pagesBufferLength: 2
},
}
```
......
/* global location, WebSocket */
/* global window, location */
import Router from 'next/router'
import fetch from 'unfetch'
const { hostname, protocol } = location
const wsProtocol = protocol.includes('https') ? 'wss' : 'ws'
const retryTime = 5000
let ws = null
let lastHref = null
let wsConnectTries = 0
let showedWarning = false
let evtSource
let currentPage
let retryTimeout
const retryWait = 5000
export default async ({ assetPrefix }) => {
Router.ready(() => {
Router.events.on('routeChangeComplete', ping)
Router.events.on('routeChangeComplete', setupPing)
})
const setup = async () => {
if (ws && ws.readyState === ws.OPEN) {
return Promise.resolve()
} else if (wsConnectTries > 1) {
return
function setupPing (retry) {
// Make sure to only create new EventSource request if page has changed
if (Router.pathname === currentPage && !retry) return
// close current EventSource connection
if (evtSource) {
evtSource.close()
}
wsConnectTries++
currentPage = Router.pathname
return new Promise(resolve => {
ws = new WebSocket(`${wsProtocol}://${hostname}:${process.env.__NEXT_WS_PORT}${process.env.__NEXT_WS_PROXY_PATH}`)
ws.onopen = () => {
wsConnectTries = 0
resolve()
}
ws.onclose = () => {
setTimeout(async () => {
await fetch(`${assetPrefix}/_next/on-demand-entries-ping`)
.then(res => {
// Only reload if next was restarted and we have a new WebSocket port
if (res.status === 200 && res.headers.get('port') !== process.env.__NEXT_WS_PORT + '') {
location.reload()
}
})
.catch(() => {})
await setup(true)
resolve()
}, retryTime)
}
ws.onmessage = async ({ data }) => {
const payload = JSON.parse(data)
if (payload.invalid && lastHref !== location.href) {
// Payload can be invalid even if the page does not exist.
// So, we need to make sure it exists before reloading.
const pageRes = await fetch(location.href, {
credentials: 'omit'
})
if (pageRes.status === 200) {
location.reload()
} else {
lastHref = location.href
}
}
}
})
}
setup()
const url = `${assetPrefix}/_next/on-demand-entries-ping?page=${currentPage}`
evtSource = new window.EventSource(url)
async function ping () {
// Use WebSocket if available
if (ws && ws.readyState === ws.OPEN) {
return ws.send(Router.pathname)
evtSource.onerror = () => {
retryTimeout = setTimeout(() => setupPing(true), retryWait)
}
if (!showedWarning) {
console.warn('onDemandEntries WebSocket failed to connect, falling back to fetch based pinging. https://err.sh/zeit/next.js/on-demand-entries-websocket-unavailable')
showedWarning = true
evtSource.onopen = () => {
clearTimeout(retryTimeout)
}
// If not, fallback to fetch based pinging
try {
const url = `${assetPrefix || ''}/_next/on-demand-entries-ping?page=${Router.pathname}`
const res = await fetch(url, {
credentials: 'same-origin'
})
const payload = await res.json()
evtSource.onmessage = event => {
const payload = JSON.parse(event.data)
if (payload.invalid) {
// Payload can be invalid even if the page does not exist.
// So, we need to make sure it exists before reloading.
const pageRes = await fetch(location.href, {
fetch(location.href, {
credentials: 'same-origin'
}).then(pageRes => {
if (pageRes.status === 200) {
location.reload()
}
})
if (pageRes.status === 200) {
location.reload()
}
}
} catch (err) {
console.error(`Error with on-demand-entries-ping: ${err.message}`)
}
}
let pingerTimeout
async function runPinger () {
// Will restart on the visibilitychange API below. For older browsers, this
// will always be true and will always run, but support is fairly prevalent
// at this point.
while (!document.hidden) {
await ping()
await new Promise(resolve => {
pingerTimeout = setTimeout(resolve, 5000)
})
}
}
document.addEventListener(
'visibilitychange',
() => {
if (!document.hidden) {
runPinger()
} else {
clearTimeout(pingerTimeout)
}
},
false
)
setTimeout(() => {
runPinger().catch(err => {
console.error(err)
})
}, 10000)
setupPing(currentPage)
}
......@@ -94,8 +94,7 @@
"webpack-dev-middleware": "3.4.0",
"webpack-hot-middleware": "2.24.3",
"webpack-sources": "1.3.0",
"worker-farm": "1.5.2",
"ws": "6.1.2"
"worker-farm": "1.5.2"
},
"peerDependencies": {
"react": "^16.6.0",
......
......@@ -5,7 +5,6 @@ import errorOverlayMiddleware from './lib/error-overlay-middleware'
import del from 'del'
import onDemandEntryHandler, {normalizePage} from './on-demand-entry-handler'
import webpack from 'webpack'
import WebSocket from 'ws'
import getBaseWebpackConfig from '../build/webpack-config'
import {IS_BUNDLED_PAGE_REGEX, ROUTE_NAME_REGEX, BLOCKED_PAGES} from 'next-server/constants'
import {route} from 'next-server/dist/server/router'
......@@ -165,15 +164,6 @@ export default class HotReloader {
return del(join(this.dir, this.config.distDir), { force: true })
}
addWsConfig (configs) {
const { websocketProxyPath, websocketProxyPort } = this.config.onDemandEntries
const opts = {
'process.env.__NEXT_WS_PORT': websocketProxyPort || this.wsPort,
'process.env.__NEXT_WS_PROXY_PATH': JSON.stringify(websocketProxyPath)
}
configs[0].plugins.push(new webpack.DefinePlugin(opts))
}
async getWebpackConfig () {
const pagePaths = await glob(`+(_app|_document).+(${this.config.pageExtensions.join('|')})`, {cwd: join(this.dir, 'pages')})
const pages = createPagesMapping(pagePaths, this.config.pageExtensions)
......@@ -187,24 +177,7 @@ export default class HotReloader {
async start () {
await this.clean()
this.wsPort = await new Promise((resolve, reject) => {
const { websocketPort } = this.config.onDemandEntries
// create on-demand-entries WebSocket
this.wss = new WebSocket.Server({ port: websocketPort }, function (err) {
if (err) {
return reject(err)
}
const {port} = this.address()
if (!port) {
return reject(new Error('No websocket port could be detected'))
}
resolve(port)
})
})
const configs = await this.getWebpackConfig()
this.addWsConfig(configs)
const multiCompiler = webpack(configs)
......@@ -215,7 +188,6 @@ export default class HotReloader {
}
async stop (webpackDevMiddleware) {
this.wss.close()
const middleware = webpackDevMiddleware || this.webpackDevMiddleware
if (middleware) {
return new Promise((resolve, reject) => {
......@@ -233,8 +205,6 @@ export default class HotReloader {
await this.clean()
const configs = await this.getWebpackConfig()
this.addWsConfig(configs)
const compiler = webpack(configs)
const buildTools = await this.prepareBuildTools(compiler)
......@@ -250,7 +220,6 @@ export default class HotReloader {
this.webpackDevMiddleware = webpackDevMiddleware
this.webpackHotMiddleware = webpackHotMiddleware
this.onDemandEntries = onDemandEntries
this.wss.on('connection', this.onDemandEntries.wsConnection)
this.middlewares = [
webpackDevMiddleware,
webpackHotMiddleware,
......@@ -367,7 +336,6 @@ export default class HotReloader {
buildId: this.buildId,
reload: this.reload.bind(this),
pageExtensions: this.config.pageExtensions,
wsPort: this.wsPort,
...this.config.onDemandEntries
})
......
......@@ -34,9 +34,18 @@ export default function onDemandEntryHandler (devMiddleware, multiCompiler, {
reload,
pageExtensions,
maxInactiveAge,
pagesBufferLength,
wsPort
pagesBufferLength
}) {
const clients = new Set()
const evtSourceHeaders = {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'text/event-stream;charset=utf-8',
'Cache-Control': 'no-cache, no-transform',
// While behind nginx, event stream should not be buffered:
// http://nginx.org/docs/http/ngx_http_proxy_module.html#proxy_buffering
'X-Accel-Buffering': 'no',
'Connection': 'keep-alive'
}
const {compilers} = multiCompiler
const invalidator = new Invalidator(devMiddleware, multiCompiler)
let entries = {}
......@@ -147,29 +156,31 @@ export default function onDemandEntryHandler (devMiddleware, multiCompiler, {
disposeHandler.unref()
function stop () {
clients.forEach(client => client.end())
clearInterval(disposeHandler)
stopped = true
doneCallbacks = null
reloadCallbacks = null
}
function handlePing (pg, socket) {
function handlePing (pg) {
const page = normalizePage(pg)
const entryInfo = entries[page]
let toSend
// If there's no entry.
// Then it seems like an weird issue.
if (!entryInfo) {
const message = `Client pings, but there's no entry for page: ${page}`
console.error(message)
return sendJson(socket, { invalid: true })
return { invalid: true }
}
// 404 is an on demand entry but when a new page is added we have to refresh the page
if (page === '/_error') {
sendJson(socket, { invalid: true })
toSend = { invalid: true }
} else {
sendJson(socket, { success: true })
toSend = { success: true }
}
// We don't need to maintain active state of anything other than BUILT entries
......@@ -185,6 +196,7 @@ export default function onDemandEntryHandler (devMiddleware, multiCompiler, {
}
}
entryInfo.lastActiveTime = Date.now()
return toSend
}
return {
......@@ -258,13 +270,6 @@ export default function onDemandEntryHandler (devMiddleware, multiCompiler, {
})
},
wsConnection (ws) {
ws.onmessage = ({ data }) => {
// `data` should be the page here
handlePing(data, ws)
}
},
middleware () {
return (req, res, next) => {
if (stopped) {
......@@ -287,14 +292,27 @@ export default function onDemandEntryHandler (devMiddleware, multiCompiler, {
if (!/^\/_next\/on-demand-entries-ping/.test(req.url)) return next()
const { query } = parse(req.url, true)
if (query.page) {
return handlePing(query.page, res)
const page = query.page
if (!page) return next()
// Upgrade request to EventSource
req.socket.setKeepAlive(true)
res.writeHead(200, evtSourceHeaders)
res.write('\n')
clients.add(res)
const runPing = () => {
const data = handlePing(query.page)
res.write('data: ' + JSON.stringify(data) + '\n\n')
}
res.statusCode = 200
res.setHeader('port', wsPort)
res.end('200')
const pingInterval = setInterval(() => runPing(), 5000)
req.on('close', () => {
clients.delete(res)
clearInterval(pingInterval)
})
// Do initial ping right after EventSource is finished being set up
runPing()
}
}
}
......@@ -340,19 +358,6 @@ export function normalizePage (page) {
return unixPagePath.replace(/\/index$/, '')
}
function sendJson (socket, data) {
data = JSON.stringify(data)
// Handle fetch request
if (socket.setHeader) {
socket.setHeader('content-type', 'application/json')
socket.status = 200
return socket.end(data)
}
// Should be WebSocket so just send
socket.send(data)
}
// Make sure only one invalidation happens at a time
// Otherwise, webpack hash gets changed and it'll force the client to reload.
class Invalidator {
......
......@@ -5,8 +5,7 @@ const path = require('path')
module.exports = withCSS(withSass({
onDemandEntries: {
// Make sure entries are not getting disposed.
maxInactiveAge: 1000 * 60 * 60,
websocketPort: 3001
maxInactiveAge: 1000 * 60 * 60
},
cssModules: true,
serverRuntimeConfig: {
......
/* eslint-env jest */
import webdriver from 'next-webdriver'
import { waitFor, fetchViaHTTP } from 'next-test-utils' /* check, File */
import { waitFor } from 'next-test-utils' /* check, File */
import { readFileSync, writeFileSync } from 'fs'
import { join } from 'path'
......@@ -22,12 +22,6 @@ export default (context, render) => {
browser.close()
})
it('should use websocketPort for on-demand-entries WebSocket', async () => {
const res = await fetchViaHTTP(context.appPort, '/_next/on-demand-entries-ping')
const wsPort = res.headers.get('port')
expect(wsPort).toBe(context.devWebSocketPort + '')
})
it('should update css styles using hmr', async () => {
let browser
try {
......
......@@ -6,8 +6,7 @@ import {
fetchViaHTTP,
findPort,
launchApp,
killApp,
File
killApp
} from 'next-test-utils'
// test suits
......@@ -20,15 +19,6 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
describe('Configuration', () => {
beforeAll(async () => {
context.appPort = await findPort()
context.devWebSocketPort = await findPort()
// update next.config with found devWebSocketPort (must come before launchApp)
context.nextConfig = new File(join(__dirname, '../next.config.js'))
context.nextConfig.replace(
'websocketPort: 3001',
`websocketPort: ${context.devWebSocketPort}`
)
context.server = await launchApp(join(__dirname, '../'), context.appPort)
// pre-build all pages at the start
......@@ -41,7 +31,6 @@ describe('Configuration', () => {
})
afterAll(() => {
killApp(context.server)
context.nextConfig.restore()
})
rendering(context, 'Rendering via HTTP', (p, q) => renderViaHTTP(context.appPort, p, q), (p, q) => fetchViaHTTP(context.appPort, p, q))
......
......@@ -3,7 +3,7 @@
import { join, resolve } from 'path'
import { existsSync } from 'fs'
import webdriver from 'next-webdriver'
import WebSocket from 'ws'
import AbortController from 'abort-controller'
import {
renderViaHTTP,
fetchViaHTTP,
......@@ -17,11 +17,20 @@ import {
const context = {}
const doPing = path => {
return new Promise(resolve => {
context.ws.onmessage = () => resolve()
context.ws.send(path)
})
const doPing = page => {
const controller = new AbortController()
const signal = controller.signal
return fetchViaHTTP(context.appPort, '/_next/on-demand-entries-ping', { page }, { signal })
.then(res => {
res.body.on('data', chunk => {
try {
const payload = JSON.parse(chunk.toString().split('data:')[1])
if (payload.success || payload.invalid) {
controller.abort()
}
} catch (_) {}
})
})
}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
......@@ -31,15 +40,6 @@ describe('On Demand Entries', () => {
beforeAll(async () => {
context.appPort = await findPort()
context.server = await launchApp(join(__dirname, '../'), context.appPort)
await new Promise(resolve => {
fetchViaHTTP(context.appPort, '/_next/on-demand-entries-ping').then(res => {
const wsPort = res.headers.get('port')
context.ws = new WebSocket(
`ws://localhost:${wsPort}`
)
context.ws.on('open', () => resolve())
})
})
})
afterAll(() => {
context.ws.close()
......@@ -103,12 +103,4 @@ describe('On Demand Entries', () => {
}
}
})
it('should able to ping using fetch fallback', async () => {
const about = await renderViaHTTP(context.appPort, '/_next/on-demand-entries-ping', {page: '/about'})
expect(JSON.parse(about)).toEqual({success: true})
const third = await renderViaHTTP(context.appPort, '/_next/on-demand-entries-ping', {page: '/third'})
expect(JSON.parse(third)).toEqual({success: true})
})
})
......@@ -56,9 +56,9 @@ export function renderViaHTTP (appPort, pathname, query) {
return fetchViaHTTP(appPort, pathname, query).then((res) => res.text())
}
export function fetchViaHTTP (appPort, pathname, query) {
export function fetchViaHTTP (appPort, pathname, query, opts) {
const url = `http://localhost:${appPort}${pathname}${query ? `?${qs.stringify(query)}` : ''}`
return fetch(url)
return fetch(url, opts)
}
export function findPort () {
......
......@@ -1734,6 +1734,13 @@ abbrev@1:
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
abort-controller@2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-2.0.2.tgz#f0c059173ac7fdc4dba73e3833102def407a6a29"
integrity sha512-JXEYGxxMwiNl9EUdLysK0K0DwB7ENw6KeeaLHgofijTfJYPB/vOer3Mb+IcP913dCfWiQsd05MmVNl0H5PanrQ==
dependencies:
event-target-shim "^5.0.0"
accepts@~1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
......@@ -4760,6 +4767,11 @@ event-source-polyfill@0.0.12:
resolved "https://registry.yarnpkg.com/event-source-polyfill/-/event-source-polyfill-0.0.12.tgz#e539cd67fdef2760a16aa5262fa98134df52e3af"
integrity sha1-5TnNZ/3vJ2ChaqUmL6mBNN9S468=
event-target-shim@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.0.tgz#8fabe06975219af64c36ceed4771cf1ad1c3455c"
integrity sha512-vu4tlY5xqMEGj/rzuDHxfvm9Kk2562O5h58i8xwnkMkv/yqmBqBcDJt/vGBrOBbCKuVc5eV3ghYxAX9YUhyi0w==
events@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
......@@ -6639,7 +6651,7 @@ is-retry-allowed@^1.0.0:
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=
is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
is-stream@^1.0.0, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
......@@ -8277,15 +8289,7 @@ node-fetch-npm@^2.0.2:
json-parse-better-errors "^1.0.0"
safe-buffer "^5.1.1"
node-fetch@1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"
node-fetch@^2.1.1, node-fetch@^2.2.0:
node-fetch@2.3.0, node-fetch@^2.1.1, node-fetch@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5"
integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==
......@@ -12387,13 +12391,6 @@ write@^0.2.1:
dependencies:
mkdirp "^0.5.1"
ws@6.1.2, ws@^6.0.0:
version "6.1.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8"
integrity sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==
dependencies:
async-limiter "~1.0.0"
ws@^5.2.0:
version "5.2.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
......@@ -12401,6 +12398,13 @@ ws@^5.2.0:
dependencies:
async-limiter "~1.0.0"
ws@^6.0.0:
version "6.1.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.2.tgz#3cc7462e98792f0ac679424148903ded3b9c3ad8"
integrity sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==
dependencies:
async-limiter "~1.0.0"
xdg-basedir@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment