From 078b2a5e492c001f6ca51387902a252f22e15772 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 30 Dec 2019 13:40:23 -0500 Subject: [PATCH 001/321] Refactor SSG Data Fetching (#9884) --- .../next/next-server/lib/router/router.ts | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index fe99dcca461c2eb..2a4380ff441a2be 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -440,18 +440,23 @@ export default class Router implements BaseRouter { } } - return new Promise((resolve, reject) => { - // we provide AppTree later so this needs to be `any` - this.getInitialProps(Component, { - pathname, - query, - asPath: as, - } as any).then(props => { - routeInfo.props = props - this.components[route] = routeInfo - resolve(routeInfo) - }, reject) - }) as Promise + return this._getData(() => + (Component as any).__NEXT_SPR + ? this._getStaticData(as) + : this.getInitialProps( + Component, + // we provide AppTree later so this needs to be `any` + { + pathname, + query, + asPath: as, + } as any + ) + ).then(props => { + routeInfo.props = props + this.components[route] = routeInfo + return routeInfo + }) }) .catch(err => { return new Promise(resolve => { @@ -651,6 +656,25 @@ export default class Router implements BaseRouter { }) } + _getStaticData = (asPath: string): Promise => { + let pathname = parse(asPath).pathname + pathname = !pathname || pathname === '/' ? '/index' : pathname + return fetch( + // @ts-ignore __NEXT_DATA__ + `/_next/data/${__NEXT_DATA__.buildId}${pathname}.json` + ) + .then(res => { + if (!res.ok) { + throw new Error(`Failed to load static props`) + } + return res.json() + }) + .catch((err: Error) => { + ;(err as any).code = 'PAGE_LOAD_ERROR' + throw err + }) + } + getInitialProps( Component: ComponentType, ctx: NextPageContext @@ -658,36 +682,11 @@ export default class Router implements BaseRouter { const { Component: App } = this.components['/_app'] const AppTree = this._wrapApp(App) ctx.AppTree = AppTree - return this._getData(() => { - if ((Component as any).__NEXT_SPR) { - let status: any - // pathname should have leading slash - let { pathname } = parse(ctx.asPath || ctx.pathname) - pathname = !pathname || pathname === '/' ? '/index' : pathname - - return fetch( - // @ts-ignore __NEXT_DATA__ - `/_next/data/${__NEXT_DATA__.buildId}${pathname}.json` - ) - .then(res => { - if (!res.ok) { - status = res.status - throw new Error('failed to load prerender data') - } - return res.json() - }) - .catch((err: Error) => { - console.error(`Failed to load data`, status, err) - window.location.href = pathname! - return new Promise(() => {}) - }) - } - return loadGetInitialProps>(App, { - AppTree, - Component, - router: this, - ctx, - }) + return loadGetInitialProps>(App, { + AppTree, + Component, + router: this, + ctx, }) } From 31f3bfa18f0790e53382287c32ece33b1abe59ec Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 30 Dec 2019 12:48:45 -0600 Subject: [PATCH 002/321] Add test ensuring basePath is added to routes-manifest (#9885) --- test/integration/basepath/test/index.test.js | 124 ++++++------------- 1 file changed, 35 insertions(+), 89 deletions(-) diff --git a/test/integration/basepath/test/index.test.js b/test/integration/basepath/test/index.test.js index 83ac33680335099..e3b19b33ad0a942 100644 --- a/test/integration/basepath/test/index.test.js +++ b/test/integration/basepath/test/index.test.js @@ -17,23 +17,27 @@ import { File, nextStart, } from 'next-test-utils' -import { readFileSync, writeFileSync, renameSync, existsSync } from 'fs' +import fs, { + readFileSync, + writeFileSync, + renameSync, + existsSync, +} from 'fs-extra' import cheerio from 'cheerio' -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 -describe('basePath development', () => { - let server - - let context = {} +const appDir = join(__dirname, '..') - beforeAll(async () => { - context.appPort = await findPort() - server = await launchApp(join(__dirname, '..'), context.appPort) - }) - afterAll(async () => { - await killApp(server) - }) +const runTests = (context, dev = false) => { + if (!dev) { + it('should add basePath to routes-manifest', async () => { + const routesManifest = await fs.readJSON( + join(appDir, '.next/routes-manifest.json') + ) + expect(routesManifest.basePath).toBe('/docs') + }) + } it('should show the hello page under the /docs prefix', async () => { const browser = await webdriver(context.appPort, '/docs/hello') @@ -72,6 +76,22 @@ describe('basePath development', () => { await browser.close() } }) +} + +describe('basePath development', () => { + let server + + let context = {} + + beforeAll(async () => { + context.appPort = await findPort() + server = await launchApp(join(__dirname, '..'), context.appPort) + }) + afterAll(async () => { + await killApp(server) + }) + + runTests(context, true) describe('Hot Module Reloading', () => { describe('delete a page and add it back', () => { @@ -379,7 +399,6 @@ describe('basePath development', () => { }) describe('basePath production', () => { - const appDir = join(__dirname, '../') let context = {} let server let app @@ -398,47 +417,10 @@ describe('basePath production', () => { afterAll(() => stopApp(server)) - it('should show the hello page under the /docs prefix', async () => { - const browser = await webdriver(context.appPort, '/docs/hello') - try { - const text = await browser.elementByCss('h1').text() - expect(text).toBe('Hello World') - } finally { - await browser.close() - } - }) - - it('should show the other-page page under the /docs prefix', async () => { - const browser = await webdriver(context.appPort, '/docs/other-page') - try { - const text = await browser.elementByCss('h1').text() - expect(text).toBe('Hello Other') - } finally { - await browser.close() - } - }) - - it('should navigate to the page without refresh', async () => { - const browser = await webdriver(context.appPort, '/docs/hello') - try { - await browser.eval('window.itdidnotrefresh = "hello"') - const text = await browser - .elementByCss('#other-page-link') - .click() - .waitForElementByCss('#other-page-title') - .elementByCss('h1') - .text() - - expect(text).toBe('Hello Other') - expect(await browser.eval('window.itdidnotrefresh')).toBe('hello') - } finally { - await browser.close() - } - }) + runTests(context) }) describe('basePath serverless', () => { - const appDir = join(__dirname, '../') let context = {} let app @@ -457,41 +439,5 @@ describe('basePath serverless', () => { await nextConfig.restore() }) - it('should show the hello page under the /docs prefix', async () => { - const browser = await webdriver(context.appPort, '/docs/hello') - try { - const text = await browser.elementByCss('h1').text() - expect(text).toBe('Hello World') - } finally { - await browser.close() - } - }) - - it('should show the other-page page under the /docs prefix', async () => { - const browser = await webdriver(context.appPort, '/docs/other-page') - try { - const text = await browser.elementByCss('h1').text() - expect(text).toBe('Hello Other') - } finally { - await browser.close() - } - }) - - it('should navigate to the page without refresh', async () => { - const browser = await webdriver(context.appPort, '/docs/hello') - try { - await browser.eval('window.itdidnotrefresh = "hello"') - const text = await browser - .elementByCss('#other-page-link') - .click() - .waitForElementByCss('#other-page-title') - .elementByCss('h1') - .text() - - expect(text).toBe('Hello Other') - expect(await browser.eval('window.itdidnotrefresh')).toBe('hello') - } finally { - await browser.close() - } - }) + runTests(context) }) From 39ccd8ffe851847cc2e2eb50c40185c20966c3f3 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 30 Dec 2019 13:06:38 -0600 Subject: [PATCH 003/321] Add error for rewrite to auto-exported dynamic page (#9816) * Add error for rewrite to auto-exported dynamic page * Update packages/next/next-server/server/render.tsx Co-authored-by: Joe Haddad --- .../next/next-server/server/next-server.ts | 2 ++ packages/next/next-server/server/render.tsx | 14 +++++++++++++ test/integration/custom-routes/next.config.js | 4 ++++ .../custom-routes/pages/another/[id].js | 1 + .../custom-routes/test/index.test.js | 21 +++++++++++++++++-- 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 test/integration/custom-routes/pages/another/[id].js diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 35cafc198c62981..0234c32f4c30c0c 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -463,6 +463,8 @@ export default class Server { return { finished: true, } + } else { + ;(_req as any)._nextDidRewrite = true } return { diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index ffaa88498dd19e9..d3446b8404c54cd 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -317,6 +317,20 @@ export async function renderToHTML( const isAutoExport = !hasPageGetInitialProps && defaultAppGetInitialProps && !isSpr + if ( + process.env.NODE_ENV !== 'production' && + isAutoExport && + isDynamicRoute(pathname) && + (req as any)._nextDidRewrite + ) { + // TODO: add err.sh when rewrites go stable + // Behavior might change before then (prefer SSR in this case) + throw new Error( + `Rewrites don't support auto-exported dynamic pages yet. ` + + `Using this will cause the page to fail to parse the params on the client` + ) + } + if (hasPageGetInitialProps && isSpr) { throw new Error(SPR_GET_INITIAL_PROPS_CONFLICT + ` ${pathname}`) } diff --git a/test/integration/custom-routes/next.config.js b/test/integration/custom-routes/next.config.js index f88b596106ea4c3..3f4be16126b56e2 100644 --- a/test/integration/custom-routes/next.config.js +++ b/test/integration/custom-routes/next.config.js @@ -3,6 +3,10 @@ module.exports = { experimental: { async rewrites() { return [ + { + source: '/to-another', + destination: '/another/one', + }, { source: '/hello-world', destination: '/static/hello.txt', diff --git a/test/integration/custom-routes/pages/another/[id].js b/test/integration/custom-routes/pages/another/[id].js new file mode 100644 index 000000000000000..0957a987fc2f227 --- /dev/null +++ b/test/integration/custom-routes/pages/another/[id].js @@ -0,0 +1 @@ +export default () => 'hi' diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 2b2ddca49006a83..6c7eb4e5059ce4e 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -193,7 +193,7 @@ const runTests = (isDev = false) => { join(appDir, '.next/routes-manifest.json') ) - for (const route of manifest.dynamicRoutes) { + for (const route of [...manifest.dynamicRoutes, ...manifest.rewrites]) { route.regex = normalizeRegEx(route.regex) } @@ -287,6 +287,12 @@ const runTests = (isDev = false) => { }, ], rewrites: [ + { + destination: '/another/one', + regex: normalizeRegEx('^\\/to-another$'), + regexKeys: [], + source: '/to-another', + }, { source: '/hello-world', destination: '/static/hello.txt', @@ -359,9 +365,13 @@ const runTests = (isDev = false) => { }, ], dynamicRoutes: [ + { + page: '/another/[id]', + regex: normalizeRegEx('^\\/another\\/([^\\/]+?)(?:\\/)?$'), + }, { page: '/blog/[post]', - regex: normalizeRegEx('^\\/blog\\/([^/]+?)(?:\\/)?$'), + regex: normalizeRegEx('^\\/blog\\/([^\\/]+?)(?:\\/)?$'), }, ], }) @@ -382,6 +392,13 @@ const runTests = (isDev = false) => { ) } }) + } else { + it('should show error for dynamic auto export rewrite', async () => { + const html = await renderViaHTTP(appPort, '/to-another') + expect(html).toContain( + `Rewrites don't support auto-exported dynamic pages yet` + ) + }) } } From 3ece98b31b5d781549fc68b4c1029036c4a63097 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Mon, 30 Dec 2019 14:18:26 -0500 Subject: [PATCH 004/321] Removed the custom configuration page (#9886) --- docs/advanced-features/custom-configuration.md | 3 --- docs/manifest.json | 4 ---- 2 files changed, 7 deletions(-) delete mode 100644 docs/advanced-features/custom-configuration.md diff --git a/docs/advanced-features/custom-configuration.md b/docs/advanced-features/custom-configuration.md deleted file mode 100644 index 2af83ad4d4d7af5..000000000000000 --- a/docs/advanced-features/custom-configuration.md +++ /dev/null @@ -1,3 +0,0 @@ -# Custom Configuration - -Next.js can be enhanced with the usage of `next.config.js`. To learn more about it please refer to the [`next.config.js` documentation](/docs/api-reference/next.config.js/introduction.md). diff --git a/docs/manifest.json b/docs/manifest.json index 57ac608e9c763d7..72b0ca82a21c4ba 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -80,10 +80,6 @@ { "title": "Advanced Features", "routes": [ - { - "title": "Custom Configuration", - "path": "/docs/advanced-features/custom-configuration.md" - }, { "title": "Dynamic Import", "path": "/docs/advanced-features/dynamic-import.md" From 0957ed6f32553dbb5715bf431e1d0baa1ca19d67 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 30 Dec 2019 17:57:06 -0500 Subject: [PATCH 005/321] Use Cached SSG Data on History Navigation (#9887) * Use Cached SSG Data on History Navigation * Add data caching test * Create a static data cache * Eliminate an if / return * Do not cache in dev mode * bump * bump * bump * bump Co-authored-by: JJ Kasper --- .../next/next-server/lib/router/router.ts | 40 ++++++++----- .../prerender/pages/another/index.js | 2 +- test/integration/prerender/test/index.test.js | 58 +++++++++++++++---- 3 files changed, 72 insertions(+), 28 deletions(-) diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index 2a4380ff441a2be..a320811a862e55f 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -71,6 +71,8 @@ export default class Router implements BaseRouter { * Map of all components loaded in `Router` */ components: { [pathname: string]: RouteInfo } + // Static Data Cache + sdc: { [asPath: string]: object } = {} sub: Subscription clc: ComponentLoadCancel pageLoader: any @@ -656,23 +658,31 @@ export default class Router implements BaseRouter { }) } - _getStaticData = (asPath: string): Promise => { + _getStaticData = (asPath: string, _cachedData?: object): Promise => { let pathname = parse(asPath).pathname pathname = !pathname || pathname === '/' ? '/index' : pathname - return fetch( - // @ts-ignore __NEXT_DATA__ - `/_next/data/${__NEXT_DATA__.buildId}${pathname}.json` - ) - .then(res => { - if (!res.ok) { - throw new Error(`Failed to load static props`) - } - return res.json() - }) - .catch((err: Error) => { - ;(err as any).code = 'PAGE_LOAD_ERROR' - throw err - }) + + return process.env.NODE_ENV === 'production' && + (_cachedData = this.sdc[pathname]) + ? Promise.resolve(_cachedData) + : fetch( + // @ts-ignore __NEXT_DATA__ + `/_next/data/${__NEXT_DATA__.buildId}${pathname}.json` + ) + .then(res => { + if (!res.ok) { + throw new Error(`Failed to load static props`) + } + return res.json() + }) + .then(data => { + this.sdc[pathname!] = data + return data + }) + .catch((err: Error) => { + ;(err as any).code = 'PAGE_LOAD_ERROR' + throw err + }) } getInitialProps( diff --git a/test/integration/prerender/pages/another/index.js b/test/integration/prerender/pages/another/index.js index e1a316d071e4984..19a7709d3dbe195 100644 --- a/test/integration/prerender/pages/another/index.js +++ b/test/integration/prerender/pages/another/index.js @@ -26,7 +26,7 @@ export async function unstable_getStaticProps() { export default ({ world, time }) => ( <>

hello {world}

- time: {time} + time: {time} to home diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index 9c5a8032155021c..15406a99f519bb5 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -110,7 +110,7 @@ const expectedManifestRoutes = () => ({ }, }) -const navigateTest = () => { +const navigateTest = (dev = false) => { it('should navigate between pages successfully', async () => { const toBuild = [ '/', @@ -133,18 +133,52 @@ const navigateTest = () => { await waitFor(2500) // go to /another - await browser.elementByCss('#another').click() - await browser.waitForElementByCss('#home') - text = await browser.elementByCss('p').text() - expect(text).toMatch(/hello.*?world/) + async function goFromHomeToAnother() { + await browser.elementByCss('#another').click() + await browser.waitForElementByCss('#home') + text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + } + await goFromHomeToAnother() // go to / - await browser.eval('window.didTransition = 1') - await browser.elementByCss('#home').click() - await browser.waitForElementByCss('#another') - text = await browser.elementByCss('p').text() - expect(text).toMatch(/hello.*?world/) - expect(await browser.eval('window.didTransition')).toBe(1) + async function goFromAnotherToHome() { + await browser.eval('window.didTransition = 1') + await browser.elementByCss('#home').click() + await browser.waitForElementByCss('#another') + text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + expect(await browser.eval('window.didTransition')).toBe(1) + } + await goFromAnotherToHome() + + // Client-side SSG data caching test + // eslint-disable-next-line no-lone-blocks + { + // Let revalidation period lapse + await waitFor(2000) + + // Trigger revalidation (visit page) + await goFromHomeToAnother() + const snapTime = await browser.elementByCss('#anotherTime').text() + + // Wait for revalidation to finish + await waitFor(2000) + + // Re-visit page + await goFromAnotherToHome() + await goFromHomeToAnother() + + const nextTime = await browser.elementByCss('#anotherTime').text() + if (dev) { + expect(snapTime).not.toMatch(nextTime) + } else { + expect(snapTime).toMatch(nextTime) + } + + // Reset to Home for next test + await goFromAnotherToHome() + } // go to /something await browser.elementByCss('#something').click() @@ -180,7 +214,7 @@ const navigateTest = () => { } const runTests = (dev = false) => { - navigateTest() + navigateTest(dev) it('should SSR normal page correctly', async () => { const html = await renderViaHTTP(appPort, '/') From b0892eff1db298478d6904fc0c554afc5954c6e0 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 30 Dec 2019 17:57:32 -0500 Subject: [PATCH 006/321] v9.1.7-canary.10 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 002667105534ea9..a1328f04606626e 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.9" + "version": "9.1.7-canary.10" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index ffe3a108d1ed3d1..81a0f415f725cd2 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 38ef4137046589d..e3334fe7bbcc74e 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 42c26daeade7171..d057c60d97a6241 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 4f5e6f02966e670..ba171dd059c2628 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 3b7f3ac4226c4a8..3b3381b4aa13181 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index f458ea2454c1ab3..e469ad28cb0ed00 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 1569182b3916734..3d0d7bffffe436e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.9", + "version": "9.1.7-canary.10", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 8247f19f10e80d93a678ef6f727ef9ffcdcb09c5 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 30 Dec 2019 18:53:35 -0500 Subject: [PATCH 007/321] Defer Loading CSS Configuration (#9889) --- packages/next/build/webpack-config.ts | 3 ++ .../build/webpack/config/blocks/css/index.ts | 45 +++++++++++++++++-- .../webpack/config/blocks/css/plugins.ts | 10 ++--- .../css-customization/test/index.test.js | 25 +++++++++++ .../next.config.js | 15 +++++++ .../custom-configuration-legacy/pages/_app.js | 12 +++++ .../pages/index.js | 3 ++ .../postcss.config.js | 10 +++++ .../styles/global.css | 11 +++++ 9 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 test/integration/css-fixtures/custom-configuration-legacy/next.config.js create mode 100644 test/integration/css-fixtures/custom-configuration-legacy/pages/_app.js create mode 100644 test/integration/css-fixtures/custom-configuration-legacy/pages/index.js create mode 100644 test/integration/css-fixtures/custom-configuration-legacy/postcss.config.js create mode 100644 test/integration/css-fixtures/custom-configuration-legacy/styles/global.css diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 05f4f97b367b02d..0279a613d8f85c3 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -28,6 +28,7 @@ import { VALID_MIDDLEWARE, } from './plugins/collect-plugins' import { build as buildConfiguration } from './webpack/config' +import { __overrideCssConfiguration } from './webpack/config/blocks/css' // @ts-ignore: JS file import { pluginLoaderOptions } from './webpack/loaders/next-plugin-loader' import BuildManifestPlugin from './webpack/plugins/build-manifest-plugin' @@ -946,6 +947,8 @@ export default async function getBaseWebpackConfig( e => (e as any).__next_css_remove !== true ) } + } else { + await __overrideCssConfiguration(dir, webpackConfig) } } diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index da90d63a1c74121..0fe22d4d00e3a69 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -1,6 +1,6 @@ import curry from 'lodash.curry' import path from 'path' -import webpack, { Configuration } from 'webpack' +import webpack, { Configuration, RuleSetRule } from 'webpack' import MiniCssExtractPlugin from '../../../plugins/mini-css-extract-plugin' import { loader } from '../../helpers' import { ConfigurationContext, ConfigurationFn, pipe } from '../../utils' @@ -66,6 +66,37 @@ function getClientStyleLoader({ } } +export async function __overrideCssConfiguration( + rootDirectory: string, + config: Configuration +) { + const postCssPlugins = await getPostCssPlugins(rootDirectory) + + function patch(rule: RuleSetRule) { + if ( + rule.options && + typeof rule.options === 'object' && + rule.options['ident'] === '__nextjs_postcss' + ) { + rule.options.plugins = postCssPlugins + } else if (Array.isArray(rule.oneOf)) { + rule.oneOf.forEach(patch) + } else if (Array.isArray(rule.use)) { + rule.use.forEach(u => { + if (typeof u === 'object') { + patch(u) + } + }) + } + } + + // TODO: remove this rule, ESLint bug + // eslint-disable-next-line no-unused-expressions + config.module?.rules?.forEach(entry => { + patch(entry) + }) +} + export const css = curry(async function css( enabled: boolean, ctx: ConfigurationContext, @@ -88,7 +119,13 @@ export const css = curry(async function css( }), ] - const postCssPlugins = await getPostCssPlugins(ctx.rootDirectory) + const postCssPlugins = await getPostCssPlugins( + ctx.rootDirectory, + // TODO: In the future, we should stop supporting old CSS setups and + // unconditionally inject ours. When that happens, we should remove this + // function argument. + true + ) // CSS Modules support must be enabled on the server and client so the class // names are availble for SSR or Prerendering. fns.push( @@ -140,7 +177,7 @@ export const css = curry(async function css( { loader: require.resolve('postcss-loader'), options: { - ident: 'postcss', + ident: '__nextjs_postcss', plugins: postCssPlugins, sourceMap: true, }, @@ -202,7 +239,7 @@ export const css = curry(async function css( { loader: require.resolve('postcss-loader'), options: { - ident: 'postcss', + ident: '__nextjs_postcss', plugins: postCssPlugins, sourceMap: true, }, diff --git a/packages/next/build/webpack/config/blocks/css/plugins.ts b/packages/next/build/webpack/config/blocks/css/plugins.ts index f2cac7742dd210d..113a6ca77d25d63 100644 --- a/packages/next/build/webpack/config/blocks/css/plugins.ts +++ b/packages/next/build/webpack/config/blocks/css/plugins.ts @@ -88,12 +88,12 @@ function getDefaultPlugins(): CssPluginCollection { } export async function getPostCssPlugins( - dir: string + dir: string, + defaults: boolean = false ): Promise { - let config = await findConfig<{ plugins: CssPluginCollection }>( - dir, - 'postcss' - ) + let config = defaults + ? null + : await findConfig<{ plugins: CssPluginCollection }>(dir, 'postcss') if (config == null) { config = { plugins: getDefaultPlugins() } diff --git a/test/integration/css-customization/test/index.test.js b/test/integration/css-customization/test/index.test.js index 45764c76f7cf8d0..c16a70d710e8261 100644 --- a/test/integration/css-customization/test/index.test.js +++ b/test/integration/css-customization/test/index.test.js @@ -71,6 +71,31 @@ describe('CSS Customization', () => { }) }) +describe('Legacy Next-CSS Customization', () => { + const appDir = join(fixturesDir, 'custom-configuration-legacy') + + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + it('should build successfully', async () => { + await nextBuild(appDir) + }) + + it(`should've compiled and prefixed`, async () => { + const cssFolder = join(appDir, '.next/static/chunks') + + const files = await readdir(cssFolder) + const cssFiles = files.filter(f => /\.css$/.test(f)) + + expect(cssFiles.length).toBe(1) + const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8') + expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatchInlineSnapshot( + `"@media (480px <= width < 768px){::placeholder{color:green}}.video{max-width:400px;max-height:300px}"` + ) + }) +}) + describe('CSS Customization Array', () => { const appDir = join(fixturesDir, 'custom-configuration-arr') diff --git a/test/integration/css-fixtures/custom-configuration-legacy/next.config.js b/test/integration/css-fixtures/custom-configuration-legacy/next.config.js new file mode 100644 index 000000000000000..93bc6a48f6b17c8 --- /dev/null +++ b/test/integration/css-fixtures/custom-configuration-legacy/next.config.js @@ -0,0 +1,15 @@ +const withCSS = require('@zeit/next-css') + +module.exports = withCSS({ + onDemandEntries: { + // Make sure entries are not getting disposed. + maxInactiveAge: 1000 * 60 * 60, + }, + experimental: { + css: true, + }, + webpack(cfg) { + cfg.devtool = 'source-map' + return cfg + }, +}) diff --git a/test/integration/css-fixtures/custom-configuration-legacy/pages/_app.js b/test/integration/css-fixtures/custom-configuration-legacy/pages/_app.js new file mode 100644 index 000000000000000..17a2196742e95d7 --- /dev/null +++ b/test/integration/css-fixtures/custom-configuration-legacy/pages/_app.js @@ -0,0 +1,12 @@ +import React from 'react' +import App from 'next/app' +import '../styles/global.css' + +class MyApp extends App { + render() { + const { Component, pageProps } = this.props + return + } +} + +export default MyApp diff --git a/test/integration/css-fixtures/custom-configuration-legacy/pages/index.js b/test/integration/css-fixtures/custom-configuration-legacy/pages/index.js new file mode 100644 index 000000000000000..b3ba78da2d5e17c --- /dev/null +++ b/test/integration/css-fixtures/custom-configuration-legacy/pages/index.js @@ -0,0 +1,3 @@ +export default function Home() { + return
+} diff --git a/test/integration/css-fixtures/custom-configuration-legacy/postcss.config.js b/test/integration/css-fixtures/custom-configuration-legacy/postcss.config.js new file mode 100644 index 000000000000000..c7b7fde03c78cfc --- /dev/null +++ b/test/integration/css-fixtures/custom-configuration-legacy/postcss.config.js @@ -0,0 +1,10 @@ +module.exports = { + // Use comments to test JSON5 support + plugins: [ + // Test a non-standard feature that wouldn't be normally enabled + require('postcss-short-size')({ + // Add a prefix to test that configuration is passed + prefix: 'xyz', + }), + ], +} diff --git a/test/integration/css-fixtures/custom-configuration-legacy/styles/global.css b/test/integration/css-fixtures/custom-configuration-legacy/styles/global.css new file mode 100644 index 000000000000000..f942036ad16ef0b --- /dev/null +++ b/test/integration/css-fixtures/custom-configuration-legacy/styles/global.css @@ -0,0 +1,11 @@ +/* this should pass through untransformed */ +@media (480px <= width < 768px) { + ::placeholder { + color: green; + } +} + +/* this should be transformed to width/height */ +.video { + -xyz-max-size: 400px 300px; +} From b6d513146e6c88bbcacba876b7a17f428dc5a442 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 30 Dec 2019 17:54:51 -0600 Subject: [PATCH 008/321] v9.1.7-canary.11 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index a1328f04606626e..0f3ab6a02fb119e 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.10" + "version": "9.1.7-canary.11" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 81a0f415f725cd2..3fe6546b0f19aee 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index e3334fe7bbcc74e..cddbe9e0eddcb22 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index d057c60d97a6241..0d885343cff3c40 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index ba171dd059c2628..f5e5f3010430b1f 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 3b3381b4aa13181..70a89b39bf558f8 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index e469ad28cb0ed00..cc095353422d90d 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 3d0d7bffffe436e..673523f3616559d 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.10", + "version": "9.1.7-canary.11", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 5be30aae887d829ab58c7249d6cbdda92e691089 Mon Sep 17 00:00:00 2001 From: Alejandro Garcia Anglada Date: Tue, 31 Dec 2019 15:15:06 +0000 Subject: [PATCH 009/321] Support static export and server hosted build and update docs (#9783) --- examples/with-next-offline/README.md | 42 +++++++++++++++++++---- examples/with-next-offline/next.config.js | 4 ++- examples/with-next-offline/package.json | 8 +++-- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/examples/with-next-offline/README.md b/examples/with-next-offline/README.md index 680e93630ac79d7..087a1d0d7f42411 100644 --- a/examples/with-next-offline/README.md +++ b/examples/with-next-offline/README.md @@ -12,7 +12,7 @@ npx create-next-app --example with-next-offline with-next-offline-app yarn create next-app --example with-next-offline with-next-offline-app ``` -### Download manually +### Download Download the example: @@ -21,20 +21,48 @@ curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 cd with-next-offline ``` -Install it and run: +### Install dependecies ```bash npm install -npm run dev -npm run export -serve -s out # or yarn -yarn dev +``` + +### Build + +#### Static export + +```bash +npm run export +# or yarn export -serve -s out ``` +To serve it yourself, you can run: + +```bash +npx serve -s out +``` + +#### Server hosted + +```bash +npm run build +# or +yarn build +``` + +To serve it yourself, run: + +```bash +npm start +# or +yarn start +``` + +### Deploy + Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)) ```bash diff --git a/examples/with-next-offline/next.config.js b/examples/with-next-offline/next.config.js index 6ff7f7cb5c43ff4..14d9c10d8f7f10f 100644 --- a/examples/with-next-offline/next.config.js +++ b/examples/with-next-offline/next.config.js @@ -2,7 +2,9 @@ const withOffline = require('next-offline') module.exports = withOffline({ workboxOpts: { - swDest: 'static/service-worker.js', + swDest: process.env.NEXT_EXPORT + ? 'service-worker.js' + : 'static/service-worker.js', }, experimental: { async rewrites() { diff --git a/examples/with-next-offline/package.json b/examples/with-next-offline/package.json index f9737d52bf81e2e..04ed33543b47428 100644 --- a/examples/with-next-offline/package.json +++ b/examples/with-next-offline/package.json @@ -6,13 +6,15 @@ "dev": "next", "build": "next build", "start": "next start", - "export": "next build && next export" + "export": "cross-env NEXT_EXPORT=true next build && cross-env NEXT_EXPORT=true next export" }, "dependencies": { "next": "canary", "next-offline": "4.0.6", "react": "16.12.0", - "react-dom": "16.12.0", - "serve": "11.2.0" + "react-dom": "16.12.0" + }, + "devDependencies": { + "cross-env": "6.0.3" } } From 4f0c74c543a15ec101e3489bb35b3920c773e7a2 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 31 Dec 2019 13:19:39 -0500 Subject: [PATCH 010/321] Fix Potential Duplication of Page Loading (#9894) --- packages/next/client/page-loader.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/next/client/page-loader.js b/packages/next/client/page-loader.js index bf940fcfef99f78..1fe7af28a44eb7b 100644 --- a/packages/next/client/page-loader.js +++ b/packages/next/client/page-loader.js @@ -110,6 +110,7 @@ export default class PageLoader { } if (!this.loadingRoutes[route]) { + this.loadingRoutes[route] = true if (process.env.__NEXT_GRANULAR_CHUNKS) { this.getDependencies(route).then(deps => { deps.forEach(d => { @@ -130,11 +131,9 @@ export default class PageLoader { } }) this.loadRoute(route) - this.loadingRoutes[route] = true }) } else { this.loadRoute(route) - this.loadingRoutes[route] = true } } }) From 5c72663c87c01fbc35691655435c79841a5d1f8e Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 31 Dec 2019 14:13:55 -0600 Subject: [PATCH 011/321] Ensure params in query are updated for custom-routes (#9797) * Add handling for params in destination query * Update describe name --- .../next/next-server/server/next-server.ts | 15 ++++++ packages/next/next-server/server/router.ts | 8 +++ test/integration/custom-routes/next.config.js | 8 +++ .../custom-routes/test/index.test.js | 53 ++++++++++++++++++- 4 files changed, 82 insertions(+), 2 deletions(-) diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 0234c32f4c30c0c..2b4de2e4d722b59 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -428,11 +428,23 @@ export default class Server { name: `${route.type} ${route.source} route`, fn: async (_req, res, params, _parsedUrl) => { const parsedDestination = parseUrl(route.destination, true) + const destQuery = parsedDestination.query let destinationCompiler = compilePathToRegex( `${parsedDestination.pathname!}${parsedDestination.hash || ''}` ) let newUrl + Object.keys(destQuery).forEach(key => { + const val = destQuery[key] + if ( + typeof val === 'string' && + val.startsWith(':') && + params[val.substr(1)] + ) { + destQuery[key] = params[val.substr(1)] + } + }) + try { newUrl = destinationCompiler(params) } catch (err) { @@ -456,6 +468,7 @@ export default class Server { ...parsedDestination, pathname: parsedNewUrl.pathname, hash: parsedNewUrl.hash, + search: undefined, }) ) res.statusCode = route.statusCode || DEFAULT_REDIRECT_STATUS @@ -470,6 +483,7 @@ export default class Server { return { finished: false, pathname: newUrl, + query: parsedDestination.query, } }, } as Route @@ -795,6 +809,7 @@ export default class Server { const curUrl = parseUrl(req.url!, true) req.url = formatUrl({ ...curUrl, + search: undefined, query: { ...curUrl.query, ...query, diff --git a/packages/next/next-server/server/router.ts b/packages/next/next-server/server/router.ts index 9cef29e7cb117c3..073f06ba51e1a02 100644 --- a/packages/next/next-server/server/router.ts +++ b/packages/next/next-server/server/router.ts @@ -11,6 +11,7 @@ export type RouteMatch = (pathname: string | undefined) => false | Params type RouteResult = { finished: boolean pathname?: string + query?: { [k: string]: string } } export type Route = { @@ -105,6 +106,13 @@ export default class Router { parsedUrlUpdated.pathname = result.pathname } + if (result.query) { + parsedUrlUpdated.query = { + ...parsedUrlUpdated.query, + ...result.query, + } + } + // check filesystem if (route.check === true) { for (const fsRoute of this.fsRoutes) { diff --git a/test/integration/custom-routes/next.config.js b/test/integration/custom-routes/next.config.js index 3f4be16126b56e2..1d4a491c59671a3 100644 --- a/test/integration/custom-routes/next.config.js +++ b/test/integration/custom-routes/next.config.js @@ -47,6 +47,10 @@ module.exports = { source: '/params/:something', destination: '/with-params', }, + { + source: '/query-rewrite/:section/:name', + destination: '/with-params?first=:section&second=:name', + }, { source: '/hidden/_next/:path*', destination: '/_next/:path*', @@ -112,6 +116,10 @@ module.exports = { source: '/to-external', destination: 'https://google.com', }, + { + source: '/query-redirect/:section/:name', + destination: '/with-params?first=:section&second=:name', + }, ] }, }, diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 6c7eb4e5059ce4e..f7d9eb1ebcdae6c 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -4,6 +4,7 @@ import url from 'url' import stripAnsi from 'strip-ansi' import fs from 'fs-extra' import { join } from 'path' +import cheerio from 'cheerio' import webdriver from 'next-webdriver' import { launchApp, @@ -28,6 +29,8 @@ let stdout = '' let appPort let app +const escapeRegex = str => str.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') + const runTests = (isDev = false) => { it('should handle one-to-one rewrite successfully', async () => { const html = await renderViaHTTP(appPort, '/first') @@ -119,6 +122,33 @@ const runTests = (isDev = false) => { expect(html).toMatch(/hi there/) }) + it('should allow params in query for rewrite', async () => { + const html = await renderViaHTTP(appPort, '/query-rewrite/hello/world?a=b') + const $ = cheerio.load(html) + expect(JSON.parse($('#__NEXT_DATA__').html()).query).toEqual({ + first: 'hello', + second: 'world', + a: 'b', + section: 'hello', + name: 'world', + }) + }) + + it('should allow params in query for redirect', async () => { + const res = await fetchViaHTTP( + appPort, + '/query-redirect/hello/world?a=b', + undefined, + { + redirect: 'manual', + } + ) + const { pathname, query } = url.parse(res.headers.get('location'), true) + expect(res.status).toBe(307) + expect(pathname).toBe('/with-params') + expect(query).toEqual({ first: 'hello', second: 'world' }) + }) + it('should overwrite param values correctly', async () => { const html = await renderViaHTTP(appPort, '/test-overwrite/first/second') expect(html).toMatch(/this-should-be-the-value/) @@ -285,6 +315,15 @@ const runTests = (isDev = false) => { source: '/to-external', statusCode: 307, }, + { + destination: '/with-params?first=:section&second=:name', + regex: normalizeRegEx( + '^\\/query-redirect(?:\\/([^\\/]+?))(?:\\/([^\\/]+?))$' + ), + regexKeys: ['section', 'name'], + source: '/query-redirect/:section/:name', + statusCode: 307, + }, ], rewrites: [ { @@ -355,6 +394,14 @@ const runTests = (isDev = false) => { regex: normalizeRegEx('^\\/params(?:\\/([^\\/]+?))$'), regexKeys: ['something'], }, + { + destination: '/with-params?first=:section&second=:name', + regex: normalizeRegEx( + '^\\/query-rewrite(?:\\/([^\\/]+?))(?:\\/([^\\/]+?))$' + ), + regexKeys: ['section', 'name'], + source: '/query-rewrite/:section/:name', + }, { destination: '/_next/:path*', regex: normalizeRegEx( @@ -388,7 +435,9 @@ const runTests = (isDev = false) => { for (const route of [...manifest.redirects, ...manifest.rewrites]) { expect(cleanStdout).toMatch( - new RegExp(`${route}.*?${route.destination}`) + new RegExp( + `${escapeRegex(route.source)}.*?${escapeRegex(route.destination)}` + ) ) } }) @@ -413,7 +462,7 @@ describe('Custom routes', () => { runTests(true) }) - describe('production mode', () => { + describe('server mode', () => { beforeAll(async () => { const { stdout: buildStdout } = await nextBuild(appDir, [], { stdout: true, From 8132524d24ed9aad48a1f8875b2b620d658b2282 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 31 Dec 2019 16:06:09 -0600 Subject: [PATCH 012/321] Revert version bump for routes-manifest (#9896) --- packages/next/build/index.ts | 2 +- test/integration/custom-routes/test/index.test.js | 2 +- test/integration/dynamic-routing/test/index.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 9bbdb3873e4fac0..5f83eb7921204cc 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -248,7 +248,7 @@ export default async function build(dir: string, conf = null): Promise { await fsWriteFile( path.join(distDir, ROUTES_MANIFEST), JSON.stringify({ - version: 2, + version: 1, basePath: config.experimental.basePath, redirects: redirects.map(r => buildCustomRoute(r, true)), rewrites: rewrites.map(r => buildCustomRoute(r)), diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index f7d9eb1ebcdae6c..32f5a7ae90dd45b 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -228,7 +228,7 @@ const runTests = (isDev = false) => { } expect(manifest).toEqual({ - version: 2, + version: 1, basePath: '', redirects: [ { diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index 55513048a07fa62..fc0563adf967d86 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -390,7 +390,7 @@ function runTests(dev) { ) expect(manifest).toEqual({ - version: 2, + version: 1, basePath: '', rewrites: [], redirects: [], From 7bf6aca7be60868e97593f82dc52cd8ef8c7f58a Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 31 Dec 2019 16:09:59 -0600 Subject: [PATCH 013/321] v9.1.7-canary.12 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 0f3ab6a02fb119e..b5dc8b028bba565 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.11" + "version": "9.1.7-canary.12" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 3fe6546b0f19aee..5340d085340d1ee 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index cddbe9e0eddcb22..6f1c8f440b32d65 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 0d885343cff3c40..90645531db28359 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index f5e5f3010430b1f..4ce2d97ccf504f5 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 70a89b39bf558f8..50b1c3bad00a9bb 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index cc095353422d90d..a207eef80a0da7c 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 673523f3616559d..4b0288f00b1c5df 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.11", + "version": "9.1.7-canary.12", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From ad7bb4e3521d601954c8e3c8a9d12c2b396277bd Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 1 Jan 2020 06:47:58 -0600 Subject: [PATCH 014/321] Add headers support to custom-routes (#9879) * Add headers support to custom-routes * Update manifest version test * Add headers field for dynamic routes test * Update test --- packages/next/build/index.ts | 25 +++- packages/next/lib/check-custom-routes.ts | 124 +++++++++++++----- .../next/next-server/server/next-server.ts | 38 +++++- packages/next/server/next-dev-server.ts | 8 +- test/integration/custom-routes/next.config.js | 31 +++++ .../custom-routes/test/index.test.js | 44 +++++++ .../dynamic-routing/test/index.test.js | 1 + .../invalid-custom-routes/test/index.test.js | 102 ++++++++++++++ 8 files changed, 325 insertions(+), 48 deletions(-) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 5f83eb7921204cc..f7a8c791fd2de9e 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -9,7 +9,12 @@ import path from 'path' import { pathToRegexp } from 'path-to-regexp' import { promisify } from 'util' import formatWebpackMessages from '../client/dev/error-overlay/format-webpack-messages' -import checkCustomRoutes from '../lib/check-custom-routes' +import checkCustomRoutes, { + RouteType, + Redirect, + Rewrite, + Header, +} from '../lib/check-custom-routes' import { PUBLIC_DIR_MIDDLEWARE_CONFLICT } from '../lib/constants' import { findPagesDir } from '../lib/find-pages-dir' import { recursiveDelete } from '../lib/recursive-delete' @@ -99,8 +104,9 @@ export default async function build(dir: string, conf = null): Promise { const { target } = config const buildId = await generateBuildId(config.generateBuildId, nanoid) const distDir = path.join(dir, config.distDir) - const rewrites = [] - const redirects = [] + const rewrites: Rewrite[] = [] + const redirects: Redirect[] = [] + const headers: Header[] = [] if (typeof config.experimental.redirects === 'function') { redirects.push(...(await config.experimental.redirects())) @@ -110,6 +116,10 @@ export default async function build(dir: string, conf = null): Promise { rewrites.push(...(await config.experimental.rewrites())) checkCustomRoutes(rewrites, 'rewrite') } + if (typeof config.experimental.headers === 'function') { + headers.push(...(await config.experimental.headers())) + checkCustomRoutes(headers, 'header') + } if (ciEnvironment.isCI) { const cacheDir = path.join(distDir, 'cache') @@ -223,7 +233,7 @@ export default async function build(dir: string, conf = null): Promise { source: string statusCode?: number }, - isRedirect = false + type: RouteType ) => { const keys: any[] = [] const routeRegex = pathToRegexp(r.source, keys, { @@ -234,7 +244,7 @@ export default async function build(dir: string, conf = null): Promise { return { ...r, - ...(isRedirect + ...(type === 'redirect' ? { statusCode: r.statusCode || DEFAULT_REDIRECT_STATUS, } @@ -250,8 +260,9 @@ export default async function build(dir: string, conf = null): Promise { JSON.stringify({ version: 1, basePath: config.experimental.basePath, - redirects: redirects.map(r => buildCustomRoute(r, true)), - rewrites: rewrites.map(r => buildCustomRoute(r)), + redirects: redirects.map(r => buildCustomRoute(r, 'redirect')), + rewrites: rewrites.map(r => buildCustomRoute(r, 'rewrite')), + headers: headers.map(r => buildCustomRoute(r, 'header')), dynamicRoutes: getSortedRoutes(dynamicRoutes).map(page => ({ page, regex: getRouteRegex(page).re.source, diff --git a/packages/next/lib/check-custom-routes.ts b/packages/next/lib/check-custom-routes.ts index 3331a6818ebb6ed..07f2f3a77c9cae1 100644 --- a/packages/next/lib/check-custom-routes.ts +++ b/packages/next/lib/check-custom-routes.ts @@ -9,27 +9,80 @@ export type Redirect = Rewrite & { statusCode?: number } +export type Header = { + source: string + headers: Array<{ key: string; value: string }> +} + const allowedStatusCodes = new Set([301, 302, 303, 307, 308]) +function checkRedirect(route: Redirect) { + const invalidParts: string[] = [] + let hadInvalidStatus: boolean = false + + if (route.statusCode && !allowedStatusCodes.has(route.statusCode)) { + hadInvalidStatus = true + invalidParts.push(`\`statusCode\` is not undefined or valid statusCode`) + } + return { + invalidParts, + hadInvalidStatus, + } +} + +function checkHeader(route: Header) { + const invalidParts: string[] = [] + + if (!Array.isArray(route.headers)) { + invalidParts.push('`headers` field must be an array') + } else { + for (const header of route.headers) { + if (!header || typeof header !== 'object') { + invalidParts.push( + "`headers` items must be object with { key: '', value: '' }" + ) + break + } + if (typeof header.key !== 'string') { + invalidParts.push('`key` in header item must be string') + break + } + if (typeof header.value !== 'string') { + invalidParts.push('`value` in header item must be string') + break + } + } + } + return invalidParts +} + +export type RouteType = 'rewrite' | 'redirect' | 'header' + export default function checkCustomRoutes( - routes: Array, - type: 'redirect' | 'rewrite' + routes: Redirect[] | Header[] | Rewrite[], + type: RouteType ): void { let numInvalidRoutes = 0 let hadInvalidStatus = false + const isRedirect = type === 'redirect' - const allowedKeys = new Set([ - 'source', - 'destination', - ...(isRedirect ? ['statusCode'] : []), - ]) + let allowedKeys: Set + + if (type === 'rewrite' || isRedirect) { + allowedKeys = new Set([ + 'source', + 'destination', + ...(isRedirect ? ['statusCode'] : []), + ]) + } else { + allowedKeys = new Set(['source', 'headers']) + } for (const route of routes) { const keys = Object.keys(route) const invalidKeys = keys.filter(key => !allowedKeys.has(key)) - const invalidParts = [] + const invalidParts: string[] = [] - // TODO: investigate allowing RegExp directly if (!route.source) { invalidParts.push('`source` is missing') } else if (typeof route.source !== 'string') { @@ -38,35 +91,38 @@ export default function checkCustomRoutes( invalidParts.push('`source` does not start with /') } - if (!route.destination) { - invalidParts.push('`destination` is missing') - } else if (typeof route.destination !== 'string') { - invalidParts.push('`destination` is not a string') - } else if (type === 'rewrite' && !route.destination.startsWith('/')) { - invalidParts.push('`destination` does not start with /') + if (type === 'header') { + invalidParts.push(...checkHeader(route as Header)) + } else { + let _route = route as Rewrite | Redirect + if (!_route.destination) { + invalidParts.push('`destination` is missing') + } else if (typeof _route.destination !== 'string') { + invalidParts.push('`destination` is not a string') + } else if (type === 'rewrite' && !_route.destination.startsWith('/')) { + invalidParts.push('`destination` does not start with /') + } } - if (isRedirect) { - const redirRoute = route as Redirect - - if ( - redirRoute.statusCode && - !allowedStatusCodes.has(redirRoute.statusCode) - ) { - hadInvalidStatus = true - invalidParts.push(`\`statusCode\` is not undefined or valid statusCode`) - } + if (type === 'redirect') { + const result = checkRedirect(route as Redirect) + hadInvalidStatus = result.hadInvalidStatus + invalidParts.push(...result.invalidParts) } - try { - // Make sure we can parse the source properly - regexpMatch(route.source) - } catch (err) { - // If there is an error show our err.sh but still show original error - console.error( - `\nError parsing ${route.source} https://err.sh/zeit/next.js/invalid-route-source`, - err - ) + if (typeof route.source === 'string') { + // only show parse error if we didn't already show error + // for not being a string + try { + // Make sure we can parse the source properly + regexpMatch(route.source) + } catch (err) { + // If there is an error show our err.sh but still show original error + console.error( + `\nError parsing ${route.source} https://err.sh/zeit/next.js/invalid-route-source`, + err + ) + } } const hasInvalidKeys = invalidKeys.length > 0 diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 2b4de2e4d722b59..03c42f9e5f28a55 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -45,7 +45,12 @@ import { sendHTML } from './send-html' import { serveStatic } from './serve-static' import { getSprCache, initializeSprCache, setSprCache } from './spr-cache' import { isBlockedPage } from './utils' -import { Redirect, Rewrite } from '../../lib/check-custom-routes' +import { + Redirect, + Rewrite, + RouteType, + Header, +} from '../../lib/check-custom-routes' const getCustomRouteMatcher = pathMatch(true) @@ -105,6 +110,7 @@ export default class Server { protected customRoutes?: { rewrites: Rewrite[] redirects: Redirect[] + headers: Header[] } public constructor({ @@ -402,17 +408,36 @@ export default class Server { const routes: Route[] = [] if (this.customRoutes) { - const { redirects, rewrites } = this.customRoutes + const { redirects, rewrites, headers } = this.customRoutes const getCustomRoute = ( - r: { source: string; destination: string; statusCode?: number }, - type: 'redirect' | 'rewrite' + r: Rewrite | Redirect | Header, + type: RouteType ) => ({ ...r, type, matcher: getCustomRouteMatcher(r.source), }) + // Headers come very first + routes.push( + ...headers.map(r => { + const route = getCustomRoute(r, 'header') + return { + check: true, + match: route.matcher, + type: route.type, + name: `${route.type} ${route.source} header route`, + fn: async (_req, res, _params, _parsedUrl) => { + for (const header of (route as Header).headers) { + res.setHeader(header.key, header.value) + } + return { finished: false } + }, + } as Route + }) + ) + const customRoutes = [ ...redirects.map(r => getCustomRoute(r, 'redirect')), ...rewrites.map(r => getCustomRoute(r, 'rewrite')), @@ -424,7 +449,7 @@ export default class Server { check: true, match: route.matcher, type: route.type, - statusCode: route.statusCode, + statusCode: (route as Redirect).statusCode, name: `${route.type} ${route.source} route`, fn: async (_req, res, params, _parsedUrl) => { const parsedDestination = parseUrl(route.destination, true) @@ -471,7 +496,8 @@ export default class Server { search: undefined, }) ) - res.statusCode = route.statusCode || DEFAULT_REDIRECT_STATUS + res.statusCode = + (route as Redirect).statusCode || DEFAULT_REDIRECT_STATUS res.end() return { finished: true, diff --git a/packages/next/server/next-dev-server.ts b/packages/next/server/next-dev-server.ts index d88bc28240670f9..6039f714d7039e1 100644 --- a/packages/next/server/next-dev-server.ts +++ b/packages/next/server/next-dev-server.ts @@ -315,8 +315,9 @@ export default class DevServer extends Server { const result = { redirects: [], rewrites: [], + headers: [], } - const { redirects, rewrites } = this.nextConfig.experimental + const { redirects, rewrites, headers } = this.nextConfig.experimental if (typeof redirects === 'function') { result.redirects = await redirects() @@ -326,6 +327,11 @@ export default class DevServer extends Server { result.rewrites = await rewrites() checkCustomRoutes(result.rewrites, 'rewrite') } + if (typeof headers === 'function') { + result.headers = await headers() + checkCustomRoutes(result.headers, 'header') + } + this.customRoutes = result } diff --git a/test/integration/custom-routes/next.config.js b/test/integration/custom-routes/next.config.js index 1d4a491c59671a3..decf161877d2b94 100644 --- a/test/integration/custom-routes/next.config.js +++ b/test/integration/custom-routes/next.config.js @@ -122,5 +122,36 @@ module.exports = { }, ] }, + + async headers() { + return [ + { + source: '/add-header', + headers: [ + { + key: 'x-custom-header', + value: 'hello world', + }, + { + key: 'x-another-header', + value: 'hello again', + }, + ], + }, + { + source: '/my-headers/(.*)', + headers: [ + { + key: 'x-first-header', + value: 'first', + }, + { + key: 'x-second-header', + value: 'second', + }, + ], + }, + ] + }, }, } diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 32f5a7ae90dd45b..269eded557397b7 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -217,6 +217,18 @@ const runTests = (isDev = false) => { expect(location).toBe('https://google.com/') }) + it('should apply headers for exact match', async () => { + const res = await fetchViaHTTP(appPort, '/add-header') + expect(res.headers.get('x-custom-header')).toBe('hello world') + expect(res.headers.get('x-another-header')).toBe('hello again') + }) + + it('should apply headers for multi match', async () => { + const res = await fetchViaHTTP(appPort, '/my-headers/first') + expect(res.headers.get('x-first-header')).toBe('first') + expect(res.headers.get('x-second-header')).toBe('second') + }) + if (!isDev) { it('should output routes-manifest successfully', async () => { const manifest = await fs.readJSON( @@ -325,6 +337,38 @@ const runTests = (isDev = false) => { statusCode: 307, }, ], + headers: [ + { + headers: [ + { + key: 'x-custom-header', + value: 'hello world', + }, + { + key: 'x-another-header', + value: 'hello again', + }, + ], + regex: normalizeRegEx('^\\/add-header$'), + regexKeys: [], + source: '/add-header', + }, + { + headers: [ + { + key: 'x-first-header', + value: 'first', + }, + { + key: 'x-second-header', + value: 'second', + }, + ], + regex: normalizeRegEx('^\\/my-headers(?:\\/(.*))$'), + regexKeys: [0], + source: '/my-headers/(.*)', + }, + ], rewrites: [ { destination: '/another/one', diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index fc0563adf967d86..59dbc21b5bc2557 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -392,6 +392,7 @@ function runTests(dev) { expect(manifest).toEqual({ version: 1, basePath: '', + headers: [], rewrites: [], redirects: [], dynamicRoutes: [ diff --git a/test/integration/invalid-custom-routes/test/index.test.js b/test/integration/invalid-custom-routes/test/index.test.js index a8cdbd6f8e752ab..6bd1b3d2ed77c53 100644 --- a/test/integration/invalid-custom-routes/test/index.test.js +++ b/test/integration/invalid-custom-routes/test/index.test.js @@ -134,6 +134,91 @@ const invalidRewriteAssertions = (stderr = '') => { expect(stderr).toContain('Invalid rewrites found') } +const invalidHeaders = [ + { + // missing source + headers: [ + { + 'x-first': 'first', + }, + ], + }, + { + // invalid headers value + source: '/hello', + headers: { + 'x-first': 'first', + }, + }, + { + source: '/again', + headers: [ + { + // missing key + value: 'idk', + }, + ], + }, + { + source: '/again', + headers: [ + { + // missing value + key: 'idk', + }, + ], + }, + { + // non-allowed destination + source: '/again', + destination: '/another', + headers: [ + { + key: 'x-first', + value: 'idk', + }, + ], + }, + { + // valid one + source: '/valid-header', + headers: [ + { + key: 'x-first', + value: 'first', + }, + { + key: 'x-another', + value: 'again', + }, + ], + }, +] + +const invalidHeaderAssertions = (stderr = '') => { + expect(stderr).toContain( + '`source` is missing, `key` in header item must be string for route {"headers":[{"x-first":"first"}]}' + ) + + expect(stderr).toContain( + '`headers` field must be an array for route {"source":"/hello","headers":{"x-first":"first"}}' + ) + + expect(stderr).toContain( + '`key` in header item must be string for route {"source":"/again","headers":[{"value":"idk"}]}' + ) + + expect(stderr).toContain( + '`value` in header item must be string for route {"source":"/again","headers":[{"key":"idk"}]}' + ) + + expect(stderr).toContain( + 'invalid field: destination for route {"source":"/again","destination":"/another","headers":[{"key":"x-first","value":"idk"}]}' + ) + + expect(stderr).not.toContain('/valid-header') +} + describe('Errors on invalid custom routes', () => { afterAll(() => fs.remove(nextConfigPath)) @@ -149,6 +234,12 @@ describe('Errors on invalid custom routes', () => { invalidRewriteAssertions(stderr) }) + it('should error during next build for invalid headers', async () => { + await writeConfig(invalidHeaders, 'headers') + const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) + invalidHeaderAssertions(stderr) + }) + it('should error during next dev for invalid redirects', async () => { await writeConfig(invalidRedirects, 'redirects') let stderr = '' @@ -170,4 +261,15 @@ describe('Errors on invalid custom routes', () => { }) invalidRewriteAssertions(stderr) }) + + it('should error during next dev for invalid headers', async () => { + await writeConfig(invalidHeaders, 'headers') + let stderr = '' + await launchApp(appDir, await findPort(), { + onStderr: msg => { + stderr += msg + }, + }) + invalidHeaderAssertions(stderr) + }) }) From d55b46406902286276f9d6f66429a8a6254fd3b3 Mon Sep 17 00:00:00 2001 From: Sarbast Mohammed Date: Thu, 2 Jan 2020 17:50:27 +0100 Subject: [PATCH 015/321] fix with-next-offline example (#9900) --- examples/with-next-offline/next.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/with-next-offline/next.config.js b/examples/with-next-offline/next.config.js index 14d9c10d8f7f10f..f714f073f9b6db3 100644 --- a/examples/with-next-offline/next.config.js +++ b/examples/with-next-offline/next.config.js @@ -5,6 +5,18 @@ module.exports = withOffline({ swDest: process.env.NEXT_EXPORT ? 'service-worker.js' : 'static/service-worker.js', + runtimeCaching: [ + { + urlPattern: /^https?.*/, + handler: 'NetworkFirst', + options: { + cacheName: 'offlineCache', + expiration: { + maxEntries: 200, + }, + }, + }, + ], }, experimental: { async rewrites() { From d59858e32cfb79b23e8c2ec8a4f166cf70a7360b Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Jan 2020 00:29:34 +0100 Subject: [PATCH 016/321] Remove example (#9910) Closes #8935 #8934 --- .../with-typings-for-css-modules/README.md | 48 ----------------- .../next-env.d.ts | 2 - .../next.config.js | 53 ------------------- .../with-typings-for-css-modules/package.json | 23 -------- .../pages/index.tsx | 10 ---- .../with-typings-for-css-modules/style.css | 10 ---- .../style.css.d.ts | 3 -- .../tsconfig.json | 23 -------- 8 files changed, 172 deletions(-) delete mode 100644 examples/with-typings-for-css-modules/README.md delete mode 100644 examples/with-typings-for-css-modules/next-env.d.ts delete mode 100644 examples/with-typings-for-css-modules/next.config.js delete mode 100644 examples/with-typings-for-css-modules/package.json delete mode 100644 examples/with-typings-for-css-modules/pages/index.tsx delete mode 100644 examples/with-typings-for-css-modules/style.css delete mode 100644 examples/with-typings-for-css-modules/style.css.d.ts delete mode 100644 examples/with-typings-for-css-modules/tsconfig.json diff --git a/examples/with-typings-for-css-modules/README.md b/examples/with-typings-for-css-modules/README.md deleted file mode 100644 index 63f6c634f628023..000000000000000 --- a/examples/with-typings-for-css-modules/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Typings for CSS Modules example - -## Deploy your own - -Deploy the example using [ZEIT Now](https://zeit.co/now): - -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typings-for-css-modules) - -## How to use - -### Using `create-next-app` - -Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/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 with-typings-for-css-modules with-typings-for-css-modules-app -# or -yarn create next-app --example with-typings-for-css-modules with-typings-for-css-modules-app -``` - -### 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/with-typings-for-css-modules -cd with-typings-for-css-modules -``` - -Install it and run: - -```bash -npm install -npm run dev -# or -yarn -yarn dev -``` - -Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)): - -```bash -now -``` - -## The idea behind the example - -This example shows how to generate type declarations for using CSS modules with TypeScript. It uses the [next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css) plugin and [typings-for-css-modules-loader](https://www.npmjs.com/package/typings-for-css-modules-loader). With additional samples of how to apply using sass, less and stylus. diff --git a/examples/with-typings-for-css-modules/next-env.d.ts b/examples/with-typings-for-css-modules/next-env.d.ts deleted file mode 100644 index 7b7aa2c7727d88b..000000000000000 --- a/examples/with-typings-for-css-modules/next-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/examples/with-typings-for-css-modules/next.config.js b/examples/with-typings-for-css-modules/next.config.js deleted file mode 100644 index cefb1c75b33042b..000000000000000 --- a/examples/with-typings-for-css-modules/next.config.js +++ /dev/null @@ -1,53 +0,0 @@ -const withCSS = require('@zeit/next-css') - -/* With additional configuration on top of CSS Modules */ -module.exports = withCSS({ - cssModules: true, - cssLoaderOptions: { - camelCase: true, - namedExport: true, - }, - webpack(config, options) { - if (!options.isServer) { - /* Using next-css */ - for (let entry of options.defaultLoaders.css) { - if (entry.loader === 'css-loader') { - entry.loader = 'typings-for-css-modules-loader' - break - } - } - - /* Using next-less */ - /* - for (let entry of options.defaultLoaders.less) { - if (entry.loader === 'css-loader') { - entry.loader = 'typings-for-css-modules-loader'; - break; - } - } - */ - - /* Using next-sass */ - /* - for (let entry of options.defaultLoaders.sass) { - if (entry.loader === 'css-loader') { - entry.loader = 'typings-for-css-modules-loader'; - break; - } - } - */ - - /* Using next-stylus */ - /* - for (let entry of options.defaultLoaders.stylus) { - if (entry.loader === 'css-loader') { - entry.loader = 'typings-for-css-modules-loader'; - break; - } - } - */ - } - - return config - }, -}) diff --git a/examples/with-typings-for-css-modules/package.json b/examples/with-typings-for-css-modules/package.json deleted file mode 100644 index 5c0c141c1cf1ee2..000000000000000 --- a/examples/with-typings-for-css-modules/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "with-typings-for-css-modules", - "version": "1.0.0", - "license": "ISC", - "scripts": { - "dev": "next", - "build": "next build", - "start": "next start", - "type-check": "tsc" - }, - "dependencies": { - "@zeit/next-css": "^1.0.1", - "next": "latest", - "react": "^16.7.0", - "react-dom": "^16.7.0", - "typings-for-css-modules-loader": "^1.7.0" - }, - "devDependencies": { - "@types/react": "16.4.16", - "@types/react-dom": "16.0.9", - "typescript": "3.1.3" - } -} diff --git a/examples/with-typings-for-css-modules/pages/index.tsx b/examples/with-typings-for-css-modules/pages/index.tsx deleted file mode 100644 index a2a38bcbb295edb..000000000000000 --- a/examples/with-typings-for-css-modules/pages/index.tsx +++ /dev/null @@ -1,10 +0,0 @@ -/* With CSS Modules */ -import css from '../style.css' - -export default () => ( -
-

- Hello World, I am being styled using Typed CSS Modules! -

-
-) diff --git a/examples/with-typings-for-css-modules/style.css b/examples/with-typings-for-css-modules/style.css deleted file mode 100644 index ec37877fc87e720..000000000000000 --- a/examples/with-typings-for-css-modules/style.css +++ /dev/null @@ -1,10 +0,0 @@ -.example { - font-size: 50px; - color: papayawhip; -} - -.example__description > strong { - color: tomato; - text-transform: uppercase; - font-style: italic; -} diff --git a/examples/with-typings-for-css-modules/style.css.d.ts b/examples/with-typings-for-css-modules/style.css.d.ts deleted file mode 100644 index eeebb52704b084c..000000000000000 --- a/examples/with-typings-for-css-modules/style.css.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const example: string -export const example__description: string -export const exampleDescription: string diff --git a/examples/with-typings-for-css-modules/tsconfig.json b/examples/with-typings-for-css-modules/tsconfig.json deleted file mode 100644 index c65399cb28e5d42..000000000000000 --- a/examples/with-typings-for-css-modules/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "allowJs": true, - "alwaysStrict": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "jsx": "preserve", - "lib": ["dom", "es2017"], - "module": "esnext", - "moduleResolution": "node", - "noEmit": true, - "noFallthroughCasesInSwitch": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "esnext" - }, - "exclude": ["node_modules"], - "include": ["**/*.ts", "**/*.tsx"] -} From 00179adcaa3140f74786d4cd07c0adc7ad6ae01d Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 2 Jan 2020 18:47:39 -0500 Subject: [PATCH 017/321] Fix User Error in Async API Endpoint (#9911) --- packages/next/next-server/server/api-utils.ts | 2 +- test/integration/api-support/pages/api/user-error-async.js | 3 +++ test/integration/api-support/test/index.test.js | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/integration/api-support/pages/api/user-error-async.js diff --git a/packages/next/next-server/server/api-utils.ts b/packages/next/next-server/server/api-utils.ts index e9f7b1911be94b0..8e200b2ec8143c3 100644 --- a/packages/next/next-server/server/api-utils.ts +++ b/packages/next/next-server/server/api-utils.ts @@ -54,7 +54,7 @@ export async function apiResolver( apiRes.json = data => sendJson(apiRes, data) const resolver = interopDefault(resolverModule) - resolver(req, res) + await resolver(req, res) } catch (err) { if (err instanceof ApiError) { sendError(apiRes, err.statusCode, err.message) diff --git a/test/integration/api-support/pages/api/user-error-async.js b/test/integration/api-support/pages/api/user-error-async.js new file mode 100644 index 000000000000000..06214200c2f4463 --- /dev/null +++ b/test/integration/api-support/pages/api/user-error-async.js @@ -0,0 +1,3 @@ +export default async (req, res) => { + throw new Error('User error') +} diff --git a/test/integration/api-support/test/index.test.js b/test/integration/api-support/test/index.test.js index 115c965dd740b7e..b422a4a35a382e8 100644 --- a/test/integration/api-support/test/index.test.js +++ b/test/integration/api-support/test/index.test.js @@ -63,6 +63,13 @@ function runTests(dev = false) { expect(text).toBe('Internal Server Error') }) + it('should throw Internal Server Error (async)', async () => { + const res = await fetchViaHTTP(appPort, '/api/user-error-async', null, {}) + const text = await res.text() + expect(res.status).toBe(500) + expect(text).toBe('Internal Server Error') + }) + it('should parse JSON body', async () => { const data = await fetchViaHTTP(appPort, '/api/parse', null, { method: 'POST', From aa04318773b54d5f859708c81126961b899e8428 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 2 Jan 2020 18:48:56 -0500 Subject: [PATCH 018/321] v9.1.7-canary.13 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index b5dc8b028bba565..d3b1925f3f47c4c 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.12" + "version": "9.1.7-canary.13" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 5340d085340d1ee..261b199a7d59306 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 6f1c8f440b32d65..2fc00120bf1f028 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 90645531db28359..07acd14100ba423 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 4ce2d97ccf504f5..719ec0f45d856a9 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 50b1c3bad00a9bb..c78f3c170073c75 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index a207eef80a0da7c..b5e822fc1547738 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 4b0288f00b1c5df..f2c2a9b6361f2b9 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.12", + "version": "9.1.7-canary.13", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 2a70b268c8184918bd217e78cc9449edaccb4224 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Thu, 2 Jan 2020 20:08:32 -0500 Subject: [PATCH 019/321] Remove dynamic assetPrefix from docs (#9912) --- docs/advanced-features/custom-server.md | 36 ------------------------- 1 file changed, 36 deletions(-) diff --git a/docs/advanced-features/custom-server.md b/docs/advanced-features/custom-server.md index ca3c08d61b007a1..824a2393bc480b2 100644 --- a/docs/advanced-features/custom-server.md +++ b/docs/advanced-features/custom-server.md @@ -93,39 +93,3 @@ module.exports = { > Note that `useFileSystemPublicRoutes` simply disables filename routes from SSR; client-side routing may still access those paths. When using this option, you should guard against navigation to routes you do not want programmatically. > You may also wish to configure the client-side Router to disallow client-side redirects to filename routes; for that refer to [`Router.beforePopState`](/docs/api-reference/next/router.md#router.beforePopState). - -## Dynamic `assetPrefix` - -Sometimes you may need to set the [`assetPrefix`](/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md) dynamically. This is useful when changing the `assetPrefix` based on incoming requests. - -For that, you can use `app.setAssetPrefix`, as in the following example: - -```js -const next = require('next') -const http = require('http') - -const dev = process.env.NODE_ENV !== 'production' -const app = next({ dev }) -const handleNextRequests = app.getRequestHandler() - -app.prepare().then(() => { - const server = new http.Server((req, res) => { - // Add assetPrefix support based on the hostname - if (req.headers.host === 'my-app.com') { - app.setAssetPrefix('http://cdn.com/myapp') - } else { - app.setAssetPrefix('') - } - - handleNextRequests(req, res) - }) - - server.listen(port, err => { - if (err) { - throw err - } - - console.log(`> Ready on http://localhost:${port}`) - }) -}) -``` From d166840e5a2d10ec10dc40105f79f2de80a30c42 Mon Sep 17 00:00:00 2001 From: Bee Ellis <44533466+hegelocampus@users.noreply.github.com> Date: Fri, 3 Jan 2020 02:13:54 -0800 Subject: [PATCH 020/321] Fix shadowing of apolloClient (#9917) * Remove redefinition of apolloClient It seems that the definition of `apolloClient` on line 47 seems to be a intended to be defining the `apolloClient` defined in global scope. That re-declaration of the `apolloClient` variable is removed in favor of assigning the return of `initApolloClient()` to the globally defined `apolloClient` * Rename the global apollo client to globalApolloClient --- examples/with-apollo/lib/apollo.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/with-apollo/lib/apollo.js b/examples/with-apollo/lib/apollo.js index 0a95656f0a66871..c2becada8e64269 100644 --- a/examples/with-apollo/lib/apollo.js +++ b/examples/with-apollo/lib/apollo.js @@ -6,7 +6,7 @@ import { InMemoryCache } from 'apollo-cache-inmemory' import { HttpLink } from 'apollo-link-http' import fetch from 'isomorphic-unfetch' -let apolloClient = null +let globalApolloClient = null /** * Creates and provides the apolloContext @@ -44,7 +44,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { // Initialize ApolloClient, add it to the ctx object so // we can use it in `PageComponent.getInitialProp`. - const apolloClient = (ctx.apolloClient = initApolloClient()) + globalApolloClient = ctx.apolloClient = initApolloClient() // Run wrapped getInitialProps methods let pageProps = {} @@ -69,7 +69,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { ) @@ -87,7 +87,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { } // Extract query data from the Apollo store - const apolloState = apolloClient.cache.extract() + const apolloState = globalApolloClient.cache.extract() return { ...pageProps, @@ -112,11 +112,11 @@ function initApolloClient(initialState) { } // Reuse client on the client-side - if (!apolloClient) { - apolloClient = createApolloClient(initialState) + if (!globalApolloClient) { + globalApolloClient = createApolloClient(initialState) } - return apolloClient + return globalApolloClient } /** From 2e3a9720337055b9472ac618b3e82d4b32be5a26 Mon Sep 17 00:00:00 2001 From: Vinci Rufus Date: Fri, 3 Jan 2020 10:36:04 +0000 Subject: [PATCH 021/321] Update the docker multistage to copy only the necessary files (#9899) * copy only the necessary files during stage 2 in multi-stage. * update readme --- examples/with-docker/Dockerfile.multistage | 4 +++- examples/with-docker/README.md | 10 +++++++++- examples/with-docker/package.json | 5 ++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/examples/with-docker/Dockerfile.multistage b/examples/with-docker/Dockerfile.multistage index 937a0c09d9a2882..c3b6d282d2addc8 100644 --- a/examples/with-docker/Dockerfile.multistage +++ b/examples/with-docker/Dockerfile.multistage @@ -9,6 +9,8 @@ RUN yarn build && yarn --production # And then copy over node_modules, etc from that stage to the smaller base image FROM mhart/alpine-node:base WORKDIR /app -COPY --from=builder /app . +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/.next ./.next +COPY --from=builder /app/next.config.js ./next.config.js EXPOSE 3000 CMD ["node_modules/.bin/next", "start"] diff --git a/examples/with-docker/README.md b/examples/with-docker/README.md index ae18ad304f9e3c3..727847a81f8a97f 100644 --- a/examples/with-docker/README.md +++ b/examples/with-docker/README.md @@ -30,7 +30,13 @@ docker build -t next-app . docker build -t next-app -f ./Dockerfile.multistage . ``` -Run it: +Alternatively you can add these commands as scripts to your package.json and simply run + +`yarn build-docker` +or +`yarn build-docker-multistage` + +Run the docker image: ```bash docker run --rm -it \ @@ -39,6 +45,8 @@ docker run --rm -it \ next-app ``` +or use `yarn build-docker-multistage` + Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)) ```bash diff --git a/examples/with-docker/package.json b/examples/with-docker/package.json index 572d445107d3d0b..5c3b01b4be1c0ec 100644 --- a/examples/with-docker/package.json +++ b/examples/with-docker/package.json @@ -4,7 +4,10 @@ "scripts": { "dev": "next", "build": "next build", - "start": "next start" + "start": "next start", + "build-docker": "docker build -t next-app .", + "build-docker-multistage": "docker build -t next-app -f ./Dockerfile.multistage .", + "run-docker": "docker run --rm -it -p 3000:3000 -e 'API_URL=https://example.com' next-app" }, "dependencies": { "next": "latest", From 6e1762a751e44dd099583f2ced345a7505ebf55d Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 3 Jan 2020 04:43:36 -0600 Subject: [PATCH 022/321] Remove extra logging from on-demand-entries (#9909) * Remove extra logging from on-demand-entries * Update on-demand-entry-handler.ts * Update on-demand-entry-handler.ts * Update on-demand-entry-handler.ts Co-authored-by: Tim Neutkens --- packages/next/server/on-demand-entry-handler.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/next/server/on-demand-entry-handler.ts b/packages/next/server/on-demand-entry-handler.ts index 53ce4197cc22a33..fc10177df54e40f 100644 --- a/packages/next/server/on-demand-entry-handler.ts +++ b/packages/next/server/on-demand-entry-handler.ts @@ -65,7 +65,6 @@ export default function onDemandEntryHandler( let reloading = false let stopped = false let reloadCallbacks: EventEmitter | null = new EventEmitter() - let lastEntry: string | null = null for (const compiler of compilers) { compiler.hooks.make.tapPromise( @@ -80,7 +79,7 @@ export default function onDemandEntryHandler( const { name, absolutePagePath } = entries[page] const pageExists = await isWriteable(absolutePagePath) if (!pageExists) { - Log.event('page was removed', page) + // page was removed delete entries[page] return } @@ -224,10 +223,7 @@ export default function onDemandEntryHandler( // If there's no entry, it may have been invalidated and needs to be re-built. if (!entryInfo) { - if (page !== lastEntry) { - Log.event(`client pings, but there's no entry for page: ${page}`) - } - lastEntry = page + // if (page !== lastEntry) client pings, but there's no entry for page return { invalid: true } } @@ -402,7 +398,7 @@ function disposeInactiveEntries( disposingPages.forEach((page: any) => { delete entries[page] }) - Log.event(`disposing inactive page(s): ${disposingPages.join(', ')}`) + // disposing inactive page(s) devMiddleware.invalidate() } } From ed1424197c7d112cab52dc122282d51db3718a31 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Jan 2020 11:46:14 +0100 Subject: [PATCH 023/321] v9.1.7-canary.14 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index d3b1925f3f47c4c..c9b3f3eb5c9f5a6 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.13" + "version": "9.1.7-canary.14" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 261b199a7d59306..623b64f12b29275 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 2fc00120bf1f028..fd357687c305c5a 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 07acd14100ba423..b5380e1cff9a0da 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 719ec0f45d856a9..70a92108f28bd3b 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index c78f3c170073c75..aa25f3bf3f0ca4f 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index b5e822fc1547738..02a19d81efda9a8 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index f2c2a9b6361f2b9..69eecb089fa40e9 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.13", + "version": "9.1.7-canary.14", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 9e9c7ea393c925f97f4a6bc7360e08da0d1fd781 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Jan 2020 12:11:01 +0100 Subject: [PATCH 024/321] Remove leftover symlink --- linkfolder | 1 - 1 file changed, 1 deletion(-) delete mode 120000 linkfolder diff --git a/linkfolder b/linkfolder deleted file mode 120000 index 47da3b84f85b9d2..000000000000000 --- a/linkfolder +++ /dev/null @@ -1 +0,0 @@ -folder1 \ No newline at end of file From 1546fcdcfd871cde1ffc0fce4ba9153c2786d0e2 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Jan 2020 16:14:53 +0100 Subject: [PATCH 025/321] Update contributing.md --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 477295fccad579c..6ca78b5a2e67999 100644 --- a/contributing.md +++ b/contributing.md @@ -16,7 +16,7 @@ Our Commitment to Open Source can be found [here](https://zeit.co/blog/oss) Make sure you have `chromedriver` installed for your Chrome version. You can install it with -- `brew install chromedriver` on Mac OS X +- `brew cask install chromedriver` on Mac OS X - `chocolatey install chromedriver` on Windows - Or manually downloading it from the [chromedriver repo](https://chromedriver.storage.googleapis.com/index.html) and adding the binary to `/node_modules/.bin` From c8799f9e7d1242ede62e16e3ce489e09d11525d7 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Jan 2020 16:51:26 +0100 Subject: [PATCH 026/321] Enable catchAllRouting by default (#9922) --- packages/next/build/index.ts | 7 ------- packages/next/next-server/server/config.ts | 1 - test/integration/dynamic-routing/next.config.js | 1 - test/integration/dynamic-routing/test/index.test.js | 6 ++---- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index f7a8c791fd2de9e..3f231929b43fd92 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -546,13 +546,6 @@ export default async function build(dir: string, conf = null): Promise { await writeBuildId(distDir, buildId) - if (config.experimental.catchAllRouting !== true) { - if (dynamicRoutes.some(page => /\/\[\.{3}[^/]+?\](?=\/|$)/.test(page))) { - throw new Error( - 'Catch-all routing is still experimental. You cannot use it yet.' - ) - } - } const finalPrerenderRoutes: { [route: string]: SprRoute } = {} const tbdPrerenderRoutes: string[] = [] diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index e40d2538c484f5f..deaa89506e770f2 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -42,7 +42,6 @@ const defaultConfig: { [key: string]: any } = { (Number(process.env.CIRCLE_NODE_TOTAL) || (os.cpus() || { length: 1 }).length) - 1 ), - catchAllRouting: false, css: false, documentMiddleware: false, granularChunks: false, diff --git a/test/integration/dynamic-routing/next.config.js b/test/integration/dynamic-routing/next.config.js index 041bc96e8551213..7b71f47f43addb2 100644 --- a/test/integration/dynamic-routing/next.config.js +++ b/test/integration/dynamic-routing/next.config.js @@ -1,6 +1,5 @@ module.exports = { experimental: { modern: true, - catchAllRouting: true, }, } diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index 59dbc21b5bc2557..492639cbd899493 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -461,8 +461,7 @@ describe('Dynamic Routing', () => { ` module.exports = { experimental: { - modern: true, - catchAllRouting: true + modern: true } } ` @@ -487,8 +486,7 @@ describe('Dynamic Routing', () => { module.exports = { target: 'serverless', experimental: { - modern: true, - catchAllRouting: true + modern: true } } ` From 3a797f1a3879ebd9122dd91ba531c94335a81c86 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Jan 2020 17:14:01 +0100 Subject: [PATCH 027/321] v9.1.7-canary.15 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index c9b3f3eb5c9f5a6..86c57f00da094ab 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.14" + "version": "9.1.7-canary.15" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 623b64f12b29275..bcb77eb356b422b 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index fd357687c305c5a..0462c166835c0da 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index b5380e1cff9a0da..55be3ef0a396bf3 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 70a92108f28bd3b..0a700c7190e90fb 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index aa25f3bf3f0ca4f..f0a907813025875 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 02a19d81efda9a8..d104f562d8d170d 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 69eecb089fa40e9..a7ea4ee9e1ae63a 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.14", + "version": "9.1.7-canary.15", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 2f1b15c6741c70c776dbb7d5f9373c4f86fe954f Mon Sep 17 00:00:00 2001 From: Igor Crispim Diniz Date: Fri, 3 Jan 2020 14:00:06 -0300 Subject: [PATCH 028/321] Fix _app global css import order (#9836) * fix root components import order * import order tests * chunks attachment order tests --- .../next-server/server/load-components.ts | 4 +- packages/next/next-server/server/render.tsx | 2 +- .../app-document-import-order/next.config.js | 35 +++++++ .../app-document-import-order/pages/_app.js | 16 +++ .../pages/_document.js | 28 ++++++ .../app-document-import-order/pages/index.js | 22 +++++ .../requiredByApp.js | 9 ++ .../requiredByPage.js | 9 ++ .../sideEffectModule.js | 10 ++ .../test/index.test.js | 99 +++++++++++++++++++ 10 files changed, 232 insertions(+), 2 deletions(-) create mode 100644 test/integration/app-document-import-order/next.config.js create mode 100644 test/integration/app-document-import-order/pages/_app.js create mode 100644 test/integration/app-document-import-order/pages/_document.js create mode 100644 test/integration/app-document-import-order/pages/index.js create mode 100644 test/integration/app-document-import-order/requiredByApp.js create mode 100644 test/integration/app-document-import-order/requiredByPage.js create mode 100644 test/integration/app-document-import-order/sideEffectModule.js create mode 100644 test/integration/app-document-import-order/test/index.test.js diff --git a/packages/next/next-server/server/load-components.ts b/packages/next/next-server/server/load-components.ts index d50e1097ea95ee9..a6aee255a0cc045 100644 --- a/packages/next/next-server/server/load-components.ts +++ b/packages/next/next-server/server/load-components.ts @@ -64,6 +64,8 @@ export async function loadComponents( const DocumentMod = require(documentPath) const { middleware: DocumentMiddleware } = DocumentMod + const AppMod = require(appPath) + const ComponentMod = requirePage(pathname, distDir, serverless) const [ @@ -77,7 +79,7 @@ export async function loadComponents( require(join(distDir, REACT_LOADABLE_MANIFEST)), interopDefault(ComponentMod), interopDefault(DocumentMod), - interopDefault(require(appPath)), + interopDefault(AppMod), ]) return { diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index d3446b8404c54cd..2d36fd87d4d0ec5 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -499,8 +499,8 @@ export async function renderToHTML( const devFiles = buildManifest.devFiles const files = [ ...new Set([ - ...getPageFiles(buildManifest, pathname), ...getPageFiles(buildManifest, '/_app'), + ...getPageFiles(buildManifest, pathname), ]), ] const polyfillFiles = getPageFiles(buildManifest, '/_polyfills') diff --git a/test/integration/app-document-import-order/next.config.js b/test/integration/app-document-import-order/next.config.js new file mode 100644 index 000000000000000..c9c416abb483a13 --- /dev/null +++ b/test/integration/app-document-import-order/next.config.js @@ -0,0 +1,35 @@ +module.exports = { + webpack: (config, { isServer }) => { + if (!isServer) { + const optimization = config.optimization || {} + const splitChunks = optimization.splitChunks || {} + const cacheGroups = splitChunks.cacheGroups || {} + + config.optimization = { + ...optimization, + splitChunks: { + ...splitChunks, + cacheGroups: { + ...cacheGroups, + requiredByApp: { + test: /requiredByApp.js/, + name: 'requiredByApp', + enforce: true, + priority: 10, + chunks: 'all', + }, + requiredByPage: { + test: /requiredByPage.js/, + name: 'requiredByPage', + enforce: true, + priority: 10, + chunks: 'all', + }, + }, + }, + } + } + + return config + }, +} diff --git a/test/integration/app-document-import-order/pages/_app.js b/test/integration/app-document-import-order/pages/_app.js new file mode 100644 index 000000000000000..1fa69716097dbe4 --- /dev/null +++ b/test/integration/app-document-import-order/pages/_app.js @@ -0,0 +1,16 @@ +import React from 'react' +import RequiredByApp from '../requiredByApp' +import sideEffect from '../sideEffectModule' + +sideEffect('_app') + +function MyApp({ Component, pageProps }) { + return ( + + + + + ) +} + +export default MyApp diff --git a/test/integration/app-document-import-order/pages/_document.js b/test/integration/app-document-import-order/pages/_document.js new file mode 100644 index 000000000000000..7afc0c658c6baaa --- /dev/null +++ b/test/integration/app-document-import-order/pages/_document.js @@ -0,0 +1,28 @@ +import Document, { Html, Head, Main, NextScript } from 'next/document' +import sideEffect from '../sideEffectModule' + +sideEffect('_document') + +class MyDocument extends Document { + static async getInitialProps(ctx) { + const initialProps = await Document.getInitialProps(ctx) + + return { + ...initialProps, + } + } + + render() { + return ( + + + +
+ + + + ) + } +} + +export default MyDocument diff --git a/test/integration/app-document-import-order/pages/index.js b/test/integration/app-document-import-order/pages/index.js new file mode 100644 index 000000000000000..5c2c954e9e89631 --- /dev/null +++ b/test/integration/app-document-import-order/pages/index.js @@ -0,0 +1,22 @@ +import sideEffect from '../sideEffectModule' +import RequiredByPage from '../requiredByPage' + +const sideEffects = sideEffect('page') + +function Hi() { + return ( +
+ +

Hello world!

+ {sideEffects.map((arg, index) => ( +

+ {arg} +

+ ))} +
+ ) +} + +Hi.getInitialProps = () => ({}) + +export default Hi diff --git a/test/integration/app-document-import-order/requiredByApp.js b/test/integration/app-document-import-order/requiredByApp.js new file mode 100644 index 000000000000000..e9a24219ab3eb7f --- /dev/null +++ b/test/integration/app-document-import-order/requiredByApp.js @@ -0,0 +1,9 @@ +function RequiredByApp() { + return ( +
+

RequiredByApp!

+
+ ) +} + +export default RequiredByApp diff --git a/test/integration/app-document-import-order/requiredByPage.js b/test/integration/app-document-import-order/requiredByPage.js new file mode 100644 index 000000000000000..e6fa661535333aa --- /dev/null +++ b/test/integration/app-document-import-order/requiredByPage.js @@ -0,0 +1,9 @@ +function RequiredByPage() { + return ( +
+

RequiredByPage

+
+ ) +} + +export default RequiredByPage diff --git a/test/integration/app-document-import-order/sideEffectModule.js b/test/integration/app-document-import-order/sideEffectModule.js new file mode 100644 index 000000000000000..e8df3b7e977138e --- /dev/null +++ b/test/integration/app-document-import-order/sideEffectModule.js @@ -0,0 +1,10 @@ +const sideEffect = arg => { + if (!sideEffect.callArguments) { + sideEffect.callArguments = [] + } + sideEffect.callArguments.push(arg) + + return sideEffect.callArguments +} + +export default sideEffect diff --git a/test/integration/app-document-import-order/test/index.test.js b/test/integration/app-document-import-order/test/index.test.js new file mode 100644 index 000000000000000..c211ca8151a4e32 --- /dev/null +++ b/test/integration/app-document-import-order/test/index.test.js @@ -0,0 +1,99 @@ +/* eslint-env jest */ +/* global jasmine */ +import { join } from 'path' +import cheerio from 'cheerio' +import { + stopApp, + startApp, + nextBuild, + nextServer, + fetchViaHTTP, + findPort, + launchApp, + killApp, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 +const appDir = join(__dirname, '../') +let appPort +let server +let app + +describe('Root components import order', () => { + beforeAll(async () => { + await nextBuild(appDir) + app = nextServer({ + dir: join(__dirname, '../'), + dev: false, + quiet: true, + }) + + server = await startApp(app) + appPort = server.address().port + }) + afterAll(() => stopApp(server)) + + const respectsSideEffects = async () => { + const res = await fetchViaHTTP(appPort, '/') + const html = await res.text() + const $ = cheerio.load(html) + + const expectSideEffectsOrder = ['_document', '_app', 'page'] + + const sideEffectCalls = $('.side-effect-calls') + + Array.from(sideEffectCalls).forEach((sideEffectCall, index) => { + expect($(sideEffectCall).text()).toEqual(expectSideEffectsOrder[index]) + }) + } + + it( + 'root components should be imported in this order _document > _app > page in order to respect side effects', + respectsSideEffects + ) + + const respectsChunkAttachmentOrder = async () => { + const res = await fetchViaHTTP(appPort, '/') + const html = await res.text() + const $ = cheerio.load(html) + + const requiredByRegex = /^\/_next\/static\/chunks\/(requiredBy\w*).*\.js/ + const chunks = Array.from($('head').contents()) + .filter( + child => + child.type === 'tag' && + child.name === 'link' && + child.attribs.href.match(requiredByRegex) + ) + .map(child => child.attribs.href.match(requiredByRegex)[1]) + + const requiredByAppIndex = chunks.indexOf('requiredByApp') + const requiredByPageIndex = chunks.indexOf('requiredByPage') + + expect(requiredByAppIndex).toBeLessThan(requiredByPageIndex) + } + + it( + '_app chunks should be attached to de dom before page chunks', + respectsChunkAttachmentOrder + ) + + describe('on dev server', () => { + beforeAll(async () => { + appPort = await findPort() + app = await launchApp(join(__dirname, '../'), appPort) + }) + + afterAll(() => killApp(app)) + + it( + 'root components should be imported in this order _document > _app > page in order to respect side effects', + respectsSideEffects + ) + + it( + '_app chunks should be attached to de dom before page chunks', + respectsChunkAttachmentOrder + ) + }) +}) From fbcc0e818e9ea88f3b8d72b74b44890d47ec2ac7 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Fri, 3 Jan 2020 12:34:20 -0500 Subject: [PATCH 029/321] =?UTF-8?q?=F0=9F=98=8C=20(#9923)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api-routes-apollo-server-and-client/apollo/client.js | 8 ++++---- examples/with-apollo-and-redux/lib/apollo.js | 8 ++++---- examples/with-apollo/lib/apollo.js | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/api-routes-apollo-server-and-client/apollo/client.js b/examples/api-routes-apollo-server-and-client/apollo/client.js index 742172be3faaee6..d39cf04f042fd08 100644 --- a/examples/api-routes-apollo-server-and-client/apollo/client.js +++ b/examples/api-routes-apollo-server-and-client/apollo/client.js @@ -4,7 +4,7 @@ import { ApolloProvider } from '@apollo/react-hooks' import { ApolloClient } from 'apollo-client' import { InMemoryCache } from 'apollo-cache-inmemory' -let apolloClient = null +let globalApolloClient = null /** * Creates and provides the apolloContext @@ -110,11 +110,11 @@ function initApolloClient(initialState) { } // Reuse client on the client-side - if (!apolloClient) { - apolloClient = createApolloClient(initialState) + if (!globalApolloClient) { + globalApolloClient = createApolloClient(initialState) } - return apolloClient + return globalApolloClient } /** diff --git a/examples/with-apollo-and-redux/lib/apollo.js b/examples/with-apollo-and-redux/lib/apollo.js index 0a95656f0a66871..54e4e3b8c8a4c22 100644 --- a/examples/with-apollo-and-redux/lib/apollo.js +++ b/examples/with-apollo-and-redux/lib/apollo.js @@ -6,7 +6,7 @@ import { InMemoryCache } from 'apollo-cache-inmemory' import { HttpLink } from 'apollo-link-http' import fetch from 'isomorphic-unfetch' -let apolloClient = null +let globalApolloClient = null /** * Creates and provides the apolloContext @@ -112,11 +112,11 @@ function initApolloClient(initialState) { } // Reuse client on the client-side - if (!apolloClient) { - apolloClient = createApolloClient(initialState) + if (!globalApolloClient) { + globalApolloClient = createApolloClient(initialState) } - return apolloClient + return globalApolloClient } /** diff --git a/examples/with-apollo/lib/apollo.js b/examples/with-apollo/lib/apollo.js index c2becada8e64269..54e4e3b8c8a4c22 100644 --- a/examples/with-apollo/lib/apollo.js +++ b/examples/with-apollo/lib/apollo.js @@ -44,7 +44,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { // Initialize ApolloClient, add it to the ctx object so // we can use it in `PageComponent.getInitialProp`. - globalApolloClient = ctx.apolloClient = initApolloClient() + const apolloClient = (ctx.apolloClient = initApolloClient()) // Run wrapped getInitialProps methods let pageProps = {} @@ -69,7 +69,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { ) @@ -87,7 +87,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { } // Extract query data from the Apollo store - const apolloState = globalApolloClient.cache.extract() + const apolloState = apolloClient.cache.extract() return { ...pageProps, From 878ee56bb951ee020d3af41a770e20931fa124b4 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 12:45:04 -0500 Subject: [PATCH 030/321] Fix New CSS Support Media Paths (#9916) * Fix CSS Media Paths * update test * Use absolute path * Add new tests * fix import --- packages/next/build/webpack-config.ts | 1 + .../build/webpack/config/blocks/css/index.ts | 14 ++- packages/next/build/webpack/config/index.ts | 7 ++ packages/next/build/webpack/config/utils.ts | 2 + .../assets/light.svg | 17 ++++ .../url-global-asset-prefix-1/next.config.js | 5 + .../url-global-asset-prefix-1/pages/_app.js | 13 +++ .../url-global-asset-prefix-1/pages/index.js | 3 + .../url-global-asset-prefix-1/styles/dark.svg | 17 ++++ .../styles/dark2.svg | 17 ++++ .../styles/global1.css | 4 + .../styles/global2.css | 5 + .../styles/global2b.css | 5 + .../assets/light.svg | 17 ++++ .../url-global-asset-prefix-2/next.config.js | 5 + .../url-global-asset-prefix-2/pages/_app.js | 13 +++ .../url-global-asset-prefix-2/pages/index.js | 3 + .../url-global-asset-prefix-2/styles/dark.svg | 17 ++++ .../styles/dark2.svg | 17 ++++ .../styles/global1.css | 4 + .../styles/global2.css | 5 + .../styles/global2b.css | 5 + test/integration/css/test/index.test.js | 94 ++++++++++++++++++- 23 files changed, 285 insertions(+), 5 deletions(-) create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/assets/light.svg create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/next.config.js create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/pages/_app.js create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/pages/index.js create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark.svg create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark2.svg create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/styles/global1.css create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2.css create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2b.css create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/assets/light.svg create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/next.config.js create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/pages/_app.js create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/pages/index.js create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark.svg create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark2.svg create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/styles/global1.css create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2.css create mode 100644 test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2b.css diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 0279a613d8f85c3..75a113a6ec00bb7 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -869,6 +869,7 @@ export default async function getBaseWebpackConfig( isServer, hasSupportCss: !!config.experimental.css, hasExperimentalData: !!config.experimental.ampBindInitData, + assetPrefix: config.assetPrefix || '', }) if (typeof config.webpack === 'function') { diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index 0fe22d4d00e3a69..cda0a0bee9025fc 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -14,8 +14,10 @@ import { getPostCssPlugins } from './plugins' function getClientStyleLoader({ isDevelopment, + assetPrefix, }: { isDevelopment: boolean + assetPrefix: string }): webpack.RuleSetUseItem { return isDevelopment ? { @@ -62,7 +64,7 @@ function getClientStyleLoader({ } : { loader: MiniCssExtractPlugin.loader, - options: {}, + options: { publicPath: `${assetPrefix}/_next/` }, } } @@ -150,7 +152,10 @@ export const css = curry(async function css( // Add appropriate development more or production mode style // loader ctx.isClient && - getClientStyleLoader({ isDevelopment: ctx.isDevelopment }), + getClientStyleLoader({ + isDevelopment: ctx.isDevelopment, + assetPrefix: ctx.assetPrefix, + }), // Resolve CSS `@import`s and `url()`s { @@ -227,7 +232,10 @@ export const css = curry(async function css( use: [ // Add appropriate development more or production mode style // loader - getClientStyleLoader({ isDevelopment: ctx.isDevelopment }), + getClientStyleLoader({ + isDevelopment: ctx.isDevelopment, + assetPrefix: ctx.assetPrefix, + }), // Resolve CSS `@import`s and `url()`s { diff --git a/packages/next/build/webpack/config/index.ts b/packages/next/build/webpack/config/index.ts index e926b17479b17f8..ca3508f1bc94f54 100644 --- a/packages/next/build/webpack/config/index.ts +++ b/packages/next/build/webpack/config/index.ts @@ -13,6 +13,7 @@ export async function build( isServer, hasSupportCss, hasExperimentalData, + assetPrefix, }: { rootDirectory: string customAppFile: string | null @@ -20,6 +21,7 @@ export async function build( isServer: boolean hasSupportCss: boolean hasExperimentalData: boolean + assetPrefix: string } ): Promise { const ctx: ConfigurationContext = { @@ -29,6 +31,11 @@ export async function build( isProduction: !isDevelopment, isServer, isClient: !isServer, + assetPrefix: assetPrefix + ? assetPrefix.endsWith('/') + ? assetPrefix.slice(0, -1) + : assetPrefix + : '', } const fn = pipe( diff --git a/packages/next/build/webpack/config/utils.ts b/packages/next/build/webpack/config/utils.ts index 49cf83188501acd..f84d9e903dec439 100644 --- a/packages/next/build/webpack/config/utils.ts +++ b/packages/next/build/webpack/config/utils.ts @@ -9,6 +9,8 @@ export type ConfigurationContext = { isServer: boolean isClient: boolean + + assetPrefix: string } export type ConfigurationFn = ( diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/assets/light.svg b/test/integration/css-fixtures/url-global-asset-prefix-1/assets/light.svg new file mode 100644 index 000000000000000..0194cbce065613d --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/assets/light.svg @@ -0,0 +1,17 @@ + + + + Logotype - White + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/next.config.js b/test/integration/css-fixtures/url-global-asset-prefix-1/next.config.js new file mode 100644 index 000000000000000..177a5d7903f16a5 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/next.config.js @@ -0,0 +1,5 @@ +const config = require('../next.config.js') +module.exports = { + ...config, + assetPrefix: '/foo/', +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/pages/_app.js b/test/integration/css-fixtures/url-global-asset-prefix-1/pages/_app.js new file mode 100644 index 000000000000000..c57bd78e5b78163 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/pages/_app.js @@ -0,0 +1,13 @@ +import React from 'react' +import App from 'next/app' +import '../styles/global1.css' +import '../styles/global2.css' + +class MyApp extends App { + render() { + const { Component, pageProps } = this.props + return + } +} + +export default MyApp diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/pages/index.js b/test/integration/css-fixtures/url-global-asset-prefix-1/pages/index.js new file mode 100644 index 000000000000000..5cbac8a153d77f0 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/pages/index.js @@ -0,0 +1,3 @@ +export default function Home() { + return
This text should be red.
+} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark.svg b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark.svg new file mode 100644 index 000000000000000..bdae3d658787240 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark.svg @@ -0,0 +1,17 @@ + + + + Logotype - Black + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark2.svg b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark2.svg new file mode 100644 index 000000000000000..bdae3d658787240 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/dark2.svg @@ -0,0 +1,17 @@ + + + + Logotype - Black + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global1.css b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global1.css new file mode 100644 index 000000000000000..fdaf9c9476f9c6a --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global1.css @@ -0,0 +1,4 @@ +.red-text { + color: red; + background-image: url('./dark.svg') url(dark2.svg); +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2.css b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2.css new file mode 100644 index 000000000000000..70ef0c6c16a98b7 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2.css @@ -0,0 +1,5 @@ +@import './global2b.css'; + +.blue-text { + color: blue; +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2b.css b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2b.css new file mode 100644 index 000000000000000..41c015298e5fdd2 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-1/styles/global2b.css @@ -0,0 +1,5 @@ +.blue-text { + color: orange; + font-weight: bolder; + background-image: url(../assets/light.svg); +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/assets/light.svg b/test/integration/css-fixtures/url-global-asset-prefix-2/assets/light.svg new file mode 100644 index 000000000000000..0194cbce065613d --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/assets/light.svg @@ -0,0 +1,17 @@ + + + + Logotype - White + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/next.config.js b/test/integration/css-fixtures/url-global-asset-prefix-2/next.config.js new file mode 100644 index 000000000000000..72ff6da7d9adfb7 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/next.config.js @@ -0,0 +1,5 @@ +const config = require('../next.config.js') +module.exports = { + ...config, + assetPrefix: '/foo', +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/pages/_app.js b/test/integration/css-fixtures/url-global-asset-prefix-2/pages/_app.js new file mode 100644 index 000000000000000..c57bd78e5b78163 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/pages/_app.js @@ -0,0 +1,13 @@ +import React from 'react' +import App from 'next/app' +import '../styles/global1.css' +import '../styles/global2.css' + +class MyApp extends App { + render() { + const { Component, pageProps } = this.props + return + } +} + +export default MyApp diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/pages/index.js b/test/integration/css-fixtures/url-global-asset-prefix-2/pages/index.js new file mode 100644 index 000000000000000..5cbac8a153d77f0 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/pages/index.js @@ -0,0 +1,3 @@ +export default function Home() { + return
This text should be red.
+} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark.svg b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark.svg new file mode 100644 index 000000000000000..bdae3d658787240 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark.svg @@ -0,0 +1,17 @@ + + + + Logotype - Black + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark2.svg b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark2.svg new file mode 100644 index 000000000000000..bdae3d658787240 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/dark2.svg @@ -0,0 +1,17 @@ + + + + Logotype - Black + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global1.css b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global1.css new file mode 100644 index 000000000000000..fdaf9c9476f9c6a --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global1.css @@ -0,0 +1,4 @@ +.red-text { + color: red; + background-image: url('./dark.svg') url(dark2.svg); +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2.css b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2.css new file mode 100644 index 000000000000000..70ef0c6c16a98b7 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2.css @@ -0,0 +1,5 @@ +@import './global2b.css'; + +.blue-text { + color: blue; +} diff --git a/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2b.css b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2b.css new file mode 100644 index 000000000000000..41c015298e5fdd2 --- /dev/null +++ b/test/integration/css-fixtures/url-global-asset-prefix-2/styles/global2b.css @@ -0,0 +1,5 @@ +.blue-text { + color: orange; + font-weight: bolder; + background-image: url(../assets/light.svg); +} diff --git a/test/integration/css/test/index.test.js b/test/integration/css/test/index.test.js index 1f01ca86a88ea68..531c448ba4586ec 100644 --- a/test/integration/css/test/index.test.js +++ b/test/integration/css/test/index.test.js @@ -469,7 +469,7 @@ describe('CSS Support', () => { }) }) - describe('CSS URL via `file-loader', () => { + describe('CSS URL via `file-loader`', () => { const appDir = join(fixturesDir, 'url-global') beforeAll(async () => { @@ -490,7 +490,97 @@ describe('CSS Support', () => { expect(cssFiles.length).toBe(1) const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8') expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatch( - /^\.red-text\{color:red;background-image:url\(static\/media\/dark\.[a-z0-9]{32}\.svg\) url\(static\/media\/dark2\.[a-z0-9]{32}\.svg\)\}\.blue-text\{color:orange;font-weight:bolder;background-image:url\(static\/media\/light\.[a-z0-9]{32}\.svg\);color:#00f\}$/ + /^\.red-text\{color:red;background-image:url\(\/_next\/static\/media\/dark\.[a-z0-9]{32}\.svg\) url\(\/_next\/static\/media\/dark2\.[a-z0-9]{32}\.svg\)\}\.blue-text\{color:orange;font-weight:bolder;background-image:url\(\/_next\/static\/media\/light\.[a-z0-9]{32}\.svg\);color:#00f\}$/ + ) + + const mediaFiles = await readdir(mediaFolder) + expect(mediaFiles.length).toBe(3) + expect( + mediaFiles + .map(fileName => + /^(.+?)\..{32}\.(.+?)$/ + .exec(fileName) + .slice(1) + .join('.') + ) + .sort() + ).toMatchInlineSnapshot(` + Array [ + "dark.svg", + "dark2.svg", + "light.svg", + ] + `) + }) + }) + + describe('CSS URL via `file-loader` and asset prefix (1)', () => { + const appDir = join(fixturesDir, 'url-global-asset-prefix-1') + + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + it('should build successfully', async () => { + await nextBuild(appDir) + }) + + it(`should've emitted expected files`, async () => { + const cssFolder = join(appDir, '.next/static/css') + const mediaFolder = join(appDir, '.next/static/media') + + const files = await readdir(cssFolder) + const cssFiles = files.filter(f => /\.css$/.test(f)) + + expect(cssFiles.length).toBe(1) + const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8') + expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatch( + /^\.red-text\{color:red;background-image:url\(\/foo\/_next\/static\/media\/dark\.[a-z0-9]{32}\.svg\) url\(\/foo\/_next\/static\/media\/dark2\.[a-z0-9]{32}\.svg\)\}\.blue-text\{color:orange;font-weight:bolder;background-image:url\(\/foo\/_next\/static\/media\/light\.[a-z0-9]{32}\.svg\);color:#00f\}$/ + ) + + const mediaFiles = await readdir(mediaFolder) + expect(mediaFiles.length).toBe(3) + expect( + mediaFiles + .map(fileName => + /^(.+?)\..{32}\.(.+?)$/ + .exec(fileName) + .slice(1) + .join('.') + ) + .sort() + ).toMatchInlineSnapshot(` + Array [ + "dark.svg", + "dark2.svg", + "light.svg", + ] + `) + }) + }) + + describe('CSS URL via `file-loader` and asset prefix (2)', () => { + const appDir = join(fixturesDir, 'url-global-asset-prefix-2') + + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + it('should build successfully', async () => { + await nextBuild(appDir) + }) + + it(`should've emitted expected files`, async () => { + const cssFolder = join(appDir, '.next/static/css') + const mediaFolder = join(appDir, '.next/static/media') + + const files = await readdir(cssFolder) + const cssFiles = files.filter(f => /\.css$/.test(f)) + + expect(cssFiles.length).toBe(1) + const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8') + expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatch( + /^\.red-text\{color:red;background-image:url\(\/foo\/_next\/static\/media\/dark\.[a-z0-9]{32}\.svg\) url\(\/foo\/_next\/static\/media\/dark2\.[a-z0-9]{32}\.svg\)\}\.blue-text\{color:orange;font-weight:bolder;background-image:url\(\/foo\/_next\/static\/media\/light\.[a-z0-9]{32}\.svg\);color:#00f\}$/ ) const mediaFiles = await readdir(mediaFolder) From 251f56b81f80c1740dd18bce038fcf42c77f9d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Xalambr=C3=AD?= Date: Fri, 3 Jan 2020 13:01:32 -0500 Subject: [PATCH 031/321] Tailwind example only run PurgeCSS in production (#9846) * Tailwind example only run PurgeCSS in production * Apply lint Co-authored-by: Joe Haddad --- examples/with-tailwindcss/postcss.config.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/with-tailwindcss/postcss.config.js b/examples/with-tailwindcss/postcss.config.js index 73f04dacb1e8100..dbf6444251ded83 100644 --- a/examples/with-tailwindcss/postcss.config.js +++ b/examples/with-tailwindcss/postcss.config.js @@ -2,13 +2,14 @@ module.exports = { plugins: [ require('postcss-easy-import'), require('tailwindcss'), - require('@fullhuman/postcss-purgecss')({ - content: [ - './pages/**/*.{js,jsx,ts,tsx}', - './components/**/*.{js,jsx,ts,tsx}', - ], - defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [], - }), + process.env.NODE_ENV === 'production' && + require('@fullhuman/postcss-purgecss')({ + content: [ + './pages/**/*.{js,jsx,ts,tsx}', + './components/**/*.{js,jsx,ts,tsx}', + ], + defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [], + }), require('autoprefixer'), require('cssnano'), ], From d1fdd2bbf8df7e12f561f3eec0c1f16897502045 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Fri, 3 Jan 2020 13:16:51 -0500 Subject: [PATCH 032/321] Add descriptions to documentation pages (#9901) * Added descriptions * Added descriptions to API Reference * Added descriptions to API Routes * Added descriptions to basic features * Added descriptions to the routing docs * Update exportPathMap.md Co-authored-by: Joe Haddad --- docs/advanced-features/amp-support/adding-amp-components.md | 4 ++++ .../amp-support/amp-in-static-html-export.md | 4 ++++ docs/advanced-features/amp-support/amp-validation.md | 4 ++++ docs/advanced-features/amp-support/introduction.md | 4 ++++ docs/advanced-features/amp-support/typescript.md | 4 ++++ docs/advanced-features/automatic-static-optimization.md | 4 ++++ docs/advanced-features/custom-app.md | 4 ++++ docs/advanced-features/custom-document.md | 4 ++++ docs/advanced-features/custom-error-page.md | 4 ++++ docs/advanced-features/custom-server.md | 4 ++++ docs/advanced-features/customizing-babel-config.md | 4 ++++ docs/advanced-features/dynamic-import.md | 4 ++++ docs/advanced-features/src-directory.md | 4 ++++ docs/advanced-features/static-html-export.md | 4 ++++ docs/api-reference/cli.md | 4 ++++ docs/api-reference/data-fetching/getInitialProps.md | 4 ++++ docs/api-reference/next.config.js/build-target.md | 4 ++++ .../next.config.js/cdn-support-with-asset-prefix.md | 4 ++++ docs/api-reference/next.config.js/compression.md | 4 ++++ .../next.config.js/configuring-onDemandEntries.md | 4 ++++ .../next.config.js/configuring-the-build-id.md | 4 ++++ docs/api-reference/next.config.js/custom-page-extensions.md | 4 ++++ docs/api-reference/next.config.js/custom-webpack-config.md | 4 ++++ .../next.config.js/disabling-etag-generation.md | 4 ++++ docs/api-reference/next.config.js/disabling-x-powered-by.md | 4 ++++ docs/api-reference/next.config.js/environment-variables.md | 4 ++++ docs/api-reference/next.config.js/exportPathMap.md | 4 ++++ .../next.config.js/ignoring-typescript-errors.md | 4 ++++ docs/api-reference/next.config.js/introduction.md | 4 ++++ docs/api-reference/next.config.js/runtime-configuration.md | 4 ++++ .../next.config.js/setting-a-custom-build-directory.md | 4 ++++ .../next.config.js/static-optimization-indicator.md | 4 ++++ docs/api-reference/next/amp.md | 4 ++++ docs/api-reference/next/head.md | 4 ++++ docs/api-reference/next/link.md | 4 ++++ docs/api-reference/next/router.md | 4 ++++ docs/api-routes/api-middlewares.md | 4 ++++ docs/api-routes/dynamic-api-routes.md | 6 +++++- docs/api-routes/introduction.md | 4 ++++ docs/api-routes/response-helpers.md | 4 ++++ docs/basic-features/built-in-css-support.md | 4 ++++ docs/basic-features/data-fetching.md | 4 ++++ docs/basic-features/pages.md | 4 ++++ docs/basic-features/static-file-serving.md | 4 ++++ docs/basic-features/typescript.md | 4 ++++ docs/deployment.md | 4 ++++ docs/faq.md | 4 ++++ docs/getting-started.md | 2 +- docs/routing/dynamic-routes.md | 4 ++++ docs/routing/imperatively.md | 4 ++++ docs/routing/introduction.md | 4 ++++ docs/routing/shallow-routing.md | 4 ++++ 52 files changed, 206 insertions(+), 2 deletions(-) diff --git a/docs/advanced-features/amp-support/adding-amp-components.md b/docs/advanced-features/amp-support/adding-amp-components.md index 8ecd294025f05c8..1c11ffe8c630c28 100644 --- a/docs/advanced-features/amp-support/adding-amp-components.md +++ b/docs/advanced-features/amp-support/adding-amp-components.md @@ -1,3 +1,7 @@ +--- +description: Add components from the AMP community to AMP pages, and make your pages more interactive. +--- + # Adding AMP Components The AMP community provide [many components](https://amp.dev/documentation/components/) to make AMP pages more interactive. You can add these components to your page by using `next/head`, as in the following example: diff --git a/docs/advanced-features/amp-support/amp-in-static-html-export.md b/docs/advanced-features/amp-support/amp-in-static-html-export.md index f6372f481eaeb24..dfa3afbc41f309c 100644 --- a/docs/advanced-features/amp-support/amp-in-static-html-export.md +++ b/docs/advanced-features/amp-support/amp-in-static-html-export.md @@ -1,3 +1,7 @@ +--- +description: Learn how AMP pages are created when used together with `next export`. +--- + # AMP in Static HTML export When using `next export` to do [Static HTML export](/docs/advanced-features/static-html-export.md) statically prerender pages, Next.js will detect if the page supports AMP and change the exporting behavior based on that. diff --git a/docs/advanced-features/amp-support/amp-validation.md b/docs/advanced-features/amp-support/amp-validation.md index ac22bd5a337b388..859024330712339 100644 --- a/docs/advanced-features/amp-support/amp-validation.md +++ b/docs/advanced-features/amp-support/amp-validation.md @@ -1,3 +1,7 @@ +--- +description: AMP pages are automatically validated by Next.js during development and on build. Learn more about it here. +--- + # AMP Validation AMP pages are automatically validated with [amphtml-validator](https://www.npmjs.com/package/amphtml-validator) during development. Errors and warnings will appear in the terminal where you started Next.js. diff --git a/docs/advanced-features/amp-support/introduction.md b/docs/advanced-features/amp-support/introduction.md index 2b87e3f33bbf774..187445004764951 100644 --- a/docs/advanced-features/amp-support/introduction.md +++ b/docs/advanced-features/amp-support/introduction.md @@ -1,3 +1,7 @@ +--- +description: With minimal config, and without leaving React, you can start adding AMP and improve the performance and speed of your pages. +--- + # AMP Support
diff --git a/docs/advanced-features/amp-support/typescript.md b/docs/advanced-features/amp-support/typescript.md index c9d794c2a580556..273c943d94920f3 100644 --- a/docs/advanced-features/amp-support/typescript.md +++ b/docs/advanced-features/amp-support/typescript.md @@ -1,3 +1,7 @@ +--- +description: Using AMP with TypeScript? Extend your typings to allow AMP components. +--- + # TypeScript AMP currently doesn't have built-in types for TypeScript, but it's in their roadmap ([#13791](https://github.com/ampproject/amphtml/issues/13791)). diff --git a/docs/advanced-features/automatic-static-optimization.md b/docs/advanced-features/automatic-static-optimization.md index 0aa01b8b25121e8..c3304ed843a05c6 100644 --- a/docs/advanced-features/automatic-static-optimization.md +++ b/docs/advanced-features/automatic-static-optimization.md @@ -1,3 +1,7 @@ +--- +description: Next.js automatically optimizes your app to be static HTML whenever possible. Learn how it works here. +--- + # Automatic Static Optimization Next.js automatically determines that a page is static (can be prerendered) if it has no blocking data requirements. This determination is made by the absence of `getInitialProps` in the page. diff --git a/docs/advanced-features/custom-app.md b/docs/advanced-features/custom-app.md index 0b920c575c3cf8a..22095d635aca23a 100644 --- a/docs/advanced-features/custom-app.md +++ b/docs/advanced-features/custom-app.md @@ -1,3 +1,7 @@ +--- +description: Control page initialization and add a layout that persists for all pages by overriding the default App component used by Next.js. +--- + # Custom `App` Next.js uses the `App` component to initialize pages. You can override it and control the page initialization. Which allows you to do amazing things like: diff --git a/docs/advanced-features/custom-document.md b/docs/advanced-features/custom-document.md index 5e1c9890b963450..4408cf087f95fb4 100644 --- a/docs/advanced-features/custom-document.md +++ b/docs/advanced-features/custom-document.md @@ -1,3 +1,7 @@ +--- +description: Extend the default document markup added by Next.js. +--- + # Custom `Document` A custom `Document` is commonly used to augment your application's `` and `` tags. This is necessary because Next.js pages skip the definition of the surrounding document's markup. diff --git a/docs/advanced-features/custom-error-page.md b/docs/advanced-features/custom-error-page.md index 80279ee19b3c83e..828ecf789a23606 100644 --- a/docs/advanced-features/custom-error-page.md +++ b/docs/advanced-features/custom-error-page.md @@ -1,3 +1,7 @@ +--- +description: Override and extend the built-in Error page to handle custom errors. +--- + # Custom Error Page **404** or **500** errors are handled both client-side and server-side by the `Error` component. If you wish to override it, define the file `pages/_error.js` and add the following code: diff --git a/docs/advanced-features/custom-server.md b/docs/advanced-features/custom-server.md index 824a2393bc480b2..7b1ae1bdc22f1fd 100644 --- a/docs/advanced-features/custom-server.md +++ b/docs/advanced-features/custom-server.md @@ -1,3 +1,7 @@ +--- +description: Start a Next.js app programmatically using a custom server. +--- + # Custom Server
diff --git a/docs/advanced-features/customizing-babel-config.md b/docs/advanced-features/customizing-babel-config.md index 4e2b33cc977e37a..8bdf25a48cd971d 100644 --- a/docs/advanced-features/customizing-babel-config.md +++ b/docs/advanced-features/customizing-babel-config.md @@ -1,3 +1,7 @@ +--- +description: Extend the babel preset added by Next.js with your own configs. +--- + # Customizing Babel Config
diff --git a/docs/advanced-features/dynamic-import.md b/docs/advanced-features/dynamic-import.md index b957d886cbf704c..adf716f1501b23c 100644 --- a/docs/advanced-features/dynamic-import.md +++ b/docs/advanced-features/dynamic-import.md @@ -1,3 +1,7 @@ +--- +description: Dynamically import JavaScript modules and React Components and split your code into manageable chunks. +--- + # Dynamic Import
diff --git a/docs/advanced-features/src-directory.md b/docs/advanced-features/src-directory.md index 048d14b40a92ab5..00a162832382719 100644 --- a/docs/advanced-features/src-directory.md +++ b/docs/advanced-features/src-directory.md @@ -1,3 +1,7 @@ +--- +description: Save pages under the `src` directory as an alternative to the root `pages` directory. +--- + # `src` Directory Pages can also be added under `src/pages` as an alternative to the root `pages` directory. diff --git a/docs/advanced-features/static-html-export.md b/docs/advanced-features/static-html-export.md index 62417c64ede1690..86922903cc89575 100644 --- a/docs/advanced-features/static-html-export.md +++ b/docs/advanced-features/static-html-export.md @@ -1,3 +1,7 @@ +--- +description: Export your Next.js app to static HTML, and run it standalone without the need of a Node.js server. +--- + # Static HTML Export
diff --git a/docs/api-reference/cli.md b/docs/api-reference/cli.md index 1774f5870611b80..da3660a75e1cc9a 100644 --- a/docs/api-reference/cli.md +++ b/docs/api-reference/cli.md @@ -1,3 +1,7 @@ +--- +description: The Next.js CLI allows you to start, build, and export your application. Learn more about it here. +--- + # Next.js CLI The Next.js CLI allows you to start, build, and export your application. diff --git a/docs/api-reference/data-fetching/getInitialProps.md b/docs/api-reference/data-fetching/getInitialProps.md index f38c3aa309f157e..122ffe288804d1d 100644 --- a/docs/api-reference/data-fetching/getInitialProps.md +++ b/docs/api-reference/data-fetching/getInitialProps.md @@ -1,3 +1,7 @@ +--- +description: Enable Server-Side Rendering in a page and do initial data population with `getInitialProps`. +--- + # getInitialProps
diff --git a/docs/api-reference/next.config.js/build-target.md b/docs/api-reference/next.config.js/build-target.md index c55da8adeec4797..06651ebf01d3b1f 100644 --- a/docs/api-reference/next.config.js/build-target.md +++ b/docs/api-reference/next.config.js/build-target.md @@ -1,3 +1,7 @@ +--- +description: Learn more about the build targets used by Next.js, which decide the way your application is built and run. +--- + # Build Target Next.js supports various build targets, each changing the way your application is built and run. We'll explain each of the targets below. diff --git a/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md b/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md index ba1ced8b1cea45a..c08b9ab21900be6 100644 --- a/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md +++ b/docs/api-reference/next.config.js/cdn-support-with-asset-prefix.md @@ -1,3 +1,7 @@ +--- +description: A custom asset prefix allows you serve static assets from a CDN. Learn more about it here. +--- + # CDN Support with Asset Prefix To set up a [CDN](https://en.wikipedia.org/wiki/Content_delivery_network), you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on. diff --git a/docs/api-reference/next.config.js/compression.md b/docs/api-reference/next.config.js/compression.md index 87a9da4d88ebe21..9f98132b1a4a659 100644 --- a/docs/api-reference/next.config.js/compression.md +++ b/docs/api-reference/next.config.js/compression.md @@ -1,3 +1,7 @@ +--- +description: Next.js provides gzip compression to compress rendered content and static files, it only works with the server target. Learn more about it here. +--- + # Compression Next.js provides [**gzip**](https://tools.ietf.org/html/rfc6713#section-3) compression to compress rendered content and static files. Compression only works with the [`server` target](/docs/api-reference/next.config.js/build-target.md#server-target). In general you will want to enable compression on a HTTP proxy like [nginx](https://www.nginx.com/), to offload load from the `Node.js` process. diff --git a/docs/api-reference/next.config.js/configuring-onDemandEntries.md b/docs/api-reference/next.config.js/configuring-onDemandEntries.md index a12c94e4ef9cfa5..8b05d1c5801ca4b 100644 --- a/docs/api-reference/next.config.js/configuring-onDemandEntries.md +++ b/docs/api-reference/next.config.js/configuring-onDemandEntries.md @@ -1,3 +1,7 @@ +--- +description: Configure how Next.js will dispose and keep in memory pages created in development. +--- + # Configuring onDemandEntries Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development. diff --git a/docs/api-reference/next.config.js/configuring-the-build-id.md b/docs/api-reference/next.config.js/configuring-the-build-id.md index 4f5eb33ce1dc279..ede037ff20f511b 100644 --- a/docs/api-reference/next.config.js/configuring-the-build-id.md +++ b/docs/api-reference/next.config.js/configuring-the-build-id.md @@ -1,3 +1,7 @@ +--- +description: Configure the build id, which is used to identify the current build in which your application is being served. +--- + # Configuring the Build ID Next.js uses a constant id generated at build time to identify which version of your application is being served. This can cause problems in multi-server deployments when `next build` is ran on every server. In order to keep a static build id between builds you can provide your own build id. diff --git a/docs/api-reference/next.config.js/custom-page-extensions.md b/docs/api-reference/next.config.js/custom-page-extensions.md index f7f1ef067acc65f..bdec8334e9cc3ef 100644 --- a/docs/api-reference/next.config.js/custom-page-extensions.md +++ b/docs/api-reference/next.config.js/custom-page-extensions.md @@ -1,3 +1,7 @@ +--- +description: Extend the default page extensions used by Next.js when resolving pages in the pages directory. +--- + # Custom Page Extensions Aimed at modules like [@next/mdx](https://github.com/zeit/next.js/tree/canary/packages/next-mdx), which adds support for pages ending with `.mdx`. You can configure the extensions looked for in the `pages` directory when resolving pages. diff --git a/docs/api-reference/next.config.js/custom-webpack-config.md b/docs/api-reference/next.config.js/custom-webpack-config.md index 6cecace2221c3e8..e3dd4af69c5f651 100644 --- a/docs/api-reference/next.config.js/custom-webpack-config.md +++ b/docs/api-reference/next.config.js/custom-webpack-config.md @@ -1,3 +1,7 @@ +--- +description: Extend the default webpack config added by Next.js. +--- + # Custom Webpack Config Some commonly asked for features are available as plugins: diff --git a/docs/api-reference/next.config.js/disabling-etag-generation.md b/docs/api-reference/next.config.js/disabling-etag-generation.md index 89329369539d72e..27ecf6660d81be2 100644 --- a/docs/api-reference/next.config.js/disabling-etag-generation.md +++ b/docs/api-reference/next.config.js/disabling-etag-generation.md @@ -1,3 +1,7 @@ +--- +description: Next.js will generate etags for every page by default. Learn more about how to disable etag generation here. +--- + # Disabling ETag Generation Next.js will generate [etags](https://en.wikipedia.org/wiki/HTTP_ETag) for every page by default. You may want to disable etag generation for HTML pages depending on your cache strategy. diff --git a/docs/api-reference/next.config.js/disabling-x-powered-by.md b/docs/api-reference/next.config.js/disabling-x-powered-by.md index cfcd4bd569d1289..a6d3db934f58eff 100644 --- a/docs/api-reference/next.config.js/disabling-x-powered-by.md +++ b/docs/api-reference/next.config.js/disabling-x-powered-by.md @@ -1,3 +1,7 @@ +--- +description: Next.js will add `x-powered-by` to the request headers by default. Learn to opt-out of it here. +--- + # Disabling x-powered-by By default Next.js will add `x-powered-by` to the request headers. To opt-out of it, open `next.config.js` and disable the `poweredByHeader` config: diff --git a/docs/api-reference/next.config.js/environment-variables.md b/docs/api-reference/next.config.js/environment-variables.md index c8d427fc4681c93..4bd74196f8b358e 100644 --- a/docs/api-reference/next.config.js/environment-variables.md +++ b/docs/api-reference/next.config.js/environment-variables.md @@ -1,3 +1,7 @@ +--- +description: Learn to add and access environment variables in your Next.js application at build time. +--- + # Environment Variables
diff --git a/docs/api-reference/next.config.js/exportPathMap.md b/docs/api-reference/next.config.js/exportPathMap.md index 9d9b3ae509ee7f6..bf367d6b31b86a9 100644 --- a/docs/api-reference/next.config.js/exportPathMap.md +++ b/docs/api-reference/next.config.js/exportPathMap.md @@ -1,3 +1,7 @@ +--- +description: Customize the pages that will be exported as HTML files when using `next export`. +--- + # exportPathMap > This feature is exclusive of `next export`. Please refer to [Static HTML export](/docs/advanced-features/static-html-export.md) if you want to learn more about it. diff --git a/docs/api-reference/next.config.js/ignoring-typescript-errors.md b/docs/api-reference/next.config.js/ignoring-typescript-errors.md index 28b45ef8b7033cc..bde16ed256ee362 100644 --- a/docs/api-reference/next.config.js/ignoring-typescript-errors.md +++ b/docs/api-reference/next.config.js/ignoring-typescript-errors.md @@ -1,3 +1,7 @@ +--- +description: Next.js reports TypeScript errors by default. Learn to opt-out of this behavior here. +--- + # Ignoring TypeScript Errors Next.js reports TypeScript errors by default. If you don't want to leverage this behavior and prefer something else instead, like your editor's integration, you may want to disable it. diff --git a/docs/api-reference/next.config.js/introduction.md b/docs/api-reference/next.config.js/introduction.md index a4af3c1cb643d1b..e9fd3f681694fb0 100644 --- a/docs/api-reference/next.config.js/introduction.md +++ b/docs/api-reference/next.config.js/introduction.md @@ -1,3 +1,7 @@ +--- +description: learn more about the configuration file used by Next.js to handle your application. +--- + # next.config.js For custom advanced behavior of Next.js, you can create a `next.config.js` in the root of your project directory (next to `package.json`). diff --git a/docs/api-reference/next.config.js/runtime-configuration.md b/docs/api-reference/next.config.js/runtime-configuration.md index 4880d9bb28402fe..b176acbb5e36189 100644 --- a/docs/api-reference/next.config.js/runtime-configuration.md +++ b/docs/api-reference/next.config.js/runtime-configuration.md @@ -1,3 +1,7 @@ +--- +description: Add client and server runtime configuration to your Next.js app. +--- + # Runtime Configuration > Generally you'll want to use [build-time environment variables](/docs/api-reference/next.config.js/environment-variables.md) to provide your configuration. The reason for this is that runtime configuration adds rendering / initialization overhead and is incompatible with [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md). diff --git a/docs/api-reference/next.config.js/setting-a-custom-build-directory.md b/docs/api-reference/next.config.js/setting-a-custom-build-directory.md index fea342c406a3f10..df5113ab88a48e3 100644 --- a/docs/api-reference/next.config.js/setting-a-custom-build-directory.md +++ b/docs/api-reference/next.config.js/setting-a-custom-build-directory.md @@ -1,3 +1,7 @@ +--- +description: Set a custom build directory to use instead of the default .next directory. +--- + # Setting a custom build directory You can specify a name to use for a custom build directory to use instead of `.next`. diff --git a/docs/api-reference/next.config.js/static-optimization-indicator.md b/docs/api-reference/next.config.js/static-optimization-indicator.md index a74d9f96bbc6c03..92ec75b66826a1b 100644 --- a/docs/api-reference/next.config.js/static-optimization-indicator.md +++ b/docs/api-reference/next.config.js/static-optimization-indicator.md @@ -1,3 +1,7 @@ +--- +description: Optimized pages include an indicator to let you know if it's being statically optimized. You can opt-out of it here. +--- + # Static Optimization Indicator When a page qualifies for [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) we show an indicator to let you know. diff --git a/docs/api-reference/next/amp.md b/docs/api-reference/next/amp.md index 5549281d97b9d15..a5fd080b2fd5d95 100644 --- a/docs/api-reference/next/amp.md +++ b/docs/api-reference/next/amp.md @@ -1,3 +1,7 @@ +--- +description: Enable AMP in a page, and control the way Next.js adds AMP to the page with the AMP config. +--- + # next/amp
diff --git a/docs/api-reference/next/head.md b/docs/api-reference/next/head.md index e083bd1cc60c9a4..802e7563b995d0d 100644 --- a/docs/api-reference/next/head.md +++ b/docs/api-reference/next/head.md @@ -1,3 +1,7 @@ +--- +description: Add custom elements to the `head` of your page with the built-in Head component. +--- + # next/head
diff --git a/docs/api-reference/next/link.md b/docs/api-reference/next/link.md index beaec48640ea9c2..560ae5c48c9ba7b 100644 --- a/docs/api-reference/next/link.md +++ b/docs/api-reference/next/link.md @@ -1,3 +1,7 @@ +--- +description: Enable client-side transitions between routes with the built-in Link component. +--- + # next/link
diff --git a/docs/api-reference/next/router.md b/docs/api-reference/next/router.md index e2a3be541e63f47..0238ef674110b42 100644 --- a/docs/api-reference/next/router.md +++ b/docs/api-reference/next/router.md @@ -1,3 +1,7 @@ +--- +description: Learn more about the API of the Next.js Router, and access the router instance in your page with the useRouter hook. +--- + # next/router > Before moving forward, we recommend you to read [Routing Introduction](/docs/routing/introduction.md) first. diff --git a/docs/api-routes/api-middlewares.md b/docs/api-routes/api-middlewares.md index 99c27971d9632cc..431e687ac01f220 100644 --- a/docs/api-routes/api-middlewares.md +++ b/docs/api-routes/api-middlewares.md @@ -1,3 +1,7 @@ +--- +description: API Routes provide built-in middlewares that parse the incoming request. Learn more about them here. +--- + # API Middlewares API routes provide built in middlewares which parse the incoming request (`req`). Those middlewares are: diff --git a/docs/api-routes/dynamic-api-routes.md b/docs/api-routes/dynamic-api-routes.md index 0624cc9ce3efa37..88aa57a7f69e967 100644 --- a/docs/api-routes/dynamic-api-routes.md +++ b/docs/api-routes/dynamic-api-routes.md @@ -1,6 +1,10 @@ +--- +description: You can add the dynamic routes used for pages to API Routes too. Learn how it works here. +--- + # Dynamic API Routes -API pages support [dynamic routes](/docs/routing/dynamic-routes.md), and follow the same file naming rules used for `pages`. +API routes support [dynamic routes](/docs/routing/dynamic-routes.md), and follow the same file naming rules used for `pages`. For example, the API route `pages/api/post/[pid].js` has the following code: diff --git a/docs/api-routes/introduction.md b/docs/api-routes/introduction.md index 6fce57779ace684..d883787531346ad 100644 --- a/docs/api-routes/introduction.md +++ b/docs/api-routes/introduction.md @@ -1,3 +1,7 @@ +--- +description: Next.js supports API Routes, which allow you to build your API without leaving your Next.js app. Learn how it works here. +--- + # API Routes
diff --git a/docs/api-routes/response-helpers.md b/docs/api-routes/response-helpers.md index 64686d3b6bbe21e..9039bd0a60e6967 100644 --- a/docs/api-routes/response-helpers.md +++ b/docs/api-routes/response-helpers.md @@ -1,3 +1,7 @@ +--- +description: API Routes include a set of Express.js-like methods for the response to help you creating new API endpoints. Learn how it works here. +--- + # Response Helpers The response (`res`) includes a set of Express.js-like methods to improve the developer experience and increase the speed of creating new API endpoints, take a look at the following example: diff --git a/docs/basic-features/built-in-css-support.md b/docs/basic-features/built-in-css-support.md index 643558a6ea25c0e..1b26fbd45b62888 100644 --- a/docs/basic-features/built-in-css-support.md +++ b/docs/basic-features/built-in-css-support.md @@ -1,3 +1,7 @@ +--- +description: Next.js includes styled-jsx by default for isolated and scoped CSS support, but you can also use any other CSS-in-JS solution!. Learn more here. +--- + # Built-in CSS Support
diff --git a/docs/basic-features/data-fetching.md b/docs/basic-features/data-fetching.md index 5345fe18bbfe934..9871ef1602a47b7 100644 --- a/docs/basic-features/data-fetching.md +++ b/docs/basic-features/data-fetching.md @@ -1,3 +1,7 @@ +--- +description: Next.js can handle data fetching in multiple ways for server-rendered and static pages. Learn how it works here. +--- + # Data fetching Next.js has 2 pre-rendering modes built-in: diff --git a/docs/basic-features/pages.md b/docs/basic-features/pages.md index f0a5ad8ad426e5e..0231a9fe434b2db 100644 --- a/docs/basic-features/pages.md +++ b/docs/basic-features/pages.md @@ -1,3 +1,7 @@ +--- +description: Next.js pages are React Components exported in a file in the pages directory. Learn how they work here. +--- + # Pages A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.ts`, or `.tsx` file in the `pages` directory. diff --git a/docs/basic-features/static-file-serving.md b/docs/basic-features/static-file-serving.md index a3696b71b327547..5b12ea4202d2155 100644 --- a/docs/basic-features/static-file-serving.md +++ b/docs/basic-features/static-file-serving.md @@ -1,3 +1,7 @@ +--- +description: Next.js allows you to serve static files, like images, in the public directory. You can learn how it works here. +--- + # Static File Serving Next.js can serve static files, like images, under a folder called `public` in the root directory. Files inside `public` can then be referenced by your code starting from the base URL (`/`). diff --git a/docs/basic-features/typescript.md b/docs/basic-features/typescript.md index 1036351b8217324..b01643cf2be3304 100644 --- a/docs/basic-features/typescript.md +++ b/docs/basic-features/typescript.md @@ -1,3 +1,7 @@ +--- +description: Next.js supports TypeScript by default and has built-in types for pages and the API. You can get started with Next.js and TypeScript here. +--- + # TypeScript
diff --git a/docs/deployment.md b/docs/deployment.md index 4dad075468db076..c934f76986cbe4d 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,3 +1,7 @@ +--- +description: Compile and deploy your Next.js app to production with ZEIT Now and other hosting alternatives. +--- + # Deployment To go to production Next.js has a `next build` command. When ran it will compile your project and automatically apply numerous optimizations. diff --git a/docs/faq.md b/docs/faq.md index 5badcf96bb0e485..311b788828d8d9d 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,3 +1,7 @@ +--- +description: Get to know more about Next.js with the frequently asked questions. +--- + # Frequently Asked Questions
diff --git a/docs/getting-started.md b/docs/getting-started.md index 79f646c1344225b..6beb43ece86e197 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,5 +1,5 @@ --- -description: Getting started with Next.js. +description: Get started with Next.js in the official documentation, and learn more about all our features! --- # Getting Started diff --git a/docs/routing/dynamic-routes.md b/docs/routing/dynamic-routes.md index 7d5ab9381e8d48e..7ae275d3ddb9ed4 100644 --- a/docs/routing/dynamic-routes.md +++ b/docs/routing/dynamic-routes.md @@ -1,3 +1,7 @@ +--- +description: Dynamic Routes are pages that allow you to add custom params to your URLs. Start creating Dynamic Routes and learn more here. +--- + # Dynamic Routes
diff --git a/docs/routing/imperatively.md b/docs/routing/imperatively.md index 112d96ee34301a8..f555132a0c5bd72 100644 --- a/docs/routing/imperatively.md +++ b/docs/routing/imperatively.md @@ -1,3 +1,7 @@ +--- +description: Client-side navigations are also possible using the Router API instead of the Link component. Learn more here. +--- + # Imperatively
diff --git a/docs/routing/introduction.md b/docs/routing/introduction.md index 185c3bdc6ff085c..8273358ab138d7b 100644 --- a/docs/routing/introduction.md +++ b/docs/routing/introduction.md @@ -1,3 +1,7 @@ +--- +description: Next.js has a built-in, opinionated, and file-system based Router. You can learn how it works here. +--- + # Routing Next.js has a file-system based router built on the [concept of pages](/docs/basic-features/pages.md). diff --git a/docs/routing/shallow-routing.md b/docs/routing/shallow-routing.md index 390194890df1ba0..96fdb6dc4405a1b 100644 --- a/docs/routing/shallow-routing.md +++ b/docs/routing/shallow-routing.md @@ -1,3 +1,7 @@ +--- +description: You can use shallow routing to change the URL without triggering a new page change. Learn more here. +--- + # Shallow Routing
From a701072fc6f0c9e2b3e4b823d2432df980c971da Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 13:19:52 -0500 Subject: [PATCH 033/321] v9.1.7-canary.16 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 86c57f00da094ab..7c628ea5c97b5cc 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.15" + "version": "9.1.7-canary.16" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index bcb77eb356b422b..62e2dc6f27ffc00 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 0462c166835c0da..13e697b00535c40 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 55be3ef0a396bf3..53eae33ebd72d45 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 0a700c7190e90fb..00dc63cdbda7dc1 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index f0a907813025875..8673df0e11637bc 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index d104f562d8d170d..a94256c53d4dfde 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index a7ea4ee9e1ae63a..6de79b4e3f9b65e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.15", + "version": "9.1.7-canary.16", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 8e2ff2cd1f4c8ee401732ef2df425b34f383a239 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 14:54:11 -0500 Subject: [PATCH 034/321] v9.1.7 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 7c628ea5c97b5cc..e3533cec0f30fab 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7-canary.16" + "version": "9.1.7" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 62e2dc6f27ffc00..1baebf95b47b788 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7-canary.16", + "version": "9.1.7", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 13e697b00535c40..ce0f74da57b2907 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7-canary.16", + "version": "9.1.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 53eae33ebd72d45..c1a5812cc877685 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7-canary.16", + "version": "9.1.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 00dc63cdbda7dc1..ede39362acf51cf 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7-canary.16", + "version": "9.1.7", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 8673df0e11637bc..bdab8d2a2d9edd5 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7-canary.16", + "version": "9.1.7", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index a94256c53d4dfde..8c7599b3eaa73b1 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7-canary.16", + "version": "9.1.7", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 6de79b4e3f9b65e..84091d3eacadb27 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7-canary.16", + "version": "9.1.7", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From ef6df482bfc05ffaaec6bd69b27728666bc55ad9 Mon Sep 17 00:00:00 2001 From: Evgeniy Kumachev Date: Fri, 3 Jan 2020 23:10:02 +0300 Subject: [PATCH 035/321] Add with-mobx-keystone-typescript example (#9844) * add with-mobx-keystone-typescript example * Use latest Next.js and removed gitignore * Fixed my suggestions * Enabled strict mode and simplified _app Co-authored-by: Luis Alvarez D. --- .../with-mobx-keystone-typescript/.babelrc | 4 + .../with-mobx-keystone-typescript/README.md | 114 ++++++++++++++++++ .../components/Clock.tsx | 24 ++++ .../components/Sample.tsx | 34 ++++++ .../next-env.d.ts | 2 + .../package.json | 25 ++++ .../pages/_app.tsx | 30 +++++ .../pages/index.tsx | 10 ++ .../pages/other.tsx | 10 ++ .../store/index.tsx | 57 +++++++++ .../store/root.ts | 32 +++++ .../tsconfig.json | 21 ++++ 12 files changed, 363 insertions(+) create mode 100644 examples/with-mobx-keystone-typescript/.babelrc create mode 100644 examples/with-mobx-keystone-typescript/README.md create mode 100644 examples/with-mobx-keystone-typescript/components/Clock.tsx create mode 100644 examples/with-mobx-keystone-typescript/components/Sample.tsx create mode 100644 examples/with-mobx-keystone-typescript/next-env.d.ts create mode 100644 examples/with-mobx-keystone-typescript/package.json create mode 100644 examples/with-mobx-keystone-typescript/pages/_app.tsx create mode 100644 examples/with-mobx-keystone-typescript/pages/index.tsx create mode 100644 examples/with-mobx-keystone-typescript/pages/other.tsx create mode 100644 examples/with-mobx-keystone-typescript/store/index.tsx create mode 100644 examples/with-mobx-keystone-typescript/store/root.ts create mode 100644 examples/with-mobx-keystone-typescript/tsconfig.json diff --git a/examples/with-mobx-keystone-typescript/.babelrc b/examples/with-mobx-keystone-typescript/.babelrc new file mode 100644 index 000000000000000..1bbd4ca8f2cd90e --- /dev/null +++ b/examples/with-mobx-keystone-typescript/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["next/babel"], + "plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]] +} diff --git a/examples/with-mobx-keystone-typescript/README.md b/examples/with-mobx-keystone-typescript/README.md new file mode 100644 index 000000000000000..c9c053792462575 --- /dev/null +++ b/examples/with-mobx-keystone-typescript/README.md @@ -0,0 +1,114 @@ +# mobx-keystone example + +## Deploy your own + +Deploy the example using [ZEIT Now](https://zeit.co/now): + +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-keystone-typescript) + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/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 with-mobx-keystone-typescript with-mobx-keystone-typescript-app +# or +yarn create next-app --example with-mobx-keystone-typescript with-mobx-keystone-typescript-app +``` + +### Download manually + +Download the example [or clone the repo](https://github.com/zeit/next.js): + +```bash +curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-mobx-keystone-typescript +cd with-mobx-keystone-typescript +``` + +Install it and run: + +```bash +npm install +npm run dev +# or +yarn +yarn dev +``` + +Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)): + +```bash +now +``` + +## Notes + +This example is a typescript and mobx-keysone port of the [with-redux](https://github.com/zeit/next.js/tree/master/examples/with-redux) example. MobX support has been implemented using React Hooks. Decorator support is activated by adding a `.babelrc` file at the root of the project: + +```json +{ + "presets": ["next/babel"], + "plugins": ["transform-decorators-legacy"] +} +``` + +## The idea behind the example + +Usually splitting your app state into `pages` feels natural but sometimes you'll want to have global state for your app. This is an example on how you can use mobx that also works with our universal rendering approach. This is just a way you can do it but it's not the only one. + +In this example we are going to display a digital clock that updates every second. The first render is happening in the server and then the browser will take over. To illustrate this, the server rendered clock will have a different background color than the client one. + +![](http://i.imgur.com/JCxtWSj.gif) + +Our page is located at `pages/index.tsx` so it will map the route `/`. To get the initial data for rendering we are implementing the static method `getInitialProps`, initializing the `mobx-keystone` store and returning the initial timestamp to be rendered. The root component for the render method is a React context provider that allows us to send the store down to children components so they can access to the state when required. + +To pass the initial timestamp from the server to the client we pass it as a prop called `lastUpdate` so then it's available when the client takes over. + +## Implementation + +The trick here for supporting universal mobx is to separate the cases for the client and the server. When we are on the server we want to create a new store every time, otherwise different users data will be mixed up. If we are in the client we want to use always the same store. That's what we accomplish on `store.ts` + +After initializing the store (and possibly making changes such as fetching data), `getInitialProps` must stringify the store in order to pass it as props to the client. `mobx-keystone` comes out of the box with a handy method for doing this called `getSnapshot`. The snapshot is passed down to `StoreProvider` via `snapshot` prop where it's used to rehydrate `RootStore` and provide context with `StoreContext` + +```tsx +export const StoreContext = createContext(null) + +export const StoreProvider: FC<{ snapshot?: SnapshotInOf }> = ({ + children, + snapshot, +}) => { + const [ctxStore] = useState(() => initStore(snapshot)) + return ( + {children} + ) +} +``` + +The store is accessible at any depth by using the StoreContext or `useStore` hook + +```tsx +export function useStore() { + const store = useContext(StoreContext) + + if (!store) { + // this is especially useful in TypeScript so you don't need to be checking for null all the time + throw new Error('useStore must be used within a StoreProvider.') + } + + return store +} +``` + +The clock, under `components/Clock.tsx`, reacts to changes in the observable `store` by means of the `useObserver` hook. + +```tsx +
+ //... + {useObserver(() => ( + + ))} + //... +
+``` diff --git a/examples/with-mobx-keystone-typescript/components/Clock.tsx b/examples/with-mobx-keystone-typescript/components/Clock.tsx new file mode 100644 index 000000000000000..5b2ccb69b0cf654 --- /dev/null +++ b/examples/with-mobx-keystone-typescript/components/Clock.tsx @@ -0,0 +1,24 @@ +import React, { FC } from 'react' + +import { RootStore } from '../store' + +const format = (t: Date) => + `${pad(t.getUTCHours())}:${pad(t.getUTCMinutes())}:${pad(t.getUTCSeconds())}` +const pad = (n: number) => (n < 10 ? `0${n}` : n) + +interface Props extends Pick {} + +const Clock: FC = props => { + const divStyle = { + backgroundColor: props.light ? '#999' : '#000', + color: '#82FA58', + display: 'inline-block', + font: '50px menlo, monaco, monospace', + padding: '15px', + } + return ( +
{format(new Date(props.lastUpdate as number))}
+ ) +} + +export { Clock } diff --git a/examples/with-mobx-keystone-typescript/components/Sample.tsx b/examples/with-mobx-keystone-typescript/components/Sample.tsx new file mode 100644 index 000000000000000..7bda4599228222a --- /dev/null +++ b/examples/with-mobx-keystone-typescript/components/Sample.tsx @@ -0,0 +1,34 @@ +import React, { useEffect, FC } from 'react' +import Link from 'next/link' +import { useObserver } from 'mobx-react-lite' + +import { useStore } from '../store' +import { Clock } from './Clock' + +interface Props { + linkTo: string +} + +export const Sample: FC = props => { + const store = useStore() + + useEffect(() => { + store.start() + return () => store.stop() + }, [store]) + + return ( +
+

Clock

+ + {useObserver(() => ( + + ))} + +
+ ) +} diff --git a/examples/with-mobx-keystone-typescript/next-env.d.ts b/examples/with-mobx-keystone-typescript/next-env.d.ts new file mode 100644 index 000000000000000..7b7aa2c7727d88b --- /dev/null +++ b/examples/with-mobx-keystone-typescript/next-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/examples/with-mobx-keystone-typescript/package.json b/examples/with-mobx-keystone-typescript/package.json new file mode 100644 index 000000000000000..b481e59384131e2 --- /dev/null +++ b/examples/with-mobx-keystone-typescript/package.json @@ -0,0 +1,25 @@ +{ + "name": "with-mobx-keystone-typescript", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "mobx": "^5.15.1", + "mobx-keystone": "^0.30.0", + "mobx-react-lite": "^1.5.2", + "next": "latest", + "react": "^16.12.0", + "react-dom": "^16.12.0", + "typescript": "^3.7.4" + }, + "devDependencies": { + "@babel/plugin-proposal-decorators": "^7.3.0", + "@types/node": "^13.1.1", + "@types/react": "^16.9.17", + "@types/react-dom": "^16.9.4" + }, + "license": "ISC" +} diff --git a/examples/with-mobx-keystone-typescript/pages/_app.tsx b/examples/with-mobx-keystone-typescript/pages/_app.tsx new file mode 100644 index 000000000000000..7cff323796437e7 --- /dev/null +++ b/examples/with-mobx-keystone-typescript/pages/_app.tsx @@ -0,0 +1,30 @@ +import { AppContext } from 'next/app' +import { getSnapshot } from 'mobx-keystone' +import { StoreProvider, initStore } from '../store' + +export default function App({ Component, pageProps, initialState }: any) { + return ( + + + + ) +} + +App.getInitialProps = async ({ Component, ctx }: AppContext) => { + // + // Use getInitialProps as a step in the lifecycle when + // we can initialize our store + // + const store = initStore() + + // + // Check whether the page being rendered by the App has a + // static getInitialProps method and if so call it + // + let pageProps = {} + if (Component.getInitialProps) { + pageProps = await Component.getInitialProps(ctx) + } + + return { initialState: getSnapshot(store), pageProps } +} diff --git a/examples/with-mobx-keystone-typescript/pages/index.tsx b/examples/with-mobx-keystone-typescript/pages/index.tsx new file mode 100644 index 000000000000000..31b400c613f4f5a --- /dev/null +++ b/examples/with-mobx-keystone-typescript/pages/index.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import { NextPage } from 'next' + +import { Sample } from '../components/Sample' + +const IndexPage: NextPage = () => { + return +} + +export default IndexPage diff --git a/examples/with-mobx-keystone-typescript/pages/other.tsx b/examples/with-mobx-keystone-typescript/pages/other.tsx new file mode 100644 index 000000000000000..fbd3f4cb4d8a65e --- /dev/null +++ b/examples/with-mobx-keystone-typescript/pages/other.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import { NextPage } from 'next' + +import { Sample } from '../components/Sample' + +const OtherPage: NextPage = () => { + return +} + +export default OtherPage diff --git a/examples/with-mobx-keystone-typescript/store/index.tsx b/examples/with-mobx-keystone-typescript/store/index.tsx new file mode 100644 index 000000000000000..2dfd54b53d2f6bd --- /dev/null +++ b/examples/with-mobx-keystone-typescript/store/index.tsx @@ -0,0 +1,57 @@ +import { FC, createContext, useState, useContext } from 'react' +import { useStaticRendering } from 'mobx-react-lite' +import { + registerRootStore, + isRootStore, + SnapshotInOf, + fromSnapshot, +} from 'mobx-keystone' + +import { RootStore } from './root' + +// eslint-disable-next-line react-hooks/rules-of-hooks +useStaticRendering(typeof window === 'undefined') + +let store: RootStore | null = null + +export const initStore = (snapshot?: SnapshotInOf) => { + if (typeof window === 'undefined') { + store = new RootStore({}) + } + if (!store) { + store = new RootStore({}) + } + + if (snapshot) { + store = fromSnapshot(snapshot) + } + + if (!isRootStore(store)) registerRootStore(store) + + return store +} + +export const StoreContext = createContext(null) + +export const StoreProvider: FC<{ snapshot?: SnapshotInOf }> = ({ + children, + snapshot, +}) => { + const [ctxStore] = useState(() => initStore(snapshot)) + return ( + {children} + ) +} + +export function useStore() { + const store = useContext(StoreContext) + + if (!store) { + // this is especially useful in TypeScript so you don't need to be checking for null all the time + throw new Error('useStore must be used within a StoreProvider.') + } + + return store +} + +export { RootStore } diff --git a/examples/with-mobx-keystone-typescript/store/root.ts b/examples/with-mobx-keystone-typescript/store/root.ts new file mode 100644 index 000000000000000..a9da845051f62b4 --- /dev/null +++ b/examples/with-mobx-keystone-typescript/store/root.ts @@ -0,0 +1,32 @@ +import { Model, model, prop, modelAction, timestampAsDate } from 'mobx-keystone' + +@model('store/root') +class RootStore extends Model({ + foo: prop(0), + lastUpdate: prop(new Date().getTime()), + light: prop(false), +}) { + timer!: ReturnType + + @timestampAsDate('lastUpdate') + lastUpdateDate!: Date + + @modelAction + start() { + this.timer = setInterval(() => { + this.update() + }, 1000) + } + @modelAction + update() { + this.lastUpdate = Date.now() + this.light = true + } + + @modelAction + stop() { + clearInterval(this.timer) + } +} + +export { RootStore } diff --git a/examples/with-mobx-keystone-typescript/tsconfig.json b/examples/with-mobx-keystone-typescript/tsconfig.json new file mode 100644 index 000000000000000..e0e18f29e6902b6 --- /dev/null +++ b/examples/with-mobx-keystone-typescript/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "keyofStringsOnly": true, + "isolatedModules": true, + "jsx": "preserve", + "experimentalDecorators": true + }, + "exclude": ["node_modules"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] +} From c4cf641c379a7dd506f553a16421b5524a764e49 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 15:23:06 -0500 Subject: [PATCH 036/321] Test 3rd Party CSS Modules (#9924) --- .../3rd-party-module/pages/index.js | 5 ++ .../3rd-party-module/pages/index.module.css | 17 +++++++ .../css-modules/test/index.test.js | 47 +++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 test/integration/css-fixtures/3rd-party-module/pages/index.js create mode 100644 test/integration/css-fixtures/3rd-party-module/pages/index.module.css diff --git a/test/integration/css-fixtures/3rd-party-module/pages/index.js b/test/integration/css-fixtures/3rd-party-module/pages/index.js new file mode 100644 index 000000000000000..044397afbd20479 --- /dev/null +++ b/test/integration/css-fixtures/3rd-party-module/pages/index.js @@ -0,0 +1,5 @@ +import { foo } from './index.module.css' + +export default function Home() { + return
+} diff --git a/test/integration/css-fixtures/3rd-party-module/pages/index.module.css b/test/integration/css-fixtures/3rd-party-module/pages/index.module.css new file mode 100644 index 000000000000000..99d63206009a172 --- /dev/null +++ b/test/integration/css-fixtures/3rd-party-module/pages/index.module.css @@ -0,0 +1,17 @@ +.foo { + position: relative; +} + +.foo :global(.bar), +.foo :global(.baz) { + height: 100%; + overflow: hidden; +} + +.foo :global(.lol) { + width: 80%; +} + +.foo > :global(.lel) { + width: 80%; +} diff --git a/test/integration/css-modules/test/index.test.js b/test/integration/css-modules/test/index.test.js index 8557dee6f086816..cb2eb58aeff4e56 100644 --- a/test/integration/css-modules/test/index.test.js +++ b/test/integration/css-modules/test/index.test.js @@ -65,6 +65,53 @@ describe('Basic CSS Module Support', () => { }) }) +describe('3rd Party CSS Module Support', () => { + const appDir = join(fixturesDir, '3rd-party-module') + + let appPort + let app + beforeAll(async () => { + await remove(join(appDir, '.next')) + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + }) + afterAll(async () => { + await killApp(app) + }) + + it(`should've emitted a single CSS file`, async () => { + const cssFolder = join(appDir, '.next/static/css') + + const files = await readdir(cssFolder) + const cssFiles = files.filter(f => /\.css$/.test(f)) + + expect(cssFiles.length).toBe(1) + const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8') + + expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatchInlineSnapshot( + `".index_foo__29BAH{position:relative}.index_foo__29BAH .bar,.index_foo__29BAH .baz{height:100%;overflow:hidden}.index_foo__29BAH .lol,.index_foo__29BAH>.lel{width:80%}"` + ) + }) + + it(`should've injected the CSS on server render`, async () => { + const content = await renderViaHTTP(appPort, '/') + const $ = cheerio.load(content) + + const cssPreload = $('link[rel="preload"][as="style"]') + expect(cssPreload.length).toBe(1) + expect(cssPreload.attr('href')).toMatch(/^\/_next\/static\/css\/.*\.css$/) + + const cssSheet = $('link[rel="stylesheet"]') + expect(cssSheet.length).toBe(1) + expect(cssSheet.attr('href')).toMatch(/^\/_next\/static\/css\/.*\.css$/) + + expect($('#verify-div').attr('class')).toMatchInlineSnapshot( + `"index_foo__29BAH"` + ) + }) +}) + describe('Has CSS Module in computed styles in Development', () => { const appDir = join(fixturesDir, 'dev-module') From ae78e8f5be63617d575bab75f072d1feb62a292a Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 3 Jan 2020 14:36:24 -0600 Subject: [PATCH 037/321] Fix get(Static|Initial)Props re-running when updating query (#9907) * Add failing test for re-calling getStaticProps after updating query * Fix get(Static|Initial)Props re-running when updating query * Update invalid export tests Co-authored-by: Joe Haddad --- packages/next/client/index.js | 1 + .../export-serverless/next.config.js | 1 + .../export-serverless/pages/query-update.js | 7 +++++++ .../export-serverless/test/browser.js | 9 ++++----- test/integration/export/next.config.js | 1 + test/integration/export/pages/query-update.js | 7 +++++++ test/integration/export/test/browser.js | 9 ++++----- test/integration/prerender/pages/something.js | 2 +- test/integration/prerender/test/index.test.js | 17 +++++++++++++++++ 9 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 test/integration/export-serverless/pages/query-update.js create mode 100644 test/integration/export/pages/query-update.js diff --git a/packages/next/client/index.js b/packages/next/client/index.js index f5ab15f4e96e24b..f2dfae47d4c11a2 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -119,6 +119,7 @@ class Container extends React.Component { // client-side hydration. Your app should _never_ use this property. // It may change at any time without notice. _h: 1, + shallow: true, } ) } diff --git a/test/integration/export-serverless/next.config.js b/test/integration/export-serverless/next.config.js index fd4243317d35383..54c6d50e04329f2 100644 --- a/test/integration/export-serverless/next.config.js +++ b/test/integration/export-serverless/next.config.js @@ -29,6 +29,7 @@ module.exports = phase => { query: { text: 'this file has an extension' }, }, '/query': { page: '/query', query: { a: 'blue' } }, + '/query-update': { page: '/query-update', query: { a: 'blue' } }, // API route '/blog/nextjs/comment/test': { page: '/blog/[post]/comment/[id]' }, } diff --git a/test/integration/export-serverless/pages/query-update.js b/test/integration/export-serverless/pages/query-update.js new file mode 100644 index 000000000000000..2fd0f49fcee73b0 --- /dev/null +++ b/test/integration/export-serverless/pages/query-update.js @@ -0,0 +1,7 @@ +import { useRouter } from 'next/router' + +const Page = () =>
{JSON.stringify(useRouter().query)}
+ +Page.getInitialProps = () => ({ hello: 'world' }) + +export default Page diff --git a/test/integration/export-serverless/test/browser.js b/test/integration/export-serverless/test/browser.js index aac586a142a5cb4..c62984d088c438e 100644 --- a/test/integration/export-serverless/test/browser.js +++ b/test/integration/export-serverless/test/browser.js @@ -183,11 +183,10 @@ export default function(context) { }) it('should update query after mount', async () => { - const browser = await webdriver(context.port, '/query?hello=1') - - await waitFor(1000) - const text = await browser.eval('document.body.innerHTML') - expect(text).toMatch(/hello/) + const browser = await webdriver(context.port, '/query-update?hello=world') + await waitFor(2000) + const query = await browser.elementByCss('#query').text() + expect(JSON.parse(query)).toEqual({ hello: 'world', a: 'blue' }) await browser.close() }) diff --git a/test/integration/export/next.config.js b/test/integration/export/next.config.js index 89123a2bf0a8baf..908945076f8a5e8 100644 --- a/test/integration/export/next.config.js +++ b/test/integration/export/next.config.js @@ -34,6 +34,7 @@ module.exports = phase => { query: { text: 'this file has an extension' }, }, '/query': { page: '/query', query: { a: 'blue' } }, + '/query-update': { page: '/query-update', query: { a: 'blue' } }, // API route '/blog/nextjs/comment/test': { page: '/blog/[post]/comment/[id]' }, } diff --git a/test/integration/export/pages/query-update.js b/test/integration/export/pages/query-update.js new file mode 100644 index 000000000000000..2fd0f49fcee73b0 --- /dev/null +++ b/test/integration/export/pages/query-update.js @@ -0,0 +1,7 @@ +import { useRouter } from 'next/router' + +const Page = () =>
{JSON.stringify(useRouter().query)}
+ +Page.getInitialProps = () => ({ hello: 'world' }) + +export default Page diff --git a/test/integration/export/test/browser.js b/test/integration/export/test/browser.js index aac586a142a5cb4..c62984d088c438e 100644 --- a/test/integration/export/test/browser.js +++ b/test/integration/export/test/browser.js @@ -183,11 +183,10 @@ export default function(context) { }) it('should update query after mount', async () => { - const browser = await webdriver(context.port, '/query?hello=1') - - await waitFor(1000) - const text = await browser.eval('document.body.innerHTML') - expect(text).toMatch(/hello/) + const browser = await webdriver(context.port, '/query-update?hello=world') + await waitFor(2000) + const query = await browser.elementByCss('#query').text() + expect(JSON.parse(query)).toEqual({ hello: 'world', a: 'blue' }) await browser.close() }) diff --git a/test/integration/prerender/pages/something.js b/test/integration/prerender/pages/something.js index 3b6cb132e618170..fde8a1730767a71 100644 --- a/test/integration/prerender/pages/something.js +++ b/test/integration/prerender/pages/something.js @@ -20,7 +20,7 @@ export default ({ world, time, params, random }) => { <>

hello: {world}

time: {time} -
{random}
+
{random}
{JSON.stringify(params)}
{JSON.stringify(useRouter().query)}
diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index 15406a99f519bb5..e71be48a58827fe 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -340,6 +340,23 @@ const runTests = (dev = false) => { await fs.writeFile(indexPage, origContent) } }) + + it('should not re-call getStaticProps when updating query', async () => { + const browser = await webdriver(appPort, '/something?hello=world') + await waitFor(2000) + + const query = await browser.elementByCss('#query').text() + expect(JSON.parse(query)).toEqual({ hello: 'world' }) + + const { + props: { + pageProps: { random: initialRandom }, + }, + } = await browser.eval('window.__NEXT_DATA__') + + const curRandom = await browser.elementByCss('#random').text() + expect(curRandom).toBe(initialRandom + '') + }) } else { it('should should use correct caching headers for a no-revalidate page', async () => { const initialRes = await fetchViaHTTP(appPort, '/something') From 41d4084c040bd74b9519bb347fdfff7ce1f5c3a6 Mon Sep 17 00:00:00 2001 From: Cully Larson Date: Fri, 3 Jan 2020 12:36:53 -0800 Subject: [PATCH 038/321] Add a missing word to the Static Optimization doc (#9926) --- docs/advanced-features/automatic-static-optimization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced-features/automatic-static-optimization.md b/docs/advanced-features/automatic-static-optimization.md index c3304ed843a05c6..2d295849102562b 100644 --- a/docs/advanced-features/automatic-static-optimization.md +++ b/docs/advanced-features/automatic-static-optimization.md @@ -10,7 +10,7 @@ This feature allows Next.js to emit hybrid applications that contain **both serv > Statically generated pages are still reactive: Next.js will hydrate your application client-side to give it full interactivity. -One of the main benefits this feature is that optimized pages require no server-side computation, and can be instantly streamed to the end-user from multiple CDN locations. The result is an _ultra fast_ loading experience for your users. +One of the main benefits of this feature is that optimized pages require no server-side computation, and can be instantly streamed to the end-user from multiple CDN locations. The result is an _ultra fast_ loading experience for your users. ## How it works From 4a7a28a887201b5eac527464543144fb54cd4b71 Mon Sep 17 00:00:00 2001 From: Cully Larson Date: Fri, 3 Jan 2020 12:37:11 -0800 Subject: [PATCH 039/321] Fixup the Static HTML Export doc (#9928) --- docs/advanced-features/static-html-export.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced-features/static-html-export.md b/docs/advanced-features/static-html-export.md index 86922903cc89575..b987c38f296b27d 100644 --- a/docs/advanced-features/static-html-export.md +++ b/docs/advanced-features/static-html-export.md @@ -15,9 +15,9 @@ description: Export your Next.js app to static HTML, and run it standalone witho The exported app supports almost every feature of Next.js, including dynamic routes, prefetching, preloading and dynamic imports. -The way `next export` works is by prerendering all pages to HTML; it does so based on a mapping mapping called [`exportPathMap`](/docs/api-reference/next.config.js/exportPathMap.md). +The way `next export` works is by prerendering all pages to HTML; it does so based on a mapping called [`exportPathMap`](/docs/api-reference/next.config.js/exportPathMap.md). -> If your pages don't have `getInitialProps` you may not need `next export` at all, `next build` is already enough thanks to [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md). +> If your pages don't have `getInitialProps` you may not need `next export` at all; `next build` is already enough thanks to [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md). ## How to use it @@ -53,6 +53,6 @@ You can read about deploying your Next.js application in the [deployment section ## Caveats -- With `next export`, we build a HTML version of your app. At export time we will run the [`getInitialProps`](/docs/api-reference/data-fetching/getInitialProps.md) in your pages. The `req` and `res` fields of the [`context`](/docs/api-reference/data-fetching/getInitialProps.md#context-object) object will be empty objects during export as there is no server running -- You won't be able to render HTML dynamically when static exporting, as we pre-build the HTML files. You application can be a hybrid of [Static Generation](/docs/basic-features/pages.md#static-generation) and [Server-Side Rendering](/docs/basic-features/pages.md#server-side-rendering) when you don't use `next export`, you can learn more about it in the [pages section](/docs/basic-features/pages.md). -- [API Routes](/docs/api-routes/introduction.md) are not supported by this method because they can't be prerendered to HTML +- With `next export`, we build an HTML version of your app. At export time we will run the [`getInitialProps`](/docs/api-reference/data-fetching/getInitialProps.md) in your pages. The `req` and `res` fields of the [`context`](/docs/api-reference/data-fetching/getInitialProps.md#context-object) object will be empty objects during export as there is no server running. +- You won't be able to render HTML dynamically when static exporting, as we pre-build the HTML files. Your application can be a hybrid of [Static Generation](/docs/basic-features/pages.md#static-generation) and [Server-Side Rendering](/docs/basic-features/pages.md#server-side-rendering) when you don't use `next export`. You can learn more about it in the [pages section](/docs/basic-features/pages.md). +- [API Routes](/docs/api-routes/introduction.md) are not supported by this method because they can't be prerendered to HTML. From a3925b5865f6959ed1334e2a707279437fcb3b89 Mon Sep 17 00:00:00 2001 From: Cully Larson Date: Fri, 3 Jan 2020 12:38:57 -0800 Subject: [PATCH 040/321] Fix mistakes in the Custom Server doc (#9930) --- docs/advanced-features/custom-server.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced-features/custom-server.md b/docs/advanced-features/custom-server.md index 7b1ae1bdc22f1fd..52d5efaf6b4854d 100644 --- a/docs/advanced-features/custom-server.md +++ b/docs/advanced-features/custom-server.md @@ -17,7 +17,7 @@ description: Start a Next.js app programmatically using a custom server. Typically you start your next server with `next start`. It's possible, however, to start a server 100% programmatically in order to use custom route patterns. -> Before deciding to use a custom a custom server please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. A custom server will remove important performance optimizations, like **serverless functions** and **[Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md).** +> Before deciding to use a custom server please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. A custom server will remove important performance optimizations, like **serverless functions** and **[Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md).** Take a look at the following example of a custom server: @@ -75,7 +75,7 @@ const app = next({}) The above `next` import is a function that receives an object with the following options: -- `dev`: `Boolean` - Whether or not to launch Next.js in dev mode. Defaults `false` +- `dev`: `Boolean` - Whether or not to launch Next.js in dev mode. Defaults to `false` - `dir`: `String` - Location of the Next.js project. Defaults to `'.'` - `quiet`: `Boolean` - Hide error messages containing server information. Defaults to `false` - `conf`: `object` - The same object you would use in [next.config.js](/docs/api-reference/next.config.js/introduction.md). Defaults to `{}` @@ -86,7 +86,7 @@ The returned `app` can then be used to let Next.js handle requests as required. By default, `Next` will serve each file in the `pages` folder under a pathname matching the filename. If your project uses a custom server, this behavior may result in the same content being served from multiple paths, which can present problems with SEO and UX. -To disable this behavior & prevent routing based on files in `pages`, open `next.config.js` and disable the `useFileSystemPublicRoutes` config: +To disable this behavior and prevent routing based on files in `pages`, open `next.config.js` and disable the `useFileSystemPublicRoutes` config: ```js module.exports = { From 9261b82a82d14f3acf2acacb1719c93a884732e6 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 15:55:10 -0500 Subject: [PATCH 041/321] Enable New Chunking Behavior (#9731) * Enable New Chunking Behavior * fix tst * Increase sizes in test * add another test * Fix preloading order * Replace commons with framework --- packages/next/next-server/server/config.ts | 2 +- test/integration/build-output/test/index.test.js | 8 ++++---- test/integration/preload-viewport/pages/multi-prefetch.js | 4 ++++ test/integration/size-limit/test/index.test.js | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index deaa89506e770f2..4b61b29701e22bd 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -44,7 +44,7 @@ const defaultConfig: { [key: string]: any } = { ), css: false, documentMiddleware: false, - granularChunks: false, + granularChunks: true, modern: false, plugins: false, profiling: false, diff --git a/test/integration/build-output/test/index.test.js b/test/integration/build-output/test/index.test.js index a4ebdc0ccdfa89a..932d688b353a1f8 100644 --- a/test/integration/build-output/test/index.test.js +++ b/test/integration/build-output/test/index.test.js @@ -25,7 +25,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/\/ [ ]* \d{1,} B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_app') @@ -51,7 +51,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/\/_app [ ]* \d{1,} B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_error') @@ -78,7 +78,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/\/hybrid [ 0-9.]* B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_error') @@ -103,7 +103,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/λ \/_error [ ]* \d{1,} B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_app') diff --git a/test/integration/preload-viewport/pages/multi-prefetch.js b/test/integration/preload-viewport/pages/multi-prefetch.js index 9a4283f3b52fec9..9d03878008c0d52 100644 --- a/test/integration/preload-viewport/pages/multi-prefetch.js +++ b/test/integration/preload-viewport/pages/multi-prefetch.js @@ -8,6 +8,10 @@ export default () => { router.prefetch('/dynamic/[hello]') router.prefetch('/dynamic/[hello]') router.prefetch('/dynamic/[hello]') + + router.prefetch('/dynamic/first') + router.prefetch('/dynamic/first') + router.prefetch('/dynamic/first') }, [router]) return (
diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index b018ccfabe9df29..a4e986d5265f2b3 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 230 + const delta = responseSizeKilobytes - 234 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 197 + const delta = responseSizeKilobytes - 202 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) From 3707701cc9e9d03016dfc830d2d80a4de8517718 Mon Sep 17 00:00:00 2001 From: Cully Larson Date: Fri, 3 Jan 2020 12:55:49 -0800 Subject: [PATCH 042/321] Fix mistakes in the Deployment doc (#9925) * Fix a few small spelling and grammar mistakes in the Deployment doc * Update deployment.md Co-authored-by: Joe Haddad --- docs/deployment.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/deployment.md b/docs/deployment.md index c934f76986cbe4d..657bcf2214db137 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -4,7 +4,7 @@ description: Compile and deploy your Next.js app to production with ZEIT Now and # Deployment -To go to production Next.js has a `next build` command. When ran it will compile your project and automatically apply numerous optimizations. +To go to production Next.js has a `next build` command. When run, it will compile your project and automatically apply numerous optimizations. ## Prepare your package.json @@ -46,9 +46,9 @@ The [hybrid pages](/docs/basic-features/pages.md) approach is fully supported ou In case of [Static Generation](/docs/basic-features/pages.md#static-generation) the page will automatically be served from the ZEIT Now Smart CDN. -When the page is using [Server-Side Rendering](/docs/basic-features/pages.md#server-side-rendering) it will become an isolated serverless function automatically. This allows the page rendering to scale automatically and be independent, errors on one page won't affect another. +When the page is using [Server-Side Rendering](/docs/basic-features/pages.md#server-side-rendering) it will become an isolated serverless function automatically. This allows the page rendering to scale automatically and be independent—errors on one page won't affect another. -API routes will also become separate serverless functions that execute and scale separately from eachother. +API routes will also become separate serverless functions that execute and scale separately from each other. ### CDN + HTTPS by default @@ -60,7 +60,7 @@ HTTPS is enabled by default and doesn't require extra configuration. #### From a git repository -You can link your project in [GitHub](https://zeit.co/new), [GitLab](https://zeit.co/new), or [Bitbucket](https://zeit.co/new) through the [web interface](https://zeit.co/new). This will automatically set up deployment previews for pull-requests and commits. +You can link your project in [GitHub](https://zeit.co/new), [GitLab](https://zeit.co/new), or [Bitbucket](https://zeit.co/new) through the [web interface](https://zeit.co/new). This will automatically set up deployment previews for pull requests and commits. #### Through the ZEIT Now CLI @@ -93,7 +93,7 @@ Generally you'll have to follow these steps to deploy to production: - Potentially copy the `.next`, `node_modules`, and `package.json` to your server. - Run `npm run start` (runs `next start`) on the server -In case you're doing a full static export using `next export` the steps are slightly different and doesn't involve using `next start`: +In case you're doing a full static export using `next export` the steps are slightly different and don't involve using `next start`: - Run `npm install` - Run `npm run build` (runs `next build && next export`) From 8ebc5461e4e78fa7337befdd180e84700c0248eb Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 16:31:32 -0500 Subject: [PATCH 043/321] v9.1.8-canary.0 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index e3533cec0f30fab..44e0e3f6bcf39ea 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.7" + "version": "9.1.8-canary.0" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 1baebf95b47b788..31ff26eb6b41db1 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.7", + "version": "9.1.8-canary.0", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index ce0f74da57b2907..6131525250a76f2 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.7", + "version": "9.1.8-canary.0", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index c1a5812cc877685..8f03b7f5a291b4b 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.7", + "version": "9.1.8-canary.0", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index ede39362acf51cf..39888a86249361e 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.7", + "version": "9.1.8-canary.0", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index bdab8d2a2d9edd5..e93f5fb323ea3b8 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.7", + "version": "9.1.8-canary.0", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 8c7599b3eaa73b1..8a8974678f9ecdd 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.7", + "version": "9.1.8-canary.0", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 84091d3eacadb27..95edb283ce2540f 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.7", + "version": "9.1.8-canary.0", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From a277218db580eb5e7aec0594a823e766a937b363 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 3 Jan 2020 19:13:32 -0500 Subject: [PATCH 044/321] Fix Safari Script Test Count (#9932) --- test/integration/production/test/index.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/production/test/index.test.js b/test/integration/production/test/index.test.js index b02b1be092a3684..9dda5c129ea2607 100644 --- a/test/integration/production/test/index.test.js +++ b/test/integration/production/test/index.test.js @@ -460,7 +460,7 @@ describe('Production Usage', () => { if (browserName === 'safari') { const elements = await browser.elementsByCss('link[rel=preload]') // 4 page preloads and 5 existing preloads for _app, commons, main, etc - expect(elements.length).toBe(9) + expect(elements.length).toBe(13) } else { const elements = await browser.elementsByCss('link[rel=prefetch]') expect(elements.length).toBe(4) From b66c34eac375ae080412e29f0d9651ba77d8d36e Mon Sep 17 00:00:00 2001 From: Jerry Green Date: Sat, 4 Jan 2020 16:41:35 +0500 Subject: [PATCH 045/321] Fix js template to be TS compatible (#9941) --- .../create-next-app/templates/default/components/nav.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/create-next-app/templates/default/components/nav.js b/packages/create-next-app/templates/default/components/nav.js index ccc249c7765d24d..03a1a2ccaa17cb2 100644 --- a/packages/create-next-app/templates/default/components/nav.js +++ b/packages/create-next-app/templates/default/components/nav.js @@ -4,10 +4,10 @@ import Link from 'next/link' const links = [ { href: 'https://zeit.co/now', label: 'ZEIT' }, { href: 'https://github.com/zeit/next.js', label: 'GitHub' }, -].map(link => { - link.key = `nav-link-${link.href}-${link.label}` - return link -}) +].map(link => ({ + ...link, + key: `nav-link-${link.href}-${link.label}`, +})) const Nav = () => (
}> - - - ) - } -} - -export default MyApp diff --git a/test/integration/data/pages/about.js b/test/integration/data/pages/about.js deleted file mode 100644 index c58e1856c37eecf..000000000000000 --- a/test/integration/data/pages/about.js +++ /dev/null @@ -1,9 +0,0 @@ -import Link from 'next/link' - -export default () => { - return ( - - home - - ) -} diff --git a/test/integration/data/pages/index.js b/test/integration/data/pages/index.js deleted file mode 100644 index cbc86914897482a..000000000000000 --- a/test/integration/data/pages/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import getUptime from '../data/get-uptime' - -export default function Index() { - const uptime = getUptime() - return

The uptime of the server is {uptime}

-} diff --git a/test/integration/data/test/index.test.js b/test/integration/data/test/index.test.js deleted file mode 100644 index 323921172b2b837..000000000000000 --- a/test/integration/data/test/index.test.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-env jest */ -/* global jasmine */ -import { join } from 'path' -import webdriver from 'next-webdriver' -import { - killApp, - findPort, - launchApp, - fetchViaHTTP, - renderViaHTTP, -} from 'next-test-utils' - -const appDir = join(__dirname, '../') -let appPort -let server -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 - -describe.skip('AMP Bind Initial Data', () => { - beforeAll(async () => { - appPort = await findPort() - server = await launchApp(appDir, appPort) - }) - afterAll(() => killApp(server)) - - it('responds with json with accept header on page', async () => { - const data = await fetchViaHTTP(appPort, '/', null, { - headers: { - accept: 'application/amp.bind+json', - }, - }).then(res => res.ok && res.text()) - - let isJSON = false - try { - JSON.parse(data) - isJSON = true - } catch (_) {} - expect(isJSON).toBe(true) - }) - - it('renders the data during SSR', async () => { - const html = await renderViaHTTP(appPort, '/') - expect(html).toMatch(/The uptime of the server is.*?\d.*?\d/) - }) - - it('renders a page without data', async () => { - const html = await renderViaHTTP(appPort, '/about') - expect(html).toMatch(/ { - const browser = await webdriver(appPort, '/about') - await browser.elementByCss('a').click() - await browser.waitForElementByCss('h1') - const h1Text = await browser.elementByCss('h1').text() - expect(h1Text).toMatch(/The uptime of the server is.*?\d.*?\d/) - await browser.close() - }) -}) diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index a4e986d5265f2b3..28acb021f5326b1 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 234 + const delta = responseSizeKilobytes - 230 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 202 + const delta = responseSizeKilobytes - 199 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) diff --git a/yarn.lock b/yarn.lock index 0804294daf96e8b..158de0aa90bf34d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12815,10 +12815,10 @@ react-is@16.8.6, react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== -react-ssr-prepass@1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/react-ssr-prepass/-/react-ssr-prepass-1.0.7.tgz#6b6fac5b4d3a8f10e6a45f33798c7cdf7a164eeb" - integrity sha512-DnXVwgytL+9UvAMnotUKW3GlksFgqOegsGOQjUI2v31pkbJBUunBvnOoNu2tNr4KRdxL5X8l66sAW5/1wSRiQw== +react-ssr-prepass@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/react-ssr-prepass/-/react-ssr-prepass-1.0.8.tgz#036abffe541975b20213cf7b261c05ac2843480d" + integrity sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA== dependencies: object-is "^1.0.1" From 72a0c5578e249b5b4c8c76aebb02ebe9e9a1a7ec Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 4 Jan 2020 17:58:32 +0100 Subject: [PATCH 049/321] Remove async from void functions in page-loader (#9948) * Remove async from void functions in page-loader * Fix void return * Update page-loader.js * Update index.test.js --- packages/next/client/page-loader.js | 60 ++++++++++--------- .../integration/size-limit/test/index.test.js | 2 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/packages/next/client/page-loader.js b/packages/next/client/page-loader.js index 1fe7af28a44eb7b..0a5cfba1df4468f 100644 --- a/packages/next/client/page-loader.js +++ b/packages/next/client/page-loader.js @@ -18,6 +18,16 @@ const relPrefetch = const hasNoModule = 'noModule' in document.createElement('script') +function normalizeRoute(route) { + if (route[0] !== '/') { + throw new Error(`Route name should start with a "/", got "${route}"`) + } + route = route.replace(/\/index$/, '/') + + if (route === '/') return route + return route.replace(/\/$/, '') +} + function appendLink(href, rel, as) { return new Promise((res, rej, link) => { link = document.createElement('link') @@ -63,22 +73,12 @@ export default class PageLoader { ) } - normalizeRoute(route) { - if (route[0] !== '/') { - throw new Error(`Route name should start with a "/", got "${route}"`) - } - route = route.replace(/\/index$/, '/') - - if (route === '/') return route - return route.replace(/\/$/, '') - } - loadPage(route) { return this.loadPageScript(route).then(v => v.page) } loadPageScript(route) { - route = this.normalizeRoute(route) + route = normalizeRoute(route) return new Promise((resolve, reject) => { const fire = ({ error, page, mod }) => { @@ -139,8 +139,8 @@ export default class PageLoader { }) } - async loadRoute(route) { - route = this.normalizeRoute(route) + loadRoute(route) { + route = normalizeRoute(route) let scriptRoute = route === '/' ? '/index.js' : `${route}.js` const url = `${this.assetPrefix}/_next/static/${encodeURIComponent( @@ -203,20 +203,20 @@ export default class PageLoader { register() } - async prefetch(route, isDependency) { + prefetch(route, isDependency) { // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118 // License: Apache 2.0 let cn if ((cn = navigator.connection)) { // Don't prefetch if using 2G or if Save-Data is enabled. - if (cn.saveData || /2g/.test(cn.effectiveType)) return + if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve() } let url = this.assetPrefix if (isDependency) { url += route } else { - route = this.normalizeRoute(route) + route = normalizeRoute(route) this.prefetched[route] = true let scriptRoute = `${route === '/' ? '/index' : route}.js` @@ -229,22 +229,24 @@ export default class PageLoader { )}/pages${encodeURI(scriptRoute)}` } - if ( + return Promise.all( document.querySelector( `link[rel="${relPrefetch}"][href^="${url}"], script[data-next-page="${route}"]` ) - ) { - return - } - - return Promise.all([ - appendLink(url, relPrefetch, url.match(/\.css$/) ? 'style' : 'script'), - process.env.__NEXT_GRANULAR_CHUNKS && - !isDependency && - this.getDependencies(route).then(urls => - Promise.all(urls.map(url => this.prefetch(url, true))) - ), - ]).then( + ? [] + : [ + appendLink( + url, + relPrefetch, + url.match(/\.css$/) ? 'style' : 'script' + ), + process.env.__NEXT_GRANULAR_CHUNKS && + !isDependency && + this.getDependencies(route).then(urls => + Promise.all(urls.map(url => this.prefetch(url, true))) + ), + ] + ).then( // do not return any data () => {}, // swallow prefetch errors diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index 28acb021f5326b1..d175c19c73651cc 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 199 + const delta = responseSizeKilobytes - 198 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) From 7e817cab04deaeb9bc7aee439bd8f4ce7135f1a8 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 4 Jan 2020 18:16:57 +0100 Subject: [PATCH 050/321] Remove rewriteUrlForNextExport from bundles when option is not enabled (#9946) Co-authored-by: Joe Haddad --- packages/next/client/link.tsx | 3 ++- packages/next/next-server/lib/router/router.ts | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/next/client/link.tsx b/packages/next/client/link.tsx index af8ce7849671484..4cca39b3a0a4aa9 100644 --- a/packages/next/client/link.tsx +++ b/packages/next/client/link.tsx @@ -3,7 +3,6 @@ declare const __NEXT_DATA__: any import { resolve, parse, UrlObject } from 'url' import React, { Component, Children } from 'react' import Router from './router' -import { rewriteUrlForNextExport } from '../next-server/lib/router/rewrite-url-for-export' import { execOnce, formatWithValidation, @@ -264,6 +263,8 @@ class Link extends Component { // Add the ending slash to the paths. So, we can serve the // "/index.html" directly. if (process.env.__NEXT_EXPORT_TRAILING_SLASH) { + const rewriteUrlForNextExport = require('../next-server/lib/router/rewrite-url-for-export') + .rewriteUrlForNextExport if ( props.href && typeof __NEXT_DATA__ !== 'undefined' && diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index a320811a862e55f..311cec1d138790b 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -13,7 +13,6 @@ import { NextPageContext, SUPPORTS_PERFORMANCE_USER_TIMING, } from '../utils' -import { rewriteUrlForNextExport } from './rewrite-url-for-export' import { isDynamicRoute } from './utils/is-dynamic' import { getRouteMatcher } from './utils/route-matcher' import { getRouteRegex } from './utils/route-regex' @@ -154,7 +153,13 @@ export default class Router implements BaseRouter { // @deprecated backwards compatibility even though it's a private method. static _rewriteUrlForNextExport(url: string): string { - return rewriteUrlForNextExport(url) + if (process.env.__NEXT_EXPORT_TRAILING_SLASH) { + const rewriteUrlForNextExport = require('./rewrite-url-for-export') + .rewriteUrlForNextExport + return rewriteUrlForNextExport(url) + } else { + return url + } } onPopState = (e: PopStateEvent): void => { @@ -275,6 +280,8 @@ export default class Router implements BaseRouter { // Add the ending slash to the paths. So, we can serve the // "/index.html" directly for the SSR page. if (process.env.__NEXT_EXPORT_TRAILING_SLASH) { + const rewriteUrlForNextExport = require('./rewrite-url-for-export') + .rewriteUrlForNextExport // @ts-ignore this is temporarily global (attached to window) if (__NEXT_DATA__.nextExport) { as = rewriteUrlForNextExport(as) From 1db6764c52e6090a965a7a9956b9a66d960c5780 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 4 Jan 2020 12:14:26 -0600 Subject: [PATCH 051/321] v9.1.8-canary.1 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 44e0e3f6bcf39ea..a53b16c04426adc 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.8-canary.0" + "version": "9.1.8-canary.1" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 31ff26eb6b41db1..f5387ff3a6c1bed 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 6131525250a76f2..9ca2ba743372ba2 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 8f03b7f5a291b4b..c255dd7ce791eca 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 39888a86249361e..ab895a9540abeb6 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index e93f5fb323ea3b8..3b8c3978ed0562a 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 8a8974678f9ecdd..56697f6fc52939e 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 95edb283ce2540f..f2e70a09a975b5b 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.8-canary.0", + "version": "9.1.8-canary.1", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 32ec4f691393038e69cd3f2e59c462879b83078d Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 4 Jan 2020 21:53:33 +0100 Subject: [PATCH 052/321] Allow for shortened names for certain items (#9949) * Use smaller name as it's not shortened * Remove export as it's not used and it'll be shortened * Update size Co-authored-by: Joe Haddad --- packages/next/client/index.js | 20 ++++++++----------- .../next/next-server/lib/router/router.ts | 4 ++-- packages/next/next-server/lib/utils.ts | 6 +++--- .../integration/size-limit/test/index.test.js | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/packages/next/client/index.js b/packages/next/client/index.js index cb4a3e5390234fd..58c3276a57825f6 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -4,11 +4,7 @@ import ReactDOM from 'react-dom' import HeadManager from './head-manager' import { createRouter, makePublicRouterInstance } from 'next/router' import mitt from '../next-server/lib/mitt' -import { - loadGetInitialProps, - getURL, - SUPPORTS_PERFORMANCE_USER_TIMING, -} from '../next-server/lib/utils' +import { loadGetInitialProps, getURL, ST } from '../next-server/lib/utils' import PageLoader from './page-loader' import * as envConfig from '../next-server/lib/runtime-config' import { HeadManagerContext } from '../next-server/lib/head-manager-context' @@ -70,7 +66,7 @@ const appElement = document.getElementById('__next') let lastAppProps let webpackHMR export let router -export let ErrorComponent +let ErrorComponent let Component let App, onPerfEntry @@ -187,7 +183,7 @@ export default async ({ webpackHMR: passedWebpackHMR } = {}) => { wrapApp, err: initialErr, subscription: ({ Component, props, err }, App) => { - render({ App, Component, props, err, emitter }) + render({ App, Component, props, err }) }, }) @@ -203,7 +199,7 @@ export default async ({ webpackHMR: passedWebpackHMR } = {}) => { }) } - const renderCtx = { App, Component, props, err: initialErr, emitter } + const renderCtx = { App, Component, props, err: initialErr } render(renderCtx) return emitter @@ -272,7 +268,7 @@ let isInitialRender = typeof ReactDOM.hydrate === 'function' let reactRoot = null function renderReactElement(reactEl, domEl) { // mark start of hydrate/render - if (SUPPORTS_PERFORMANCE_USER_TIMING) { + if (ST) { performance.mark('beforeRender') } @@ -297,7 +293,7 @@ function renderReactElement(reactEl, domEl) { } } - if (onPerfEntry && SUPPORTS_PERFORMANCE_USER_TIMING) { + if (onPerfEntry && ST) { if (!(PerformanceObserver in window)) { window.addEventListener('load', () => { performance.getEntriesByType('paint').forEach(onPerfEntry) @@ -312,7 +308,7 @@ function renderReactElement(reactEl, domEl) { } function markHydrateComplete() { - if (!SUPPORTS_PERFORMANCE_USER_TIMING) return + if (!ST) return performance.mark('afterHydrate') // mark end of hydration @@ -330,7 +326,7 @@ function markHydrateComplete() { } function markRenderComplete() { - if (!SUPPORTS_PERFORMANCE_USER_TIMING) return + if (!ST) return performance.mark('afterRender') // mark end of render const navStartEntries = performance.getEntriesByName('routeChange', 'mark') diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index 311cec1d138790b..70787fbdd5bdd26 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -11,7 +11,7 @@ import { getURL, loadGetInitialProps, NextPageContext, - SUPPORTS_PERFORMANCE_USER_TIMING, + ST, } from '../utils' import { isDynamicRoute } from './utils/is-dynamic' import { getRouteMatcher } from './utils/route-matcher' @@ -268,7 +268,7 @@ export default class Router implements BaseRouter { this.isSsr = false } // marking route changes as a navigation start entry - if (SUPPORTS_PERFORMANCE_USER_TIMING) { + if (ST) { performance.mark('routeChange') } diff --git a/packages/next/next-server/lib/utils.ts b/packages/next/next-server/lib/utils.ts index 4a54d8b3cd37629..fefad1a3b6fb5e7 100644 --- a/packages/next/next-server/lib/utils.ts +++ b/packages/next/next-server/lib/utils.ts @@ -325,8 +325,8 @@ export function formatWithValidation( return format(url as any, options) } -export const SUPPORTS_PERFORMANCE = typeof performance !== 'undefined' -export const SUPPORTS_PERFORMANCE_USER_TIMING = - SUPPORTS_PERFORMANCE && +export const SP = typeof performance !== 'undefined' +export const ST = + SP && typeof performance.mark === 'function' && typeof performance.measure === 'function' diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index d175c19c73651cc..1795b5d745f1941 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 230 + const delta = responseSizeKilobytes - 228 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) From 5a2182e62ee23c243a94ff026da224b07b446524 Mon Sep 17 00:00:00 2001 From: Brian Mathews Date: Mon, 6 Jan 2020 07:55:39 -0800 Subject: [PATCH 053/321] Add assetPrefix when fetching script and style dependencies (#9933) * Add assetPrefix when fetching script and style dependencies for granularChunks * Lint * Fix assetPrefix usage with granularChunks * Add tests for granularChunks with assetPrefix * Cleanup --- packages/next/client/page-loader.js | 12 ++-- test/integration/chunking/next.config.js | 1 + test/integration/chunking/pages/page3.js | 4 +- test/integration/chunking/test/index.test.js | 60 ++++++++++++++++---- test/lib/next-test-utils.js | 2 +- 5 files changed, 61 insertions(+), 18 deletions(-) diff --git a/packages/next/client/page-loader.js b/packages/next/client/page-loader.js index 0a5cfba1df4468f..22f09c3296264dc 100644 --- a/packages/next/client/page-loader.js +++ b/packages/next/client/page-loader.js @@ -69,7 +69,11 @@ export default class PageLoader { getDependencies(route) { return this.promisedBuildManifest.then( man => - (man[route] && man[route].map(url => `/_next/${encodeURI(url)}`)) || [] + (man[route] && + man[route].map( + url => `${this.assetPrefix}/_next/${encodeURI(url)}` + )) || + [] ) } @@ -212,9 +216,9 @@ export default class PageLoader { if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve() } - let url = this.assetPrefix + let url if (isDependency) { - url += route + url = route } else { route = normalizeRoute(route) this.prefetched[route] = true @@ -224,7 +228,7 @@ export default class PageLoader { scriptRoute = scriptRoute.replace(/\.js$/, '.module.js') } - url += `/_next/static/${encodeURIComponent( + url = `${this.assetPrefix}/_next/static/${encodeURIComponent( this.buildId )}/pages${encodeURI(scriptRoute)}` } diff --git a/test/integration/chunking/next.config.js b/test/integration/chunking/next.config.js index b3323e7f40cd8f3..3c374c570aceef7 100644 --- a/test/integration/chunking/next.config.js +++ b/test/integration/chunking/next.config.js @@ -1,6 +1,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') .BundleAnalyzerPlugin module.exports = { + assetPrefix: '/foo/', experimental: { granularChunks: true, }, diff --git a/test/integration/chunking/pages/page3.js b/test/integration/chunking/pages/page3.js index 5defb9feffaf2b4..91ce8054163d097 100644 --- a/test/integration/chunking/pages/page3.js +++ b/test/integration/chunking/pages/page3.js @@ -5,7 +5,9 @@ const Page = () => { return (

Page3

- Page2 + + Page2 +
) } diff --git a/test/integration/chunking/test/index.test.js b/test/integration/chunking/test/index.test.js index c73c8596a0bf147..01a32228f705e14 100644 --- a/test/integration/chunking/test/index.test.js +++ b/test/integration/chunking/test/index.test.js @@ -1,12 +1,14 @@ /* eslint-env jest */ /* global jasmine */ import { join } from 'path' +import express from 'express' +import http from 'http' import { nextBuild, - findPort, waitFor, - nextStart, - killApp, + nextServer, + promiseCall, + stopApp, } from 'next-test-utils' import { readdir, readFile, unlink, access } from 'fs-extra' import cheerio from 'cheerio' @@ -107,18 +109,52 @@ describe('Chunking', () => { expect(misplacedReactDom).toBe(false) }) - it('should hydrate with granularChunks config', async () => { - const appPort = await findPort() - const app = await nextStart(appDir, appPort) + describe('Serving', () => { + let server + let appPort - const browser = await webdriver(appPort, '/page2') - await waitFor(1000) - const text = await browser.elementByCss('#padded-str').text() + beforeAll(async () => { + await nextBuild(appDir) + const app = nextServer({ + dir: join(__dirname, '../'), + dev: false, + quiet: true, + }) + + const expressApp = express() + await app.prepare() + expressApp.use('/foo/_next', express.static(join(__dirname, '../.next'))) + expressApp.use(app.getRequestHandler()) + server = http.createServer(expressApp) + await promiseCall(server, 'listen') + appPort = server.address().port + }) - expect(text).toBe('__rad__') + afterAll(() => stopApp(server)) - await browser.close() + it('should hydrate with granularChunks config', async () => { + const browser = await webdriver(appPort, '/page2') + await waitFor(1000) + const text = await browser.elementByCss('#padded-str').text() - await killApp(app) + expect(text).toBe('__rad__') + + await browser.close() + }) + + it('should load chunks when navigating', async () => { + const browser = await webdriver(appPort, '/page3') + await waitFor(1000) + const text = await browser + .elementByCss('#page2-link') + .click() + .waitForElementByCss('#padded-str') + .elementByCss('#padded-str') + .text() + + expect(text).toBe('__rad__') + + await browser.close() + }) }) }) diff --git a/test/lib/next-test-utils.js b/test/lib/next-test-utils.js index 4289a171aebd40a..b695ca874062931 100644 --- a/test/lib/next-test-utils.js +++ b/test/lib/next-test-utils.js @@ -271,7 +271,7 @@ export async function stopApp(server) { await promiseCall(server, 'close') } -function promiseCall(obj, method, ...args) { +export function promiseCall(obj, method, ...args) { return new Promise((resolve, reject) => { const newArgs = [ ...args, From a50a0577d22c05ff1765f2294a35fb4b1d8efcdf Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 6 Jan 2020 11:43:26 -0500 Subject: [PATCH 054/321] Fix Tests (#9963) --- package.json | 12 +- .../lib/router/utils/route-matcher.ts | 2 +- .../next/next-server/server/lib/path-match.ts | 2 +- packages/next/next-server/server/router.ts | 2 +- packages/next/package.json | 4 +- .../integration/size-limit/test/index.test.js | 2 +- yarn.lock | 3413 ++++++++--------- 7 files changed, 1534 insertions(+), 1903 deletions(-) diff --git a/package.json b/package.json index 81b7912b76c4709..8af963c4e6e3d93 100644 --- a/package.json +++ b/package.json @@ -86,8 +86,8 @@ "postcss-trolling": "0.1.7", "pre-commit": "1.2.2", "prettier": "1.19.1", - "react": "16.10.2", - "react-dom": "16.10.2", + "react": "16.12.0", + "react-dom": "16.12.0", "react-ssr-prepass": "1.0.8", "release": "6.0.1", "request-promise-core": "1.1.2", @@ -100,11 +100,13 @@ "tree-kill": "1.2.1", "typescript": "3.7.3", "wait-port": "0.2.2", - "webpack-bundle-analyzer": "3.3.2" + "webpack-bundle-analyzer": "3.3.2", + "browserslist": "^4.8.3", + "caniuse-lite": "^1.0.30001019" }, "resolutions": { - "browserslist": "^4.7.1", - "caniuse-lite": "^1.0.30001002" + "browserslist": "^4.8.3", + "caniuse-lite": "^1.0.30001019" }, "engines": { "node": ">= 8.0.0" diff --git a/packages/next/next-server/lib/router/utils/route-matcher.ts b/packages/next/next-server/lib/router/utils/route-matcher.ts index 60a73150a74dd9d..75bf2990906d66e 100644 --- a/packages/next/next-server/lib/router/utils/route-matcher.ts +++ b/packages/next/next-server/lib/router/utils/route-matcher.ts @@ -2,7 +2,7 @@ import { getRouteRegex } from './route-regex' export function getRouteMatcher(routeRegex: ReturnType) { const { re, groups } = routeRegex - return (pathname: string | undefined) => { + return (pathname: string | null | undefined) => { const routeMatch = re.exec(pathname!) if (!routeMatch) { return false diff --git a/packages/next/next-server/server/lib/path-match.ts b/packages/next/next-server/server/lib/path-match.ts index 9e53f626f922c49..ec1e64960d4c393 100644 --- a/packages/next/next-server/server/lib/path-match.ts +++ b/packages/next/next-server/server/lib/path-match.ts @@ -11,7 +11,7 @@ export default (customRoute = false) => { decode: decodeParam, }) - return (pathname: string | undefined, params?: any) => { + return (pathname: string | null | undefined, params?: any) => { const res = pathname == null ? false : matcher(pathname) if (!res) { return false diff --git a/packages/next/next-server/server/router.ts b/packages/next/next-server/server/router.ts index 073f06ba51e1a02..75bc8faed8cad14 100644 --- a/packages/next/next-server/server/router.ts +++ b/packages/next/next-server/server/router.ts @@ -6,7 +6,7 @@ export const route = pathMatch() export type Params = { [param: string]: any } -export type RouteMatch = (pathname: string | undefined) => false | Params +export type RouteMatch = (pathname: string | null | undefined) => false | Params type RouteResult = { finished: boolean diff --git a/packages/next/package.json b/packages/next/package.json index f2e70a09a975b5b..2f5283cd33c5cfd 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -171,8 +171,8 @@ "@types/mkdirp": "0.5.2", "@types/nanoid": "2.0.0", "@types/node-fetch": "2.3.4", - "@types/react": "16.8.18", - "@types/react-dom": "16.9.3", + "@types/react": "16.9.17", + "@types/react-dom": "16.9.4", "@types/react-is": "16.7.1", "@types/resolve": "0.0.8", "@types/send": "0.14.4", diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index 1795b5d745f1941..9653eda05a8a805 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 198 + const delta = responseSizeKilobytes - 196 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) diff --git a/yarn.lock b/yarn.lock index 158de0aa90bf34d..26896f991887afa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -33,14 +33,7 @@ resolved "https://registry.yarnpkg.com/@ampproject/toolbox-script-csp/-/toolbox-script-csp-1.1.1.tgz#0b049a1c86c99f300162a10e1b9ce83c6e354a45" integrity sha512-gACGfsVKinCy/977FSrlVgo6jxTZ0lcTCvCnRlNwvSOcxJVm+jJR3sP7/F43fpak9Gsq/EwFaatfnNMbunPc+w== -"@babel/code-frame@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/code-frame@^7.5.5": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== @@ -68,114 +61,78 @@ source-map "^0.5.0" "@babel/core@^7.1.0": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.5.tgz#081f97e8ffca65a9b4b0fdc7e274e703f000c06a" - integrity sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA== + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" + integrity sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ== dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.4.4" - "@babel/helpers" "^7.4.4" - "@babel/parser" "^7.4.5" - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.4.5" - "@babel/types" "^7.4.4" - convert-source-map "^1.1.0" + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.7.7" + "@babel/helpers" "^7.7.4" + "@babel/parser" "^7.7.7" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" + convert-source-map "^1.7.0" debug "^4.1.0" json5 "^2.1.0" - lodash "^4.17.11" + lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.4.tgz#174a215eb843fc392c7edcaabeaa873de6e8f041" - integrity sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ== - dependencies: - "@babel/types" "^7.4.4" - jsesc "^2.5.1" - lodash "^4.17.11" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/generator@^7.6.3": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" - integrity sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w== - dependencies: - "@babel/types" "^7.6.3" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/generator@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.2.tgz#2f4852d04131a5e17ea4f6645488b5da66ebf3af" - integrity sha512-WthSArvAjYLz4TcbKOi88me+KmDJdKSlfwwN8CnUYn9jBkzhq0ZEPuBfkAWIvjJ3AdEV1Cf/+eSQTnp3IDJKlQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.7.2", "@babel/generator@^7.7.4", "@babel/generator@^7.7.7": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" + integrity sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ== dependencies: - "@babel/types" "^7.7.2" + "@babel/types" "^7.7.4" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" - integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-annotate-as-pure@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.0.tgz#efc54032d43891fe267679e63f6860aa7dbf4a5e" - integrity sha512-k50CQxMlYTYo+GGyUGFwpxKVtxVJi9yh61sXZji3zYHccK9RYliZGSTOgci85T+r+0VFN2nWbGM04PIqwfrpMg== +"@babel/helper-annotate-as-pure@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz#bb3faf1e74b74bd547e867e48f551fa6b098b6ce" + integrity sha512-2BQmQgECKzYKFPpiycoF9tlb5HA4lrVyAmLLVK177EcQAqjVLciUb2/R+n1boQ9y5ENV3uz2ZqiNw7QMBBw1Og== dependencies: - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" - integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== +"@babel/helper-builder-binary-assignment-operator-visitor@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.4.tgz#5f73f2b28580e224b5b9bd03146a4015d6217f5f" + integrity sha512-Biq/d/WtvfftWZ9Uf39hbPBYDUo986m5Bb4zhkeYDGUllF43D+nUe5M6Vuo6/8JDK/0YX/uBdeoQpyaNhNugZQ== dependencies: - "@babel/helper-explode-assignable-expression" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/helper-explode-assignable-expression" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-builder-react-jsx@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.0.tgz#c6b8254d305bacd62beb648e4dea7d3ed79f352d" - integrity sha512-LSln3cexwInTMYYoFeVLKnYPPMfWNJ8PubTBs3hkh7wCu9iBaqq1OOyW+xGmEdLxT1nhsl+9SJ+h2oUDYz0l2A== +"@babel/helper-builder-react-jsx@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.4.tgz#da188d247508b65375b2c30cf59de187be6b0c66" + integrity sha512-kvbfHJNN9dg4rkEM4xn1s8d1/h6TYNvajy9L1wx4qLn9HFg0IkTsQi4rfBe92nxrPUFcMsHoMV+8rU7MJb3fCA== dependencies: - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" esutils "^2.0.0" -"@babel/helper-call-delegate@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" - integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== +"@babel/helper-call-delegate@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.7.4.tgz#621b83e596722b50c0066f9dc37d3232e461b801" + integrity sha512-8JH9/B7J7tCYJ2PpWVpw9JhPuEVHztagNVuQAFBVFYluRMlpG7F1CgKEgGeL6KFqcsIa92ZYVj6DSc0XwmN1ZA== dependencies: - "@babel/helper-hoist-variables" "^7.4.4" - "@babel/traverse" "^7.4.4" - "@babel/types" "^7.4.4" + "@babel/helper-hoist-variables" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-create-class-features-plugin@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.0.tgz#bcdc223abbfdd386f94196ae2544987f8df775e8" - integrity sha512-MZiB5qvTWoyiFOgootmRSDV1udjIqJW/8lmxgzKq6oDqxdmHUjeP2ZUOmgHdYjmUVNABqRrHjYAYRvj8Eox/UA== +"@babel/helper-create-class-features-plugin@^7.7.0", "@babel/helper-create-class-features-plugin@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.4.tgz#fce60939fd50618610942320a8d951b3b639da2d" + integrity sha512-l+OnKACG4uiDHQ/aJT8dwpR+LhCJALxL0mJ6nzjB25e5IPwqV1VOsY7ah6UB1DG+VOXAIMtuC54rFJGiHkxjgA== dependencies: - "@babel/helper-function-name" "^7.7.0" - "@babel/helper-member-expression-to-functions" "^7.7.0" - "@babel/helper-optimise-call-expression" "^7.7.0" + "@babel/helper-function-name" "^7.7.4" + "@babel/helper-member-expression-to-functions" "^7.7.4" + "@babel/helper-optimise-call-expression" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.7.0" - "@babel/helper-split-export-declaration" "^7.7.0" - -"@babel/helper-create-regexp-features-plugin@^7.7.0": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.2.tgz#6f20443778c8fce2af2ff4206284afc0ced65db6" - integrity sha512-pAil/ZixjTlrzNpjx+l/C/wJk002Wo7XbbZ8oujH/AoJ3Juv0iN/UTcPUHXKMFLqsfS0Hy6Aow8M31brUYBlQQ== - dependencies: - "@babel/helper-regex" "^7.4.4" - regexpu-core "^4.6.0" + "@babel/helper-replace-supers" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" "@babel/helper-create-regexp-features-plugin@^7.7.4": version "7.7.4" @@ -185,134 +142,78 @@ "@babel/helper-regex" "^7.4.4" regexpu-core "^4.6.0" -"@babel/helper-define-map@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.7.0.tgz#60b0e9fd60def9de5054c38afde8c8ee409c7529" - integrity sha512-kPKWPb0dMpZi+ov1hJiwse9dWweZsz3V9rP4KdytnX1E7z3cTNmFGglwklzFPuqIcHLIY3bgKSs4vkwXXdflQA== +"@babel/helper-define-map@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.7.4.tgz#2841bf92eb8bd9c906851546fe6b9d45e162f176" + integrity sha512-v5LorqOa0nVQUvAUTUF3KPastvUt/HzByXNamKQ6RdJRTV7j8rLL+WB5C/MzzWAwOomxDhYFb1wLLxHqox86lg== dependencies: - "@babel/helper-function-name" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/helper-function-name" "^7.7.4" + "@babel/types" "^7.7.4" lodash "^4.17.13" -"@babel/helper-explode-assignable-expression@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" - integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== - dependencies: - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== - dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-function-name@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.0.tgz#44a5ad151cfff8ed2599c91682dda2ec2c8430a3" - integrity sha512-tDsJgMUAP00Ugv8O2aGEua5I2apkaQO7lBGUq1ocwN3G23JE5Dcq0uh3GvFTChPa4b40AWiAsLvCZOA2rdnQ7Q== - dependencies: - "@babel/helper-get-function-arity" "^7.7.0" - "@babel/template" "^7.7.0" - "@babel/types" "^7.7.0" - -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-get-function-arity@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.0.tgz#c604886bc97287a1d1398092bc666bc3d7d7aa2d" - integrity sha512-tLdojOTz4vWcEnHWHCuPN5P85JLZWbm5Fx5ZsMEMPhF3Uoe3O7awrbM2nQ04bDOUToH/2tH/ezKEOR8zEYzqyw== - dependencies: - "@babel/types" "^7.7.0" - -"@babel/helper-hoist-variables@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" - integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== - dependencies: - "@babel/types" "^7.4.4" - -"@babel/helper-hoist-variables@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.0.tgz#b4552e4cfe5577d7de7b183e193e84e4ec538c81" - integrity sha512-LUe/92NqsDAkJjjCEWkNe+/PcpnisvnqdlRe19FahVapa4jndeuJ+FBiTX1rcAKWKcJGE+C3Q3tuEuxkSmCEiQ== +"@babel/helper-explode-assignable-expression@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.4.tgz#fa700878e008d85dc51ba43e9fb835cddfe05c84" + integrity sha512-2/SicuFrNSXsZNBxe5UGdLr+HZg+raWBLE9vC98bdYOKX/U6PY0mdGlYUJdtTDPSU0Lw0PNbKKDpwYHJLn2jLg== dependencies: - "@babel/types" "^7.7.0" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-member-expression-to-functions@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" - integrity sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA== +"@babel/helper-function-name@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" + integrity sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ== dependencies: - "@babel/types" "^7.5.5" + "@babel/helper-get-function-arity" "^7.7.4" + "@babel/template" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-member-expression-to-functions@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.0.tgz#472b93003a57071f95a541ea6c2b098398bcad8a" - integrity sha512-QaCZLO2RtBcmvO/ekOLp8p7R5X2JriKRizeDpm5ChATAFWrrYDcDxPuCIBXKyBjY+i1vYSdcUTMIb8psfxHDPA== +"@babel/helper-get-function-arity@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" + integrity sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA== dependencies: - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== +"@babel/helper-hoist-variables@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.4.tgz#612384e3d823fdfaaf9fce31550fe5d4db0f3d12" + integrity sha512-wQC4xyvc1Jo/FnLirL6CEgPgPCa8M74tOdjWpRhQYapz5JC7u3NYU1zCVoVAGCE3EaIP9T1A3iW0WLJ+reZlpQ== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.7.4" -"@babel/helper-module-imports@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.0.tgz#99c095889466e5f7b6d66d98dffc58baaf42654d" - integrity sha512-Dv3hLKIC1jyfTkClvyEkYP2OlkzNvWs5+Q8WgPbxM5LMeorons7iPP91JM+DU7tRbhqA1ZeooPaMFvQrn23RHw== +"@babel/helper-member-expression-to-functions@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.4.tgz#356438e2569df7321a8326644d4b790d2122cb74" + integrity sha512-9KcA1X2E3OjXl/ykfMMInBK+uVdfIVakVe7W7Lg3wfXUNyS3Q1HWLFRwZIjhqiCGbslummPDnmb7vIekS0C1vw== dependencies: - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" -"@babel/helper-module-transforms@^7.1.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" - integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.7.0", "@babel/helper-module-imports@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" + integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ== dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/template" "^7.4.4" - "@babel/types" "^7.4.4" - lodash "^4.17.11" + "@babel/types" "^7.7.4" -"@babel/helper-module-transforms@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.0.tgz#154a69f0c5b8fd4d39e49750ff7ac4faa3f36786" - integrity sha512-rXEefBuheUYQyX4WjV19tuknrJFwyKw0HgzRwbkyTbB+Dshlq7eqkWbyjzToLrMZk/5wKVKdWFluiAsVkHXvuQ== +"@babel/helper-module-transforms@^7.7.0", "@babel/helper-module-transforms@^7.7.4", "@babel/helper-module-transforms@^7.7.5": + version "7.7.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz#d044da7ffd91ec967db25cd6748f704b6b244835" + integrity sha512-A7pSxyJf1gN5qXVcidwLWydjftUN878VkalhXX5iQDuGyiGK3sOrrKKHF4/A4fwHtnsotv/NipwAeLzY4KQPvw== dependencies: - "@babel/helper-module-imports" "^7.7.0" - "@babel/helper-simple-access" "^7.7.0" - "@babel/helper-split-export-declaration" "^7.7.0" - "@babel/template" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/helper-module-imports" "^7.7.4" + "@babel/helper-simple-access" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" + "@babel/template" "^7.7.4" + "@babel/types" "^7.7.4" lodash "^4.17.13" -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-optimise-call-expression@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.0.tgz#4f66a216116a66164135dc618c5d8b7a959f9365" - integrity sha512-48TeqmbazjNU/65niiiJIJRc5JozB8acui1OS7bSd6PgxfuovWsvjfWSzlgx+gPFdVveNzUdpdIg5l56Pl5jqg== +"@babel/helper-optimise-call-expression@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.4.tgz#034af31370d2995242aa4df402c3b7794b2dcdf2" + integrity sha512-VB7gWZ2fDkSuqW6b1AKXkJWO5NyNI3bFL/kK79/30moK57blr6NbH8xcl2XcKCwOmJosftWunZqfO84IGq3ZZg== dependencies: - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" @@ -320,133 +221,89 @@ integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" - integrity sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q== - dependencies: - lodash "^4.17.11" - -"@babel/helper-remap-async-to-generator@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.0.tgz#4d69ec653e8bff5bce62f5d33fc1508f223c75a7" - integrity sha512-pHx7RN8X0UNHPB/fnuDnRXVZ316ZigkO8y8D835JlZ2SSdFKb6yH9MIYRU4fy/KPe5sPHDFOPvf8QLdbAGGiyw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.7.0" - "@babel/helper-wrap-function" "^7.7.0" - "@babel/template" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - -"@babel/helper-replace-supers@^7.5.5": version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" - integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.5.5" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.5.5" - "@babel/types" "^7.5.5" - -"@babel/helper-replace-supers@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.7.0.tgz#d5365c8667fe7cbd13b8ddddceb9bd7f2b387512" - integrity sha512-5ALYEul5V8xNdxEeWvRsBzLMxQksT7MaStpxjJf9KsnLxpAKBtfw5NeMKZJSYDa0lKdOcy0g+JT/f5mPSulUgg== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.7.0" - "@babel/helper-optimise-call-expression" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" + integrity sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw== dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" + lodash "^4.17.13" -"@babel/helper-simple-access@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.0.tgz#97a8b6c52105d76031b86237dc1852b44837243d" - integrity sha512-AJ7IZD7Eem3zZRuj5JtzFAptBw7pMlS3y8Qv09vaBWoFsle0d1kAn5Wq6Q9MyBXITPOKnxwkZKoAm4bopmv26g== +"@babel/helper-remap-async-to-generator@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.4.tgz#c68c2407350d9af0e061ed6726afb4fff16d0234" + integrity sha512-Sk4xmtVdM9sA/jCI80f+KS+Md+ZHIpjuqmYPk1M7F/upHou5e4ReYmExAiu6PVe65BhJPZA2CY9x9k4BqE5klw== dependencies: - "@babel/template" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/helper-annotate-as-pure" "^7.7.4" + "@babel/helper-wrap-function" "^7.7.4" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-split-export-declaration@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" - integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== +"@babel/helper-replace-supers@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.7.4.tgz#3c881a6a6a7571275a72d82e6107126ec9e2cdd2" + integrity sha512-pP0tfgg9hsZWo5ZboYGuBn/bbYT/hdLPVSS4NMmiRJdwWhP0IznPwN9AE1JwyGsjSPLC364I0Qh5p+EPkGPNpg== dependencies: - "@babel/types" "^7.4.4" + "@babel/helper-member-expression-to-functions" "^7.7.4" + "@babel/helper-optimise-call-expression" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-split-export-declaration@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.0.tgz#1365e74ea6c614deeb56ebffabd71006a0eb2300" - integrity sha512-HgYSI8rH08neWlAH3CcdkFg9qX9YsZysZI5GD8LjhQib/mM0jGOZOVkoUiiV2Hu978fRtjtsGsW6w0pKHUWtqA== +"@babel/helper-simple-access@^7.7.0", "@babel/helper-simple-access@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294" + integrity sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A== dependencies: - "@babel/types" "^7.7.0" + "@babel/template" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helper-wrap-function@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.0.tgz#15af3d3e98f8417a60554acbb6c14e75e0b33b74" - integrity sha512-sd4QjeMgQqzshSjecZjOp8uKfUtnpmCyQhKQrVJBBgeHAB/0FPi33h3AbVlVp07qQtMD4QgYSzaMI7VwncNK/w== +"@babel/helper-split-export-declaration@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" + integrity sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug== dependencies: - "@babel/helper-function-name" "^7.7.0" - "@babel/template" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/types" "^7.7.4" -"@babel/helpers@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.4.tgz#868b0ef59c1dd4e78744562d5ce1b59c89f2f2a5" - integrity sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A== +"@babel/helper-wrap-function@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz#37ab7fed5150e22d9d7266e830072c0cdd8baace" + integrity sha512-VsfzZt6wmsocOaVU0OokwrIytHND55yvyT4BPB9AIIgwr8+x7617hetdJTsuGwygN5RC6mxA9EJztTjuwm2ofg== dependencies: - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.4.4" - "@babel/types" "^7.4.4" + "@babel/helper-function-name" "^7.7.4" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/helpers@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.0.tgz#359bb5ac3b4726f7c1fde0ec75f64b3f4275d60b" - integrity sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g== +"@babel/helpers@^7.7.0", "@babel/helpers@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" + integrity sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg== dependencies: - "@babel/template" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" "@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.7.0", "@babel/parser@^7.7.2": - version "7.7.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.3.tgz#5fad457c2529de476a248f75b0f090b3060af043" - integrity sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A== - -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.4.5": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872" - integrity sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew== - -"@babel/parser@^7.6.3": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" - integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.2", "@babel/parser@^7.7.4", "@babel/parser@^7.7.7": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" + integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== "@babel/plugin-proposal-async-generator-functions@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.0.tgz#83ef2d6044496b4c15d8b4904e2219e6dccc6971" - integrity sha512-ot/EZVvf3mXtZq0Pd0+tSOfGWMizqmOohXmNZg6LNFjHOV+wOPv7BvVYh8oPR8LhpIP3ye8nNooKL50YRWxpYA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.4.tgz#0351c5ac0a9e927845fffd5b82af476947b7ce6d" + integrity sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.7.0" - "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/helper-remap-async-to-generator" "^7.7.4" + "@babel/plugin-syntax-async-generators" "^7.7.4" "@babel/plugin-proposal-class-properties@7.7.0": version "7.7.0" @@ -457,30 +314,30 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-dynamic-import@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.0.tgz#dc02a8bad8d653fb59daf085516fa416edd2aa7f" - integrity sha512-7poL3Xi+QFPC7sGAzEIbXUyYzGJwbc2+gSD0AkiC5k52kH2cqHdqxm5hNFfLW3cRSTcx9bN0Fl7/6zWcLLnKAQ== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.4.tgz#dde64a7f127691758cbfed6cf70de0fa5879d52d" + integrity sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-syntax-dynamic-import" "^7.7.4" "@babel/plugin-proposal-json-strings@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" - integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz#7700a6bfda771d8dc81973249eac416c6b4c697d" + integrity sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.7.4" "@babel/plugin-proposal-nullish-coalescing-operator@7.7.4": version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel%2fplugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.7.4.tgz#7db302c83bc30caa89e38fee935635ef6bd11c28" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.7.4.tgz#7db302c83bc30caa89e38fee935635ef6bd11c28" integrity sha512-TbYHmr1Gl1UC7Vo2HVuj/Naci5BEGNZ0AJhzqD2Vpr6QPFWpUmBRLrIDjedzx7/CShq0bRDS2gI4FIs77VHLVQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.7.4" -"@babel/plugin-proposal-object-rest-spread@7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.6.2": +"@babel/plugin-proposal-object-rest-spread@7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz#8ffccc8f3a6545e9f78988b6bf4fe881b88e8096" integrity sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw== @@ -488,260 +345,251 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.3.2": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz#1ef173fcf24b3e2df92a678f027673b55e7e3005" - integrity sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g== +"@babel/plugin-proposal-object-rest-spread@^7.3.2", "@babel/plugin-proposal-object-rest-spread@^7.6.2": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.7.7.tgz#9f27075004ab99be08c5c1bd653a2985813cb370" + integrity sha512-3qp9I8lelgzNedI3hrhkvhaEYree6+WHnyA/q4Dza9z7iEIs1eyhWyJnetk3jJ69RT0AT4G0UhEGwyGFJ7GUuQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.7.4" "@babel/plugin-proposal-optional-catch-binding@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" - integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.7.4.tgz#ec21e8aeb09ec6711bc0a39ca49520abee1de379" + integrity sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.7.4" "@babel/plugin-proposal-optional-chaining@7.7.4": version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel%2fplugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.7.4.tgz#3f04c2de1a942cbd3008324df8144b9cbc0ca0ba" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.7.4.tgz#3f04c2de1a942cbd3008324df8144b9cbc0ca0ba" integrity sha512-JmgaS+ygAWDR/STPe3/7y0lNlHgS+19qZ9aC06nYLwQ/XB7c0q5Xs+ksFU3EDnp9EiEsO0dnRAOKeyLHTZuW3A== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-chaining" "^7.7.4" -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.4.tgz#7c239ccaf09470dbe1d453d50057460e84517ebb" - integrity sha512-cHgqHgYvffluZk85dJ02vloErm3Y6xtH+2noOBOJ2kXOJH3aVCDnj5eR/lVNlTnYu4hndAPJD3rTFjW3qee0PA== +"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.7.0": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.7.tgz#433fa9dac64f953c12578b29633f456b68831c4e" + integrity sha512-80PbkKyORBUVm1fbTLrHpYdJxMThzM1UqFGh0ALEhO9TYbG86Ah9zQYAB/84axz2vcxefDLdZwWwZNlYARlu9w== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-unicode-property-regex@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.0.tgz#549fe1717a1bd0a2a7e63163841cb37e78179d5d" - integrity sha512-mk34H+hp7kRBWJOOAR0ZMGCydgKMD4iN9TpDRp3IIcbunltxEY89XSimc6WbtSLCDrwcdy/EEw7h5CFCzxTchw== +"@babel/plugin-syntax-async-generators@^7.2.0", "@babel/plugin-syntax-async-generators@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.7.4.tgz#331aaf310a10c80c44a66b238b6e49132bd3c889" + integrity sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-async-generators@^7.2.0": +"@babel/plugin-syntax-dynamic-import@7.2.0": version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" - integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" + integrity sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-dynamic-import@7.2.0", "@babel/plugin-syntax-dynamic-import@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" - integrity sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w== +"@babel/plugin-syntax-dynamic-import@^7.2.0", "@babel/plugin-syntax-dynamic-import@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.7.4.tgz#29ca3b4415abfe4a5ec381e903862ad1a54c3aec" + integrity sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-flow@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" - integrity sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg== +"@babel/plugin-syntax-flow@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.4.tgz#6d91b59e1a0e4c17f36af2e10dd64ef220919d7b" + integrity sha512-2AMAWl5PsmM5KPkB22cvOkUyWk6MjUaqhHNU5nSPUl/ns3j5qLfw2SuYP5RbVZ0tfLvePr4zUScbICtDP2CUNw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-json-strings@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" - integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== +"@babel/plugin-syntax-json-strings@^7.2.0", "@babel/plugin-syntax-json-strings@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.7.4.tgz#86e63f7d2e22f9e27129ac4e83ea989a382e86cc" + integrity sha512-QpGupahTQW1mHRXddMG5srgpHWqRLwJnJZKXTigB9RPFCCGbDGCgBeM/iC82ICXp414WeYx/tD54w7M2qRqTMg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-jsx@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz#0b85a3b4bc7cdf4cc4b8bf236335b907ca22e7c7" - integrity sha512-VyN4QANJkRW6lDBmENzRszvZf3/4AXaj9YR7GwrWeeN9tEBPuXbmDYVU9bYBN0D70zCWVwUy0HWq2553VCb6Hw== +"@babel/plugin-syntax-jsx@^7.2.0", "@babel/plugin-syntax-jsx@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.7.4.tgz#dab2b56a36fb6c3c222a1fbc71f7bf97f327a9ec" + integrity sha512-wuy6fiMe9y7HeZBWXYCGt2RGxZOj0BImZ9EyXJVnVGBKO/Br592rbR3rtIQn0eQhAk9vqaKP5n8tVqEFBQMfLg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-nullish-coalescing-operator@^7.7.4": version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel%2fplugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.7.4.tgz#e53b751d0c3061b1ba3089242524b65a7a9da12b" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.7.4.tgz#e53b751d0c3061b1ba3089242524b65a7a9da12b" integrity sha512-XKh/yIRPiQTOeBg0QJjEus5qiSKucKAiApNtO1psqG7D17xmE+X2i5ZqBEuSvo0HRuyPaKaSN/Gy+Ha9KFQolw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" - integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== +"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0", "@babel/plugin-syntax-object-rest-spread@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz#47cf220d19d6d0d7b154304701f468fc1cc6ff46" + integrity sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-catch-binding@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" - integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== +"@babel/plugin-syntax-optional-catch-binding@^7.2.0", "@babel/plugin-syntax-optional-catch-binding@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.7.4.tgz#a3e38f59f4b6233867b4a92dcb0ee05b2c334aa6" + integrity sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-chaining@^7.7.4": version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel%2fplugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.7.4.tgz#c91fdde6de85d2eb8906daea7b21944c3610c901" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.7.4.tgz#c91fdde6de85d2eb8906daea7b21944c3610c901" integrity sha512-2MqYD5WjZSbJdUagnJvIdSfkb/ucOC9/1fRJxm7GAxY6YQLWlUvkfxoNbUPcPLHJyetKUDQ4+yyuUyAoc0HriA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-top-level-await@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.0.tgz#f5699549f50bbe8d12b1843a4e82f0a37bb65f4d" - integrity sha512-hi8FUNiFIY1fnUI2n1ViB1DR0R4QeK4iHcTlW6aJkrPoTdb8Rf1EMQ6GT3f67DDkYyWgew9DFoOZ6gOoEsdzTA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.4.tgz#bd7d8fa7b9fee793a36e4027fd6dd1aa32f946da" + integrity sha512-wdsOw0MvkL1UIgiQ/IFr3ETcfv1xb8RMM0H9wbiDyLaJFyiDg5oZvDLCXosIXmFeIlweML5iOBXAkqddkYNizg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-typescript@^7.2.0": - version "7.3.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz#a7cc3f66119a9f7ebe2de5383cce193473d65991" - integrity sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag== +"@babel/plugin-syntax-typescript@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.7.4.tgz#5d037ffa10f3b25a16f32570ebbe7a8c2efa304b" + integrity sha512-77blgY18Hud4NM1ggTA8xVT/dBENQf17OpiToSa2jSmEY3fWXD2jwrdVlO4kq5yzUTeF15WSQ6b4fByNvJcjpQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" - integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.7.4.tgz#76309bd578addd8aee3b379d809c802305a98a12" + integrity sha512-zUXy3e8jBNPiffmqkHRNDdZM2r8DWhCB7HhcoyZjiK1TxYEluLHAvQuYnTT+ARqRpabWqy/NHkO6e3MsYB5YfA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-async-to-generator@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.0.tgz#e2b84f11952cf5913fe3438b7d2585042772f492" - integrity sha512-vLI2EFLVvRBL3d8roAMqtVY0Bm9C1QzLkdS57hiKrjUBSqsQYrBsMCeOg/0KK7B0eK9V71J5mWcha9yyoI2tZw== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.4.tgz#694cbeae6d613a34ef0292713fa42fb45c4470ba" + integrity sha512-zpUTZphp5nHokuy8yLlyafxCJ0rSlFoSHypTUWgpdwoDXWQcseaect7cJ8Ppk6nunOM6+5rPMkod4OYKPR5MUg== dependencies: - "@babel/helper-module-imports" "^7.7.0" + "@babel/helper-module-imports" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.7.0" + "@babel/helper-remap-async-to-generator" "^7.7.4" "@babel/plugin-transform-block-scoped-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" - integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.7.4.tgz#d0d9d5c269c78eaea76227ace214b8d01e4d837b" + integrity sha512-kqtQzwtKcpPclHYjLK//3lH8OFsCDuDJBaFhVwf8kqdnF6MN4l618UDlcA7TfRs3FayrHj+svYnSX8MC9zmUyQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoping@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz#6e854e51fbbaa84351b15d4ddafe342f3a5d542a" - integrity sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.7.4.tgz#200aad0dcd6bb80372f94d9e628ea062c58bf224" + integrity sha512-2VBe9u0G+fDt9B5OV5DQH4KBf5DoiNkwFKOz0TCvBWvdAN2rOykCTkrL+jTLxfCAm76l9Qo5OqL7HBOx2dWggg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.13" "@babel/plugin-transform-classes@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.0.tgz#b411ecc1b8822d24b81e5d184f24149136eddd4a" - integrity sha512-/b3cKIZwGeUesZheU9jNYcwrEA7f/Bo4IdPmvp7oHgvks2majB5BoT5byAql44fiNQYOPzhk2w8DbgfuafkMoA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.4.tgz#c92c14be0a1399e15df72667067a8f510c9400ec" + integrity sha512-sK1mjWat7K+buWRuImEzjNf68qrKcrddtpQo3swi9j7dUcG6y6R6+Di039QN2bD1dykeswlagupEmpOatFHHUg== dependencies: - "@babel/helper-annotate-as-pure" "^7.7.0" - "@babel/helper-define-map" "^7.7.0" - "@babel/helper-function-name" "^7.7.0" - "@babel/helper-optimise-call-expression" "^7.7.0" + "@babel/helper-annotate-as-pure" "^7.7.4" + "@babel/helper-define-map" "^7.7.4" + "@babel/helper-function-name" "^7.7.4" + "@babel/helper-optimise-call-expression" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.7.0" - "@babel/helper-split-export-declaration" "^7.7.0" + "@babel/helper-replace-supers" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" - integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.7.4.tgz#e856c1628d3238ffe12d668eb42559f79a81910d" + integrity sha512-bSNsOsZnlpLLyQew35rl4Fma3yKWqK3ImWMSC/Nc+6nGjC9s5NFWAer1YQ899/6s9HxO2zQC1WoFNfkOqRkqRQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.6.0.tgz#44bbe08b57f4480094d57d9ffbcd96d309075ba6" - integrity sha512-2bGIS5P1v4+sWTCnKNDZDxbGvEqi0ijeqM/YqHtVGrvG2y0ySgnEEhXErvE9dA0bnIzY9bIzdFK0jFA46ASIIQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-dotall-regex@^7.4.4": version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.4.tgz#f7ccda61118c5b7a2599a72d5e3210884a021e96" - integrity sha512-mk0cH1zyMa/XHeb6LOTXTbG7uIJ8Rrjlzu91pUx/KS3JpcgaTDwMS8kM+ar8SLOvlL2Lofi4CGBAjCo3a2x+lw== + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.7.4.tgz#2b713729e5054a1135097b6a67da1b6fe8789267" + integrity sha512-4jFMXI1Cu2aXbcXXl8Lr6YubCn6Oc7k9lLsu8v61TZh+1jny2BWmdtvY9zSUlLdGUvcy9DMAWyZEOqjsbeg/wA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.0.tgz#c5c9ecacab3a5e0c11db6981610f0c32fd698b3b" - integrity sha512-3QQlF7hSBnSuM1hQ0pS3pmAbWLax/uGNCbPBND9y+oJ4Y776jsyujG2k0Sn2Aj2a0QwVOiOFL5QVPA7spjvzSA== +"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.7.0": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.7.tgz#3e9713f1b69f339e87fa796b097d73ded16b937b" + integrity sha512-b4in+YlTeE/QmTgrllnb3bHA0HntYvjz8O3Mcbx75UBPJA2xhb5A8nle498VhxSXJHQefjtQxpnLPehDJ4TRlg== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.0" + "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-duplicate-keys@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.5.0.tgz#c5dbf5106bf84cdf691222c0974c12b1df931853" - integrity sha512-igcziksHizyQPlX9gfSjHkE2wmoCH3evvD2qR5w29/Dk0SMKE/eOI7f1HhBdNhR/zxJDqrgpoDTq5YSLH/XMsQ== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.7.4.tgz#3d21731a42e3f598a73835299dd0169c3b90ac91" + integrity sha512-g1y4/G6xGWMD85Tlft5XedGaZBCIVN+/P0bs6eabmcPP9egFleMAo65OOjlhcz1njpwagyY3t0nsQC9oTFegJA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-exponentiation-operator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" - integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.7.4.tgz#dd30c0191e3a1ba19bcc7e389bdfddc0729d5db9" + integrity sha512-MCqiLfCKm6KEA1dglf6Uqq1ElDIZwFuzz1WH5mTf8k2uQSxEJMbOIEh7IZv7uichr7PMfi5YVSrr1vz+ipp7AQ== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.4.4.tgz#d267a081f49a8705fc9146de0768c6b58dccd8f7" - integrity sha512-WyVedfeEIILYEaWGAUWzVNyqG4sfsNooMhXWsu/YzOvVGcsnPb5PguysjJqI3t3qiaYj0BR8T2f5njdjTGe44Q== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.7.4.tgz#cc73f85944782df1d77d80977bc097920a8bf31a" + integrity sha512-w9dRNlHY5ElNimyMYy0oQowvQpwt/PRHI0QS98ZJCTZU2bvSnKXo5zEiD5u76FBPigTm8TkqzmnUTg16T7qbkA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.2.0" + "@babel/plugin-syntax-flow" "^7.7.4" "@babel/plugin-transform-for-of@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" - integrity sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.7.4.tgz#248800e3a5e507b1f103d8b4ca998e77c63932bc" + integrity sha512-zZ1fD1B8keYtEcKF+M1TROfeHTKnijcVQm0yO/Yu1f7qoDoxEIc/+GX6Go430Bg84eM/xwPFp0+h4EbZg7epAA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.0.tgz#0fa786f1eef52e3b7d4fc02e54b2129de8a04c2a" - integrity sha512-P5HKu0d9+CzZxP5jcrWdpe7ZlFDe24bmqP6a6X8BHEBl/eizAsY8K6LX8LASZL0Jxdjm5eEfzp+FIrxCm/p8bA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.4.tgz#75a6d3303d50db638ff8b5385d12451c865025b1" + integrity sha512-E/x09TvjHNhsULs2IusN+aJNRV5zKwxu1cpirZyRPw+FyyIKEHPXTsadj48bVpc1R5Qq1B5ZkzumuFLytnbT6g== dependencies: - "@babel/helper-function-name" "^7.7.0" + "@babel/helper-function-name" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" - integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.7.4.tgz#27fe87d2b5017a2a5a34d1c41a6b9f6a6262643e" + integrity sha512-X2MSV7LfJFm4aZfxd0yLVFrEXAgPqYoDG53Br/tCKiKYfX0MjVjQeWPIhPHHsCqzwQANq+FLN786fF5rgLS+gw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-member-expression-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" - integrity sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.7.4.tgz#aee127f2f3339fc34ce5e3055d7ffbf7aa26f19a" + integrity sha512-9VMwMO7i69LHTesL0RdGy93JU6a+qOPuvB4F4d0kR0zyVjJRVJRaoaGjhtki6SzQUu8yen/vxPKN6CWnCUw6bA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-amd@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.5.0.tgz#ef00435d46da0a5961aa728a1d2ecff063e4fb91" - integrity sha512-n20UsQMKnWrltocZZm24cRURxQnWIvsABPJlw/fvoy9c6AgHZzoelAIzajDHAQrDpuKFFPPcFGd7ChsYuIUMpg== + version "7.7.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.7.5.tgz#39e0fb717224b59475b306402bb8eedab01e729c" + integrity sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ== dependencies: - "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-module-transforms" "^7.7.5" "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@7.7.0", "@babel/plugin-transform-modules-commonjs@^7.7.0": +"@babel/plugin-transform-modules-commonjs@7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.0.tgz#3e5ffb4fd8c947feede69cbe24c9554ab4113fe3" integrity sha512-KEMyWNNWnjOom8vR/1+d+Ocz/mILZG/eyHHO06OuBQ2aNhxT62fr4y6fGOplRx+CxCSp3IFwesL8WdINfY/3kg== @@ -751,104 +599,114 @@ "@babel/helper-simple-access" "^7.7.0" babel-plugin-dynamic-import-node "^2.3.0" +"@babel/plugin-transform-modules-commonjs@^7.7.0": + version "7.7.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.5.tgz#1d27f5eb0bcf7543e774950e5b2fa782e637b345" + integrity sha512-9Cq4zTFExwFhQI6MT1aFxgqhIsMWQWDVwOgLzl7PTWJHsNaqFvklAU+Oz6AQLAS0dJKTwZSOCo20INwktxpi3Q== + dependencies: + "@babel/helper-module-transforms" "^7.7.5" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.7.4" + babel-plugin-dynamic-import-node "^2.3.0" + "@babel/plugin-transform-modules-systemjs@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.0.tgz#9baf471213af9761c1617bb12fd278e629041417" - integrity sha512-ZAuFgYjJzDNv77AjXRqzQGlQl4HdUM6j296ee4fwKVZfhDR9LAGxfvXjBkb06gNETPnN0sLqRm9Gxg4wZH6dXg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.4.tgz#cd98152339d3e763dfe838b7d4273edaf520bb30" + integrity sha512-y2c96hmcsUi6LrMqvmNDPBBiGCiQu0aYqpHatVVu6kD4mFEXKjyNxd/drc18XXAf9dv7UXjrZwBVmTTGaGP8iw== dependencies: - "@babel/helper-hoist-variables" "^7.7.0" + "@babel/helper-hoist-variables" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" babel-plugin-dynamic-import-node "^2.3.0" "@babel/plugin-transform-modules-umd@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.0.tgz#d62c7da16670908e1d8c68ca0b5d4c0097b69966" - integrity sha512-u7eBA03zmUswQ9LQ7Qw0/ieC1pcAkbp5OQatbWUzY1PaBccvuJXUkYzoN1g7cqp7dbTu6Dp9bXyalBvD04AANA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.4.tgz#1027c355a118de0aae9fee00ad7813c584d9061f" + integrity sha512-u2B8TIi0qZI4j8q4C51ktfO7E3cQ0qnaXFI1/OXITordD40tt17g/sXqgNNCcMTcBFKrUPcGDx+TBJuZxLx7tw== dependencies: - "@babel/helper-module-transforms" "^7.7.0" + "@babel/helper-module-transforms" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-named-capturing-groups-regex@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.0.tgz#358e6fd869b9a4d8f5cbc79e4ed4fc340e60dcaf" - integrity sha512-+SicSJoKouPctL+j1pqktRVCgy+xAch1hWWTMy13j0IflnyNjaoskj+DwRQFimHbLqO3sq2oN2CXMvXq3Bgapg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.4.tgz#fb3bcc4ee4198e7385805007373d6b6f42c98220" + integrity sha512-jBUkiqLKvUWpv9GLSuHUFYdmHg0ujC1JEYoZUfeOOfNydZXp1sXObgyPatpcwjWgsdBGsagWW0cdJpX/DO2jMw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.0" + "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/plugin-transform-new-target@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" - integrity sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.7.4.tgz#4a0753d2d60639437be07b592a9e58ee00720167" + integrity sha512-CnPRiNtOG1vRodnsyGX37bHQleHE14B9dnnlgSeEs3ek3fHN1A1SScglTCg1sfbe7sRQ2BUcpgpTpWSfMKz3gg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-object-super@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz#c70021df834073c65eb613b8679cc4a381d1a9f9" - integrity sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.7.4.tgz#48488937a2d586c0148451bf51af9d7dda567262" + integrity sha512-ho+dAEhC2aRnff2JCA0SAK7V2R62zJd/7dmtoe7MHcso4C2mS+vZjn1Pb1pCVZvJs1mgsvv5+7sT+m3Bysb6eg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-replace-supers" "^7.7.4" "@babel/plugin-transform-parameters@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" - integrity sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw== + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.7.7.tgz#7a884b2460164dc5f194f668332736584c760007" + integrity sha512-OhGSrf9ZBrr1fw84oFXj5hgi8Nmg+E2w5L7NhnG0lPvpDtqd7dbyilM2/vR8CKbJ907RyxPh2kj6sBCSSfI9Ew== dependencies: - "@babel/helper-call-delegate" "^7.4.4" - "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-call-delegate" "^7.7.4" + "@babel/helper-get-function-arity" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-property-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" - integrity sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.7.4.tgz#2388d6505ef89b266103f450f9167e6bd73f98c2" + integrity sha512-MatJhlC4iHsIskWYyawl53KuHrt+kALSADLQQ/HkhTjX954fkxIEh4q5slL4oRAnsm/eDoZ4q0CIZpcqBuxhJQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-display-name@^7.0.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz#ebfaed87834ce8dc4279609a4f0c324c156e3eb0" - integrity sha512-Htf/tPa5haZvRMiNSQSFifK12gtr/8vwfr+A9y69uF0QcU77AVu4K7MiHEkTxF7lQoHOL0F9ErqgfNEAKgXj7A== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.7.4.tgz#9f2b80b14ebc97eef4a9b29b612c58ed9c0d10dd" + integrity sha512-sBbIvqYkthai0X0vkD2xsAwluBp+LtNHH+/V4a5ydifmTtb8KOVOlrMIk/MYmIc4uTYDnjZUHQildYNo36SRJw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-jsx-self@^7.0.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.2.0.tgz#461e21ad9478f1031dd5e276108d027f1b5240ba" - integrity sha512-v6S5L/myicZEy+jr6ielB0OR8h+EH/1QFx/YJ7c7Ua+7lqsjj/vW6fD5FR9hB/6y7mGbfT4vAURn3xqBxsUcdg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.7.4.tgz#81b8fbfd14b2215e8f1c2c3adfba266127b0231c" + integrity sha512-PWYjSfqrO273mc1pKCRTIJXyqfc9vWYBax88yIhQb+bpw3XChVC7VWS4VwRVs63wFHKxizvGSd00XEr+YB9Q2A== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.2.0" + "@babel/plugin-syntax-jsx" "^7.7.4" "@babel/plugin-transform-react-jsx-source@^7.0.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.2.0.tgz#20c8c60f0140f5dd3cd63418d452801cf3f7180f" - integrity sha512-A32OkKTp4i5U6aE88GwwcuV4HAprUgHcTq0sSafLxjr6AW0QahrCRCjxogkbbcdtpbXkuTOlgpjophCxb6sh5g== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.7.4.tgz#8994b1bf6014b133f5a46d3b7d1ee5f5e3e72c10" + integrity sha512-5ZU9FnPhqtHsOXxutRtXZAzoEJwDaP32QcobbMP1/qt7NYcsCNK8XgzJcJfoEr/ZnzVvUNInNjIW22Z6I8p9mg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.2.0" + "@babel/plugin-syntax-jsx" "^7.7.4" "@babel/plugin-transform-react-jsx@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.0.tgz#834b0723ba78cd4d24d7d629300c2270f516d0b7" - integrity sha512-mXhBtyVB1Ujfy+0L6934jeJcSXj/VCg6whZzEcgiiZHNS0PGC7vUCsZDQCxxztkpIdF+dY1fUMcjAgEOC3ZOMQ== + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.7.tgz#5cbaa7445b4a09f774029f3cc7bb448ff3122a5d" + integrity sha512-SlPjWPbva2+7/ZJbGcoqjl4LsQaLpKEzxW9hcxU7675s24JmdotJOSJ4cgAbV82W3FcZpHIGmRZIlUL8ayMvjw== dependencies: - "@babel/helper-builder-react-jsx" "^7.7.0" + "@babel/helper-builder-react-jsx" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.2.0" + "@babel/plugin-syntax-jsx" "^7.7.4" "@babel/plugin-transform-regenerator@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.0.tgz#f1b20b535e7716b622c99e989259d7dd942dd9cc" - integrity sha512-AXmvnC+0wuj/cFkkS/HFHIojxH3ffSXE+ttulrqWjZZRaUOonfJc60e1wSNT4rV8tIunvu/R3wCp71/tLAa9xg== + version "7.7.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.5.tgz#3a8757ee1a2780f390e89f246065ecf59c26fce9" + integrity sha512-/8I8tPvX2FkuEyWbjRCt4qTAgZK0DVy8QRguhA524UH48RfGJy94On2ri+dCuwOpcerPRl9O4ebQkRcVzIaGBw== dependencies: regenerator-transform "^0.14.0" "@babel/plugin-transform-reserved-words@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" - integrity sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.7.4.tgz#6a7cf123ad175bb5c69aec8f6f0770387ed3f1eb" + integrity sha512-OrPiUB5s5XvkCO1lS7D8ZtHcswIC57j62acAnJZKqGGnHP+TIc/ljQSrgdX/QyOTdEK5COAhuc820Hi1q2UgLQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -863,65 +721,57 @@ semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" - integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.7.4.tgz#74a0a9b2f6d67a684c6fbfd5f0458eb7ba99891e" + integrity sha512-q+suddWRfIcnyG5YiDP58sT65AJDZSUhXQDZE3r04AuqD6d/XLaQPPXSBzP2zGerkgBivqtQm9XKGLuHqBID6Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.6.2": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.6.2.tgz#fc77cf798b24b10c46e1b51b1b88c2bf661bb8dd" - integrity sha512-DpSvPFryKdK1x+EDJYCy28nmAaIMdxmhot62jAXF/o99iA33Zj2Lmcp3vDmz+MUh0LNYVPvfj5iC3feb3/+PFg== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.7.4.tgz#aa673b356fe6b7e70d69b6e33a17fef641008578" + integrity sha512-8OSs0FLe5/80cndziPlg4R0K6HcWSM0zyNhHhLsmw/Nc5MaA49cAsnoJ/t/YZf8qkG7fD+UjTRaApVDB526d7Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-sticky-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" - integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.7.4.tgz#ffb68c05090c30732076b1285dc1401b404a123c" + integrity sha512-Ls2NASyL6qtVe1H1hXts9yuEeONV2TJZmplLONkMPUG158CtmnrzW5Q5teibM5UVOFjG0D3IC5mzXR6pPpUY7A== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" "@babel/plugin-transform-template-literals@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" - integrity sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.7.4.tgz#1eb6411736dd3fe87dbd20cc6668e5121c17d604" + integrity sha512-sA+KxLwF3QwGj5abMHkHgshp9+rRz+oY9uoRil4CyLtgEuE/88dpkeWgNk5qKVsJE9iSfly3nvHapdRiIS2wnQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-annotate-as-pure" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-typeof-symbol@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" - integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-typescript@^7.3.2": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.5.tgz#ab3351ba35307b79981993536c93ff8be050ba28" - integrity sha512-RPB/YeGr4ZrFKNwfuQRlMf2lxoCUaU01MTw39/OFE/RiL8HDjtn68BwEPft1P7JN4akyEmjGWAMNldOV7o9V2g== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.7.4.tgz#3174626214f2d6de322882e498a38e8371b2140e" + integrity sha512-KQPUQ/7mqe2m0B8VecdyaW5XcQYaePyl9R7IsKd+irzj6jvbhoGnRE+M0aNkyAzI07VfUQ9266L5xMARitV3wg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.2.0" -"@babel/plugin-transform-typescript@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.7.2.tgz#eb9f14c516b5d36f4d6f3a9d7badae6d0fc313d4" - integrity sha512-UWhDaJRqdPUtdK1s0sKYdoRuqK0NepjZto2UZltvuCgMoMZmdjhgz5hcRokie/3aYEaSz3xvusyoayVaq4PjRg== +"@babel/plugin-transform-typescript@^7.7.2", "@babel/plugin-transform-typescript@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.7.4.tgz#2974fd05f4e85c695acaf497f432342de9fc0636" + integrity sha512-X8e3tcPEKnwwPVG+vP/vSqEShkwODOEeyQGod82qrIuidwIrfnsGn11qPM1jBLF4MqguTXXYzm58d0dY+/wdpg== dependencies: - "@babel/helper-create-class-features-plugin" "^7.7.0" + "@babel/helper-create-class-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.2.0" + "@babel/plugin-syntax-typescript" "^7.7.4" "@babel/plugin-transform-unicode-regex@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.0.tgz#743d9bcc44080e3cc7d49259a066efa30f9187a3" - integrity sha512-RrThb0gdrNwFAqEAAx9OWgtx6ICK69x7i9tCnMdVrxQwSDp/Abu9DXFU5Hh16VP33Rmxh04+NGW28NsIkFvFKA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.4.tgz#a3c0f65b117c4c81c5b6484f2a5e7b95346b83ae" + integrity sha512-N77UUIV+WCvE+5yHw+oks3m18/umd7y392Zv7mYTpFqHtkpcc+QUz+gLJNTWVlWROIWeLqY0f3OjZxV5TcXnRw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.0" + "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/preset-env@7.7.1": @@ -1020,12 +870,12 @@ "@babel/plugin-transform-typescript" "^7.7.2" "@babel/preset-typescript@^7.0.0": - version "7.3.3" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.3.3.tgz#88669911053fa16b2b276ea2ede2ca603b3f307a" - integrity sha512-mzMVuIP4lqtn4du2ynEfdO0+RYcslwrZiJHXu4MGaC1ctJiW2fyaeDrtjJGs7R/KebZ1sgowcIoWf4uRpEfKEg== + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.7.7.tgz#69ddea54e8b4e491ccbf94147e673b2ac6e11e2e" + integrity sha512-Apg0sCTovsSA+pEaI8efnA44b9x4X/7z4P8vsWMiN8rSUaM4y4+Shl5NMWnMl6njvt96+CEb6jwpXAKYAVCSQA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.3.2" + "@babel/plugin-transform-typescript" "^7.7.4" "@babel/runtime-corejs2@7.7.2": version "7.7.2" @@ -1042,91 +892,34 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" - integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.4.4" - "@babel/types" "^7.4.4" - -"@babel/template@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" - integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/types" "^7.7.0" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.2.tgz#ef0a65e07a2f3c550967366b3d9b62a2dcbeae09" - integrity sha512-TM01cXib2+rgIZrGJOLaHV/iZUAxf4A0dt5auY6KNZ+cm6aschuJGqKJM3ROTt3raPUdIDk9siAufIFEleRwtw== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.2" - "@babel/helper-function-name" "^7.7.0" - "@babel/helper-split-export-declaration" "^7.7.0" - "@babel/parser" "^7.7.2" - "@babel/types" "^7.7.2" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.4.5": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.5.tgz#4e92d1728fd2f1897dafdd321efbff92156c3216" - integrity sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A== +"@babel/template@^7.4.0", "@babel/template@^7.7.0", "@babel/template@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" + integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.4.4" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.4.5" - "@babel/types" "^7.4.4" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.11" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" -"@babel/traverse@^7.5.5": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" - integrity sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.2", "@babel/traverse@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" + integrity sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw== dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.6.3" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.6.3" - "@babel/types" "^7.6.3" + "@babel/generator" "^7.7.4" + "@babel/helper-function-name" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0" - integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ== - dependencies: - esutils "^2.0.2" - lodash "^4.17.11" - to-fast-properties "^2.0.0" - -"@babel/types@^7.5.5", "@babel/types@^7.6.3": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" - integrity sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.7.0", "@babel/types@^7.7.1", "@babel/types@^7.7.2": - version "7.7.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7" - integrity sha512-YTf6PXoh3+eZgRCBzzP25Bugd2ngmpQVrk7kXX0i5N9BO7TFBtIgZYs7WtxtOGs8e6A4ZI7ECkbBCEHeXocvOA== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.1", "@babel/types@^7.7.2", "@babel/types@^7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" + integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== dependencies: esutils "^2.0.2" lodash "^4.17.13" @@ -1317,23 +1110,14 @@ purgecss "^1.4.0" "@grpc/proto-loader@^0.5.0": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.1.tgz#48492b53cdda353110b51a4b02f465974729c76f" - integrity sha512-3y0FhacYAwWvyXshH18eDkUI40wT/uGio7MAegzY8lO5+wVsc19+1A7T0pPptae4kl7bdITL+0cHpnAPmryBjQ== + version "0.5.3" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.3.tgz#a233070720bf7560c4d70e29e7950c72549a132c" + integrity sha512-8qvUtGg77G2ZT2HqdqYoM/OY97gQd/0crSG34xNmZ4ZOsv3aQT/FQV9QfZPazTGna6MIoyUd+u6AxsoZjJ/VMQ== dependencies: lodash.camelcase "^4.3.0" protobufjs "^6.8.6" -"@jest/console@^24.7.1": - version "24.7.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545" - integrity sha512-iNhtIy2M8bXlAOULWVTUxmnelTLFneTNEkHCgPmgd+zNwy9zVddJ6oS5rZ9iwoscNdT5mMwUd0C51v/fSlzItg== - dependencies: - "@jest/source-map" "^24.3.0" - chalk "^2.0.1" - slash "^2.0.0" - -"@jest/console@^24.9.0": +"@jest/console@^24.7.1", "@jest/console@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== @@ -1422,16 +1206,7 @@ source-map "^0.6.0" string-length "^2.0.0" -"@jest/source-map@^24.3.0": - version "24.3.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.3.0.tgz#563be3aa4d224caf65ff77edc95cd1ca4da67f28" - integrity sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.1.15" - source-map "^0.6.0" - -"@jest/source-map@^24.9.0": +"@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": version "24.9.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== @@ -2222,15 +1997,14 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@octokit/endpoint@^5.1.0": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.1.2.tgz#45fd879e33a25ee10fa4cffc4d098ee04135afe6" - integrity sha512-bBGGmcRFq1x0jrB29G/9KjYmO3cdHfk3476B2JOHRvLsNw1Pn3l+ZvbiqtcO9qAS4Ti+zFedLB84ziHZRZclQA== +"@octokit/endpoint@^5.5.0": + version "5.5.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.1.tgz#2eea81e110ca754ff2de11c79154ccab4ae16b3f" + integrity sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg== dependencies: - deepmerge "3.2.0" + "@octokit/types" "^2.0.0" is-plain-object "^3.0.0" - universal-user-agent "^2.1.0" - url-template "^2.0.8" + universal-user-agent "^4.0.0" "@octokit/plugin-enterprise-rest@^2.1.1": version "2.2.2" @@ -2238,25 +2012,27 @@ integrity sha512-CTZr64jZYhGWNTDGlSJ2mvIlFsm9OEO3LqWn9I/gmoHI4jRBp4kpHoFYNemG4oA75zUAcmbuWblb7jjP877YZw== "@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.0.2.tgz#e6dbc5be13be1041ef8eca9225520982add574cf" - integrity sha512-T9swMS/Vc4QlfWrvyeSyp/GjhXtYaBzCcibjGywV4k4D2qVrQKfEMPy8OxMDEj7zkIIdpHwqdpVbKCvnUPqkXw== + version "1.2.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.0.tgz#a64d2a9d7a13555570cd79722de4a4d76371baaa" + integrity sha512-DNBhROBYjjV/I9n7A8kVkmQNkqFAMem90dSxqvPq57e2hBr7mNTX98y3R2zDpqMQHVRpBDjsvsfIGgBzy+4PAg== dependencies: + "@octokit/types" "^2.0.0" deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^4.0.1": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-4.1.0.tgz#e85dc377113baf2fe24433af8feb20e8a32e21b0" - integrity sha512-RvpQAba4i+BNH0z8i0gPRc1ShlHidj4puQjI/Tno6s+Q3/Mzb0XRSHJiOhpeFrZ22V7Mwjq1E7QS27P5CgpWYA== +"@octokit/request@^5.2.0": + version "5.3.1" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.1.tgz#3a1ace45e6f88b1be4749c5da963b3a3b4a2f120" + integrity sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg== dependencies: - "@octokit/endpoint" "^5.1.0" + "@octokit/endpoint" "^5.5.0" "@octokit/request-error" "^1.0.1" + "@octokit/types" "^2.0.0" deprecation "^2.0.0" is-plain-object "^3.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^2.1.0" + universal-user-agent "^4.0.0" "@octokit/rest@15.2.6": version "15.2.6" @@ -2273,14 +2049,14 @@ url-template "^2.0.8" "@octokit/rest@^16.16.0": - version "16.26.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.26.0.tgz#5c12b28763219045e1c9a15182e8dfaed10004e8" - integrity sha512-NBpzre44ZAQWZhlH+zUYTgqI0pHN+c9rNj4d+pCydGEiKTGc1HKmoTghEUyr9GxazDyoAvmpx9nL0I7QS1Olvg== + version "16.36.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.36.0.tgz#99892c57ba632c2a7b21845584004387b56c2cb7" + integrity sha512-zoZj7Ya4vWBK4fjTwK2Cnmu7XBB1p9ygSvTk2TthN6DVJXM4hQZQoAiknWFLJWSTix4dnA3vuHtjPZbExYoCZA== dependencies: - "@octokit/request" "^4.0.1" + "@octokit/request" "^5.2.0" "@octokit/request-error" "^1.0.2" atob-lite "^2.0.0" - before-after-hook "^1.4.0" + before-after-hook "^2.0.0" btoa-lite "^1.0.0" deprecation "^2.0.0" lodash.get "^4.4.2" @@ -2288,8 +2064,14 @@ lodash.uniq "^4.5.0" octokit-pagination-methods "^1.1.0" once "^1.4.0" - universal-user-agent "^2.0.0" - url-template "^2.0.8" + universal-user-agent "^4.0.0" + +"@octokit/types@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.0.2.tgz#0888497f5a664e28b0449731d5e88e19b2a74f90" + integrity sha512-StASIL2lgT3TRjxv17z9pAqbnI7HGu9DrJlg3sEBFfCLaMEqp+O3IQPUF6EZtQ4xkAu2ml6kMBBCtGxjvmtmuQ== + dependencies: + "@types/node" ">= 8" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -2469,7 +2251,7 @@ resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.7.tgz#667eb1640e8039436028055737d2b9986ee336e3" integrity sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ== -"@types/babel__core@7.1.3": +"@types/babel__core@7.1.3", "@types/babel__core@^7.1.0": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" integrity sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA== @@ -2480,21 +2262,10 @@ "@types/babel__template" "*" "@types/babel__traverse" "*" -"@types/babel__core@^7.1.0": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.2.tgz#608c74f55928033fce18b99b213c16be4b3d114f" - integrity sha512-cfCCrFmiGY/yq0NuKNxIQvZFy9kY/1immpSpTngOnyIbD4+eJOG5mxphhHDv3CHL9GltO4GcKr54kGBg3RNdbg== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - "@types/babel__generator@*": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.2.tgz#d2112a6b21fad600d7674274293c85dce0cb47fc" - integrity sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ== + version "7.6.1" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" + integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== dependencies: "@babel/types" "^7.0.0" @@ -2513,14 +2284,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.6.tgz#328dd1a8fc4cfe3c8458be9477b219ea158fd7b2" - integrity sha512-XYVgHF2sQ0YblLRMLNPB3CkFMewzFmlDsH/TneZFHUXDlABQgh88uOxuez7ZcXxayLFrqLwtDH1t+FmlFwNZxw== - dependencies: - "@babel/types" "^7.3.0" - -"@types/babel__traverse@7.0.8": +"@types/babel__traverse@*", "@types/babel__traverse@7.0.8", "@types/babel__traverse@^7.0.6": version "7.0.8" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.8.tgz#479a4ee3e291a403a1096106013ec22cf9b64012" integrity sha512-yGeB2dHEdvxjP0y4UbRtQaSkXJ9649fYCmIdRoul5kfAoGCwxuCbMhag0k3RPfnuh9kPGm8x89btcfDEXdVWGw== @@ -2528,9 +2292,9 @@ "@babel/types" "^7.3.0" "@types/body-parser@*": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.0.tgz#9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c" - integrity sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w== + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.1.tgz#18fcf61768fb5c30ccc508c21d6fd2e8b3bf7897" + integrity sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w== dependencies: "@types/connect" "*" "@types/node" "*" @@ -2548,9 +2312,9 @@ "@types/express" "*" "@types/connect@*": - version "3.4.32" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.32.tgz#aa0e9616b9435ccad02bc52b5b454ffc2c70ba28" - integrity sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg== + version "3.4.33" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546" + integrity sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A== dependencies: "@types/node" "*" @@ -2589,17 +2353,17 @@ integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== "@types/express-serve-static-core@*": - version "4.16.7" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.16.7.tgz#50ba6f8a691c08a3dd9fa7fba25ef3133d298049" - integrity sha512-847KvL8Q1y3TtFLRTXcVakErLJQgdpFSaq+k043xefz9raEf0C7HalpSY7OW5PyjCnY8P7bPW5t/Co9qqp+USg== + version "4.17.1" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.1.tgz#82be64a77211b205641e0209096fd3afb62481d3" + integrity sha512-9e7jj549ZI+RxY21Cl0t8uBnWyb22HzILupyHZjYEVK//5TT/1bZodU+yUbLnPdoYViBBnNWbxp4zYjGV0zUGw== dependencies: "@types/node" "*" "@types/range-parser" "*" "@types/express@*": - version "4.17.0" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.0.tgz#49eaedb209582a86f12ed9b725160f12d04ef287" - integrity sha512-CjaMu57cjgjuZbh9DpkloeGxV45CnMGlVd+XpG7Gm9QgVrd7KFq+X4HY0vM+2v0bczS48Wg7bvnMY5TN+Xmcfw== + version "4.17.2" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.2.tgz#a0fb7a23d8855bac31bc01d5a58cadd9b2173e6c" + integrity sha512-5mHFNyavtLoJmnusB8OKJ5bshSzw+qkMIBAobLrIM48HJvunFva9mOa6aBwh64lBFyNwBbs0xiEFuj4eU/NjCA== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "*" @@ -2654,9 +2418,11 @@ "@types/istanbul-lib-report" "*" "@types/jest-diff@*": - version "20.0.1" - resolved "https://registry.yarnpkg.com/@types/jest-diff/-/jest-diff-20.0.1.tgz#35cc15b9c4f30a18ef21852e255fdb02f6d59b89" - integrity sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA== + version "24.3.0" + resolved "https://registry.yarnpkg.com/@types/jest-diff/-/jest-diff-24.3.0.tgz#29e237a3d954babfe6e23cc59b57ecd8ca8d858d" + integrity sha512-vx1CRDeDUwQ0Pc7v+hS61O1ETA81kD04IMEC0hS1kPyVtHDdZrokAvpF7MT9VI/fVSzicelUZNCepDvhRV1PeA== + dependencies: + jest-diff "*" "@types/jest@24.0.13": version "24.0.13" @@ -2666,9 +2432,9 @@ "@types/jest-diff" "*" "@types/json-schema@^7.0.3": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" - integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" + integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== "@types/json5@0.0.30": version "0.0.30" @@ -2757,20 +2523,20 @@ dependencies: "@types/node" "*" -"@types/node@*": - version "12.0.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.2.tgz#3452a24edf9fea138b48fad4a0a028a683da1e40" - integrity sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA== +"@types/node@*", "@types/node@>= 8": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e" + integrity sha512-Lue/mlp2egZJoHXZr4LndxDAd7i/7SQYhV0EjWfb/a4/OZ6tuVwMCVPiwkU5nsEipxEf7hmkSU7Em5VQ8P5NGA== "@types/node@^10.1.0": - version "10.14.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.14.tgz#a47955df2acf76ba7f0ac3b205d325da193dc9ad" - integrity sha512-xXD08vZsvpv4xptQXj1+ky22f7ZoKu5ZNI/4l+/BXG3X+XaeZsmaFbbTKuhSE3NjjvRuZFxFf9sQBMXIcZNFMQ== + version "10.17.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" + integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== "@types/node@^12.6.8": - version "12.6.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" - integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== + version "12.12.24" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.24.tgz#d4606afd8cf6c609036b854360367d1b2c78931f" + integrity sha512-1Ciqv9pqwVtW6FsIUKSZNB82E5Cu1I2bBTj1xuIHXLe/1zYLl3956Nbhg2MzSYHVfl9/rmanjbQIb7LibfCnug== "@types/prompts@2.0.1": version "2.0.1" @@ -2778,9 +2544,9 @@ integrity sha512-AhtMcmETelF8wFDV1ucbChKhLgsc+ytXZXkNz/nnTAMSDeqsjALknEFxi7ZtLgS/G8bV2rp90LhDW5SGACimIQ== "@types/prop-types@*": - version "15.7.1" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6" - integrity sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg== + version "15.7.3" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" + integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== "@types/q@^1.5.1": version "1.5.2" @@ -2792,10 +2558,10 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@16.9.3": - version "16.9.3" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.3.tgz#4006ff0e13958af91313869077c04cb20d9b9d04" - integrity sha512-FUuZKXPr9qlzUT9lhuzrZgLjH63TvNn28Ch3MvKG4B+F52zQtO8DtE0Opbncy3xaucNZM2WIPfuNTgkbKx5Brg== +"@types/react-dom@16.9.4": + version "16.9.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.4.tgz#0b58df09a60961dcb77f62d4f1832427513420df" + integrity sha512-fya9xteU/n90tda0s+FtN5Ym4tbgxpq/hb/Af24dvs6uYnYn+fspaxw5USlw0R8apDNwxsqumdRoCoKitckQqw== dependencies: "@types/react" "*" @@ -2806,10 +2572,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@16.8.18": - version "16.8.18" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.18.tgz#fe66fb748b0b6ca9709d38b87b2d1356d960a511" - integrity sha512-lUXdKzRqWR4FebR5tGHkLCqnvQJS4fdXKCBrNGGbglqZg2gpU+J82pMONevQODUotATs9fc9k66bx3/St8vReg== +"@types/react@*", "@types/react@16.9.17": + version "16.9.17" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.17.tgz#58f0cc0e9ec2425d1441dd7b623421a867aa253e" + integrity sha512-UP27In4fp4sWF5JgyV6pwVPAQM83Fj76JOcg02X5BZcpSu5Wx+fP9RMqc2v0ssBoQIFvD5JdKY41gjJJKmw6Bg== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -2830,9 +2596,9 @@ "@types/node" "*" "@types/serve-static@*": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.2.tgz#f5ac4d7a6420a99a6a45af4719f4dcd8cd907a48" - integrity sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q== + version "1.13.3" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" + integrity sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g== dependencies: "@types/express-serve-static-core" "*" "@types/mime" "*" @@ -2878,9 +2644,9 @@ integrity sha512-dchbFCWfVgUSWEvhOkXGS7zjm+K7jCUvGrQkAHPk2Fmslfofp4HQTH2pqnQ3Pw5GPYv0zWa2AQjKtsfZThuemQ== "@types/tough-cookie@*": - version "2.3.5" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d" - integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg== + version "2.3.6" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.6.tgz#c880579e087d7a0db13777ff8af689f4ffc7b0d5" + integrity sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ== "@types/uglify-js@*": version "3.0.4" @@ -2929,7 +2695,7 @@ "@types/connect" "*" "@types/webpack" "*" -"@types/webpack-sources@0.1.5": +"@types/webpack-sources@*", "@types/webpack-sources@0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.5.tgz#be47c10f783d3d6efe1471ff7f042611bd464a92" integrity sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w== @@ -2939,14 +2705,15 @@ source-map "^0.6.1" "@types/webpack@*": - version "4.4.32" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.32.tgz#2d460cd33a15e568e93f38de5e628cf846396c51" - integrity sha512-mNARoaSJTzbiHxtZbf9NULFilu2frqD+g9Iyl9V2jPYJWXi+AC3Hz8lQWPZ5LLtgUm7iF4SDDMB/1bPrbRQgFw== + version "4.41.1" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.1.tgz#571f0e137ce698710dd2637f7d222811eb83e274" + integrity sha512-n9fP8UrMxOi1wiM3oM+vMZHMJJ7WoQohqd63C20cmKOFkNEy9Q8hyZyDR6PWdvSYt3V3A7cwDq/kWxHlRYYZEg== dependencies: "@types/anymatch" "*" "@types/node" "*" "@types/tapable" "*" "@types/uglify-js" "*" + "@types/webpack-sources" "*" source-map "^0.6.0" "@types/yargs-parser@*": @@ -2955,9 +2722,9 @@ integrity sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg== "@types/yargs@^13.0.0": - version "13.0.3" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.3.tgz#76482af3981d4412d65371a318f992d33464a380" - integrity sha512-K8/LfZq2duW33XW/tFwEAfnZlqIfVsoyRB3kfXdPXYhl0nfM8mmh7GS0jg7WrX2Dgq/0Ha/pR1PaR+BvmWwjiQ== + version "13.0.4" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.4.tgz#53d231cebe1a540e7e13727fc1f0d13ad4a9ba3b" + integrity sha512-Ke1WmBbIkVM8bpvsNEcGgQM70XcEh/nbpxQhW7FhrsbCsXSY9BmLB1+LHtD7r9zrsOcFlLiF+a/UeJsdfw3C5A== dependencies: "@types/yargs-parser" "*" @@ -3165,9 +2932,9 @@ integrity sha512-F+SbvEAh8rchiRXqQbmD1UmbePY7dCOKTbvfFtbVbK2xMH/tyri5YKfNxXKK7eL9EWkkbqB3NTVQO6nokApeBA== "@zeit/ncc@^0.20.4": - version "0.20.4" - resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.20.4.tgz#00f0a25a88cac3712af4ba66561d9e281c6f05c9" - integrity sha512-fmq+F/QxPec+k/zvT7HiVpk7oiGFseS6brfT/AYqmCUp6QFRK7vZf2Ref46MImsg/g2W3g5X6SRvGRmOAvEfdA== + version "0.20.5" + resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.20.5.tgz#a41af6e6bcab4a58f4612bae6137f70bce0192e3" + integrity sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw== "@zeit/next-css@1.0.2-canary.2": version "1.0.2-canary.2" @@ -3206,9 +2973,9 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: through ">=2.2.7 <3" abab@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" - integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== + version "2.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" + integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== abbrev@1: version "1.1.1" @@ -3231,9 +2998,9 @@ accepts@~1.3.5, accepts@~1.3.7: negotiator "0.6.2" acorn-globals@^4.1.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.2.tgz#4e2c2313a597fd589720395f6354b41cd5ec8006" - integrity sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ== + version "4.3.4" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" + integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== dependencies: acorn "^6.0.1" acorn-walk "^6.0.1" @@ -3244,24 +3011,19 @@ acorn-jsx@^5.1.0: integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== acorn-walk@^6.0.1, acorn-walk@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== + version "6.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" + integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== acorn@^5.5.3: version "5.7.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.0.7: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" - integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== - -acorn@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" - integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== +acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.1: + version "6.4.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" + integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw== acorn@^7.1.0: version "7.1.0" @@ -3273,20 +3035,20 @@ after-all-results@^2.0.0: resolved "https://registry.yarnpkg.com/after-all-results/-/after-all-results-2.0.0.tgz#6ac2fc202b500f88da8f4f5530cfa100f4c6a2d0" integrity sha1-asL8ICtQD4jaj09VMM+hAPTGotA= -agent-base@4, agent-base@^4.1.0, agent-base@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@^4.3.0: +agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== dependencies: es6-promisify "^5.0.0" +agent-base@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + agentkeepalive@^3.4.1: version "3.5.2" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" @@ -3307,12 +3069,7 @@ ajv-errors@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== -ajv-keywords@^3.1.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.0.tgz#4b831e7b531415a7cc518cd404e73f6193c6349d" - integrity sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw== - -ajv-keywords@^3.4.1: +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== @@ -3327,17 +3084,7 @@ ajv@^5.1.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.1.0, ajv@^6.5.5: - version "6.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" - integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.10.0, ajv@^6.10.2: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -3377,11 +3124,11 @@ ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-escapes@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.2.1.tgz#4dccdb846c3eee10f6d64dea66273eab90c37228" - integrity sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d" + integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg== dependencies: - type-fest "^0.5.2" + type-fest "^0.8.1" ansi-html@0.0.7: version "0.0.7" @@ -3403,6 +3150,11 @@ ansi-regex@^4.0.0, ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -3516,11 +3268,6 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -3537,22 +3284,13 @@ array-ify@^1.0.0: integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= array-includes@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" - integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0= + version "3.1.1" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" - -array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" array-union@^1.0.1, array-union@^1.0.2: version "1.0.2" @@ -3649,9 +3387,9 @@ async-foreach@^0.1.3: integrity sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI= async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== async-retry@1.2.1: version "1.2.1" @@ -3677,14 +3415,7 @@ async-sema@3.0.1: resolved "https://registry.yarnpkg.com/async-sema/-/async-sema-3.0.1.tgz#404225197ea43e3be91ac7d711fb7088f2469c79" integrity sha512-fKT2riE8EHAvJEfLJXZiATQWqZttjx1+tfgnVshCDrH8vlw4YC8aECe0B8MU184g+aVRFVgmfxFlKZKaozSrNw== -async@^2.1.5: - version "2.6.2" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" - integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== - dependencies: - lodash "^4.17.11" - -async@^2.6.2: +async@^2.1.5, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== @@ -3701,7 +3432,7 @@ atob-lite@^2.0.0: resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= -atob@^2.1.1: +atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== @@ -3722,41 +3453,28 @@ autodll-webpack-plugin@0.4.2: webpack-merge "^4.1.0" webpack-sources "^1.0.1" -autoprefixer@^9.4.5: - version "9.7.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.2.tgz#26cf729fbb709323b40171a874304884dcceffed" - integrity sha512-LCAfcdej1182uVvPOZnytbq61AhnOZ/4JelDaJGDeNwewyU1AMaNthcHsyz1NRjTmd2FkurMckLWfkHg3Z//KA== +autoprefixer@^9.4.5, autoprefixer@^9.6.1: + version "9.7.3" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.3.tgz#fd42ed03f53de9beb4ca0d61fb4f7268a9bb50b4" + integrity sha512-8T5Y1C5Iyj6PgkPSFd0ODvK9DIleuPKUPYniNxybS47g2k2wFgLZ46lGQHlBuGKIAEV8fbCDfKCCRS1tvOgc3Q== dependencies: - browserslist "^4.7.3" - caniuse-lite "^1.0.30001010" + browserslist "^4.8.0" + caniuse-lite "^1.0.30001012" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" postcss "^7.0.23" postcss-value-parser "^4.0.2" -autoprefixer@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw== - dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" - chalk "^2.4.2" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.6.0, aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + version "1.9.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" + integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A== babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" @@ -3815,10 +3533,11 @@ babel-plugin-dynamic-import-node@2.3.0, babel-plugin-dynamic-import-node@^2.3.0: object.assign "^4.1.0" babel-plugin-istanbul@^5.1.0: - version "5.1.4" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.4.tgz#841d16b9a58eeb407a0ddce622ba02fe87a752ba" - integrity sha512-dySz4VJMH+dpndj0wjJ8JPs/7i1TdSPb1nRrn56/92pKOF9VKC1FMFJmMXjzlGGusnCAqujP6PBCiKq0sVA+YQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" + integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== dependencies: + "@babel/helper-plugin-utils" "^7.0.0" find-up "^3.0.0" istanbul-lib-instrument "^3.3.0" test-exclude "^5.2.3" @@ -3885,9 +3604,9 @@ balanced-match@^1.0.0: integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base64-js@^1.0.2, base64-js@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== base@^0.11.1: version "0.11.2" @@ -3909,20 +3628,25 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -before-after-hook@^1.1.0, before-after-hook@^1.4.0: +before-after-hook@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.4.0.tgz#2b6bf23dca4f32e628fd2747c10a37c74a4b484d" integrity sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg== +before-after-hook@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" + integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== + bfj@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.1.tgz#05a3b7784fbd72cfa3c22e56002ef99336516c48" - integrity sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ== + version "6.1.2" + resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f" + integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw== dependencies: - bluebird "^3.5.1" - check-types "^7.3.0" - hoopy "^0.1.2" - tryer "^1.0.0" + bluebird "^3.5.5" + check-types "^8.0.3" + hoopy "^0.1.4" + tryer "^1.0.1" big.js@^5.2.2: version "5.2.2" @@ -3939,6 +3663,13 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.0.tgz#e1a574cdf528e4053019bb800b041c0ac88da493" @@ -3954,15 +3685,10 @@ block-stream@*: dependencies: inherits "~2.0.0" -bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3: - version "3.5.4" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714" - integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw== - -bluebird@^3.5.5: - version "3.5.5" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" - integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== +bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" @@ -4120,14 +3846,14 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.6.4, browserslist@^4.7.1, browserslist@^4.7.3: - version "4.8.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.2.tgz#b45720ad5fbc8713b7253c20766f701c9a694289" - integrity sha512-+M4oeaTplPm/f1pXDw84YohEv7B1i/2Aisei8s4s6k3QsoSHa7i5sz8u/cGQkkatCPxMASKxPualR4wwYgVboA== +browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" + integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg== dependencies: - caniuse-lite "^1.0.30001015" + caniuse-lite "^1.0.30001017" electron-to-chromium "^1.3.322" - node-releases "^1.1.42" + node-releases "^1.1.44" browserstack-local@1.4.0: version "1.4.0" @@ -4140,10 +3866,10 @@ browserstack-local@1.4.0: sinon "^1.17.6" temp-fs "^0.9.9" -bser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" - integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== dependencies: node-int64 "^0.4.0" @@ -4173,9 +3899,9 @@ buffer-xor@^1.0.3: integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -4218,30 +3944,30 @@ bytes@3.1.0, bytes@^3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^11.0.1, cacache@^11.3.2: - version "11.3.2" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa" - integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg== +cacache@^11.3.3: + version "11.3.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.3.tgz#8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc" + integrity sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA== dependencies: - bluebird "^3.5.3" + bluebird "^3.5.5" chownr "^1.1.1" figgy-pudding "^3.5.1" - glob "^7.1.3" + glob "^7.1.4" graceful-fs "^4.1.15" lru-cache "^5.1.1" mississippi "^3.0.0" mkdirp "^0.5.1" move-concurrently "^1.0.1" promise-inflight "^1.0.1" - rimraf "^2.6.2" + rimraf "^2.6.3" ssri "^6.0.1" unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^12.0.2: - version "12.0.2" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" - integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== +cacache@^12.0.0, cacache@^12.0.2: + version "12.0.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" + integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== dependencies: bluebird "^3.5.5" chownr "^1.1.1" @@ -4393,10 +4119,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001002, caniuse-lite@^1.0.30001010, caniuse-lite@^1.0.30001015: - version "1.0.30001017" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001017.tgz#d3ad6ec18148b9bd991829958d9d7e562bb78cd6" - integrity sha512-EDnZyOJ6eYh6lHmCvCdHAFbfV4KJ9lSdfv4h/ppEhrU/Yudkl7jujwMZ1we6RX7DXqBfT04pVMQ4J+1wcTlsKA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019: + version "1.0.30001019" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz#857e3fccaad2b2feb3f1f6d8a8f62d747ea648e1" + integrity sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g== capitalize@1.0.0: version "1.0.0" @@ -4502,10 +4228,10 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-types@^7.3.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/check-types/-/check-types-7.4.0.tgz#0378ec1b9616ec71f774931a3c6516fad8c152f4" - integrity sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg== +check-types@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552" + integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ== cheerio@0.22.0: version "0.22.0" @@ -4555,9 +4281,9 @@ chokidar@^1.7.0: fsevents "^1.0.0" chokidar@^2.0.2: - version "2.1.6" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" - integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== dependencies: anymatch "^2.0.0" async-each "^1.0.1" @@ -4574,9 +4300,9 @@ chokidar@^2.0.2: fsevents "^1.2.7" chokidar@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + version "3.3.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" + integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -4584,14 +4310,14 @@ chokidar@^3.3.0: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.2.0" + readdirp "~3.3.0" optionalDependencies: - fsevents "~2.1.1" + fsevents "~2.1.2" -chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== +chownr@^1.1.1, chownr@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" + integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== chrome-trace-event@^1.0.2: version "1.0.2" @@ -4730,9 +4456,9 @@ clor@^5.1.0: integrity sha512-Z+jjxoF4lNUJQtsdz7d9HLz7yP49hnt4CH76AB7DLusHws14gOlVMl/ShtkMPfoFculqejaiQW5EG2Gt5/cCdg== cmd-shim@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" - integrity sha1-b8vamUg6j9FdfTChlspp1oii79s= + version "2.1.0" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.1.0.tgz#e59a08d4248dda3bb502044083a4db4ac890579a" + integrity sha512-A5C0Cyf2H8sKsHqX0tvIWRXw5/PK++3Dc0lDbsugr90nOECLLuSPahVQBG8pgmgiXgm/TzBWMqI2rWdZwHduAw== dependencies: graceful-fs "^4.1.2" mkdirp "~0.5.0" @@ -4795,9 +4521,9 @@ color-string@^1.5.2: simple-swizzle "^0.2.2" color@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.1.tgz#7abf5c0d38e89378284e873c207ae2172dcc8a61" - integrity sha512-PvUltIXRjehRKPSy89VnDWFKY58xyhTLyxIg21vwQBI6qLwZNPmC8k3C1uytIgFKEpOIzN4y32iPm8231zFHIg== + version "3.1.2" + resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" + integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== dependencies: color-convert "^1.9.1" color-string "^1.5.2" @@ -4827,7 +4553,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2.20.0, commander@^2.18.0, commander@^2.20.0, commander@^2.9.0, commander@~2.20.0: +commander@2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -4839,7 +4565,7 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.19.0: +commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.9.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -4863,11 +4589,11 @@ component-emitter@^1.2.0, component-emitter@^1.2.1: integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== compressible@~2.0.16: - version "2.0.17" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.17.tgz#6e8c108a16ad58384a977f3a482ca20bff2f38c1" - integrity sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw== + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: - mime-db ">= 1.40.0 < 2" + mime-db ">= 1.43.0 < 2" compression@1.7.4: version "1.7.4" @@ -4941,11 +4667,9 @@ configstore@3.1.2: xdg-basedir "^3.0.0" console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= - dependencies: - date-now "^0.1.4" + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" @@ -4978,25 +4702,25 @@ content-type@1.0.4, content-type@~1.0.4: integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== conventional-changelog-angular@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.3.tgz#299fdd43df5a1f095283ac16aeedfb0a682ecab0" - integrity sha512-YD1xzH7r9yXQte/HF9JBuEDfvjxxwDGGwZU1+ndanbY0oFgA+Po1T9JDSpPLdP0pZT6MhCAsdvFKC4TJ4MTJTA== + version "5.0.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz#269540c624553aded809c29a3508fdc2b544c059" + integrity sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA== dependencies: compare-func "^1.3.1" q "^1.5.1" conventional-changelog-core@^3.1.6: - version "3.2.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.2.tgz#de41e6b4a71011a18bcee58e744f6f8f0e7c29c0" - integrity sha512-cssjAKajxaOX5LNAJLB+UOcoWjAIBvXtDMedv/58G+YEmAXMNfC16mmPl0JDOuVJVfIqM0nqQiZ8UCm8IXbE0g== + version "3.2.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb" + integrity sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ== dependencies: - conventional-changelog-writer "^4.0.5" - conventional-commits-parser "^3.0.2" + conventional-changelog-writer "^4.0.6" + conventional-commits-parser "^3.0.3" dateformat "^3.0.0" get-pkg-repo "^1.0.0" git-raw-commits "2.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^2.0.2" + git-semver-tags "^2.0.3" lodash "^4.2.1" normalize-package-data "^2.3.5" q "^1.5.1" @@ -5005,22 +4729,22 @@ conventional-changelog-core@^3.1.6: through2 "^3.0.0" conventional-changelog-preset-loader@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.1.1.tgz#65bb600547c56d5627d23135154bcd9a907668c4" - integrity sha512-K4avzGMLm5Xw0Ek/6eE3vdOXkqnpf9ydb68XYmCc16cJ99XMMbc2oaNMuPwAsxVK6CC1yA4/I90EhmWNj0Q6HA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz#580fa8ab02cef22c24294d25e52d7ccd247a9a6a" + integrity sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ== -conventional-changelog-writer@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.6.tgz#24db578ac8e7c89a409ef9bba12cf3c095990148" - integrity sha512-ou/sbrplJMM6KQpR5rKFYNVQYesFjN7WpNGdudQSWNi6X+RgyFUcSv871YBYkrUYV9EX8ijMohYVzn9RUb+4ag== +conventional-changelog-writer@^4.0.6: + version "4.0.11" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4" + integrity sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw== dependencies: compare-func "^1.3.1" conventional-commits-filter "^2.0.2" dateformat "^3.0.0" - handlebars "^4.1.0" + handlebars "^4.4.0" json-stringify-safe "^5.0.1" - lodash "^4.2.1" - meow "^4.0.0" + lodash "^4.17.15" + meow "^5.0.0" semver "^6.0.0" split "^1.0.0" through2 "^3.0.0" @@ -5033,15 +4757,15 @@ conventional-commits-filter@^2.0.2: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.3.tgz#c3f972fd4e056aa8b9b4f5f3d0e540da18bf396d" - integrity sha512-KaA/2EeUkO4bKjinNfGUyqPTX/6w9JGshuQRik4r/wJz7rUw3+D3fDG6sZSEqJvKILzKXFQuFkpPLclcsAuZcg== +conventional-commits-parser@^3.0.2, conventional-commits-parser@^3.0.3: + version "3.0.8" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710" + integrity sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ== dependencies: JSONStream "^1.0.4" - is-text-path "^2.0.0" - lodash "^4.2.1" - meow "^4.0.0" + is-text-path "^1.0.1" + lodash "^4.17.15" + meow "^5.0.0" split2 "^2.0.0" through2 "^3.0.0" trim-off-newlines "^1.0.0" @@ -5060,20 +4784,13 @@ conventional-recommended-bump@^4.0.4: meow "^4.0.0" q "^1.5.1" -convert-source-map@1.7.0, convert-source-map@^1.7.0: +convert-source-map@1.7.0, convert-source-map@^1.4.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" -convert-source-map@^1.1.0, convert-source-map@^1.4.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== - dependencies: - safe-buffer "~5.1.1" - cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -5112,18 +4829,12 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-compat@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.1.2.tgz#c29ab9722517094b98622175e2218c3b7398176d" - integrity sha512-X0Ch5f6itrHxhg5HSJucX6nNLNAGr+jq+biBh6nPGc3YAWz2a8p/ZIZY8cUkDzSRNG54omAuu3hoEF8qZbu/6Q== + version "3.6.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.1.tgz#39638c935c83c93a793abb628b252ec43e85783a" + integrity sha512-2Tl1EuxZo94QS2VeH28Ebf5g3xbPZG/hj/N5HDDy4XMP/ImR0JIer/nggQRiMN91Q54JVkGbytf42wO29oXVHg== dependencies: - browserslist "^4.6.0" - core-js-pure "3.1.2" - semver "^6.0.0" - -core-js-pure@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.1.2.tgz#62fc435f35b7374b9b782013cdcb2f97e9f6dffa" - integrity sha512-5ckIdBF26B3ldK9PM177y2ZcATP2oweam9RskHSoqfZCrJ2As6wVg8zJ1zTriFsZf6clj/N1ThDFRGaomMsh9w== + browserslist "^4.8.2" + semver "7.0.0" core-js@3.1.4: version "3.1.4" @@ -5131,25 +4842,15 @@ core-js@3.1.4: integrity sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ== core-js@^2.4.0, core-js@^2.6.5: - version "2.6.8" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.8.tgz#dc3a1e633a04267944e0cb850d3880f340248139" - integrity sha512-RWlREFU74TEkdXzyl1bka66O3kYp8jeTXrvJZDzVVMH8AiHUSOFpL1yfhQJ+wHocAm1m+4971W1PPzfLuCv1vg== + version "2.6.11" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" - integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - require-from-string "^2.0.1" - cosmiconfig@^5.0.0, cosmiconfig@^5.1.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -5382,12 +5083,12 @@ css-select-base-adapter@^0.1.1: integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== css-select@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.0.2.tgz#ab4386cec9e1f668855564b17c3733b43b2a5ede" - integrity sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" + integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== dependencies: boolbase "^1.0.0" - css-what "^2.1.2" + css-what "^3.2.1" domutils "^1.7.0" nth-check "^1.0.2" @@ -5410,37 +5111,29 @@ css-selector-tokenizer@^0.7.0: fastparse "^1.1.1" regexpu-core "^1.0.0" -css-tree@1.0.0-alpha.28: - version "1.0.0-alpha.28" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.28.tgz#8e8968190d886c9477bc8d61e96f61af3f7ffa7f" - integrity sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w== - dependencies: - mdn-data "~1.1.0" - source-map "^0.5.3" - -css-tree@1.0.0-alpha.29: - version "1.0.0-alpha.29" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.29.tgz#3fa9d4ef3142cbd1c301e7664c1f352bd82f5a39" - integrity sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg== +css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" + integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== dependencies: - mdn-data "~1.1.0" - source-map "^0.5.3" + mdn-data "2.0.4" + source-map "^0.6.1" css-unit-converter@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.1.tgz#d9b9281adcfd8ced935bdbaba83786897f64e996" integrity sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY= -css-url-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/css-url-regex/-/css-url-regex-1.1.0.tgz#83834230cc9f74c457de59eebd1543feeb83b7ec" - integrity sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w= - -css-what@2.1, css-what@^2.1.2: +css-what@2.1: version "2.1.3" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== +css-what@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.2.1.tgz#f4a8f12421064621b456755e34a03a2c22df5da1" + integrity sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw== + css@2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" @@ -5508,9 +5201,9 @@ cssnano-preset-default@^4.0.7: postcss-unique-selectors "^4.0.1" cssnano-preset-simple@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.0.0.tgz#8d231a0e56e39d4246633fe25ac001ea608f0436" - integrity sha512-102bKOr+fpjBLPWHCB8/4MAtVFmaWd7J/O7UJ7UqU8vFtSMV72eoYXxDDiX/mxZRgZ77LhsmDbvrAtd1fmwimw== + version "1.0.2" + resolved "https://registry.yarnpkg.com/cssnano-preset-simple/-/cssnano-preset-simple-1.0.2.tgz#0af821593cec5edf010e5ff0753fd89eb52d40de" + integrity sha512-FhAjiyAJoQOfvOZVSaNYkmmg2KE/SmaJVBNqglvvZ4QgwtTMVOaggozmRwfyO2QfeyKstRCpeRglziWym0Q9/w== dependencies: postcss "^7.0.18" @@ -5544,7 +5237,7 @@ cssnano-util-same-parent@^4.0.0: resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== -cssnano@^4.1.0: +cssnano@^4.1.10: version "4.1.10" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== @@ -5554,29 +5247,29 @@ cssnano@^4.1.0: is-resolvable "^1.0.0" postcss "^7.0.0" -csso@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/csso/-/csso-3.5.1.tgz#7b9eb8be61628973c1b261e169d2f024008e758b" - integrity sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg== +csso@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-4.0.2.tgz#e5f81ab3a56b8eefb7f0092ce7279329f454de3d" + integrity sha512-kS7/oeNVXkHWxby5tHVxlhjizRCSv8QdU7hB2FpdAibDU8FjTAolhNjKNTiLzXtUrKT6HwClE81yXwEk1309wg== dependencies: - css-tree "1.0.0-alpha.29" + css-tree "1.0.0-alpha.37" cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.6" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.6.tgz#f85206cee04efa841f3c5982a74ba96ab20d65ad" - integrity sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A== + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== cssstyle@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.2.2.tgz#427ea4d585b18624f6fdbf9de7a2a1a3ba713077" - integrity sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow== + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" + integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== dependencies: cssom "0.3.x" csstype@^2.2.0: - version "2.6.4" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.4.tgz#d585a6062096e324e7187f80e04f92bd0f00e37f" - integrity sha512-lAJUJP3M6HxFXbqtGRc0iZrdyeN+WzOWeY0q/VnFzI+kqVrYIzC7bWlKqCW7oCIdzoPkvfp82EVvrTlQ8zsWQg== + version "2.6.8" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.8.tgz#0fb6fc2417ffd2816a418c9336da74d7f07db431" + integrity sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA== currently-unhandled@^0.4.1: version "0.4.1" @@ -5592,10 +5285,10 @@ cwd@^0.9.1: dependencies: find-pkg "^0.1.0" -cyclist@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" - integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= dargs@^4.0.1: version "4.1.0" @@ -5625,11 +5318,6 @@ date-fns@^1.27.2: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= - dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -5713,11 +5401,6 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" - integrity sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow== - defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -5726,9 +5409,9 @@ defaults@^1.0.3: clone "^1.0.2" defer-to-connect@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" - integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== + version "1.1.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.1.tgz#88ae694b93f67b81815a2c8c769aef6574ac8f2f" + integrity sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ== define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" @@ -5801,14 +5484,14 @@ depd@~1.1.2: integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= deprecation@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.0.0.tgz#dd0427cd920c78bc575ec39dab2f22e7c304fb9d" - integrity sha512-lbQN037mB3VfA2JFuguM5GCJ+zPinMeCrFe+AfSZ6eqrnJA/Fs+EYMnd6Nb2mn9lf2jO9xwEd9o9lic+D4vkcw== + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" @@ -5903,7 +5586,15 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serializer@0, dom-serializer@~0.1.0: +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== @@ -5926,6 +5617,11 @@ domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== +domelementtype@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" + integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5978,9 +5674,9 @@ dot-prop@^4.1.0, dot-prop@^4.1.1, dot-prop@^4.2.0: is-obj "^1.0.0" dot-prop@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.1.0.tgz#bdd8c986a77b83e3fca524e53786df916cabbd8a" - integrity sha512-n1oC6NBF+KM9oVXtjmen4Yo7HyAVWV2UUl50dCYJdw2924K6dX9bf9TTTWaKtYlRn0FEtxG27KS80ayVLixxJA== + version "5.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" + integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== dependencies: is-obj "^2.0.0" @@ -6018,14 +5714,14 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= ejs@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0" - integrity sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ== + version "2.7.4" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" + integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== electron-to-chromium@^1.3.322: - version "1.3.322" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz#a6f7e1c79025c2b05838e8e344f6e89eb83213a8" - integrity sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA== + version "1.3.327" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.327.tgz#516f28b4271727004362b4ac814494ae64d9dde7" + integrity sha512-DNMd91VtKt44LIkFtpICxAWu/GSGFLUMDM/kFINJ3Oe47OimSnbMvO3ChkUCdUyit+pRdhdCcM3+i5bpli5gqg== elegant-spinner@^1.0.1: version "1.0.1" @@ -6033,9 +5729,9 @@ elegant-spinner@^1.0.1: integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= elliptic@^6.0.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -6072,14 +5768,7 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== - dependencies: - once "^1.4.0" - -end-of-stream@^1.4.1: +end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -6087,12 +5776,12 @@ end-of-stream@^1.4.1: once "^1.4.0" enhanced-resolve@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" - integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== + version "4.1.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" + integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== dependencies: graceful-fs "^4.1.2" - memory-fs "^0.4.0" + memory-fs "^0.5.0" tapable "^1.0.0" entities@^1.1.1, entities@~1.1.1: @@ -6100,6 +5789,11 @@ entities@^1.1.1, entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== +entities@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" + integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + env-paths@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" @@ -6124,58 +5818,22 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.12.0, es-abstract@^1.5.1: - version "1.13.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" - integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== - dependencies: - es-to-primitive "^1.2.0" - function-bind "^1.1.1" - has "^1.0.3" - is-callable "^1.1.4" - is-regex "^1.0.4" - object-keys "^1.0.12" - -es-abstract@^1.15.0, es-abstract@^1.7.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.0.tgz#d3a26dc9c3283ac9750dca569586e976d9dcc06d" - integrity sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg== - dependencies: - es-to-primitive "^1.2.0" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.0" - is-callable "^1.1.4" - is-regex "^1.0.4" - object-inspect "^1.6.0" - object-keys "^1.1.1" - string.prototype.trimleft "^2.1.0" - string.prototype.trimright "^2.1.0" - -es-abstract@^1.4.3: - version "1.16.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.2.tgz#4e874331645e9925edef141e74fc4bd144669d34" - integrity sha512-jYo/J8XU2emLXl3OLwfwtuFfuF2w6DYPs+xy9ZfVyPkDcrauu6LYrw/q2TyCtrbc/KUdCiC5e9UajRhgNkVopA== +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1: + version "1.17.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" + integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" has "^1.0.3" has-symbols "^1.0.1" - is-callable "^1.1.4" - is-regex "^1.0.4" + is-callable "^1.1.5" + is-regex "^1.0.5" object-inspect "^1.7.0" object-keys "^1.1.1" - string.prototype.trimleft "^2.1.0" - string.prototype.trimright "^2.1.0" - -es-to-primitive@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" es-to-primitive@^1.2.1: version "1.2.1" @@ -6186,12 +5844,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es6-promise@^4.0.3: - version "4.2.6" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" - integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== - -es6-promise@^4.1.1: +es6-promise@^4.0.3, es6-promise@^4.1.1: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== @@ -6224,9 +5877,9 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escodegen@^1.9.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" - integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== + version "1.12.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.1.tgz#08770602a74ac34c7a90ca9229e7d51e379abc76" + integrity sha512-Q8t2YZ+0e0pc7NRVj3B4tSQ9rim1oi4Fh46k2xhJ2qOiEwhQfdjyEQddWdj7ZFaKmU+5104vn1qrcjEPWq+bgQ== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -6359,20 +6012,15 @@ esrecurse@^4.1.0: dependencies: estraverse "^4.1.0" -estraverse@^4.0.0: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= - esutils@^2.0.0, esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== etag@1.8.1, etag@~1.8.1: version "1.8.1" @@ -6416,9 +6064,9 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" exec-sh@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" - integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== + version "0.3.4" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" + integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== execa@2.0.3: version "2.0.3" @@ -6514,7 +6162,7 @@ expect@^24.9.0: jest-message-util "^24.9.0" jest-regex-util "^24.9.0" -express@4.17.0, express@^4.16.3: +express@4.17.0: version "4.17.0" resolved "https://registry.yarnpkg.com/express/-/express-4.17.0.tgz#288af62228a73f4c8ea2990ba3b791bb87cd4438" integrity sha512-1Z7/t3Z5ZnBG252gKUPyItc4xdeaA0X934ca2ewckAsVsw9EG71i++ZHZPYnus8g/s5Bty8IMpSVEuRkmwwPRQ== @@ -6550,6 +6198,42 @@ express@4.17.0, express@^4.16.3: utils-merge "1.0.1" vary "~1.1.2" +express@^4.16.3: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -6580,9 +6264,9 @@ external-editor@^2.1.0: tmp "^0.0.33" external-editor@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" - integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" @@ -6658,9 +6342,9 @@ fast-glob@^2.0.2, fast-glob@^2.2.6: micromatch "^3.1.10" fast-glob@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.0.tgz#77375a7e3e6f6fc9b18f061cddd28b8d1eec75ae" - integrity sha512-TrUz3THiq2Vy3bjfQUB2wNyPdGBeGmdjbzzBLhfHN4YFurYptCKwGq/TfiRavbGywFRzY6U2CdmQ1zmsY5yYaw== + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82" + integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -6669,11 +6353,11 @@ fast-glob@^3.0.3: micromatch "^4.0.2" fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.4, fast-levenshtein@~2.0.6: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -6711,11 +6395,11 @@ faye-websocket@0.11.3: websocket-driver ">=0.5.1" fb-watchman@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" - integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= + version "2.0.1" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" + integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== dependencies: - bser "^2.0.0" + bser "2.1.1" fd-slicer@~1.1.0: version "1.1.0" @@ -6771,6 +6455,11 @@ file-name@^0.1.0: resolved "https://registry.yarnpkg.com/file-name/-/file-name-0.1.0.tgz#12b122f120f9c34dbc176c1ab81a548aced6def7" integrity sha1-ErEi8SD5w028F2wauBpUis7W3vc= +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -6934,9 +6623,9 @@ flatted@^2.0.0: integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - integrity sha1-2uRqnXj74lKSJYzB54CkHZXAN4I= + version "1.0.3" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" + integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== flush-write-stream@^1.0.0: version "1.1.1" @@ -6995,9 +6684,9 @@ fork-ts-checker-webpack-plugin@3.1.1: worker-rpc "^0.1.0" form-data@^2.3.1, form-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.0.tgz#094ec359dc4b55e7d62e0db4acd76e89fe874d37" - integrity sha512-WXieX3G/8side6VIqx44ablyULoGruSde5PNTxoUyo5CeyAMX6nVWUd0rgist/EuX655cjhUhTo1Fo3tRYqbcA== + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: asynckit "^0.4.0" combined-stream "^1.0.6" @@ -7092,11 +6781,11 @@ fs-extra@^8.0.0: universalify "^0.1.0" fs-minipass@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.6.tgz#2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07" - integrity sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ== + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: - minipass "^2.2.1" + minipass "^2.6.0" fs-write-stream-atomic@^1.0.8: version "1.0.10" @@ -7114,14 +6803,14 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.0.0, fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + version "1.2.11" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.11.tgz#67bf57f4758f02ede88fb2a1712fef4d15358be3" + integrity sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== dependencies: + bindings "^1.5.0" nan "^2.12.1" - node-pre-gyp "^0.12.0" -fsevents@~2.1.1: +fsevents@~2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== @@ -7136,7 +6825,7 @@ fstream@^1.0.0, fstream@^1.0.12: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2, function-bind@^1.1.1: +function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== @@ -7183,9 +6872,9 @@ get-caller-file@^2.0.1: integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-own-enumerable-property-symbols@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" - integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg== + version "3.0.2" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== get-pkg-repo@^1.0.0: version "1.4.0" @@ -7292,13 +6981,13 @@ git-repo-name@0.6.0: lazy-cache "^1.0.4" remote-origin-url "^0.5.1" -git-semver-tags@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.2.tgz#f506ec07caade191ac0c8d5a21bdb8131b4934e3" - integrity sha512-34lMF7Yo1xEmsK2EkbArdoU79umpvm0MfzaDkSNYSJqtM5QLAVTPWgpiXSVI5o/O9EvZPSrP4Zvnec/CqhSd5w== +git-semver-tags@^2.0.2, git-semver-tags@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.3.tgz#48988a718acf593800f99622a952a77c405bfa34" + integrity sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA== dependencies: meow "^4.0.0" - semver "^5.5.0" + semver "^6.0.0" git-spawned-stream@1.0.0: version "1.0.0" @@ -7393,9 +7082,9 @@ glob-to-regexp@^0.4.1: integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@~7.1.1: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -7428,9 +7117,9 @@ globals@^11.1.0, globals@^11.7.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globby@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" - integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== dependencies: "@types/glob" "^7.1.1" array-union "^2.1.0" @@ -7480,9 +7169,9 @@ globby@^9.2.0: slash "^2.0.0" globule@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d" - integrity sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ== + version "1.3.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.0.tgz#41d0e9fb44afd4b80d93a23263714f90b3dec904" + integrity sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg== dependencies: glob "~7.1.1" lodash "~4.17.10" @@ -7525,17 +7214,7 @@ got@^7.0.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -graceful-fs@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b" - integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg== - -graceful-fs@^4.2.2: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: version "4.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== @@ -7574,10 +7253,10 @@ gzip-size@5.1.1, gzip-size@^5.0.0: duplexer "^0.1.1" pify "^4.0.1" -handlebars@^4.1.0, handlebars@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" - integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== +handlebars@^4.1.2, handlebars@^4.4.0: + version "4.5.3" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" + integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA== dependencies: neo-async "^2.6.0" optimist "^0.6.1" @@ -7628,12 +7307,7 @@ has-symbol-support-x@^1.4.1: resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has-symbols@^1.0.1: +has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== @@ -7681,7 +7355,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.0, has@^1.0.1, has@^1.0.3: +has@^1.0.0, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -7748,15 +7422,15 @@ homedir-polyfill@^1.0.0: dependencies: parse-passwd "^1.0.0" -hoopy@^0.1.2: +hoopy@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" + integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== hsl-regex@^1.0.0: version "1.0.0" @@ -7807,7 +7481,7 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5" integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== -http-errors@1.7.2, http-errors@~1.7.2: +http-errors@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== @@ -7818,6 +7492,17 @@ http-errors@1.7.2, http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + "http-parser-js@>=0.4.0 <0.4.11": version "0.4.10" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" @@ -7845,18 +7530,18 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" - integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== +https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== dependencies: - agent-base "^4.1.0" + agent-base "^4.3.0" debug "^3.1.0" https-proxy-agent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.0.tgz#0106efa5d63d6d6f3ab87c999fa4877a3fd1ff97" - integrity sha512-y4jAxNEihqvBI5F3SaO2rtsjIOnnNA8sEbuiP+UhJZJHeM2NRm6c09ax2tgqme+SgUUvjao2fJXF4h3D6Cb2HQ== + version "3.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" + integrity sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg== dependencies: agent-base "^4.3.0" debug "^3.1.0" @@ -7915,9 +7600,9 @@ ignore-loader@0.1.2: integrity sha1-2B8kA3bQuk8Nd4lyw60lh0EXpGM= ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== dependencies: minimatch "^3.0.4" @@ -7957,9 +7642,9 @@ import-fresh@^2.0.0: resolve-from "^3.0.0" import-fresh@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118" - integrity sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ== + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -8019,7 +7704,7 @@ indexes-of@^1.0.1: resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= -infer-owner@^1.0.3: +infer-owner@^1.0.3, infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== @@ -8032,16 +7717,21 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" @@ -8081,9 +7771,9 @@ inquirer@5.2.0: through "^2.3.6" inquirer@^6.2.0: - version "6.3.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" - integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== dependencies: ansi-escapes "^3.2.0" chalk "^2.4.2" @@ -8091,7 +7781,7 @@ inquirer@^6.2.0: cli-width "^2.0.0" external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.17.11" + lodash "^4.17.12" mute-stream "0.0.7" run-async "^2.2.0" rxjs "^6.4.0" @@ -8100,9 +7790,9 @@ inquirer@^6.2.0: through "^2.3.6" inquirer@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a" - integrity sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ== + version "7.0.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.2.tgz#b39b205b95c9424839a1fd991d60426cf9bbc0e9" + integrity sha512-cZGvHaHwcR9E3xK9EGO5pHKELU+yaeJO7l2qGKIbqk4bCuDuAn15LCoUTS2nSkfv9JybFlnAGrOcVpCDZZOLhw== dependencies: ansi-escapes "^4.2.1" chalk "^2.4.2" @@ -8113,7 +7803,7 @@ inquirer@^7.0.0: lodash "^4.17.15" mute-stream "0.0.8" run-async "^2.2.0" - rxjs "^6.4.0" + rxjs "^6.5.3" string-width "^4.1.0" strip-ansi "^5.1.0" through "^2.3.6" @@ -8140,7 +7830,7 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip@^1.1.5: +ip@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -8217,14 +7907,14 @@ is-buffer@^1.0.2, is-buffer@^1.1.5: integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-buffer@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" - integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== -is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== is-ci@^1.0.10: version "1.2.1" @@ -8267,9 +7957,9 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== is-decimal@^1.0.0: version "1.0.3" @@ -8514,12 +8204,12 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== dependencies: - has "^1.0.1" + has "^1.0.3" is-regexp@^1.0.0: version "1.0.0" @@ -8532,9 +8222,9 @@ is-resolvable@^1.0.0: integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== is-retry-allowed@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== is-running@^2.0.0: version "2.1.0" @@ -8558,6 +8248,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + is-svg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" @@ -8566,18 +8261,18 @@ is-svg@^3.0.0: html-comment-regex "^1.1.0" is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== dependencies: - has-symbols "^1.0.0" + has-symbols "^1.0.1" -is-text-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-2.0.0.tgz#b2484e2b720a633feb2e85b67dc193ff72c75636" - integrity sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw== +is-text-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= dependencies: - text-extensions "^2.0.0" + text-extensions "^1.0.0" is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" @@ -8783,7 +8478,7 @@ jest-config@^24.9.0: pretty-format "^24.9.0" realpath-native "^1.1.0" -jest-diff@^24.9.0: +jest-diff@*, jest-diff@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== @@ -8794,9 +8489,9 @@ jest-diff@^24.9.0: pretty-format "^24.9.0" jest-docblock@^24.3.0: - version "24.3.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.3.0.tgz#b9c32dac70f72e4464520d2ba4aec02ab14db5dd" - integrity sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg== + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.9.0.tgz#7970201802ba560e1c4092cc25cbedf5af5a8ce2" + integrity sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA== dependencies: detect-newline "^2.1.0" @@ -8924,12 +8619,7 @@ jest-pnp-resolver@^1.2.1: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-regex-util@^24.3.0: - version "24.3.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.3.0.tgz#d5a65f60be1ae3e310d5214a0307581995227b36" - integrity sha512-tXQR1NEOyGlfylyEjg1ImtScwMq8Oh3iJbGTjN7p0J23EuVX1MA8rwU69K4sLbCmwzgCUbVkm0FkSF9TdzOhtg== - -jest-regex-util@^24.9.0: +jest-regex-util@^24.3.0, jest-regex-util@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636" integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== @@ -9075,7 +8765,7 @@ jest-watcher@^24.9.0: jest-util "^24.9.0" string-length "^2.0.0" -jest-worker@24.9.0, jest-worker@^24.9.0: +jest-worker@24.9.0, jest-worker@^24.6.0, jest-worker@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== @@ -9083,14 +8773,6 @@ jest-worker@24.9.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" -jest-worker@^24.6.0: - version "24.6.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.6.0.tgz#7f81ceae34b7cde0c9827a6980c35b7cdc0161b3" - integrity sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ== - dependencies: - merge-stream "^1.0.1" - supports-color "^6.1.0" - js-base64@^2.1.8, js-base64@^2.1.9: version "2.5.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" @@ -9111,7 +8793,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.11.0, js-yaml@^3.13.1, js-yaml@^3.9.0: +js-yaml@^3.11.0, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -9187,9 +8869,9 @@ json-schema-traverse@^0.4.1: integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema-typed@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.1.tgz#5e56564b5a0950423e22b285a30ade219e38084d" - integrity sha512-IqUK+Cqc8/MqHsCvv1TMccbKdBzoATOLHXZAF5UDu70/CCxo648cHUig24hc+XTK53TyeNk1UeVTlc2Haovtsw== + version "7.0.3" + resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.3.tgz#23ff481b8b4eebcd2ca123b4fa0409e66469a2d9" + integrity sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A== json-schema@0.2.3: version "0.2.3" @@ -9206,7 +8888,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.1.1: +json5@2.1.1, json5@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== @@ -9220,13 +8902,6 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== - dependencies: - minimist "^1.2.0" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -9234,11 +8909,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -9310,7 +8980,7 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== -kleur@^3.0.2: +kleur@^3.0.2, kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== @@ -9407,19 +9077,19 @@ levn@^0.3.0, levn@~0.3.0: type-check "~0.3.2" libnpmaccess@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.1.tgz#5b3a9de621f293d425191aa2e779102f84167fa8" - integrity sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA== + version "3.0.2" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.2.tgz#8b2d72345ba3bef90d3b4f694edd5c0417f58923" + integrity sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ== dependencies: aproba "^2.0.0" get-stream "^4.0.0" npm-package-arg "^6.1.0" - npm-registry-fetch "^3.8.0" + npm-registry-fetch "^4.0.0" libnpmpublish@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.1.tgz#ff0c6bb0b4ad2bda2ad1f5fba6760a4af37125f0" - integrity sha512-nefbvJd/wY38zdt+b9SHL6171vqBrMtZ56Gsgfd0duEKb/pB8rDT4/ObUQLrHz1tOfht1flt2zM+UGaemzAG5g== + version "1.1.3" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.3.tgz#e3782796722d79eef1a0a22944c117e0c4ca4280" + integrity sha512-/3LsYqVc52cHXBmu26+J8Ed7sLs/hgGVFMH1mwYpL7Qaynb9RenpKqIKu0sJ130FB9PMkpMlWjlbtU8A4m7CQw== dependencies: aproba "^2.0.0" figgy-pudding "^3.5.1" @@ -9427,7 +9097,7 @@ libnpmpublish@^1.1.1: lodash.clonedeep "^4.5.0" normalize-package-data "^2.4.0" npm-package-arg "^6.1.0" - npm-registry-fetch "^3.8.0" + npm-registry-fetch "^4.0.0" semver "^5.5.1" ssri "^6.0.1" @@ -9575,7 +9245,7 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: +lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= @@ -9651,9 +9321,9 @@ lodash.memoize@^4.1.2: integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= lodash.merge@^4.4.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" - integrity sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ== + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.pick@^4.2.1: version "4.4.0" @@ -9690,15 +9360,7 @@ lodash.tail@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" integrity sha1-0jM6NtnncXyK0vfKyv7HwytERmQ= -lodash.template@^4.0.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" - integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= - dependencies: - lodash._reinterpolate "~3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.template@^4.5.0: +lodash.template@^4.0.2, lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -9707,11 +9369,11 @@ lodash.template@^4.5.0: lodash.templatesettings "^4.0.0" lodash.templatesettings@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" lodash.toarray@^4.4.0: version "4.4.0" @@ -9728,12 +9390,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.10: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.10: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -9774,9 +9431,9 @@ log-update@^2.3.0: wrap-ansi "^3.0.1" loglevel@^1.6.2: - version "1.6.4" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" - integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== + version "1.6.6" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312" + integrity sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ== lolex@1.3.2: version "1.3.2" @@ -9837,7 +9494,7 @@ lru-cache@5.1.1, lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^4.0.1, lru-cache@^4.1.2, lru-cache@^4.1.3: +lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -9851,9 +9508,9 @@ lru_map@^0.3.3: integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= macos-release@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.2.0.tgz#ab58d55dd4714f0a05ad4b0e90f4370fef5cdea8" - integrity sha512-iV2IDxZaX8dIcM7fG6cI46uNmHUxHE4yN+Z8tKHAW1TBPMZDIKHf/3L+YnOuj/FK9il14UaVdHmiQ1tsi90ltA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" + integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== make-dir@3.0.0, make-dir@^3.0.0: version "3.0.0" @@ -9877,17 +9534,34 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-fetch-happen@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" - integrity sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ== +make-fetch-happen@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.2.tgz#2d156b11696fb32bffbafe1ac1bc085dd6c78a79" + integrity sha512-YMJrAjHSb/BordlsDEcVcPyTbiJKkzqMf48N8dAJZT9Zjctrkb6Yg4TY9Sq2AwSIQJFn5qBBKVTYt3vP5FMIHA== dependencies: agentkeepalive "^3.4.1" - cacache "^11.0.1" + cacache "^11.3.3" http-cache-semantics "^3.8.1" http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.1" - lru-cache "^4.1.2" + lru-cache "^5.1.1" + mississippi "^3.0.0" + node-fetch-npm "^2.0.2" + promise-retry "^1.1.1" + socks-proxy-agent "^4.0.0" + ssri "^6.0.0" + +make-fetch-happen@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" + integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag== + dependencies: + agentkeepalive "^3.4.1" + cacache "^12.0.0" + http-cache-semantics "^3.8.1" + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.3" + lru-cache "^5.1.1" mississippi "^3.0.0" node-fetch-npm "^2.0.2" promise-retry "^1.1.1" @@ -9960,16 +9634,16 @@ md5.js@^1.3.4: safe-buffer "^5.1.2" mdast-squeeze-paragraphs@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-3.0.4.tgz#e27affcc8cc854842ff504ebb8f380e3c8e131f8" - integrity sha512-sUu55X5JWisBqfiq2pwQv4SnLb11EBua0NWjvcl6WORfV18MdWoyODE2tS4pyqjwXbFTaq3y3Ca/4OMNvx8B0Q== + version "3.0.5" + resolved "https://registry.yarnpkg.com/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-3.0.5.tgz#f428b6b944f8faef454db9b58f170c4183cb2e61" + integrity sha512-xX6Vbe348Y/rukQlG4W3xH+7v4ZlzUbSY4HUIQCuYrF2DrkcHx584mCaFxkWoDZKNUfyLZItHC9VAqX3kIP7XA== dependencies: unist-util-remove "^1.0.0" mdast-util-definitions@^1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-1.2.3.tgz#49f936b09207c45b438db19551652934312f04f0" - integrity sha512-P6wpRO8YVQ1iv30maMc93NLh7COvufglBE8/ldcOyYmk5EbfF0YeqlLgtqP/FOBU501Kqar1x5wYWwB3Nga74g== + version "1.2.5" + resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-1.2.5.tgz#3fe622a4171c774ebd06f11e9f8af7ec53ea5c74" + integrity sha512-CJXEdoLfiISCDc2JB6QLb79pYfI6+GcIH+W2ox9nMc7od0Pz+bovcHsiq29xAQY6ayqe/9CsK2VzkSJdg1pFYA== dependencies: unist-util-visit "^1.0.0" @@ -9990,10 +9664,10 @@ mdast-util-to-hast@^4.0.0: unist-util-visit "^1.1.0" xtend "^4.0.1" -mdn-data@~1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01" - integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA== +mdn-data@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" + integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== mdurl@^1.0.1: version "1.0.1" @@ -10014,7 +9688,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.0, memory-fs@^0.4.1: +memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -10022,6 +9696,14 @@ memory-fs@^0.4.0, memory-fs@^0.4.1: errno "^0.1.3" readable-stream "^2.0.1" +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -10058,29 +9740,32 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" +meow@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= -merge-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= - dependencies: - readable-stream "^2.0.1" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" - integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== - -merge2@^1.3.0: +merge2@^1.2.3, merge2@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== @@ -10149,17 +9834,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": - version "1.40.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" - integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== +mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.24" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" - integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== dependencies: - mime-db "1.40.0" + mime-db "1.43.0" mime@1.6.0, mime@^1.4.1: version "1.6.0" @@ -10167,9 +9852,9 @@ mime@1.6.0, mime@^1.4.1: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.4.2: - version "2.4.3" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.3.tgz#229687331e86f68924e6cb59e1cdd937f18275fe" - integrity sha512-QgrPRJfE+riq5TPZMcHZOtm8c6K/yYrMbKIoRfapfiGLxS8OTeIfRhUGW5LU7MlRa52KOAGCfUNruqLrIBvWZw== + version "2.4.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" + integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== mimic-fn@^1.0.0: version "1.2.0" @@ -10236,20 +9921,20 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.4, minipass@^2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.1, minizlib@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== dependencies: - minipass "^2.2.1" + minipass "^2.9.0" mississippi@^3.0.0: version "3.0.0" @@ -10268,9 +9953,9 @@ mississippi@^3.0.0: through2 "^2.0.0" mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" @@ -10332,11 +10017,16 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.1, ms@^2.0.0, ms@^2.1.1: +ms@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +ms@^2.0.0, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + multimatch@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" @@ -10562,22 +10252,6 @@ node-notifier@^5.4.2: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - node-pre-gyp@^0.13.0: version "0.13.0" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz#df9ab7b68dd6498137717838e4f92a33fc9daa42" @@ -10594,10 +10268,10 @@ node-pre-gyp@^0.13.0: semver "^5.3.0" tar "^4" -node-releases@^1.1.42: - version "1.1.42" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.42.tgz#a999f6a62f8746981f6da90627a8d2fc090bbad7" - integrity sha512-OQ/ESmUqGawI2PRX+XIRao44qWYBBfN54ImQYdWVTQqUckuejOg76ysSqDBK8NG3zwySRVnX36JwDQ6x+9GxzA== +node-releases@^1.1.44: + version "1.1.44" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.44.tgz#cd66438a6eb875e3eb012b6a12e48d9f4326ffd7" + integrity sha512-NwbdvJyR7nrcGrXvKAvzc5raj/NkoJudkarh2yIpJ4t0NH4aqjUDz/486P+ynIW5eokKOfzGNRdYoLfBlomruw== dependencies: semver "^6.3.0" @@ -10692,9 +10366,9 @@ normalize-url@^3.0.0, normalize-url@^3.3.0: integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== normalize-url@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.3.0.tgz#9c49e10fc1876aeb76dba88bf1b2b5d9fa57b2ee" - integrity sha512-0NLtR71o4k6GLP+mr6Ty34c5GA6CMoEsncKJxvQd8NzPxaHRJNnb5gZE8R1XF4CPIS7QPHLJ74IFszwtNVAHVQ== + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== normalize.css@^8.0.1: version "8.0.1" @@ -10702,9 +10376,11 @@ normalize.css@^8.0.1: integrity sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg== npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" npm-lifecycle@^2.1.1: version "2.1.1" @@ -10720,44 +10396,62 @@ npm-lifecycle@^2.1.1: umask "^1.1.0" which "^1.3.1" +npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" - integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" + integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== dependencies: - hosted-git-info "^2.6.0" + hosted-git-info "^2.7.1" osenv "^0.1.5" - semver "^5.5.0" + semver "^5.6.0" validate-npm-package-name "^3.0.0" npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" - integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== + version "1.4.7" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" + integrity sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" - integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA== +npm-pick-manifest@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" + integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== dependencies: figgy-pudding "^3.5.1" npm-package-arg "^6.0.0" semver "^5.4.1" -npm-registry-fetch@^3.8.0, npm-registry-fetch@^3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.9.0.tgz#44d841780e2833f06accb34488f8c7450d1a6856" - integrity sha512-srwmt8YhNajAoSAaDWndmZgx89lJwIZ1GWxOuckH4Coek4uHv5S+o/l9FLQe/awA+JwTnj4FJHldxhlXdZEBmw== +npm-registry-fetch@^3.9.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.9.1.tgz#00ff6e4e35d3f75a172b332440b53e93f4cb67de" + integrity sha512-VQCEZlydXw4AwLROAXWUR7QDfe2Y8Id/vpAgp6TI1/H78a4SiQ1kQrKZALm5/zxM5n4HIi+aYb+idUAV/RuY0Q== + dependencies: + JSONStream "^1.3.4" + bluebird "^3.5.1" + figgy-pudding "^3.4.1" + lru-cache "^5.1.1" + make-fetch-happen "^4.0.2" + npm-package-arg "^6.1.0" + +npm-registry-fetch@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" + integrity sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A== dependencies: JSONStream "^1.3.4" bluebird "^3.5.1" figgy-pudding "^3.4.1" - lru-cache "^4.1.3" - make-fetch-happen "^4.0.1" + lru-cache "^5.1.1" + make-fetch-happen "^5.0.0" npm-package-arg "^6.1.0" + safe-buffer "^5.2.0" npm-run-all@4.1.5: version "4.1.5" @@ -10821,9 +10515,9 @@ number-is-nan@^1.0.0: integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwsapi@^2.0.7: - version "2.1.4" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.4.tgz#e006a878db23636f8e8a67d33ca0e4edf61a842f" - integrity sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" + integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== oauth-sign@~0.8.2: version "0.8.2" @@ -10849,20 +10543,15 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" - integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== - object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== object-is@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6" - integrity sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY= + version "1.0.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" + integrity sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ== object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" @@ -10892,32 +10581,32 @@ object.assign@^4.1.0: object-keys "^1.0.11" object.entries@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" - integrity sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" + integrity sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ== dependencies: define-properties "^1.1.3" - es-abstract "^1.12.0" + es-abstract "^1.17.0-next.1" function-bind "^1.1.1" has "^1.0.3" object.fromentries@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.1.tgz#050f077855c7af8ae6649f45c80b16ee2d31e704" - integrity sha512-PUQv8Hbg3j2QX0IQYv3iAGCbGcu4yY4KQ92/dhA4sFSixBmSmp13UpDLs6jGK8rBtbmhNNIK99LD2k293jpiGA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" + integrity sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ== dependencies: define-properties "^1.1.3" - es-abstract "^1.15.0" + es-abstract "^1.17.0-next.1" function-bind "^1.1.1" has "^1.0.3" object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" object.omit@^2.0.0: version "2.0.1" @@ -10935,12 +10624,12 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9" - integrity sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== dependencies: define-properties "^1.1.3" - es-abstract "^1.12.0" + es-abstract "^1.17.0-next.1" function-bind "^1.1.1" has "^1.0.3" @@ -11003,26 +10692,14 @@ optimist@^0.6.1: wordwrap "~0.0.2" optimize-css-assets-webpack-plugin@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.1.tgz#9eb500711d35165b45e7fd60ba2df40cb3eb9159" - integrity sha512-Rqm6sSjWtx9FchdP0uzTQDc7GXDKnwVEGoSxjezPkzMewx7gEWE9IMUYKmigTRC4U3RaNSwYVnUDLuIdtTpm0A== + version "5.0.3" + resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz#e2f1d4d94ad8c0af8967ebd7cf138dcb1ef14572" + integrity sha512-q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA== dependencies: - cssnano "^4.1.0" + cssnano "^4.1.10" last-call-webpack-plugin "^3.0.0" -optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -optionator@^0.8.2: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -11089,7 +10766,7 @@ os-locale@^3.0.0: lcid "^2.0.0" mem "^4.0.0" -os-name@^3.0.0: +os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== @@ -11160,9 +10837,9 @@ p-limit@^1.1.0: p-try "^1.0.0" p-limit@^2.0.0, p-limit@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" - integrity sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ== + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== dependencies: p-try "^2.0.0" @@ -11253,26 +10930,29 @@ p-waterfall@^1.0.0: p-reduce "^1.0.0" pacote@^9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.0.tgz#85f3013a3f6dd51c108b0ccabd3de8102ddfaeda" - integrity sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg== + version "9.5.11" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.11.tgz#524152077cb392c47b1fbe198aa28f778bef7ee1" + integrity sha512-DMDPvFKCjCg6zMS4IfzZyvT57O/bX8XGG00eEoy4K/S4Wj+qiN8KbnmKpsTvfS6OL9r5TAicxMKWbj1yV2Yh4g== dependencies: bluebird "^3.5.3" - cacache "^11.3.2" + cacache "^12.0.2" + chownr "^1.1.2" figgy-pudding "^3.5.1" get-stream "^4.1.0" glob "^7.1.3" + infer-owner "^1.0.4" lru-cache "^5.1.1" - make-fetch-happen "^4.0.1" + make-fetch-happen "^5.0.0" minimatch "^3.0.4" minipass "^2.3.5" mississippi "^3.0.0" mkdirp "^0.5.1" normalize-package-data "^2.4.0" + npm-normalize-package-bin "^1.0.0" npm-package-arg "^6.1.0" npm-packlist "^1.1.12" - npm-pick-manifest "^2.2.3" - npm-registry-fetch "^3.8.0" + npm-pick-manifest "^3.0.0" + npm-registry-fetch "^4.0.0" osenv "^0.1.5" promise-inflight "^1.0.1" promise-retry "^1.1.1" @@ -11281,7 +10961,7 @@ pacote@^9.5.0: safe-buffer "^5.1.2" semver "^5.6.0" ssri "^6.0.1" - tar "^4.4.8" + tar "^4.4.10" unique-filename "^1.1.1" which "^1.3.1" @@ -11291,11 +10971,11 @@ pako@~1.0.2, pako@~1.0.5: integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== parallel-transform@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" - integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY= + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== dependencies: - cyclist "~0.2.2" + cyclist "^1.0.1" inherits "^2.0.3" readable-stream "^2.1.5" @@ -11314,9 +10994,9 @@ parent-module@^1.0.0: callsites "^3.0.0" parse-asn1@^5.0.0: - version "5.1.4" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" - integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== + version "5.1.5" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -11417,11 +11097,16 @@ parse5@4.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== -parse5@5.1.0, parse5@^5.1.0: +parse5@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== +parse5@^5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -11490,9 +11175,9 @@ path-key@^2.0.0, path-key@^2.0.1: integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-key@^3.0.0, path-key@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3" - integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg== + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: version "1.0.6" @@ -11565,15 +11250,10 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5" - integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA== - -picomatch@^2.0.5: - version "2.0.7" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6" - integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA== +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7: + version "2.2.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" + integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== pidtree@^0.3.0: version "0.3.0" @@ -11883,9 +11563,9 @@ postcss-image-set-function@^3.0.1: postcss-values-parser "^2.0.0" postcss-initial@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-3.0.1.tgz#99d319669a13d6c06ef8e70d852f68cb1b399b61" - integrity sha512-I2Sz83ZSHybMNh02xQDK609lZ1/QOyYeuizCjzEhlMgeV/HcDJapQiH4yTqLjZss0X6/6VvKFXUeObaHpJoINw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-3.0.2.tgz#f018563694b3c16ae8eaabe3c585ac6319637b2d" + integrity sha512-ugA2wKonC0xeNHgirR4D3VWHs2JcU08WAi1KFLVcnb7IN89phID6Qtg2RIctWbnvp1TM2BOmDtX8GGLCKdR8YA== dependencies: lodash.template "^4.5.0" postcss "^7.0.2" @@ -11908,11 +11588,11 @@ postcss-lab-function@^2.0.1: postcss-values-parser "^2.0.0" postcss-load-config@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.0.0.tgz#f1312ddbf5912cd747177083c5ef7a19d62ee484" - integrity sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" + integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q== dependencies: - cosmiconfig "^4.0.0" + cosmiconfig "^5.0.0" import-cwd "^2.0.0" postcss-loader@3.0.0: @@ -12392,37 +12072,10 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.23, postcss@^6.0.9: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.5: - version "7.0.16" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.16.tgz#48f64f1b4b558cb8b52c88987724359acb010da2" - integrity sha512-MOo8zNSlIqh22Uaa3drkdIAgUGEL+AD1ESiSdmElLUmE2uVDo1QloiT/IfW9qRw8Gw+Y/w69UVMGwbufMSftxA== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -postcss@^7.0.11, postcss@^7.0.21, postcss@^7.0.23: - version "7.0.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.23.tgz#9f9759fad661b15964f3cfc3140f66f1e05eadc1" - integrity sha512-hOlMf3ouRIFXD+j2VJecwssTwbvsPGJVMzupptg+85WA+i7MwyrydmQAgY3R+m0Bc0exunhbJmijy8u8+vufuQ== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.6: - version "7.0.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" - integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - -postcss@^7.0.7: - version "7.0.24" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.24.tgz#972c3c5be431b32e40caefe6c81b5a19117704c2" - integrity sha512-Xl0XvdNWg+CblAXzNvbSOUvgJXwSjmbAKORqyw9V2AlHrm1js2gFw9y3jibBAhpKZi8b5JzJCVh/FyzPsTtgTA== +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.23, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: + version "7.0.26" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587" + integrity sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -12483,9 +12136,9 @@ private@^0.1.6: integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== process@^0.11.10: version "0.11.10" @@ -12532,7 +12185,7 @@ promisepipe@3.0.0: resolved "https://registry.yarnpkg.com/promisepipe/-/promisepipe-3.0.0.tgz#c9b6e5aa861ef5fcce6134f6f75e14f8f30bd3b2" integrity sha512-V6TbZDJ/ZswevgkDNpGt/YqNCiZP9ASfgU+p83uJE6NrGtvSGoOcHLiDCqkMs2+yg7F5qHdLV8d0aS8O26G/KA== -prompts@2.1.0, prompts@^2.0.1: +prompts@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.1.0.tgz#bf90bc71f6065d255ea2bdc0fe6520485c1b45db" integrity sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg== @@ -12540,6 +12193,14 @@ prompts@2.1.0, prompts@^2.0.1: kleur "^3.0.2" sisteransi "^1.0.0" +prompts@^2.0.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.0.tgz#a444e968fa4cc7e86689a74050685ac8006c4cc4" + integrity sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.3" + promzard@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" @@ -12637,9 +12298,9 @@ pseudomap@^1.0.2: integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.24, psl@^1.1.28: - version "1.1.31" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" - integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== + version "1.7.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" + integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== public-encrypt@^4.0.0: version "4.0.3" @@ -12694,9 +12355,9 @@ punycode@^2.1.0, punycode@^2.1.1: integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== purgecss@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-1.4.1.tgz#d362e63eb1ed9dd1fa1554b9fd7accb8d54e56dc" - integrity sha512-5jONV/D/3nfa+lC425+LA+OWe5/LDn4a79cac+TnzJq3VczwnWlpIDdW275hHsGhkzIlqATQsYFLW7or0cSwNQ== + version "1.4.2" + resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-1.4.2.tgz#67ab50cb4f5c163fcefde56002467c974e577f41" + integrity sha512-hkOreFTgiyMHMmC2BxzdIw5DuC6kxAbP/gGOGd3MEsF3+5m69rIvUEPaxrnoUtfODTFKe9hcXjGwC6jcjoyhOw== dependencies: glob "^7.1.3" postcss "^7.0.14" @@ -12708,11 +12369,16 @@ q@^1.1.2, q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qs@6.7.0, qs@^6.5.1: +qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@^6.5.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.1.tgz#20082c65cb78223635ab1a9eaca8875a29bf8ec9" + integrity sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA== + qs@~6.5.1, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -12795,26 +12461,31 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dom@16.10.2: - version "16.10.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.10.2.tgz#4840bce5409176bc3a1f2bd8cb10b92db452fda6" - integrity sha512-kWGDcH3ItJK4+6Pl9DZB16BXYAZyrYQItU4OMy0jAkv5aNqc+mAKb4TpFtAteI6TJZu+9ZlNhaeNQSVQDHJzkw== +react-dom@16.12.0: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11" + integrity sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.16.2" + scheduler "^0.18.0" react-error-overlay@5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.6.tgz#0cd73407c5d141f9638ae1e0c63e7b2bf7e9929d" integrity sha512-X1Y+0jR47ImDVr54Ab6V9eGk0Hnu7fVWGeHQSOXHf/C2pF9c6uy3gef8QUeuUiWlNb0i08InPSE5a/KJzNzw1Q== -react-is@16.8.6, react-is@^16.8.1, react-is@^16.8.4: +react-is@16.8.6: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== +react-is@^16.8.1, react-is@^16.8.4: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" + integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + react-ssr-prepass@1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/react-ssr-prepass/-/react-ssr-prepass-1.0.8.tgz#036abffe541975b20213cf7b261c05ac2843480d" @@ -12822,44 +12493,42 @@ react-ssr-prepass@1.0.8: dependencies: object-is "^1.0.1" -react@16.10.2: - version "16.10.2" - resolved "https://registry.yarnpkg.com/react/-/react-16.10.2.tgz#a5ede5cdd5c536f745173c8da47bda64797a4cf0" - integrity sha512-MFVIq0DpIhrHFyqLU0S3+4dIcBhhOvBE8bJ/5kHPVOVaGdo0KuiQzpcjCPsf585WvhypqtrMILyoE2th6dT+Lw== +react@16.12.0: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83" + integrity sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" read-cmd-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" - integrity sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs= + version "1.0.5" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" + integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA== dependencies: graceful-fs "^4.1.2" "read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" - integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" + integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" normalize-package-data "^2.0.0" - slash "^1.0.0" + npm-normalize-package-bin "^1.0.0" optionalDependencies: graceful-fs "^4.1.2" read-package-tree@^5.1.6: - version "5.2.2" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.2.tgz#4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8" - integrity sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA== + version "5.3.1" + resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" + integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - once "^1.3.0" read-package-json "^2.0.0" readdir-scoped-modules "^1.0.0" + util-promisify "^2.1.0" read-pkg-up@^1.0.1: version "1.0.1" @@ -12920,9 +12589,9 @@ read@1, read@~1.0.1: mute-stream "~0.0.4" "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -12933,9 +12602,9 @@ read@1, read@~1.0.1: util-deprecate "~1.0.1" "readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.3.0.tgz#cb8011aad002eb717bf040291feba8569c986fb9" - integrity sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw== + version "3.4.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -12952,9 +12621,9 @@ readable-stream@~1.0.17: string_decoder "~0.10.x" readdir-scoped-modules@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" - integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= + version "1.1.0" + resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" + integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" @@ -12970,12 +12639,12 @@ readdirp@^2.0.0, readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== +readdirp@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" + integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== dependencies: - picomatch "^2.0.4" + picomatch "^2.0.7" realpath-native@^1.1.0: version "1.1.0" @@ -13031,14 +12700,14 @@ regenerator-runtime@^0.11.0: integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== regenerator-runtime@^0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" - integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== regenerator-transform@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.0.tgz#2ca9aaf7a2c239dd32e4761218425b8c7a86ecaf" - integrity sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w== + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" + integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== dependencies: private "^0.1.6" @@ -13104,9 +12773,9 @@ regjsgen@^0.2.0: integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= regjsgen@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" - integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== + version "0.5.1" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" + integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== regjsparser@^0.1.4: version "0.1.5" @@ -13116,9 +12785,9 @@ regjsparser@^0.1.4: jsesc "~0.5.0" regjsparser@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" - integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== + version "0.6.2" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.2.tgz#fd62c753991467d9d1ffe0a9f67f27a529024b96" + integrity sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q== dependencies: jsesc "~0.5.0" @@ -13174,9 +12843,9 @@ remark-parse@^6.0.0: xtend "^4.0.1" remark-squeeze-paragraphs@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-3.0.3.tgz#299d8db7d44008c9ae240dbf6d1f55b8b0f924ce" - integrity sha512-eDvjtwFa9eClqb7XgdF/1H9Pfs2LPnf/P3eRs9ucYAWUuv4WO8ZOVAUeT/1h66rQvghnfctz9au+HEmoKcdoqA== + version "3.0.4" + resolved "https://registry.yarnpkg.com/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-3.0.4.tgz#9fe50c3bf3b572dd88754cd426ada007c0b8dc5f" + integrity sha512-Wmz5Yj9q+W1oryo8BV17JrOXZgUKVcpJ2ApE2pwnoHwhFKSk4Wp2PmFNbmJMgYSqAdFwfkoe+TSYop5Fy8wMgA== dependencies: mdast-squeeze-paragraphs "^3.0.0" @@ -13235,6 +12904,13 @@ request-promise-core@1.1.2: dependencies: lodash "^4.17.11" +request-promise-core@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" + integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ== + dependencies: + lodash "^4.17.15" + request-promise-native@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" @@ -13245,11 +12921,11 @@ request-promise-native@1.0.5: tough-cookie ">=2.3.3" request-promise-native@^1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" - integrity sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w== + version "1.0.8" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" + integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== dependencies: - request-promise-core "1.1.2" + request-promise-core "1.1.3" stealthy-require "^1.1.1" tough-cookie "^2.3.3" @@ -13312,11 +12988,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - require-like@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa" @@ -13367,17 +13038,17 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.11.0, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.8.1: +resolve@1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" integrity sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw== dependencies: path-parse "^1.0.6" -resolve@^1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" - integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.1.tgz#9e018c540fcf0c427d678b9931cbf45e984bcaff" + integrity sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg== dependencies: path-parse "^1.0.6" @@ -13439,7 +13110,14 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -13469,9 +13147,9 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: inherits "^2.0.1" rsvp@^4.8.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911" - integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA== + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== run-async@^2.2.0: version "2.3.0" @@ -13499,19 +13177,19 @@ rxjs@^5.5.2: dependencies: symbol-observable "1.0.1" -rxjs@^6.3.3, rxjs@^6.4.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" - integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== +rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -13579,10 +13257,10 @@ sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.16.2.tgz#f74cd9d33eff6fc554edfb79864868e4819132c1" - integrity sha512-BqYVWqwz6s1wZMhjFvLfVR5WXP7ZY32M/wYPo04CcuPM7XZEbV2TBNW7Z0UkguPTl0dWMA59VbNXxK6q+pHItg== +scheduler@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4" + integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -13596,15 +13274,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.0, schema-utils@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.2.0.tgz#48a065ce219e0cacf4631473159037b2c1ae82da" - integrity sha512-5EwsCNhfFTZvUreQhx/4vVQpJ/lnCAkgoIHLhSpp4ZirE+4hzFvdJi0FMub6hxbFVBJYSpeVVmon+2e7uEGRrA== - dependencies: - ajv "^6.10.2" - ajv-keywords "^3.4.1" - -schema-utils@^2.6.0: +schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.1.tgz#eb78f0b945c7bcfa2082b3565e8db3548011dc4f" integrity sha512-0WXHDs1VDJyo+Zqs9TKLKyD/h7yDpHUhEFsM2CzkICFdoX1av+GBq/J2xRTFfsQO5kBfhZzANf2VcIm84jqDbg== @@ -13655,21 +13325,21 @@ semver-compare@^1.0.0: integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== semver@5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== -semver@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.0.tgz#e95dc415d45ecf03f2f9f83b264a6b11f49c0cca" - integrity sha512-kCqEOOHoBcFs/2Ccuk4Xarm/KiWRSLEX9CAZF8xkJ6ZPlIoTZ8V5f7J16vYLJqDbR7KrxTJpR2lqjIEm2Qx9cQ== +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -13706,10 +13376,10 @@ sentence-case@^2.1.0: no-case "^2.2.0" upper-case-first "^1.1.2" -serialize-javascript@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" - integrity sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA== +serialize-javascript@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" + integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== serve-static@1.14.1: version "1.14.1" @@ -13731,20 +13401,10 @@ set-immediate-shim@~1.0.1: resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -13803,21 +13463,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@1.7.2: +shell-quote@1.7.2, shell-quote@^1.6.1: version "1.7.2" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== -shell-quote@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" - shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -13845,10 +13495,10 @@ sinon@^1.17.6: samsam "1.1.2" util ">=0.10.3 <1" -sisteransi@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.0.tgz#77d9622ff909080f1c19e5f4a1df0c1b0a27b88c" - integrity sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ== +sisteransi@^1.0.0, sisteransi@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" + integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== slash@^1.0.0: version "1.0.0" @@ -13884,10 +13534,10 @@ slide@^1.1.6: resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= -smart-buffer@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" - integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== +smart-buffer@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" + integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== snake-case@^2.1.0: version "2.1.0" @@ -13942,12 +13592,12 @@ socks-proxy-agent@^4.0.0: socks "~2.3.2" socks@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" - integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== + version "2.3.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" + integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== dependencies: - ip "^1.1.5" - smart-buffer "4.0.2" + ip "1.1.5" + smart-buffer "^4.1.0" sort-keys@^1.0.0: version "1.1.2" @@ -13969,28 +13619,20 @@ source-list-map@^2.0.0: integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== dependencies: - atob "^2.1.1" + atob "^2.1.2" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6: - version "0.5.12" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@~0.5.12: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== +source-map-support@^0.5.6, source-map-support@~0.5.12: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -14017,7 +13659,7 @@ source-map@^0.4.2: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -14060,9 +13702,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" - integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -14194,9 +13836,9 @@ stream-http@^2.7.2: xtend "^4.0.0" stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== strict-uri-encode@^1.0.0: version "1.1.0" @@ -14248,45 +13890,44 @@ string-width@^3.0.0, string-width@^3.1.0: strip-ansi "^5.1.0" string-width@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.1.0.tgz#ba846d1daa97c3c596155308063e075ed1c99aff" - integrity sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^5.2.0" + strip-ansi "^6.0.0" string.prototype.padend@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" - integrity sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA= + version "3.1.0" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz#dc08f57a8010dc5c153550318f67e13adbb72ac3" + integrity sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA== dependencies: - define-properties "^1.1.2" - es-abstract "^1.4.3" - function-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" -string.prototype.trimleft@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634" - integrity sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw== +string.prototype.trimleft@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== dependencies: define-properties "^1.1.3" function-bind "^1.1.1" -string.prototype.trimright@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58" - integrity sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg== +string.prototype.trimright@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== dependencies: define-properties "^1.1.3" function-bind "^1.1.1" string_decoder@^1.0.0, string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: - safe-buffer "~5.1.0" + safe-buffer "~5.2.0" string_decoder@~0.10.x: version "0.10.31" @@ -14335,6 +13976,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -14472,17 +14120,16 @@ supports-color@^6.1.0: has-flag "^3.0.0" svgo@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.2.tgz#0253d34eccf2aed4ad4f283e11ee75198f9d7316" - integrity sha512-rAfulcwp2D9jjdGu+0CuqlrAUin6bBWrpoqXWwKDZZZJfXcUXQSxLJOFJCQCSA0x0pP2U0TxSlJu2ROq5Bq6qA== + version "1.3.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== dependencies: chalk "^2.4.1" coa "^2.0.2" css-select "^2.0.0" css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.28" - css-url-regex "^1.1.0" - csso "^3.5.1" + css-tree "1.0.0-alpha.37" + csso "^4.0.2" js-yaml "^3.13.1" mkdirp "~0.5.1" object.values "^1.1.0" @@ -14510,9 +14157,9 @@ symbol-observable@^1.1.0: integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== symbol-tree@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== table@^5.2.3: version "5.4.6" @@ -14590,18 +14237,18 @@ tar@^2.0.0: fstream "^1.0.12" inherits "2" -tar@^4, tar@^4.4.8: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== +tar@^4, tar@^4.4.10, tar@^4.4.8: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" + minipass "^2.8.6" + minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" - yallist "^3.0.2" + yallist "^3.0.3" taskr@1.1.0: version "1.1.0" @@ -14640,15 +14287,15 @@ temp-write@^3.4.0: uuid "^3.0.1" terser-webpack-plugin@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz#61b18e40eaee5be97e771cdbb10ed1280888c2b4" - integrity sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg== + version "1.4.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" + integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== dependencies: cacache "^12.0.2" find-cache-dir "^2.1.0" is-wsl "^1.1.0" schema-utils "^1.0.0" - serialize-javascript "^1.7.0" + serialize-javascript "^2.1.2" source-map "^0.6.1" terser "^4.1.2" webpack-sources "^1.4.0" @@ -14664,9 +14311,9 @@ terser@4.4.2: source-map-support "~0.5.12" terser@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.2.tgz#b2656c8a506f7ce805a3f300a2ff48db022fa391" - integrity sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw== + version "4.6.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.0.tgz#5c1f8d01897a718797958b8607ff7cc4a3d12055" + integrity sha512-YMJyZ/KsqA1LVS0z5m9W1//n4zo6iYqvBSAvss07e4BfHl9ZdQWUeXN/Xh1nGzMO/CwS0zjANpOzR8KibBP9Pg== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -14682,10 +14329,10 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" -text-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6" - integrity sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ== +text-extensions@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== text-table@0.2.0, text-table@^0.2.0: version "0.2.0" @@ -14747,9 +14394,9 @@ timed-out@^4.0.0: integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= timers-browserify@^2.0.4: - version "2.0.10" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" - integrity sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg== + version "2.0.11" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== dependencies: setimmediate "^1.0.4" @@ -14759,9 +14406,9 @@ timsort@^0.3.0: integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= tinydate@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tinydate/-/tinydate-1.0.1.tgz#5e38797e2e3e79ce2300543f586c6caa2dfcf668" - integrity sha512-Imqa6iv3Ig5FmC3ESwmqczusIn1h8D5RqNbpatGc1eLHeoytuhodbsAPpSJ8iKiLhxBtLuRsrywWHlJM1bA3Rg== + version "1.2.0" + resolved "https://registry.yarnpkg.com/tinydate/-/tinydate-1.2.0.tgz#36b4bb02715f89743f3ef9073d3573d005a28d0e" + integrity sha512-3GwPk8VhDFnUZ2TrgkhXJs6hcMAIIw4x/xkz+ayK6dGoQmp2nUwKzBXK0WnMsqkh6vfUhpqQicQF3rbshfyJkg== title-case@^2.1.0: version "2.1.1" @@ -14921,11 +14568,6 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - trim-trailing-lines@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz#d2f1e153161152e9f02fabc670fb40bec2ea2e3a" @@ -14948,26 +14590,21 @@ trough@^1.0.0: dependencies: glob "^7.1.2" -tryer@^1.0.0: +tryer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== ts-pnp@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.4.tgz#ae27126960ebaefb874c6d7fa4729729ab200d90" - integrity sha512-1J/vefLC+BWSo+qe8OnJQfWTYRS6ingxjwqmHMqaMxXMj7kFtKLgAaYW3JeX3mktjgUL+etlU8/B4VUAUI9QGw== + version "1.1.5" + resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.5.tgz#840e0739c89fce5f3abd9037bb091dbff16d9dec" + integrity sha512-ti7OGMOUOzo66wLF3liskw6YQIaSsBgc4GOAlWRnIEj8htCxJUxskanMUoJOD6MDCRAXo36goXJZch+nOS0VMA== -tslib@1.10.0, tslib@^1.8.1, tslib@^1.9.3: +tslib@1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tslib@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" - integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== - tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -15004,10 +14641,10 @@ type-fest@^0.3.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== -type-fest@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2" - integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw== +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" @@ -15035,11 +14672,11 @@ typescript@3.7.3: integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw== uglify-js@^3.1.4: - version "3.5.15" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.5.15.tgz#fe2b5378fd0b09e116864041437bff889105ce24" - integrity sha512-fe7aYFotptIddkwcm6YuA0HmknBZ52ZzOsUxZEdhhkSsz7RfjHDX2QDxwKTiv4JQ5t5NhfmpgAK+J7LiDhKSqg== + version "3.7.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.3.tgz#f918fce9182f466d5140f24bb0ff35c2d32dcc6a" + integrity sha512-7tINm46/3puUA4hCkKYo4Xdts+JDaVC9ZPRcG8Xw9R4nhO/gZgUM3TENq8IF4Vatk8qCig4MzP/c8G4u2BkVQg== dependencies: - commander "~2.20.0" + commander "~2.20.3" source-map "~0.6.1" uid-number@0.0.6: @@ -15103,14 +14740,14 @@ unified@^7.0.0: x-is-string "^0.1.0" union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== dependencies: arr-union "^3.1.0" get-value "^2.0.6" is-extendable "^0.1.1" - set-value "^0.4.3" + set-value "^2.0.1" uniq@^1.0.1: version "1.0.1" @@ -15130,9 +14767,9 @@ unique-filename@^1.1.1: unique-slug "^2.0.0" unique-slug@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.1.tgz#5e9edc6d1ce8fb264db18a507ef9bd8544451ca6" - integrity sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== dependencies: imurmurhash "^0.1.4" @@ -15151,33 +14788,33 @@ unist-builder@^1.0.1: object-assign "^4.1.0" unist-util-generated@^1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.4.tgz#2261c033d9fc23fae41872cdb7663746e972c1a7" - integrity sha512-SA7Sys3h3X4AlVnxHdvN/qYdr4R38HzihoEVY2Q2BZu8NHWDnw5OGcC/tXWjQfd4iG+M6qRFNIRGqJmp2ez4Ww== + version "1.1.5" + resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.5.tgz#1e903e68467931ebfaea386dae9ea253628acd42" + integrity sha512-1TC+NxQa4N9pNdayCYA1EGUOCAO0Le3fVp7Jzns6lnua/mYgwHo0tz5WUAfrdpNch1RZLHc61VZ1SDgrtNXLSw== -unist-util-is@^2.0.0, unist-util-is@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.3.tgz#459182db31f4742fceaea88d429693cbf0043d20" - integrity sha512-4WbQX2iwfr/+PfM4U3zd2VNXY+dWtZsN1fLnWEi2QQXA4qyDYAZcDMfXUX0Cu6XZUHHAO9q4nyxxLT4Awk1qUA== +unist-util-is@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-3.0.0.tgz#d9e84381c2468e82629e4a5be9d7d05a2dd324cd" + integrity sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A== unist-util-position@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.0.3.tgz#fff942b879538b242096c148153826664b1ca373" - integrity sha512-28EpCBYFvnMeq9y/4w6pbnFmCUfzlsc41NJui5c51hOFjBA1fejcwc+5W4z2+0ECVbScG3dURS3JTVqwenzqZw== + version "3.0.4" + resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.0.4.tgz#5872be7aec38629b971fdb758051f78817b0040a" + integrity sha512-tWvIbV8goayTjobxDIr4zVTyG+Q7ragMSMeKC3xnPl9xzIc0+she8mxXLM3JVNDDsfARPbCd3XdzkyLdo7fF3g== unist-util-remove-position@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.3.tgz#d91aa8b89b30cb38bad2924da11072faa64fd972" - integrity sha512-CtszTlOjP2sBGYc2zcKA/CvNdTdEs3ozbiJ63IPBxh8iZg42SCCb8m04f8z2+V1aSk5a7BxbZKEdoDjadmBkWA== + version "1.1.4" + resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz#ec037348b6102c897703eee6d0294ca4755a2020" + integrity sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A== dependencies: unist-util-visit "^1.1.0" unist-util-remove@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unist-util-remove/-/unist-util-remove-1.0.2.tgz#fd33d34cf659ebc9a4473cf9e56635c6e74b0f6d" - integrity sha512-fnvaUeZXdR3IUI3uh4YclS9t4rST66uQI/1SG6dpWpeeXqzcqQ2gfhM0e1sapUr0if6oiR3xjYIhwa7mYNTTTw== + version "1.0.3" + resolved "https://registry.yarnpkg.com/unist-util-remove/-/unist-util-remove-1.0.3.tgz#58ec193dfa84b52d5a055ffbc58e5444eb8031a3" + integrity sha512-mB6nCHCQK0pQffUAcCVmKgIWzG/AXs/V8qpS8K72tMPtOSCMSjDeMc5yN+Ye8rB0FhcE+JvW++o1xRNc0R+++g== dependencies: - unist-util-is "^2.0.0" + unist-util-is "^3.0.0" unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1: version "1.1.2" @@ -15185,11 +14822,11 @@ unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1: integrity sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ== unist-util-visit-parents@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.1.0.tgz#e45cad0d7e5ac683362088b329bc80abd1cfc5fb" - integrity sha512-j0XZY3063E6v7qhx4+Q2Z0r8SMrLX7Mr6DabiCy67zMEcFQYtpNOplLlEK1KKEBEs9S+xB5U+yloQxbSwF9P/g== + version "2.1.2" + resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz#25e43e55312166f3348cae6743588781d112c1e9" + integrity sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g== dependencies: - unist-util-is "^2.1.2" + unist-util-is "^3.0.0" unist-util-visit@^1.0.0, unist-util-visit@^1.1.0, unist-util-visit@^1.3.0: version "1.4.1" @@ -15203,12 +14840,12 @@ unistore@3.4.1: resolved "https://registry.yarnpkg.com/unistore/-/unistore-3.4.1.tgz#effdee7d9f2e00fdc6cecad5ab598ccd54344d38" integrity sha512-p2Ej8qqrqcD10Ah0ZUKUU/mhRB8pM4q6gzjxq9kZpgxa8dks7oHT8jDP4CqLhoRof3RXOZLKB9EBV1DTzHiJRw== -universal-user-agent@^2.0.0, universal-user-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" - integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== +universal-user-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" + integrity sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA== dependencies: - os-name "^3.0.0" + os-name "^3.1.0" universalify@^0.1.0: version "0.1.2" @@ -15234,9 +14871,9 @@ unset-value@^1.0.0: isobject "^3.0.0" upath@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" - integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== update-check@1.3.2: version "1.3.2" @@ -15335,6 +14972,13 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +util-promisify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" + integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= + dependencies: + object.getownpropertydescriptors "^2.0.3" + util.promisify@^1.0.0, util.promisify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" @@ -15351,11 +14995,11 @@ util@0.10.3: inherits "2.0.1" "util@>=0.10.3 <1": - version "0.12.0" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.0.tgz#bb5e3d29ba2703c7add0ad337003be3ca477798a" - integrity sha512-pPSOFl7VLhZ7LO/SFABPraZEEurkJUWSMn3MuA/r3WQZc+Z1fqou2JqLSOZbCLl73EUIxuUVX8X4jkX2vfJeAA== + version "0.12.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.1.tgz#f908e7b633e7396c764e694dd14e716256ce8ade" + integrity sha512-MREAtYOp+GTt9/+kwf00IYoHZyjM8VU4aVrkzUlejyqaIjd2GztVl5V9hGXKlvBKE3gENn/FMfHE5v6hElXGcQ== dependencies: - inherits "2.0.3" + inherits "^2.0.3" is-arguments "^1.0.4" is-generator-function "^1.0.7" object.entries "^1.1.0" @@ -15374,9 +15018,9 @@ utils-merge@1.0.1: integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== v8-compile-cache@^2.0.3: version "2.1.0" @@ -15418,9 +15062,9 @@ verror@1.10.0: extsprintf "^1.2.0" vfile-location@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.4.tgz#2a5e7297dd0d9e2da4381464d04acc6b834d3e55" - integrity sha512-KRL5uXQPoUKu+NGvQVL4XLORw45W62v4U4gxJ3vRlDfI9QsT4ZN1PNXn/zQpKUulqGDpYuT0XDfp5q9O87/y/w== + version "2.0.6" + resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.6.tgz#8a274f39411b8719ea5728802e10d9e0dff1519e" + integrity sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA== vfile-message@^1.0.0: version "1.1.1" @@ -15440,9 +15084,9 @@ vfile@^3.0.0: vfile-message "^1.0.0" vm-browserify@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" - integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw== + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== w3c-hr-time@^1.0.1: version "1.0.1" @@ -15545,13 +15189,13 @@ webpack-log@^2.0.0: uuid "^3.3.2" webpack-merge@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.1.tgz#5e923cf802ea2ace4fd5af1d3247368a633489b4" - integrity sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw== + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== dependencies: - lodash "^4.17.5" + lodash "^4.17.15" -webpack-sources@1.4.3: +webpack-sources@1.4.3, webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== @@ -15559,22 +15203,6 @@ webpack-sources@1.4.3: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-sources@^1.0.1, webpack-sources@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" - integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.1.tgz#b91b2c5b1c4e890ff50d1d35b7fa3657040da1da" - integrity sha512-XSz38193PTo/1csJabKaV4b53uRVotlMgqJXm3s3eje0Bu6gQTxYDqpD38CmQfDBA+gN+QqaGjasuC8I/7eW3Q== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - webpack@4.41.2: version "4.41.2" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.2.tgz#c34ec76daa3a8468c9b61a50336d8e3303dce74e" @@ -15650,9 +15278,9 @@ whatwg-url@^6.4.1: webidl-conversions "^4.0.2" whatwg-url@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" - integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -15683,9 +15311,9 @@ which@1.2.x: isexe "^2.0.0" which@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.1.tgz#f1cf94d07a8e571b6ff006aeb91d0300c47ef0a4" - integrity sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w== + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" @@ -15718,11 +15346,6 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" @@ -15777,18 +15400,18 @@ write-file-atomic@2.4.1: signal-exit "^3.0.2" write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.2.tgz#a7181706dfba17855d221140a9c06e15fcdd87b9" - integrity sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g== + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" signal-exit "^3.0.2" write-file-atomic@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.0.tgz#1b64dbbf77cb58fd09056963d63e62667ab4fb21" - integrity sha512-EIgkf60l2oWsffja2Sf2AL384dx328c0B+cIYPTQq5q2rOYuDV00/iPFBOUiDKKwKMOhkymH8AidPaRvzfxY+Q== + version "3.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.1.tgz#558328352e673b5bb192cf86500d60b230667d4b" + integrity sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw== dependencies: imurmurhash "^0.1.4" is-typedarray "^1.0.0" @@ -15852,12 +15475,11 @@ xml-name-validator@^3.0.0: integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== xml2js@^0.4.19: - version "0.4.22" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.22.tgz#4fa2d846ec803237de86f30aa9b5f70b6600de02" - integrity sha512-MWTbxAQqclRSTnehWWe5nMKzI3VmJ8ltiJEco8akcC6j3miOhjjfzKum5sId+CWhfxdOs/1xauYr8/ZDBtQiRw== + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== dependencies: sax ">=0.6.0" - util.promisify "~1.0.0" xmlbuilder "~11.0.0" xmlbuilder@~11.0.0: @@ -15871,9 +15493,9 @@ xmlhttprequest@1.8.0: integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== xtend@~2.1.1: version "2.1.2" @@ -15898,9 +15520,16 @@ yallist@^2.1.2: integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" yargs-parser@^11.1.1: version "11.1.1" From 501587ab2c30e2783223346a357d1822b49f0315 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 6 Jan 2020 11:27:13 -0600 Subject: [PATCH 055/321] v9.1.8-canary.2 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index a53b16c04426adc..0147cddd016b33c 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.1.8-canary.1" + "version": "9.1.8-canary.2" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index f5387ff3a6c1bed..14c5b6271cc40e5 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 9ca2ba743372ba2..15deec84a67304b 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index c255dd7ce791eca..5128199858122ae 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index ab895a9540abeb6..bd325134c655eaa 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 3b8c3978ed0562a..1a39f7550d9f3bf 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 56697f6fc52939e..2399f10b9db7678 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 2f5283cd33c5cfd..7aae355105dadea 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.1.8-canary.1", + "version": "9.1.8-canary.2", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From dea80b8565b8ec65c28f02136a2846adc42f54fe Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Mon, 6 Jan 2020 21:27:36 +0200 Subject: [PATCH 056/321] Allow libs that ends with `next/dist` such as `i18next`, `next-i18next`, `react-i18next` to be external (#9956) fixes #9022 Co-authored-by: Joe Haddad --- packages/next/build/webpack-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 817efd300d5602b..ac2219fe8a99420 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -476,7 +476,7 @@ export default async function getBaseWebpackConfig( // Default pages have to be transpiled if ( !res.match(/next[/\\]dist[/\\]next-server[/\\]/) && - (res.match(/next[/\\]dist[/\\]/) || + (res.match(/[/\\]next[/\\]dist[/\\]/) || res.match(/node_modules[/\\]@babel[/\\]runtime[/\\]/) || res.match(/node_modules[/\\]@babel[/\\]runtime-corejs2[/\\]/)) ) { From 2757826cf75e75ddbcb2d4f57800da2fb0563346 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 6 Jan 2020 14:55:08 -0500 Subject: [PATCH 057/321] Use `` in the head of your index.html +- Then you can use the element anywhere in your template, JSX, html etc + +### Node Modules + +- Run `npm install my-component --save` +- Put a script tag similar to this `` in the head of your index.html +- Then you can use the element anywhere in your template, JSX, html etc + +### In a stencil-starter app + +- Run `npm install my-component --save` +- Add an import to the npm packages `import my-component;` +- Then you can use the element anywhere in your template, JSX, html etc diff --git a/examples/with-stencil/packages/test-component/src/components.d.ts b/examples/with-stencil/packages/test-component/src/components.d.ts new file mode 100644 index 000000000000000..3c8b5104e87c921 --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/components.d.ts @@ -0,0 +1,70 @@ +/* eslint-disable */ +/* tslint:disable */ +/** + * This is an autogenerated file created by the Stencil compiler. + * It contains typing information for all components that exist in this project. + */ + +import { HTMLStencilElement, JSXBase } from '@stencil/core/internal' + +export namespace Components { + interface MyComponent { + /** + * The first name + */ + first: string + /** + * The last name + */ + last: string + /** + * The middle name + */ + middle: string + } +} + +declare global { + interface HTMLMyComponentElement + extends Components.MyComponent, + HTMLStencilElement {} + var HTMLMyComponentElement: { + prototype: HTMLMyComponentElement + new (): HTMLMyComponentElement + } + interface HTMLElementTagNameMap { + 'my-component': HTMLMyComponentElement + } +} + +declare namespace LocalJSX { + interface MyComponent { + /** + * The first name + */ + first?: string + /** + * The last name + */ + last?: string + /** + * The middle name + */ + middle?: string + } + + interface IntrinsicElements { + 'my-component': MyComponent + } +} + +export { LocalJSX as JSX } + +declare module '@stencil/core' { + export namespace JSX { + interface IntrinsicElements { + 'my-component': LocalJSX.MyComponent & + JSXBase.HTMLAttributes + } + } +} diff --git a/examples/with-stencil/packages/test-component/src/components/my-component/my-component.css b/examples/with-stencil/packages/test-component/src/components/my-component/my-component.css new file mode 100644 index 000000000000000..e69de29bb2d1d64 diff --git a/examples/with-stencil/packages/test-component/src/components/my-component/my-component.e2e.ts b/examples/with-stencil/packages/test-component/src/components/my-component/my-component.e2e.ts new file mode 100644 index 000000000000000..2fcd9f1da9bf16a --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/components/my-component/my-component.e2e.ts @@ -0,0 +1,32 @@ +import { newE2EPage } from '@stencil/core/testing' + +describe('my-component', () => { + it('renders', async () => { + const page = await newE2EPage() + + await page.setContent('') + const element = await page.find('my-component') + expect(element).toHaveClass('hydrated') + }) + + it('renders changes to the name data', async () => { + const page = await newE2EPage() + + await page.setContent('') + const component = await page.find('my-component') + const element = await page.find('my-component >>> div') + expect(element.textContent).toEqual(`Hello, World! I'm `) + + component.setProperty('first', 'James') + await page.waitForChanges() + expect(element.textContent).toEqual(`Hello, World! I'm James`) + + component.setProperty('last', 'Quincy') + await page.waitForChanges() + expect(element.textContent).toEqual(`Hello, World! I'm James Quincy`) + + component.setProperty('middle', 'Earl') + await page.waitForChanges() + expect(element.textContent).toEqual(`Hello, World! I'm James Earl Quincy`) + }) +}) diff --git a/examples/with-stencil/packages/test-component/src/components/my-component/my-component.tsx b/examples/with-stencil/packages/test-component/src/components/my-component/my-component.tsx new file mode 100644 index 000000000000000..5fdf96be44d2485 --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/components/my-component/my-component.tsx @@ -0,0 +1,33 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import { Component, Prop, h } from '@stencil/core' +import { format } from '../../utils/utils' + +@Component({ + tag: 'my-component', + styleUrl: 'my-component.css', + shadow: true, +}) +export class MyComponent { + /** + * The first name + */ + @Prop() first: string + + /** + * The middle name + */ + @Prop() middle: string + + /** + * The last name + */ + @Prop() last: string + + private getText(): string { + return format(this.first, this.middle, this.last) + } + + render() { + return
Hello, World! I'm {this.getText()}
+ } +} diff --git a/examples/with-stencil/packages/test-component/src/components/my-component/readme.md b/examples/with-stencil/packages/test-component/src/components/my-component/readme.md new file mode 100644 index 000000000000000..b927eea947707ff --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/components/my-component/readme.md @@ -0,0 +1,15 @@ +# my-component + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| -------- | --------- | --------------- | -------- | ----------- | +| `first` | `first` | The first name | `string` | `undefined` | +| `last` | `last` | The last name | `string` | `undefined` | +| `middle` | `middle` | The middle name | `string` | `undefined` | + +--- + +_Built with [StencilJS](https://stenciljs.com/)_ diff --git a/examples/with-stencil/packages/test-component/src/index.html b/examples/with-stencil/packages/test-component/src/index.html new file mode 100644 index 000000000000000..a8e534f2daea78c --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/index.html @@ -0,0 +1,20 @@ + + + + + + Stencil Component Starter + + + + + + + + diff --git a/examples/with-stencil/packages/test-component/src/index.ts b/examples/with-stencil/packages/test-component/src/index.ts new file mode 100644 index 000000000000000..cb64ac1b52aada9 --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/index.ts @@ -0,0 +1 @@ +export * from './components' diff --git a/examples/with-stencil/packages/test-component/src/utils/utils.spec.ts b/examples/with-stencil/packages/test-component/src/utils/utils.spec.ts new file mode 100644 index 000000000000000..db69728c03eb222 --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/utils/utils.spec.ts @@ -0,0 +1,21 @@ +import { format } from './utils' + +describe('format', () => { + it('returns empty string for no names defined', () => { + expect(format(undefined, undefined, undefined)).toEqual('') + }) + + it('formats just first names', () => { + expect(format('Joseph', undefined, undefined)).toEqual('Joseph') + }) + + it('formats first and last names', () => { + expect(format('Joseph', undefined, 'Publique')).toEqual('Joseph Publique') + }) + + it('formats first, middle and last names', () => { + expect(format('Joseph', 'Quincy', 'Publique')).toEqual( + 'Joseph Quincy Publique' + ) + }) +}) diff --git a/examples/with-stencil/packages/test-component/src/utils/utils.ts b/examples/with-stencil/packages/test-component/src/utils/utils.ts new file mode 100644 index 000000000000000..15d205fd1a74c8b --- /dev/null +++ b/examples/with-stencil/packages/test-component/src/utils/utils.ts @@ -0,0 +1,3 @@ +export function format(first: string, middle: string, last: string): string { + return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '') +} diff --git a/examples/with-stencil/packages/test-component/stencil.config.ts b/examples/with-stencil/packages/test-component/stencil.config.ts new file mode 100644 index 000000000000000..19dff0f5352800d --- /dev/null +++ b/examples/with-stencil/packages/test-component/stencil.config.ts @@ -0,0 +1,18 @@ +import { Config } from '@stencil/core' + +export const config: Config = { + namespace: 'test-component', + outputTargets: [ + { + type: 'dist', + esmLoaderPath: '../loader', + }, + { + type: 'docs-readme', + }, + { + type: 'www', + serviceWorker: null, // disable service workers + }, + ], +} diff --git a/examples/with-stencil/packages/test-component/tsconfig.json b/examples/with-stencil/packages/test-component/tsconfig.json new file mode 100644 index 000000000000000..1ba949095d2656e --- /dev/null +++ b/examples/with-stencil/packages/test-component/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "allowUnreachableCode": false, + "declaration": false, + "experimentalDecorators": true, + "lib": ["dom", "es2017"], + "moduleResolution": "node", + "module": "esnext", + "target": "es2017", + "noUnusedLocals": true, + "noUnusedParameters": true, + "jsx": "react", + "jsxFactory": "h" + }, + "include": ["src", "types/jsx.d.ts"], + "exclude": ["node_modules"] +} diff --git a/examples/with-stencil/packages/web-app/package.json b/examples/with-stencil/packages/web-app/package.json new file mode 100644 index 000000000000000..83f9086886282c2 --- /dev/null +++ b/examples/with-stencil/packages/web-app/package.json @@ -0,0 +1,15 @@ +{ + "name": "web-app", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "latest", + "react": "^16.8.3", + "react-dom": "^16.8.3" + }, + "license": "ISC" +} diff --git a/examples/with-stencil/packages/web-app/pages/_app.js b/examples/with-stencil/packages/web-app/pages/_app.js new file mode 100644 index 000000000000000..6ff0a5f5d41bce5 --- /dev/null +++ b/examples/with-stencil/packages/web-app/pages/_app.js @@ -0,0 +1,17 @@ +import React from 'react' +import App from 'next/app' + +import { applyPolyfills, defineCustomElements } from 'test-component/loader' + +export default class MyApp extends App { + componentDidMount() { + applyPolyfills().then(() => { + defineCustomElements(window) + }) + } + + render() { + const { Component, pageProps } = this.props + return + } +} diff --git a/examples/with-stencil/packages/web-app/pages/index.js b/examples/with-stencil/packages/web-app/pages/index.js new file mode 100644 index 000000000000000..a0995f106401b10 --- /dev/null +++ b/examples/with-stencil/packages/web-app/pages/index.js @@ -0,0 +1,5 @@ +export default () => ( +
+ +
+) From 39020c432d2b269c3b63d2f44d31d56fa4cfe9e1 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Mon, 20 Jan 2020 17:19:33 -0500 Subject: [PATCH 175/321] Improve user errors for invalid `pageExtensions` (#10178) * Added validation for pageExtensions and tests * Removed log * Test for undefined --- packages/next/next-server/server/config.ts | 29 +++++++ test/integration/page-extensions/.babelrc | 6 -- .../page-extensions/next.config.js | 7 -- .../page-extensions/pages/hmr/some-page.tsx | 23 ------ .../page-extensions/pages/index.js | 1 + .../integration/page-extensions/test/.babelrc | 9 -- test/integration/page-extensions/test/hmr.js | 42 ---------- .../page-extensions/test/index.test.js | 82 ++++++++++++++++--- 8 files changed, 100 insertions(+), 99 deletions(-) delete mode 100644 test/integration/page-extensions/.babelrc delete mode 100644 test/integration/page-extensions/next.config.js delete mode 100644 test/integration/page-extensions/pages/hmr/some-page.tsx create mode 100644 test/integration/page-extensions/pages/index.js delete mode 100644 test/integration/page-extensions/test/.babelrc delete mode 100644 test/integration/page-extensions/test/hmr.js diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index da84248f5d1272b..57a50d0df8b0b21 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -105,6 +105,35 @@ function assignDefaults(userConfig: { [key: string]: any }) { } } + if (key === 'pageExtensions') { + const pageExtensions = userConfig[key] + + if (pageExtensions === undefined) { + delete userConfig[key] + return + } + + if (!Array.isArray(pageExtensions)) { + throw new Error( + `Specified pageExtensions is not an array of strings, found "${pageExtensions}". Please update this config or remove it.` + ) + } + + if (!pageExtensions.length) { + throw new Error( + `Specified pageExtensions is an empty array. Please update it with the relevant extensions or remove it.` + ) + } + + pageExtensions.forEach(ext => { + if (typeof ext !== 'string') { + throw new Error( + `Specified pageExtensions is not an array of strings, found "${ext}" of type "${typeof ext}". Please update this config or remove it.` + ) + } + }) + } + const maybeObject = userConfig[key] if (!!maybeObject && maybeObject.constructor === Object) { userConfig[key] = { diff --git a/test/integration/page-extensions/.babelrc b/test/integration/page-extensions/.babelrc deleted file mode 100644 index f1ced417a8813d3..000000000000000 --- a/test/integration/page-extensions/.babelrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "presets": [ - "next/babel", - "@zeit/next-typescript/babel" - ] -} \ No newline at end of file diff --git a/test/integration/page-extensions/next.config.js b/test/integration/page-extensions/next.config.js deleted file mode 100644 index 14cd83bcc23f2f9..000000000000000 --- a/test/integration/page-extensions/next.config.js +++ /dev/null @@ -1,7 +0,0 @@ -const withTypescript = require('@zeit/next-typescript') -module.exports = withTypescript({ - onDemandEntries: { - // Make sure entries are not getting disposed. - maxInactiveAge: 1000 * 60 * 60, - }, -}) diff --git a/test/integration/page-extensions/pages/hmr/some-page.tsx b/test/integration/page-extensions/pages/hmr/some-page.tsx deleted file mode 100644 index 6677d0f34ca16a7..000000000000000 --- a/test/integration/page-extensions/pages/hmr/some-page.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react' - -if (typeof window !== 'undefined' && !(window as any).HMR_RANDOM_NUMBER) { - ;(window as any).HMR_RANDOM_NUMBER = Math.random() -} - -export default class Counter extends React.Component { - state = { count: 0 } - - incr() { - const { count } = this.state - this.setState({ count: count + 1 }) - } - - render() { - return ( -
-

COUNT: {this.state.count}

- -
- ) - } -} diff --git a/test/integration/page-extensions/pages/index.js b/test/integration/page-extensions/pages/index.js new file mode 100644 index 000000000000000..77346cb4003c7bd --- /dev/null +++ b/test/integration/page-extensions/pages/index.js @@ -0,0 +1 @@ +export default () => 'Hello World' diff --git a/test/integration/page-extensions/test/.babelrc b/test/integration/page-extensions/test/.babelrc deleted file mode 100644 index 27c7237aeb802f8..000000000000000 --- a/test/integration/page-extensions/test/.babelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": [ - ["next/babel", { - "preset-env": { - "modules": "commonjs" - } - }] - ] -} \ No newline at end of file diff --git a/test/integration/page-extensions/test/hmr.js b/test/integration/page-extensions/test/hmr.js deleted file mode 100644 index 553aed13e4c8bb9..000000000000000 --- a/test/integration/page-extensions/test/hmr.js +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-env jest */ -import webdriver from 'next-webdriver' -import { readFileSync, writeFileSync } from 'fs' -import { join } from 'path' -import { waitFor } from 'next-test-utils' - -export default (context, renderViaHTTP) => { - describe('Hot Module Reloading', () => { - it('should reload typescript file without refresh', async () => { - let browser - const pagePath = join(__dirname, '../', 'pages', 'hmr', 'some-page.tsx') - - const originalContent = readFileSync(pagePath, 'utf8') - const editedContent = originalContent.replace('Increment', 'INCREMENT') - try { - browser = await webdriver(context.appPort, '/hmr/some-page') - const randomNumber = await browser.eval('window.HMR_RANDOM_NUMBER') - const originalButtonText = await browser.elementByCss('button').text() - expect(originalButtonText).toBe('Increment') - - // Change the about.js page - writeFileSync(pagePath, editedContent, 'utf8') - - // wait for 5 seconds - await waitFor(5000) - - const randomNumberAfterEdit = await browser.eval( - 'window.HMR_RANDOM_NUMBER' - ) - expect(randomNumberAfterEdit).toBe(randomNumber) - const updatedButtonText = await browser.elementByCss('button').text() - expect(updatedButtonText).toBe('INCREMENT') - } finally { - // restore the about page content. - writeFileSync(pagePath, originalContent, 'utf8') - if (browser) { - await browser.close() - } - } - }) - }) -} diff --git a/test/integration/page-extensions/test/index.test.js b/test/integration/page-extensions/test/index.test.js index 7a36d1f847f807e..725de071c64369d 100644 --- a/test/integration/page-extensions/test/index.test.js +++ b/test/integration/page-extensions/test/index.test.js @@ -1,23 +1,81 @@ /* eslint-env jest */ /* global jasmine */ import { join } from 'path' -import { renderViaHTTP, findPort, launchApp, killApp } from 'next-test-utils' +import fs from 'fs-extra' +import { runNextCommand } from 'next-test-utils' -// test suits -import hmr from './hmr' - -const context = {} jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 +const appDir = join(__dirname, '..') +const nextConfig = join(appDir, 'next.config.js') + describe('Page Extensions', () => { - beforeAll(async () => { - context.appPort = await findPort() - context.server = await launchApp(join(__dirname, '../'), context.appPort) + it('should use the default pageExtensions if set to undefined', async () => { + await fs.writeFile( + nextConfig, + `module.exports = { pageExtensions: undefined }` + ) + + const { stdout } = await runNextCommand(['build', appDir], { stdout: true }) + + await fs.remove(nextConfig) + + expect(stdout).toContain('Compiled successfully') + }) - // pre-build all pages at the start - await Promise.all([renderViaHTTP(context.appPort, '/hmr/some-page')]) + it('should throw if pageExtensions is not an array', async () => { + await fs.writeFile(nextConfig, `module.exports = { pageExtensions: null }`) + + const { stderr } = await runNextCommand(['build', appDir], { stderr: true }) + + await fs.remove(nextConfig) + + expect(stderr).toContain( + 'Specified pageExtensions is not an array of strings, found "null". Please update this config or remove it' + ) }) - afterAll(() => killApp(context.server)) - hmr(context, (p, q) => renderViaHTTP(context.appPort, p, q)) + it('should throw if pageExtensions is an empty array', async () => { + await fs.writeFile(nextConfig, `module.exports = { pageExtensions: [] }`) + + const { stderr } = await runNextCommand(['build', appDir], { stderr: true }) + + await fs.remove(nextConfig) + + expect(stderr).toContain( + 'Specified pageExtensions is an empty array. Please update it with the relevant extensions or remove it' + ) + }) + + it('should throw if pageExtensions has invalid extensions', async () => { + await fs.writeFile( + nextConfig, + `module.exports = { pageExtensions: ['js', 123] }` + ) + + const { stderr } = await runNextCommand(['build', appDir], { stderr: true }) + + await fs.remove(nextConfig) + + expect(stderr).toContain( + 'Specified pageExtensions is not an array of strings, found "123" of type "number". Please update this config or remove it' + ) + }) + + it('should throw if @zeit/next-typescript is used', async () => { + await fs.writeFile( + nextConfig, + `const withTypescript = require('@zeit/next-typescript') + module.exports = withTypescript() + ` + ) + + const { stderr } = await runNextCommand(['build', appDir], { stderr: true }) + + await fs.remove(nextConfig) + + expect(stderr).toContain( + '@zeit/next-typescript is no longer needed since Next.js has built-in support for TypeScript now' + ) + }) }) From 57aae473eda1302ace02693c49616e5e5bd576ac Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 20 Jan 2020 16:36:58 -0600 Subject: [PATCH 176/321] v9.2.1-canary.5 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 8f8264dc005d8f6..0a5582f4d3017cb 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1-canary.4" + "version": "9.2.1-canary.5" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 1602379f25b67c3..8346f2d792c0dc2 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 15c1bfb1e54fdfb..6eebdf43f3f8ddd 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index e32913aeed5650d..d3b9db017864952 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 85c495264a810e7..63259cf1e3b602f 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 82e89452597b379..b1da10eae4e75bd 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 748028cfa0cbc97..08b5a84292aae6e 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index d8d0628a8190161..09e9bd6182958c2 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1-canary.4", + "version": "9.2.1-canary.5", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From fcfb5959e6029439220581d0a5fac70b8cc90628 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 20 Jan 2020 16:47:52 -0600 Subject: [PATCH 177/321] Allow mismatching `href` and `as` when manually provided (#9837) * Allow mismatch href and as when manually provided * Swap warning and error and throw error in production also * Add test for mismatch error in production * Update to only show warning in development --- .../next/next-server/lib/router/router.ts | 38 +++++++---- test/integration/invalid-href/pages/[post].js | 1 + .../pages/dynamic-route-mismatch-manual.js | 7 ++ .../invalid-href/test/index.test.js | 68 ++++++++++++++++++- 4 files changed, 98 insertions(+), 16 deletions(-) create mode 100644 test/integration/invalid-href/pages/[post].js create mode 100644 test/integration/invalid-href/pages/dynamic-route-mismatch-manual.js diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index bf945755ea59e3e..a3897e261244ace 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -331,22 +331,34 @@ export default class Router implements BaseRouter { if (isDynamicRoute(route)) { const { pathname: asPathname } = parse(as) - const routeMatch = getRouteMatcher(getRouteRegex(route))(asPathname) + const routeRegex = getRouteRegex(route) + const routeMatch = getRouteMatcher(routeRegex)(asPathname) if (!routeMatch) { - const error = - `The provided \`as\` value (${asPathname}) is incompatible with the \`href\` value (${route}). ` + - `Read more: https://err.sh/zeit/next.js/incompatible-href-as` - - if (process.env.NODE_ENV !== 'production') { - throw new Error(error) - } else { - console.error(error) + const missingParams = Object.keys(routeRegex.groups).filter( + param => !query[param] + ) + + if (missingParams.length > 0) { + if (process.env.NODE_ENV !== 'production') { + console.warn( + `Mismatching \`as\` and \`href\` failed to manually provide ` + + `the params: ${missingParams.join( + ', ' + )} in the \`href\`'s \`query\`` + ) + } + + return reject( + new Error( + `The provided \`as\` value (${asPathname}) is incompatible with the \`href\` value (${route}). ` + + `Read more: https://err.sh/zeit/next.js/incompatible-href-as` + ) + ) } - return resolve(false) + } else { + // Merge params into `query`, overwriting any specified in search + Object.assign(query, routeMatch) } - - // Merge params into `query`, overwriting any specified in search - Object.assign(query, routeMatch) } Router.events.emit('routeChangeStart', as) diff --git a/test/integration/invalid-href/pages/[post].js b/test/integration/invalid-href/pages/[post].js new file mode 100644 index 000000000000000..c8c9238f4cbe48c --- /dev/null +++ b/test/integration/invalid-href/pages/[post].js @@ -0,0 +1 @@ +export default () => 'hi from post' diff --git a/test/integration/invalid-href/pages/dynamic-route-mismatch-manual.js b/test/integration/invalid-href/pages/dynamic-route-mismatch-manual.js new file mode 100644 index 000000000000000..bb9cf86937ff27a --- /dev/null +++ b/test/integration/invalid-href/pages/dynamic-route-mismatch-manual.js @@ -0,0 +1,7 @@ +import Link from 'next/link' + +export default () => ( + + Click me + +) diff --git a/test/integration/invalid-href/test/index.test.js b/test/integration/invalid-href/test/index.test.js index 4d8810d9835e1a5..6d9f9c43c30f7cb 100644 --- a/test/integration/invalid-href/test/index.test.js +++ b/test/integration/invalid-href/test/index.test.js @@ -20,13 +20,45 @@ const appDir = join(__dirname, '..') const firstErrorRegex = /Invalid href passed to router: mailto:idk@idk.com.*invalid-href-passed/ const secondErrorRegex = /Invalid href passed to router: .*google\.com.*invalid-href-passed/ -const showsError = async (pathname, regex, click = false) => { +const showsError = async ( + pathname, + regex, + click = false, + isWarn = false, + cb +) => { const browser = await webdriver(appPort, pathname) + if (isWarn) { + await browser.eval(`(function() { + window.warnLogs = [] + var origWarn = window.console.warn + window.console.warn = function() { + var warnStr = '' + for (var i = 0; i < arguments.length; i++) { + if (i > 0) warnStr += ' '; + warnStr += arguments[i] + } + window.warnLogs.push(warnStr) + origWarn.apply(undefined, arguments) + } + })()`) + } + if (click) { await browser.elementByCss('a').click() } - const errorContent = await getReactErrorOverlayContent(browser) - expect(errorContent).toMatch(regex) + if (isWarn) { + await waitFor(2000) + const warnLogs = await browser.eval('window.warnLogs') + console.log(warnLogs) + expect(warnLogs.some(log => log.match(regex))).toBe(true) + } else { + const errorContent = await getReactErrorOverlayContent(browser) + expect(errorContent).toMatch(regex) + } + + if (cb) await cb(browser) + await browser.close() } @@ -89,6 +121,16 @@ describe('Invalid hrefs', () => { /The provided `as` value \(\/blog\/post-1\) is incompatible with the `href` value \(\/\[post\]\)/, true ) + await showsError( + '/dynamic-route-mismatch', + /Mismatching `as` and `href` failed to manually provide the params: post in the `href`'s `query`/, + true, + true + ) + }) + + it('does not throw error when dynamic route mismatch is used on Link and params are manually provided', async () => { + await noError('/dynamic-route-mismatch-manual', true) }) }) @@ -123,5 +165,25 @@ describe('Invalid hrefs', () => { it('does not show error in production when https://google.com is used as href on router.replace', async () => { await noError('/second?method=replace', true) }) + + it('shows error when dynamic route mismatch is used on Link', async () => { + const browser = await webdriver(appPort, '/dynamic-route-mismatch') + await browser.eval(`(function() { + window.caughtErrors = [] + window.addEventListener('unhandledrejection', (error) => { + window.caughtErrors.push(error.reason.message) + }) + })()`) + await browser.elementByCss('a').click() + await waitFor(500) + const errors = await browser.eval('window.caughtErrors') + expect( + errors.find(err => + err.includes( + 'The provided `as` value (/blog/post-1) is incompatible with the `href` value (/[post]). Read more: https://err.sh/zeit/next.js/incompatible-href-as' + ) + ) + ).toBeTruthy() + }) }) }) From ebc46c111f4ff6a2cb86776f1b41f0e347fa1efc Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 20 Jan 2020 18:53:41 -0500 Subject: [PATCH 178/321] v9.2.1-canary.6 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 0a5582f4d3017cb..f546a708e8a6d41 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1-canary.5" + "version": "9.2.1-canary.6" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 8346f2d792c0dc2..66141d5e6472b84 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 6eebdf43f3f8ddd..8cf3c27c32c6970 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index d3b9db017864952..79b060b94e86699 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 63259cf1e3b602f..c2dc30ff429adec 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index b1da10eae4e75bd..b3fc40031b64501 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 08b5a84292aae6e..29abd0e0455d1d7 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 09e9bd6182958c2..a916101914203d1 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1-canary.5", + "version": "9.2.1-canary.6", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From c75146f7b2d13aa1a27f73dc66785edc215d38fb Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 21 Jan 2020 08:19:53 -0500 Subject: [PATCH 179/321] Test CSS/Media Caching in Production Suite (#10184) * Test CSS Modules in Production Suite * fix build * test css and media assets --- .../next/next-server/server/next-server.ts | 2 + .../production/components/logo/dark.svg | 19 ++++++++ .../production/components/logo/index.js | 5 ++ .../components/logo/logo.module.css | 3 ++ .../production/pages/css-modules.js | 7 +++ .../integration/production/test/index.test.js | 47 +++++++++++++------ 6 files changed, 68 insertions(+), 15 deletions(-) create mode 100644 test/integration/production/components/logo/dark.svg create mode 100644 test/integration/production/components/logo/index.js create mode 100644 test/integration/production/components/logo/logo.module.css create mode 100644 test/integration/production/pages/css-modules.js diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 315f88c04d839cc..a7029431e628eda 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -330,6 +330,8 @@ export default class Server { if ( params.path[0] === CLIENT_STATIC_FILES_RUNTIME || params.path[0] === 'chunks' || + params.path[0] === 'css' || + params.path[0] === 'media' || params.path[0] === this.buildId ) { this.setImmutableAssetCacheControl(res) diff --git a/test/integration/production/components/logo/dark.svg b/test/integration/production/components/logo/dark.svg new file mode 100644 index 000000000000000..aaa95aa3259e90e --- /dev/null +++ b/test/integration/production/components/logo/dark.svg @@ -0,0 +1,19 @@ + + + + Logotype - Black + Created with Sketch. + + + + + + + + + + + + diff --git a/test/integration/production/components/logo/index.js b/test/integration/production/components/logo/index.js new file mode 100644 index 000000000000000..41a481d105fdbc9 --- /dev/null +++ b/test/integration/production/components/logo/index.js @@ -0,0 +1,5 @@ +import styles from './logo.module.css' + +export default function Logo() { + return
+} diff --git a/test/integration/production/components/logo/logo.module.css b/test/integration/production/components/logo/logo.module.css new file mode 100644 index 000000000000000..774d42d9ec9d41a --- /dev/null +++ b/test/integration/production/components/logo/logo.module.css @@ -0,0 +1,3 @@ +.logo { + background-image: url(dark.svg); +} diff --git a/test/integration/production/pages/css-modules.js b/test/integration/production/pages/css-modules.js new file mode 100644 index 000000000000000..86a3aa6df705384 --- /dev/null +++ b/test/integration/production/pages/css-modules.js @@ -0,0 +1,7 @@ +import Logo from '../components/logo' + +export default () => ( +
+ +
+) diff --git a/test/integration/production/test/index.test.js b/test/integration/production/test/index.test.js index 141f96833e5dcb0..56f48a3676f7d2c 100644 --- a/test/integration/production/test/index.test.js +++ b/test/integration/production/test/index.test.js @@ -1,26 +1,27 @@ /* eslint-env jest */ /* global jasmine, browserName */ -import webdriver from 'next-webdriver' -import { readFileSync, existsSync } from 'fs' -import { join } from 'path' +import cheerio from 'cheerio' +import { existsSync, readFileSync } from 'fs' import { nextServer, + renderViaHTTP, runNextCommand, startApp, stopApp, - renderViaHTTP, waitFor, } from 'next-test-utils' -import fetch from 'node-fetch' -import dynamicImportTests from './dynamic' -import processEnv from './process-env' -import security from './security' +import webdriver from 'next-webdriver' import { BUILD_MANIFEST, - REACT_LOADABLE_MANIFEST, PAGES_MANIFEST, + REACT_LOADABLE_MANIFEST, } from 'next/constants' -import cheerio from 'cheerio' +import { recursiveReadDir } from 'next/dist/lib/recursive-readdir' +import fetch from 'node-fetch' +import { join } from 'path' +import dynamicImportTests from './dynamic' +import processEnv from './process-env' +import security from './security' const appDir = join(__dirname, '../') let serverDir let appPort @@ -172,23 +173,39 @@ describe('Production Usage', () => { )) const url = `http://localhost:${appPort}/_next/` - const resources = [] + const resources = new Set() // test a regular page - resources.push(`${url}static/${buildId}/pages/index.js`) + resources.add(`${url}static/${buildId}/pages/index.js`) // test dynamic chunk - resources.push( + resources.add( url + reactLoadableManifest['../../components/hello1'][0].publicPath ) // test main.js runtime etc for (const item of buildManifest.pages['/']) { - resources.push(url + item) + resources.add(url + item) } + const cssStaticAssets = await recursiveReadDir( + join(__dirname, '..', '.next', 'static'), + /\.css$/ + ) + expect(cssStaticAssets.length).toBeGreaterThanOrEqual(1) + expect(cssStaticAssets[0]).toMatch(/[\\/]css[\\/]/) + const mediaStaticAssets = await recursiveReadDir( + join(__dirname, '..', '.next', 'static'), + /\.svg$/ + ) + expect(mediaStaticAssets.length).toBeGreaterThanOrEqual(1) + expect(mediaStaticAssets[0]).toMatch(/[\\/]media[\\/]/) + ;[...cssStaticAssets, ...mediaStaticAssets].forEach(asset => { + resources.add(`${url}static${asset.replace(/\\+/g, '/')}`) + }) + const responses = await Promise.all( - resources.map(resource => fetch(resource)) + [...resources].map(resource => fetch(resource)) ) responses.forEach(res => { From 9b512a850cff7d4ff1329c3dcfff097c5c5f4e2b Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 21 Jan 2020 09:10:47 -0500 Subject: [PATCH 180/321] Stabilize New Dev Test (#10188) --- test/integration/invalid-href/test/index.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/invalid-href/test/index.test.js b/test/integration/invalid-href/test/index.test.js index 6d9f9c43c30f7cb..0bd3d46fb917c91 100644 --- a/test/integration/invalid-href/test/index.test.js +++ b/test/integration/invalid-href/test/index.test.js @@ -64,6 +64,7 @@ const showsError = async ( const noError = async (pathname, click = false) => { const browser = await webdriver(appPort, '/') + await waitFor(2000) await browser.eval(`(function() { window.caughtErrors = [] window.addEventListener('error', function (error) { @@ -74,7 +75,8 @@ const noError = async (pathname, click = false) => { }) window.next.router.replace('${pathname}') })()`) - await waitFor(250) + // wait for page to be built and navigated to + await waitFor(3000) if (click) { await browser.elementByCss('a').click() } From bea488f009aaf00e09ea3e9278a6e5c6e0f06d85 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 21 Jan 2020 15:18:06 +0100 Subject: [PATCH 181/321] Don't include core-js for default _document (#10187) * Don't include core-js for default _document * update taskfile.js Co-authored-by: Joe Haddad --- packages/next/taskfile.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index a9b6a7b24c8d37c..5911f1235cc704a 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -185,13 +185,36 @@ export async function nextbuildstatic(task, opts) { notify('Compiled export files') } -export async function pages(task, opts) { +export async function pages_app(task) { + await task + .source('pages/_app.tsx') + .babel(babelClientOpts) + .target('dist/pages') +} + +export async function pages_error(task) { await task - .source(opts.src || 'pages/**/*.+(js|ts|tsx)') + .source('pages/_error.tsx') .babel(babelClientOpts) .target('dist/pages') } +export async function pages_document(task) { + const babelOpts = { + ...babelServerOpts, + presets: [...babelServerOpts.presets, '@babel/preset-react'], + } + + await task + .source('pages/_document.tsx') + .babel(babelOpts) + .target('dist/pages') +} + +export async function pages(task, opts) { + await task.parallel(['pages_app', 'pages_error', 'pages_document']) +} + export async function telemetry(task, opts) { await task .source(opts.src || 'telemetry/**/*.+(js|ts|tsx)') From 4bd6a53ebcf0ea2d1a8fef269c5f8e5e0abbea50 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 21 Jan 2020 09:32:27 -0500 Subject: [PATCH 182/321] Test Query String with + Sign (#10186) --- .../query-with-encoding/pages/plus.js | 15 ++++++ .../query-with-encoding/test/index.test.js | 53 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 test/integration/query-with-encoding/pages/plus.js diff --git a/test/integration/query-with-encoding/pages/plus.js b/test/integration/query-with-encoding/pages/plus.js new file mode 100644 index 000000000000000..9350fb3f5744b0e --- /dev/null +++ b/test/integration/query-with-encoding/pages/plus.js @@ -0,0 +1,15 @@ +import Link from 'next/link' + +const Another = () => ( +
+ + Hello + + +
+ + Hello Complex + +
+) + +export default Another diff --git a/test/integration/query-with-encoding/test/index.test.js b/test/integration/query-with-encoding/test/index.test.js index 32309b8a7331237..2a78b7add8725a8 100644 --- a/test/integration/query-with-encoding/test/index.test.js +++ b/test/integration/query-with-encoding/test/index.test.js @@ -190,4 +190,57 @@ describe('Query String with Encoding', () => { } }) }) + + describe('plus', () => { + it('should have correct query on SSR', async () => { + const browser = await webdriver(appPort, '/?test=abc%2B') + try { + const text = await browser.elementByCss('#query-content').text() + expect(text).toBe('{"test":"abc+"}') + } finally { + await browser.close() + } + }) + + it('should have correct query on Router#push', async () => { + const browser = await webdriver(appPort, '/') + try { + await waitFor(2000) + await browser.eval( + `window.next.router.push({pathname:'/',query:{abc:'def+'}})` + ) + await waitFor(1000) + const text = await browser.elementByCss('#query-content').text() + expect(text).toBe('{"abc":"def+"}') + } finally { + await browser.close() + } + }) + + it('should have correct query on simple client-side ', async () => { + const browser = await webdriver(appPort, '/plus') + try { + await waitFor(2000) + await browser.elementByCss('#hello-plus').click() + await waitFor(1000) + const text = await browser.elementByCss('#query-content').text() + expect(text).toBe('{"another":"hello+"}') + } finally { + await browser.close() + } + }) + + it('should have correct query on complex client-side ', async () => { + const browser = await webdriver(appPort, '/plus') + try { + await waitFor(2000) + await browser.elementByCss('#hello-complex').click() + await waitFor(1000) + const text = await browser.elementByCss('#query-content').text() + expect(text).toBe('{"complex":"yes+"}') + } finally { + await browser.close() + } + }) + }) }) From fa65442cade925f8d232cfd15024274448e9133f Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 21 Jan 2020 15:47:20 +0100 Subject: [PATCH 183/321] Disable core-js for server-side build (#10189) * Disable core-js in server-side build * Update cache-key Co-authored-by: Joe Haddad --- packages/next/build/babel/preset.ts | 2 +- packages/next/build/webpack/loaders/next-babel-loader.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/build/babel/preset.ts b/packages/next/build/babel/preset.ts index 3ec284689f41790..ac886d86fa8a7f8 100644 --- a/packages/next/build/babel/preset.ts +++ b/packages/next/build/babel/preset.ts @@ -149,7 +149,7 @@ module.exports = ( useBuiltIns: true, }, ], - [ + !isServer && [ require('@babel/plugin-transform-runtime'), { corejs: 2, diff --git a/packages/next/build/webpack/loaders/next-babel-loader.js b/packages/next/build/webpack/loaders/next-babel-loader.js index 6c71d47c8e49eb7..ecf5c0f8056832d 100644 --- a/packages/next/build/webpack/loaders/next-babel-loader.js +++ b/packages/next/build/webpack/loaders/next-babel-loader.js @@ -4,7 +4,7 @@ import hash from 'string-hash' // increment 'e' to invalidate cache // eslint-disable-next-line no-useless-concat -const cacheKey = 'babel-cache-' + 'g' + '-' +const cacheKey = 'babel-cache-' + 'h' + '-' const nextBabelPreset = require('../../babel/preset') const getModernOptions = (babelOptions = {}) => { From 53e9983d83d0bcdc1d84617d4fadf0707d9dfbb5 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 21 Jan 2020 14:33:58 -0600 Subject: [PATCH 184/321] Add hydration callback for testing (#10195) * Add hydration callback for testing * Update size-limit test --- packages/next/client/index.js | 8 + .../auto-export/test/index.test.js | 4 - test/integration/chunking/test/index.test.js | 10 +- test/integration/config/test/client.js | 2 - .../test/index.test.js | 2 - .../css-client-nav/test/index.test.js | 4 - .../css-modules/test/index.test.js | 1 - test/integration/css/test/index.test.js | 3 - .../duplicate-pages/test/index.test.js | 2 - .../dynamic-routing/test/index.test.js | 4 - .../test/index.test.js | 1 - .../test/index.test.js | 2 - .../export-dynamic-pages/test/index.test.js | 2 - .../export-serverless/test/browser.js | 3 +- test/integration/export/test/browser.js | 3 +- test/integration/future/test/index.test.js | 2 - test/integration/hydration/test/index.test.js | 9 +- .../initial-ref/test/index.test.js | 4 +- .../invalid-href/test/index.test.js | 1 - test/integration/link-ref/test/index.test.js | 1 - .../next-dynamic/test/index.test.js | 2 - .../next-plugins/test/index.test.js | 3 - test/integration/polyfills/test/index.test.js | 9 +- .../preload-viewport/test/index.test.js | 4 - test/integration/prerender/test/index.test.js | 5 - .../integration/production/test/index.test.js | 1 - test/integration/production/test/security.js | 4 +- .../integration/size-limit/test/index.test.js | 2 +- test/lib/next-test-utils.js | 7 +- test/lib/next-webdriver.d.ts | 28 ++++ test/lib/next-webdriver.js | 150 +++--------------- test/lib/wd-chain.js | 133 ++++++++++++++++ test/tsconfig.json | 9 ++ 33 files changed, 217 insertions(+), 208 deletions(-) create mode 100644 test/lib/next-webdriver.d.ts create mode 100644 test/lib/wd-chain.js create mode 100644 test/tsconfig.json diff --git a/packages/next/client/index.js b/packages/next/client/index.js index 4650c74e1af3f24..bbbb9f60732ae85 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -114,6 +114,14 @@ class Container extends React.Component { } ) } + + if (process.env.__NEXT_TEST_MODE) { + window.__NEXT_HYDRATED = true + + if (window.__NEXT_HYDRATED_CB) { + window.__NEXT_HYDRATED_CB() + } + } } componentDidUpdate() { diff --git a/test/integration/auto-export/test/index.test.js b/test/integration/auto-export/test/index.test.js index 0b1d30fa66a12ad..a7216042c7398e7 100644 --- a/test/integration/auto-export/test/index.test.js +++ b/test/integration/auto-export/test/index.test.js @@ -8,7 +8,6 @@ import { findPort, killApp, launchApp, - waitFor, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 @@ -42,14 +41,12 @@ const runTests = () => { it('should update asPath after mount', async () => { const browser = await webdriver(appPort, '/zeit/cmnt-2') - await waitFor(500) const html = await browser.eval(`document.documentElement.innerHTML`) expect(html).toMatch(/\/zeit\/cmnt-2/) }) it('should not replace URL with page name while asPath is delayed', async () => { const browser = await webdriver(appPort, '/zeit/cmnt-1') - await waitFor(500) const val = await browser.eval(`!!window.pathnames.find(function(p) { return p !== '/zeit/cmnt-1' })`) @@ -84,7 +81,6 @@ describe('Auto Export', () => { it('should not show hydration warning from mismatching asPath', async () => { const browser = await webdriver(appPort, '/zeit/cmnt-1') - await waitFor(500) const numCaught = await browser.eval(`window.caughtWarns.length`) expect(numCaught).toBe(0) diff --git a/test/integration/chunking/test/index.test.js b/test/integration/chunking/test/index.test.js index 01a32228f705e14..f5563a6b554ef72 100644 --- a/test/integration/chunking/test/index.test.js +++ b/test/integration/chunking/test/index.test.js @@ -3,13 +3,7 @@ import { join } from 'path' import express from 'express' import http from 'http' -import { - nextBuild, - waitFor, - nextServer, - promiseCall, - stopApp, -} from 'next-test-utils' +import { nextBuild, nextServer, promiseCall, stopApp } from 'next-test-utils' import { readdir, readFile, unlink, access } from 'fs-extra' import cheerio from 'cheerio' import webdriver from 'next-webdriver' @@ -134,7 +128,6 @@ describe('Chunking', () => { it('should hydrate with granularChunks config', async () => { const browser = await webdriver(appPort, '/page2') - await waitFor(1000) const text = await browser.elementByCss('#padded-str').text() expect(text).toBe('__rad__') @@ -144,7 +137,6 @@ describe('Chunking', () => { it('should load chunks when navigating', async () => { const browser = await webdriver(appPort, '/page3') - await waitFor(1000) const text = await browser .elementByCss('#page2-link') .click() diff --git a/test/integration/config/test/client.js b/test/integration/config/test/client.js index 9d09666a7a0f0ec..5181256e2381e73 100644 --- a/test/integration/config/test/client.js +++ b/test/integration/config/test/client.js @@ -8,8 +8,6 @@ export default (context, render) => { describe('Configuration', () => { it('should have config available on the client', async () => { const browser = await webdriver(context.appPort, '/next-config') - // Wait for client side to load - await waitFor(10000) const serverText = await browser.elementByCss('#server-only').text() const serverClientText = await browser diff --git a/test/integration/conflicting-public-file-page/test/index.test.js b/test/integration/conflicting-public-file-page/test/index.test.js index cb5a7ee3c0d426b..2ac948bb92f214f 100644 --- a/test/integration/conflicting-public-file-page/test/index.test.js +++ b/test/integration/conflicting-public-file-page/test/index.test.js @@ -7,7 +7,6 @@ import { findPort, killApp, renderViaHTTP, - waitFor, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 @@ -25,7 +24,6 @@ describe('Errors on conflict between public file and page file', () => { /A conflicting public file and page file was found for path/ ) } - await waitFor(1000) await killApp(app) }) diff --git a/test/integration/css-client-nav/test/index.test.js b/test/integration/css-client-nav/test/index.test.js index 3fdbcf58db2c157..d5dfc8cba184a0a 100644 --- a/test/integration/css-client-nav/test/index.test.js +++ b/test/integration/css-client-nav/test/index.test.js @@ -5,7 +5,6 @@ import { remove } from 'fs-extra' import { nextBuild, nextStart, - waitFor, findPort, killApp, renderViaHTTP, @@ -80,9 +79,6 @@ describe('CSS Module client-side navigation in Production', () => { let browser try { browser = await webdriver(appPort, '/blue') - - await waitFor(2000) // Ensure hydration - await browser.eval(`window.__did_not_ssr = 'make sure this is set'`) const redColor = await browser.eval( diff --git a/test/integration/css-modules/test/index.test.js b/test/integration/css-modules/test/index.test.js index cb2eb58aeff4e56..3c0d865fd44dc09 100644 --- a/test/integration/css-modules/test/index.test.js +++ b/test/integration/css-modules/test/index.test.js @@ -178,7 +178,6 @@ xdescribe('Can hot reload CSS Module without losing state', () => { // FIXME: this is broken it('should update CSS color without remounting ', async () => { const browser = await webdriver(appPort, '/') - await waitFor(2000) // ensure application hydrates const desiredText = 'hello world' await browser.elementById('text-input').type(desiredText) diff --git a/test/integration/css/test/index.test.js b/test/integration/css/test/index.test.js index 8d2b401e62a54e0..b4a971c74c934d9 100644 --- a/test/integration/css/test/index.test.js +++ b/test/integration/css/test/index.test.js @@ -304,7 +304,6 @@ describe('CSS Support', () => { let browser try { browser = await webdriver(appPort, '/page1') - await waitFor(2000) // ensure application hydrates const desiredText = 'hello world' await browser.elementById('text-input').type(desiredText) @@ -703,7 +702,6 @@ describe('CSS Support', () => { it('should have the correct color (css ordering)', async () => { const browser = await webdriver(appPort, '/') - await waitFor(2000) // ensure application hydrates const currentColor = await browser.eval( `window.getComputedStyle(document.querySelector('.my-text')).color` @@ -729,7 +727,6 @@ describe('CSS Support', () => { it('should have the correct color (css ordering)', async () => { const browser = await webdriver(appPort, '/') - await waitFor(2000) // ensure application hydrates const currentColor = await browser.eval( `window.getComputedStyle(document.querySelector('.my-text')).color` diff --git a/test/integration/duplicate-pages/test/index.test.js b/test/integration/duplicate-pages/test/index.test.js index 2b2b50f5e411996..cbcd06fffcd6d0f 100644 --- a/test/integration/duplicate-pages/test/index.test.js +++ b/test/integration/duplicate-pages/test/index.test.js @@ -8,7 +8,6 @@ import { launchApp, renderViaHTTP, killApp, - waitFor, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 @@ -34,7 +33,6 @@ describe('Handles Duplicate Pages', () => { onStderr: handleOutput, }) await renderViaHTTP(appPort, '/hello') - await waitFor(3000) await killApp(app) expect(output).toMatch(/Duplicate page detected/) }) diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index 643c6407b82a322..4edbcae89075d77 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -304,7 +304,6 @@ function runTests(dev) { expect(html).toMatch(/onmpost:.*pending/) const browser = await webdriver(appPort, '/on-mount/post-1') - await waitFor(1000) const text = await browser.eval(`document.body.innerHTML`) expect(text).toMatch(/onmpost:.*post-1/) }) @@ -316,14 +315,12 @@ function runTests(dev) { it('should update with a hash in the URL', async () => { const browser = await webdriver(appPort, '/on-mount/post-1#abc') - await waitFor(1000) const text = await browser.eval(`document.body.innerHTML`) expect(text).toMatch(/onmpost:.*post-1/) }) it('should scroll to a hash on mount', async () => { const browser = await webdriver(appPort, '/on-mount/post-1#item-400') - await waitFor(1000) const text = await browser.eval(`document.body.innerHTML`) expect(text).toMatch(/onmpost:.*post-1/) @@ -334,7 +331,6 @@ function runTests(dev) { it('should scroll to a hash on client-side navigation', async () => { const browser = await webdriver(appPort, '/') - await waitFor(1000) await browser.elementByCss('#view-dynamic-with-hash').click() await browser.waitForElementByCss('p') diff --git a/test/integration/empty-object-getInitialProps/test/index.test.js b/test/integration/empty-object-getInitialProps/test/index.test.js index 951969217a548c8..e3773336850864d 100644 --- a/test/integration/empty-object-getInitialProps/test/index.test.js +++ b/test/integration/empty-object-getInitialProps/test/index.test.js @@ -49,7 +49,6 @@ describe('Empty Project', () => { it('should show empty object warning during client transition', async () => { const browser = await webdriver(appPort, '/static') - await waitFor(1000) await browser.eval(`(function() { window.gotWarn = false const origWarn = console.warn diff --git a/test/integration/export-dynamic-pages-serverless/test/index.test.js b/test/integration/export-dynamic-pages-serverless/test/index.test.js index dd2c576ee0ae301..c7fc27ac4462ae2 100644 --- a/test/integration/export-dynamic-pages-serverless/test/index.test.js +++ b/test/integration/export-dynamic-pages-serverless/test/index.test.js @@ -9,7 +9,6 @@ import { startCleanStaticServer, stopApp, renderViaHTTP, - waitFor, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 @@ -41,7 +40,6 @@ describe('Export Dyanmic Pages', () => { expect.assertions(1) const browser = await webdriver(port, '/regression/jeff-is-cool') try { - await waitFor(3000) expect(await browser.eval(`window.__AS_PATHS`)).toEqual([ '/regression/jeff-is-cool', ]) diff --git a/test/integration/export-dynamic-pages/test/index.test.js b/test/integration/export-dynamic-pages/test/index.test.js index dd2c576ee0ae301..c7fc27ac4462ae2 100644 --- a/test/integration/export-dynamic-pages/test/index.test.js +++ b/test/integration/export-dynamic-pages/test/index.test.js @@ -9,7 +9,6 @@ import { startCleanStaticServer, stopApp, renderViaHTTP, - waitFor, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 @@ -41,7 +40,6 @@ describe('Export Dyanmic Pages', () => { expect.assertions(1) const browser = await webdriver(port, '/regression/jeff-is-cool') try { - await waitFor(3000) expect(await browser.eval(`window.__AS_PATHS`)).toEqual([ '/regression/jeff-is-cool', ]) diff --git a/test/integration/export-serverless/test/browser.js b/test/integration/export-serverless/test/browser.js index c62984d088c438e..8a73de458198d61 100644 --- a/test/integration/export-serverless/test/browser.js +++ b/test/integration/export-serverless/test/browser.js @@ -1,6 +1,6 @@ /* eslint-env jest */ import webdriver from 'next-webdriver' -import { check, waitFor, getBrowserBodyText } from 'next-test-utils' +import { check, getBrowserBodyText } from 'next-test-utils' export default function(context) { describe('Render via browser', () => { @@ -184,7 +184,6 @@ export default function(context) { it('should update query after mount', async () => { const browser = await webdriver(context.port, '/query-update?hello=world') - await waitFor(2000) const query = await browser.elementByCss('#query').text() expect(JSON.parse(query)).toEqual({ hello: 'world', a: 'blue' }) await browser.close() diff --git a/test/integration/export/test/browser.js b/test/integration/export/test/browser.js index 201634536fe6475..92ea5604a50c248 100644 --- a/test/integration/export/test/browser.js +++ b/test/integration/export/test/browser.js @@ -1,6 +1,6 @@ /* eslint-env jest */ import webdriver from 'next-webdriver' -import { check, waitFor, getBrowserBodyText } from 'next-test-utils' +import { check, getBrowserBodyText } from 'next-test-utils' export default function(context) { describe('Render via browser', () => { @@ -191,7 +191,6 @@ export default function(context) { it('should update query after mount', async () => { const browser = await webdriver(context.port, '/query-update?hello=world') - await waitFor(2000) const query = await browser.elementByCss('#query').text() expect(JSON.parse(query)).toEqual({ hello: 'world', a: 'blue' }) await browser.close() diff --git a/test/integration/future/test/index.test.js b/test/integration/future/test/index.test.js index 3878b8d8e77d233..8988c97205a5411 100644 --- a/test/integration/future/test/index.test.js +++ b/test/integration/future/test/index.test.js @@ -8,7 +8,6 @@ import { startApp, stopApp, renderViaHTTP, - waitFor, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 @@ -34,7 +33,6 @@ describe('future.excludeDefaultMomentLocales', () => { it('should load momentjs', async () => { const browser = await webdriver(appPort, '/') - await waitFor(5000) expect(await browser.elementByCss('h1').text()).toMatch(/current time/i) const locales = await browser.eval('moment.locales()') expect(locales).toEqual(['en']) diff --git a/test/integration/hydration/test/index.test.js b/test/integration/hydration/test/index.test.js index 5a18abec58403b1..bca7263bf2feff6 100644 --- a/test/integration/hydration/test/index.test.js +++ b/test/integration/hydration/test/index.test.js @@ -3,13 +3,7 @@ import path from 'path' import fs from 'fs-extra' import webdriver from 'next-webdriver' -import { - nextBuild, - nextStart, - findPort, - waitFor, - killApp, -} from 'next-test-utils' +import { nextBuild, nextStart, findPort, killApp } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 const appDir = path.join(__dirname, '..') @@ -27,7 +21,6 @@ describe('Hydration', () => { it('Hydrates correctly', async () => { const browser = await webdriver(appPort, '/') - await waitFor(2000) expect(await browser.eval('window.didHydrate')).toBe(true) }) }) diff --git a/test/integration/initial-ref/test/index.test.js b/test/integration/initial-ref/test/index.test.js index a418167f7db847b..6ec48eddd025ef9 100644 --- a/test/integration/initial-ref/test/index.test.js +++ b/test/integration/initial-ref/test/index.test.js @@ -7,7 +7,6 @@ import { nextStart, launchApp, findPort, - waitFor, killApp, } from 'next-test-utils' @@ -19,12 +18,11 @@ let appPort const runTest = () => { it('Has correct initial ref values', async () => { const browser = await webdriver(appPort, '/') - await waitFor(2000) expect(await browser.elementByCss('#ref-val').text()).toContain('76px') }) } -describe('Hydration', () => { +describe('Initial Refs', () => { describe('production mode', () => { beforeAll(async () => { await nextBuild(appDir) diff --git a/test/integration/invalid-href/test/index.test.js b/test/integration/invalid-href/test/index.test.js index 0bd3d46fb917c91..8382ed9b43b95fc 100644 --- a/test/integration/invalid-href/test/index.test.js +++ b/test/integration/invalid-href/test/index.test.js @@ -64,7 +64,6 @@ const showsError = async ( const noError = async (pathname, click = false) => { const browser = await webdriver(appPort, '/') - await waitFor(2000) await browser.eval(`(function() { window.caughtErrors = [] window.addEventListener('error', function (error) { diff --git a/test/integration/link-ref/test/index.test.js b/test/integration/link-ref/test/index.test.js index d51489091a8cc84..cab64da4cafc8bc 100644 --- a/test/integration/link-ref/test/index.test.js +++ b/test/integration/link-ref/test/index.test.js @@ -35,7 +35,6 @@ const noError = async pathname => { const didPrefetch = async pathname => { const browser = await webdriver(appPort, pathname) - await waitFor(500) const links = await browser.elementsByCss('link[rel=prefetch]') let found = false diff --git a/test/integration/next-dynamic/test/index.test.js b/test/integration/next-dynamic/test/index.test.js index 6e16fcee311ab13..01db1ae88fd498d 100644 --- a/test/integration/next-dynamic/test/index.test.js +++ b/test/integration/next-dynamic/test/index.test.js @@ -7,7 +7,6 @@ import { findPort, launchApp, killApp, - waitFor, runNextCommand, nextServer, startApp, @@ -29,7 +28,6 @@ function runTests() { it('should render dynamic server rendered values on client mount', async () => { const browser = await webdriver(appPort, '/') - await waitFor(5000) const text = await browser.elementByCss('#first-render').text() // Failure case is 'Index3' diff --git a/test/integration/next-plugins/test/index.test.js b/test/integration/next-plugins/test/index.test.js index dcedcfd0c998ed6..2024a179ad58116 100644 --- a/test/integration/next-plugins/test/index.test.js +++ b/test/integration/next-plugins/test/index.test.js @@ -8,7 +8,6 @@ import { findPort, launchApp, killApp, - waitFor, nextBuild, nextStart, renderViaHTTP, @@ -57,7 +56,6 @@ function runTests() { it('should call clientInit from plugin correctly', async () => { const browser = await webdriver(appPort, '/') - await waitFor(250) expect(await browser.eval('window.didClientInit')).toBe(true) }) @@ -125,7 +123,6 @@ describe('Next.js plugins', () => { it('should expose a plugins config', async () => { const browser = await webdriver(appPort, '/') - await waitFor(500) expect(await browser.eval('window.initClientConfig')).toBe('world') }) }) diff --git a/test/integration/polyfills/test/index.test.js b/test/integration/polyfills/test/index.test.js index 27e404a6770baf2..d14af807461f80b 100644 --- a/test/integration/polyfills/test/index.test.js +++ b/test/integration/polyfills/test/index.test.js @@ -1,13 +1,7 @@ /* eslint-env jest */ /* global jasmine */ import { join } from 'path' -import { - nextBuild, - findPort, - waitFor, - nextStart, - killApp, -} from 'next-test-utils' +import { nextBuild, findPort, nextStart, killApp } from 'next-test-utils' import webdriver from 'next-webdriver' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 @@ -34,7 +28,6 @@ describe('Polyfills', () => { it('should alias fetch', async () => { const browser = await webdriver(appPort, '/fetch') - await waitFor(1000) const text = await browser.elementByCss('#test-status').text() expect(text).toBe('pass') diff --git a/test/integration/preload-viewport/test/index.test.js b/test/integration/preload-viewport/test/index.test.js index 8b49bcf85bb1f1c..96e246fe0f871f4 100644 --- a/test/integration/preload-viewport/test/index.test.js +++ b/test/integration/preload-viewport/test/index.test.js @@ -36,7 +36,6 @@ describe('Prefetching Links in viewport', () => { let browser try { browser = await webdriver(appPort, '/') - await waitFor(2 * 1000) const links = await browser.elementsByCss('link[rel=prefetch]') let found = false @@ -124,7 +123,6 @@ describe('Prefetching Links in viewport', () => { it('should not prefetch when prefetch is explicitly set to false', async () => { const browser = await webdriver(appPort, '/opt-out') - await waitFor(2 * 1000) const links = await browser.elementsByCss('link[rel=prefetch]') let found = false @@ -141,7 +139,6 @@ describe('Prefetching Links in viewport', () => { it('should not duplicate prefetches', async () => { const browser = await webdriver(appPort, '/multi-prefetch') - await waitFor(2 * 1000) const links = await browser.elementsByCss('link[rel=prefetch]') @@ -163,7 +160,6 @@ describe('Prefetching Links in viewport', () => { // info: both `/` and `/de-duped` ref the `/first` page, which we don't // want to be re-fetched/re-observed. const browser = await webdriver(appPort, '/') - await waitFor(2 * 1000) await browser.eval(`(function() { window.calledPrefetch = false window.next.router.prefetch = function() { diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index 928add00f53a687..036070238794e92 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -150,9 +150,6 @@ const navigateTest = (dev = false) => { let text = await browser.elementByCss('p').text() expect(text).toMatch(/hello.*?world/) - // hydration - await waitFor(2500) - // go to /another async function goFromHomeToAnother() { await browser.eval('window.beforeAnother = true') @@ -322,7 +319,6 @@ const runTests = (dev = false) => { it('should parse query values on mount correctly', async () => { const browser = await webdriver(appPort, '/blog/post-1?another=value') - await waitFor(2000) const text = await browser.elementByCss('#query').text() expect(text).toMatch(/another.*?value/) expect(text).toMatch(/post.*?post-1/) @@ -330,7 +326,6 @@ const runTests = (dev = false) => { it('should reload page on failed data request', async () => { const browser = await webdriver(appPort, '/') - await waitFor(500) await browser.eval('window.beforeClick = true') await browser.elementByCss('#broken-post').click() await waitFor(1000) diff --git a/test/integration/production/test/index.test.js b/test/integration/production/test/index.test.js index 56f48a3676f7d2c..1533089d0a4f829 100644 --- a/test/integration/production/test/index.test.js +++ b/test/integration/production/test/index.test.js @@ -608,7 +608,6 @@ describe('Production Usage', () => { it('should handle AMP correctly in IE', async () => { const browser = await webdriver(appPort, '/some-amp') - await waitFor(1000) const text = await browser.elementByCss('p').text() expect(text).toBe('Not AMP') }) diff --git a/test/integration/production/test/security.js b/test/integration/production/test/security.js index a76efbc36aea923..93eac4bda209519 100644 --- a/test/integration/production/test/security.js +++ b/test/integration/production/test/security.js @@ -6,10 +6,10 @@ import { renderViaHTTP, getBrowserBodyText, waitFor } from 'next-test-utils' import { recursiveReadDir } from 'next/dist/lib/recursive-readdir' import { homedir } from 'os' -// Does the same evaluation checking for INJECTED for 15 seconds, triggering every 500ms +// Does the same evaluation checking for INJECTED for 5 seconds after hydration, triggering every 500ms async function checkInjected(browser) { const start = Date.now() - while (Date.now() - start < 15000) { + while (Date.now() - start < 5000) { const bodyText = await getBrowserBodyText(browser) if (/INJECTED/.test(bodyText)) { throw new Error('Vulnerable to XSS attacks') diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index 10ae42c581ad4ff..70fd0d332d00dd2 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 234 + const delta = responseSizeKilobytes - 235 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) diff --git a/test/lib/next-test-utils.js b/test/lib/next-test-utils.js index a4bfcb75f6d71a0..0a66a45232c9aef 100644 --- a/test/lib/next-test-utils.js +++ b/test/lib/next-test-utils.js @@ -82,7 +82,12 @@ export function runNextCommand(argv, options = {}) { const nextBin = path.join(nextDir, 'dist/bin/next') const cwd = options.cwd || nextDir // Let Next.js decide the environment - const env = { ...process.env, ...options.env, NODE_ENV: '' } + const env = { + ...process.env, + ...options.env, + NODE_ENV: '', + __NEXT_TEST_MODE: 'true', + } return new Promise((resolve, reject) => { console.log(`Running command "next ${argv.join(' ')}"`) diff --git a/test/lib/next-webdriver.d.ts b/test/lib/next-webdriver.d.ts new file mode 100644 index 000000000000000..9c243dcc6f69237 --- /dev/null +++ b/test/lib/next-webdriver.d.ts @@ -0,0 +1,28 @@ +interface Chain { + elementByCss: () => Chain + elementById: () => Chain + getValue: () => Chain + text: () => Chain + type: () => Chain + moveTo: () => Chain + getComputedCss: () => Chain + getAttribute: () => Chain + hasElementByCssSelector: () => Chain + click: () => Chain + elementsByCss: () => Chain + waitForElementByCss: () => Chain + eval: () => Chain + log: () => Chain + url: () => Chain + back: () => Chain + forward: () => Chain + refresh: () => Chain + close: () => Chain + quit: () => Chain +} + +export default function( + appPort: number, + path: string, + waitHydration?: boolean +): Promise diff --git a/test/lib/next-webdriver.js b/test/lib/next-webdriver.js index faf241c16992e2b..bd6d975a50ef032 100644 --- a/test/lib/next-webdriver.js +++ b/test/lib/next-webdriver.js @@ -1,7 +1,9 @@ +/// import os from 'os' import path from 'path' import fetch from 'node-fetch' -import { until, Builder, By } from 'selenium-webdriver' +import Chain from './wd-chain' +import { Builder, By } from 'selenium-webdriver' import { Options as ChromeOptions } from 'selenium-webdriver/chrome' import { Options as SafariOptions } from 'selenium-webdriver/safari' import { Options as FireFoxOptions } from 'selenium-webdriver/firefox' @@ -153,7 +155,7 @@ const freshWindow = async () => { await browser.switchTo().window(newWindow) } -export default async (appPort, path) => { +export default async (appPort, path, waitHydration = true) => { if (!initialWindow) { initialWindow = await browser.getWindowHandle() } @@ -173,137 +175,33 @@ export default async (appPort, path) => { await browser.get(url) console.log(`\n> Loaded browser with ${url}\n`) - class Chain { - updateChain(nextCall) { - if (!this.promise) { - this.promise = Promise.resolve() - } - this.promise = this.promise.then(nextCall) - this.then = cb => this.promise.then(cb) - this.catch = cb => this.promise.catch(cb) - this.finally = cb => this.promise.finally(cb) - return this - } - - elementByCss(sel) { - return this.updateChain(() => - browser.findElement(By.css(sel)).then(el => { - el.sel = sel - el.text = () => el.getText() - el.getComputedCss = prop => el.getCssValue(prop) - el.type = text => el.sendKeys(text) - el.getValue = () => - browser.executeScript( - `return document.querySelector('${sel}').value` - ) - return el - }) - ) - } - - elementById(sel) { - return this.elementByCss(`#${sel}`) - } + // Wait for application to hydrate + if (waitHydration) { + console.log(`\n> Waiting hydration for ${url}\n`) + await browser.executeAsyncScript(function() { + var callback = arguments[arguments.length - 1] - getValue() { - return this.updateChain(el => - browser.executeScript( - `return document.querySelector('${el.sel}').value` - ) - ) - } - - text() { - return this.updateChain(el => el.getText()) - } - - type(text) { - return this.updateChain(el => el.sendKeys(text)) - } - - moveTo() { - return this.updateChain(el => { - return browser - .actions() - .move({ origin: el }) - .perform() - .then(() => el) - }) - } - - getComputedCss(prop) { - return this.updateChain(el => { - return el.getCssValue(prop) - }) - } - - getAttribute(attr) { - return this.updateChain(el => el.getAttribute(attr)) - } - - hasElementByCssSelector(sel) { - return this.eval(`document.querySelector('${sel}')`) - } - - click() { - return this.updateChain(el => { - return el.click().then(() => el) - }) - } - - elementsByCss(sel) { - return this.updateChain(() => browser.findElements(By.css(sel))) - } - - waitForElementByCss(sel, timeout) { - return this.updateChain(() => - browser.wait(until.elementLocated(By.css(sel), timeout)) - ) - } - - eval(snippet) { - if (typeof snippet === 'string' && !snippet.startsWith('return')) { - snippet = `return ${snippet}` + // if it's not a Next.js app return + if (document.documentElement.innerHTML.indexOf('__NEXT_DATA__') === -1) { + callback() } - return this.updateChain(() => browser.executeScript(snippet)) - } - - log(type) { - return this.updateChain(() => - browser - .manage() - .logs() - .get(type) - ) - } - - url() { - return this.updateChain(() => browser.getCurrentUrl()) - } - back() { - return this.updateChain(() => browser.navigate().back()) - } - - forward() { - return this.updateChain(() => browser.navigate().forward()) - } - - refresh() { - return this.updateChain(() => browser.navigate().refresh()) - } - - close() { - return this.updateChain(() => Promise.resolve()) - } - quit() { - return this.close() - } + if (window.__NEXT_HYDRATED) { + callback() + } else { + var timeout = setTimeout(callback, 10 * 1000) + window.__NEXT_HYDRATED_CB = function() { + clearTimeout(timeout) + callback() + } + } + }) + console.log(`\n> Hydration complete for ${url}\n`) } const promiseProp = new Set(['then', 'catch', 'finally']) - return new Proxy(new Chain(), { + return new Proxy(new Chain(browser), { get(obj, prop) { if (obj[prop] || promiseProp.has(prop)) { return obj[prop] diff --git a/test/lib/wd-chain.js b/test/lib/wd-chain.js new file mode 100644 index 000000000000000..0d402eee575f1a8 --- /dev/null +++ b/test/lib/wd-chain.js @@ -0,0 +1,133 @@ +import { until, By } from 'selenium-webdriver' + +export default class Chain { + constructor(browser) { + this.browser = browser + } + + updateChain(nextCall) { + if (!this.promise) { + this.promise = Promise.resolve() + } + this.promise = this.promise.then(nextCall) + this.then = cb => this.promise.then(cb) + this.catch = cb => this.promise.catch(cb) + this.finally = cb => this.promise.finally(cb) + return this + } + + elementByCss(sel) { + return this.updateChain(() => + this.browser.findElement(By.css(sel)).then(el => { + el.sel = sel + el.text = () => el.getText() + el.getComputedCss = prop => el.getCssValue(prop) + el.type = text => el.sendKeys(text) + el.getValue = () => + this.browser.executeScript( + `return document.querySelector('${sel}').value` + ) + return el + }) + ) + } + + elementById(sel) { + return this.elementByCss(`#${sel}`) + } + + getValue() { + return this.updateChain(el => + this.browser.executeScript( + `return document.querySelector('${el.sel}').value` + ) + ) + } + + text() { + return this.updateChain(el => el.getText()) + } + + type(text) { + return this.updateChain(el => el.sendKeys(text)) + } + + moveTo() { + return this.updateChain(el => { + return this.browser + .actions() + .move({ origin: el }) + .perform() + .then(() => el) + }) + } + + getComputedCss(prop) { + return this.updateChain(el => { + return el.getCssValue(prop) + }) + } + + getAttribute(attr) { + return this.updateChain(el => el.getAttribute(attr)) + } + + hasElementByCssSelector(sel) { + return this.eval(`document.querySelector('${sel}')`) + } + + click() { + return this.updateChain(el => { + return el.click().then(() => el) + }) + } + + elementsByCss(sel) { + return this.updateChain(() => this.browser.findElements(By.css(sel))) + } + + waitForElementByCss(sel, timeout) { + return this.updateChain(() => + this.browser.wait(until.elementLocated(By.css(sel), timeout)) + ) + } + + eval(snippet) { + if (typeof snippet === 'string' && !snippet.startsWith('return')) { + snippet = `return ${snippet}` + } + return this.updateChain(() => this.browser.executeScript(snippet)) + } + + log(type) { + return this.updateChain(() => + this.browser + .manage() + .logs() + .get(type) + ) + } + + url() { + return this.updateChain(() => this.browser.getCurrentUrl()) + } + + back() { + return this.updateChain(() => this.browser.navigate().back()) + } + + forward() { + return this.updateChain(() => this.browser.navigate().forward()) + } + + refresh() { + return this.updateChain(() => this.browser.navigate().refresh()) + } + + close() { + return this.updateChain(() => Promise.resolve()) + } + quit() { + return this.close() + } +} diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 000000000000000..010d7d03ce9685e --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "module": "esnext", + "target": "es6", + "allowJs": true, + "baseUrl": "./lib" + }, + "include": ["./**/*"] +} From 592a2c2f009a7be164f25af5c512c844da19cde2 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 21 Jan 2020 15:29:39 -0600 Subject: [PATCH 185/321] Update tsconfig for tests --- test/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/tsconfig.json b/test/tsconfig.json index 010d7d03ce9685e..894681abb33aae2 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -3,7 +3,8 @@ "module": "esnext", "target": "es6", "allowJs": true, - "baseUrl": "./lib" + "baseUrl": "./lib", + "noEmit": true }, "include": ["./**/*"] } From fe72fd215c62b4d7ca069b441dccde643ba94272 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 21 Jan 2020 15:49:16 -0600 Subject: [PATCH 186/321] v9.2.1-canary.7 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index f546a708e8a6d41..7023350e483ffb1 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1-canary.6" + "version": "9.2.1-canary.7" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 66141d5e6472b84..c53da15c8f2a4e6 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 8cf3c27c32c6970..2c7bfa7856cd452 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 79b060b94e86699..a6e699a47c38c0f 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index c2dc30ff429adec..4e978b56fd5f9a1 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index b3fc40031b64501..035b8275024ecb7 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 29abd0e0455d1d7..cbc0044d8bc9c96 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index a916101914203d1..d200ace266b9e9a 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1-canary.6", + "version": "9.2.1-canary.7", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From b6edf814b77cb8c9a8f01659a936d2e1c1f38e77 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 22 Jan 2020 04:16:13 -0600 Subject: [PATCH 187/321] Update error for failing to parse custom-route source (#10197) * De-dupe invalid-custom-routes tests * Update error for failing to parse custom-route source --- packages/next/lib/check-custom-routes.ts | 26 +- .../invalid-custom-routes/test/index.test.js | 512 +++++++++--------- 2 files changed, 289 insertions(+), 249 deletions(-) diff --git a/packages/next/lib/check-custom-routes.ts b/packages/next/lib/check-custom-routes.ts index cc204f24466947a..36d1737880d3bb2 100644 --- a/packages/next/lib/check-custom-routes.ts +++ b/packages/next/lib/check-custom-routes.ts @@ -126,18 +126,32 @@ export default function checkCustomRoutes( invalidParts.push(...result.invalidParts) } - if (typeof route.source === 'string') { + if (typeof route.source === 'string' && route.source.startsWith('/')) { // only show parse error if we didn't already show error // for not being a string try { // Make sure we can parse the source properly regexpMatch(route.source) } catch (err) { - // If there is an error show our err.sh but still show original error - console.error( - `\nError parsing ${route.source} https://err.sh/zeit/next.js/invalid-route-source`, - err - ) + // If there is an error show our err.sh but still show original error or a formatted one if we can + const errMatches = err.message.match(/at (\d{0,})/) + + if (errMatches) { + const position = parseInt(errMatches[1], 10) + console.error( + `\nError parsing \`${route.source}\` ` + + `https://err.sh/zeit/next.js/invalid-route-source\n` + + `Reason: ${err.message}\n\n` + + ` ${route.source}\n` + + ` ${new Array(position).fill(' ').join('')}^\n` + ) + } else { + console.error( + `\nError parsing ${route.source} https://err.sh/zeit/next.js/invalid-route-source`, + err + ) + } + invalidParts.push('`source` parse failed') } } diff --git a/test/integration/invalid-custom-routes/test/index.test.js b/test/integration/invalid-custom-routes/test/index.test.js index 008324ed7b72dcc..eaf8352f8c22733 100644 --- a/test/integration/invalid-custom-routes/test/index.test.js +++ b/test/integration/invalid-custom-routes/test/index.test.js @@ -24,264 +24,290 @@ const writeConfig = async (routes = [], type = 'redirects') => { ) } -const invalidRedirects = [ - { - // missing destination - source: '/hello', - permanent: false, - }, - { - // invalid source - source: 123, - destination: '/another', - permanent: false, - }, - { - // invalid statusCode type - source: '/hello', - destination: '/another', - statusCode: '301', - }, - { - // invalid statusCode - source: '/hello', - destination: '/another', - statusCode: 404, - }, - { - // invalid permanent value - source: '/hello', - destination: '/another', - permanent: 'yes', - }, -] - -const invalidRedirectAssertions = (stderr = '') => { - expect(stderr).toContain( - `\`destination\` is missing for route {"source":"/hello","permanent":false}` - ) - - expect(stderr).toContain( - `\`source\` is not a string for route {"source":123,"destination":"/another","permanent":false}` - ) - - expect(stderr).toContain( - `\`statusCode\` is not undefined or valid statusCode for route {"source":"/hello","destination":"/another","statusCode":"301"}` - ) - - expect(stderr).toContain( - `\`statusCode\` is not undefined or valid statusCode for route {"source":"/hello","destination":"/another","statusCode":404}` - ) - - expect(stderr).toContain( - `\`permanent\` is not set to \`true\` or \`false\` for route {"source":"/hello","destination":"/another","permanent":"yes"}` - ) - - expect(stderr).toContain( - 'Valid redirect statusCode values are 301, 302, 303, 307, 308' - ) - expect(stderr).toContain('Invalid redirects found') -} - -const invalidRewrites = [ - { - // missing destination - source: '/hello', - }, - { - // invalid source - source: 123, - destination: '/another', - }, - { - // extra field - source: '/hello', - destination: '/another', - headers: 'not-allowed', - }, - { - // missing forward slash in source - source: 'hello', - destination: '/another', - }, - { - // missing forward slash in destination - source: '/hello', - destination: 'another', - }, - { - source: '/feedback/(?!general)', - destination: '/feedback/general', - }, -] - -const invalidRewriteAssertions = (stderr = '') => { - expect(stderr).toContain( - `\`destination\` is missing for route {"source":"/hello"}` - ) - - expect(stderr).toContain( - `\`source\` is not a string for route {"source":123,"destination":"/another"}` - ) - - expect(stderr).toContain( - `invalid field: headers for route {"source":"/hello","destination":"/another","headers":"not-allowed"}` - ) - - expect(stderr).toContain( - `\`source\` does not start with / for route {"source":"hello","destination":"/another"}` - ) - - expect(stderr).toContain( - `\`destination\` does not start with / for route {"source":"/hello","destination":"another"}` - ) - - expect(stderr).toContain( - `Error parsing /feedback/(?!general) https://err.sh/zeit/next.js/invalid-route-source TypeError: Pattern cannot start with "?"` - ) - - expect(stderr).not.toContain( - 'Valid redirect statusCode values are 301, 302, 303, 307, 308' - ) - expect(stderr).toContain('Invalid rewrites found') -} - -const invalidHeaders = [ - { - // missing source - headers: [ - { - 'x-first': 'first', - }, - ], - }, - { - // invalid headers value - source: '/hello', - headers: { - 'x-first': 'first', - }, - }, - { - source: '/again', - headers: [ - { - // missing key - value: 'idk', - }, - ], - }, - { - source: '/again', - headers: [ - { - // missing value - key: 'idk', - }, - ], - }, - { - // non-allowed destination - source: '/again', - destination: '/another', - headers: [ - { - key: 'x-first', - value: 'idk', - }, - ], - }, - { - // valid one - source: '/valid-header', - headers: [ - { - key: 'x-first', - value: 'first', - }, - { - key: 'x-another', - value: 'again', - }, - ], - }, -] - -const invalidHeaderAssertions = (stderr = '') => { - expect(stderr).toContain( - '`source` is missing, `key` in header item must be string for route {"headers":[{"x-first":"first"}]}' - ) - - expect(stderr).toContain( - '`headers` field must be an array for route {"source":"/hello","headers":{"x-first":"first"}}' - ) - - expect(stderr).toContain( - '`key` in header item must be string for route {"source":"/again","headers":[{"value":"idk"}]}' - ) - - expect(stderr).toContain( - '`value` in header item must be string for route {"source":"/again","headers":[{"key":"idk"}]}' - ) - - expect(stderr).toContain( - 'invalid field: destination for route {"source":"/again","destination":"/another","headers":[{"key":"x-first","value":"idk"}]}' - ) - - expect(stderr).not.toContain('/valid-header') -} - -describe('Errors on invalid custom routes', () => { - afterAll(() => fs.remove(nextConfigPath)) +let getStderr +const runTests = () => { it('should error during next build for invalid redirects', async () => { - await writeConfig(invalidRedirects, 'redirects') - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) - invalidRedirectAssertions(stderr) + await writeConfig( + [ + { + // missing destination + source: '/hello', + permanent: false, + }, + { + // invalid source + source: 123, + destination: '/another', + permanent: false, + }, + { + // invalid statusCode type + source: '/hello', + destination: '/another', + statusCode: '301', + }, + { + // invalid statusCode + source: '/hello', + destination: '/another', + statusCode: 404, + }, + { + // invalid permanent value + source: '/hello', + destination: '/another', + permanent: 'yes', + }, + ], + 'redirects' + ) + const stderr = await getStderr() + + expect(stderr).toContain( + `\`destination\` is missing for route {"source":"/hello","permanent":false}` + ) + + expect(stderr).toContain( + `\`source\` is not a string for route {"source":123,"destination":"/another","permanent":false}` + ) + + expect(stderr).toContain( + `\`statusCode\` is not undefined or valid statusCode for route {"source":"/hello","destination":"/another","statusCode":"301"}` + ) + + expect(stderr).toContain( + `\`statusCode\` is not undefined or valid statusCode for route {"source":"/hello","destination":"/another","statusCode":404}` + ) + + expect(stderr).toContain( + `\`permanent\` is not set to \`true\` or \`false\` for route {"source":"/hello","destination":"/another","permanent":"yes"}` + ) + + expect(stderr).toContain( + 'Valid redirect statusCode values are 301, 302, 303, 307, 308' + ) + expect(stderr).toContain('Invalid redirects found') }) it('should error during next build for invalid rewrites', async () => { - await writeConfig(invalidRewrites, 'rewrites') - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) - invalidRewriteAssertions(stderr) + await writeConfig( + [ + { + // missing destination + source: '/hello', + }, + { + // invalid source + source: 123, + destination: '/another', + }, + { + // extra field + source: '/hello', + destination: '/another', + headers: 'not-allowed', + }, + { + // missing forward slash in source + source: 'hello', + destination: '/another', + }, + { + // missing forward slash in destination + source: '/hello', + destination: 'another', + }, + { + source: '/feedback/(?!general)', + destination: '/feedback/general', + }, + ], + 'rewrites' + ) + const stderr = await getStderr() + + expect(stderr).toContain( + `\`destination\` is missing for route {"source":"/hello"}` + ) + + expect(stderr).toContain( + `\`source\` is not a string for route {"source":123,"destination":"/another"}` + ) + + expect(stderr).toContain( + `invalid field: headers for route {"source":"/hello","destination":"/another","headers":"not-allowed"}` + ) + + expect(stderr).toContain( + `\`source\` does not start with / for route {"source":"hello","destination":"/another"}` + ) + + expect(stderr).toContain( + `\`destination\` does not start with / for route {"source":"/hello","destination":"another"}` + ) + + expect(stderr).toContain( + `Error parsing \`/feedback/(?!general)\` https://err.sh/zeit/next.js/invalid-route-source` + ) + expect(stderr).toContain(`Reason: Pattern cannot start with "?" at 11`) + expect(stderr).toContain(`/feedback/(?!general)`) + + expect(stderr).not.toContain( + 'Valid redirect statusCode values are 301, 302, 303, 307, 308' + ) + expect(stderr).toContain('Invalid rewrites found') }) it('should error during next build for invalid headers', async () => { - await writeConfig(invalidHeaders, 'headers') - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) - invalidHeaderAssertions(stderr) + await writeConfig( + [ + { + // missing source + headers: [ + { + 'x-first': 'first', + }, + ], + }, + { + // invalid headers value + source: '/hello', + headers: { + 'x-first': 'first', + }, + }, + { + source: '/again', + headers: [ + { + // missing key + value: 'idk', + }, + ], + }, + { + source: '/again', + headers: [ + { + // missing value + key: 'idk', + }, + ], + }, + { + // non-allowed destination + source: '/again', + destination: '/another', + headers: [ + { + key: 'x-first', + value: 'idk', + }, + ], + }, + { + // valid one + source: '/valid-header', + headers: [ + { + key: 'x-first', + value: 'first', + }, + { + key: 'x-another', + value: 'again', + }, + ], + }, + ], + 'headers' + ) + const stderr = await getStderr() + + expect(stderr).toContain( + '`source` is missing, `key` in header item must be string for route {"headers":[{"x-first":"first"}]}' + ) + + expect(stderr).toContain( + '`headers` field must be an array for route {"source":"/hello","headers":{"x-first":"first"}}' + ) + + expect(stderr).toContain( + '`key` in header item must be string for route {"source":"/again","headers":[{"value":"idk"}]}' + ) + + expect(stderr).toContain( + '`value` in header item must be string for route {"source":"/again","headers":[{"key":"idk"}]}' + ) + + expect(stderr).toContain( + 'invalid field: destination for route {"source":"/again","destination":"/another","headers":[{"key":"x-first","value":"idk"}]}' + ) + + expect(stderr).not.toContain('/valid-header') }) - it('should error during next dev for invalid redirects', async () => { - await writeConfig(invalidRedirects, 'redirects') - let stderr = '' - await launchApp(appDir, await findPort(), { - onStderr: msg => { - stderr += msg - }, - }) - invalidRedirectAssertions(stderr) + it('should show formatted error for redirect source parse fail', async () => { + await writeConfig( + [ + { + source: '/feedback/(?!general)', + destination: '/feedback/general', + permanent: false, + }, + { + source: '/learning/?', + destination: '/learning', + permanent: true, + }, + ], + 'redirects' + ) + + const stderr = await getStderr() + + expect(stderr).toContain( + `Error parsing \`/feedback/(?!general)\` https://err.sh/zeit/next.js/invalid-route-source` + ) + expect(stderr).toContain(`Reason: Pattern cannot start with "?" at 11`) + expect(stderr).toContain(`/feedback/(?!general)`) + + expect(stderr).toContain( + `Error parsing \`/learning/?\` https://err.sh/zeit/next.js/invalid-route-source` + ) + expect(stderr).toContain(`Reason: Unexpected MODIFIER at 10, expected END`) + expect(stderr).toContain(`/learning/?`) }) +} + +describe('Errors on invalid custom routes', () => { + afterAll(() => fs.remove(nextConfigPath)) - it('should error during next dev for invalid rewrites', async () => { - await writeConfig(invalidRewrites, 'rewrites') - let stderr = '' - await launchApp(appDir, await findPort(), { - onStderr: msg => { - stderr += msg - }, + describe('dev mode', () => { + beforeAll(() => { + getStderr = async () => { + let stderr = '' + await launchApp(appDir, await findPort(), { + onStderr: msg => { + stderr += msg + }, + }) + return stderr + } }) - invalidRewriteAssertions(stderr) + + runTests() }) - it('should error during next dev for invalid headers', async () => { - await writeConfig(invalidHeaders, 'headers') - let stderr = '' - await launchApp(appDir, await findPort(), { - onStderr: msg => { - stderr += msg - }, + describe('production mode', () => { + beforeAll(() => { + getStderr = async () => { + const { stderr } = await nextBuild(appDir, [], { stderr: true }) + return stderr + } }) - invalidHeaderAssertions(stderr) + + runTests() }) }) From 7b0118a991066538a91f85779b1d0227a29c6590 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 22 Jan 2020 14:34:49 +0100 Subject: [PATCH 188/321] =?UTF-8?q?Disable=20core-js=20on=20Next.js=20core?= =?UTF-8?q?=20files=20as=20it's=20not=20transforming=E2=80=A6=20(#10193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Disable core-js on Next.js core files as it's not transforming anything important * Move babel options to taskr plugin * Disable transform-runtime for pages dir * Disable correctly * Disable corejs for core files * Temporarily check if this fixes the error --- packages/next/client/index.js | 2 +- packages/next/taskfile-babel.js | 81 ++++++++++++++++++++++++++++-- packages/next/taskfile.js | 88 +++++---------------------------- 3 files changed, 90 insertions(+), 81 deletions(-) diff --git a/packages/next/client/index.js b/packages/next/client/index.js index bbbb9f60732ae85..b34e55fc15402a0 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -20,7 +20,7 @@ import { isDynamicRoute } from '../next-server/lib/router/utils/is-dynamic' // So, we need to polyfill it. // See: https://webpack.js.org/guides/code-splitting/#dynamic-imports if (!window.Promise) { - window.Promise = Promise + window.Promise = require('@babel/runtime-corejs2/core-js/promise') } const data = JSON.parse(document.getElementById('__NEXT_DATA__').textContent) diff --git a/packages/next/taskfile-babel.js b/packages/next/taskfile-babel.js index b956dcd7cee91e8..0036821f8abb6a7 100644 --- a/packages/next/taskfile-babel.js +++ b/packages/next/taskfile-babel.js @@ -4,11 +4,84 @@ const extname = require('path').extname const transform = require('@babel/core').transform +const babelClientOpts = { + presets: [ + '@babel/preset-typescript', + [ + '@babel/preset-env', + { + modules: 'commonjs', + targets: { + esmodules: true, + }, + loose: true, + exclude: ['transform-typeof-symbol'], + }, + ], + '@babel/preset-react', + ], + plugins: [ + // workaround for @taskr/esnext bug replacing `-import` with `-require(` + // eslint-disable-next-line no-useless-concat + '@babel/plugin-syntax-dynamic-impor' + 't', + ['@babel/plugin-proposal-class-properties', { loose: true }], + ], +} + +const babelServerOpts = { + presets: [ + '@babel/preset-typescript', + '@babel/preset-react', + [ + '@babel/preset-env', + { + modules: 'commonjs', + targets: { + node: '8.3', + }, + loose: true, + exclude: ['transform-typeof-symbol'], + }, + ], + ], + plugins: [ + '@babel/plugin-proposal-optional-chaining', + '@babel/plugin-proposal-nullish-coalescing-operator', + 'babel-plugin-dynamic-import-node', + ['@babel/plugin-proposal-class-properties', { loose: true }], + ], +} + module.exports = function(task) { // eslint-disable-next-line require-yield - task.plugin('babel', {}, function*(file, babelOpts, { stripExtension } = {}) { + task.plugin('babel', {}, function*( + file, + serverOrClient, + { stripExtension } = {} + ) { + // Don't compile .d.ts + if (file.base.endsWith('.d.ts')) return + + const babelOpts = + serverOrClient === 'client' ? babelClientOpts : babelServerOpts + const options = { ...babelOpts, + plugins: [ + ...babelOpts.plugins, + // pages dir doesn't need core-js + serverOrClient === 'client' + ? [ + '@babel/plugin-transform-runtime', + { + corejs: false, + helpers: true, + regenerator: false, + useESModules: false, + }, + ] + : false, + ].filter(Boolean), compact: true, babelrc: false, configFile: false, @@ -17,8 +90,10 @@ module.exports = function(task) { const output = transform(file.data, options) const ext = extname(file.base) - // Include declaration files as they are - if (file.base.endsWith('.d.ts')) return + output.code = output.code.replace( + /@babel\/runtime\//g, + '@babel/runtime-corejs2/' + ) // Replace `.ts|.tsx` with `.js` in files with an extension if (ext) { diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 5911f1235cc704a..dddbf07cdd2b890 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -1,62 +1,6 @@ const notifier = require('node-notifier') const relative = require('path').relative -const babelClientOpts = { - presets: [ - '@babel/preset-typescript', - [ - '@babel/preset-env', - { - modules: 'commonjs', - targets: { - esmodules: true, - }, - loose: true, - exclude: ['transform-typeof-symbol'], - }, - ], - '@babel/preset-react', - ], - plugins: [ - // workaround for @taskr/esnext bug replacing `-import` with `-require(` - // eslint-disable-next-line no-useless-concat - '@babel/plugin-syntax-dynamic-impor' + 't', - ['@babel/plugin-proposal-class-properties', { loose: true }], - [ - '@babel/plugin-transform-runtime', - { - corejs: 2, - helpers: true, - regenerator: false, - useESModules: false, - }, - ], - ], -} - -const babelServerOpts = { - presets: [ - '@babel/preset-typescript', - [ - '@babel/preset-env', - { - modules: 'commonjs', - targets: { - node: '8.3', - }, - loose: true, - exclude: ['transform-typeof-symbol'], - }, - ], - ], - plugins: [ - '@babel/plugin-proposal-optional-chaining', - '@babel/plugin-proposal-nullish-coalescing-operator', - 'babel-plugin-dynamic-import-node', - ['@babel/plugin-proposal-class-properties', { loose: true }], - ], -} - // eslint-disable-next-line camelcase export async function ncc_arg(task, opts) { await task @@ -126,7 +70,7 @@ export async function compile(task) { export async function bin(task, opts) { await task .source(opts.src || 'bin/*') - .babel(babelServerOpts, { stripExtension: true }) + .babel('server', { stripExtension: true }) .target('dist/bin', { mode: '0755' }) notify('Compiled binaries') } @@ -134,7 +78,7 @@ export async function bin(task, opts) { export async function cli(task, opts) { await task .source(opts.src || 'cli/**/*.+(js|ts|tsx)') - .babel(babelServerOpts) + .babel('server') .target('dist/cli') notify('Compiled cli files') } @@ -142,20 +86,15 @@ export async function cli(task, opts) { export async function lib(task, opts) { await task .source(opts.src || 'lib/**/*.+(js|ts|tsx)') - .babel(babelServerOpts) + .babel('server') .target('dist/lib') notify('Compiled lib files') } export async function server(task, opts) { - const babelOpts = { - ...babelServerOpts, - // the /server files may use React - presets: [...babelServerOpts.presets, '@babel/preset-react'], - } await task .source(opts.src || 'server/**/*.+(js|ts|tsx)') - .babel(babelOpts) + .babel('server') .target('dist/server') notify('Compiled server files') } @@ -163,7 +102,7 @@ export async function server(task, opts) { export async function nextbuild(task, opts) { await task .source(opts.src || 'build/**/*.+(js|ts|tsx)') - .babel(babelServerOpts) + .babel('server') .target('dist/build') notify('Compiled build files') } @@ -171,7 +110,7 @@ export async function nextbuild(task, opts) { export async function client(task, opts) { await task .source(opts.src || 'client/**/*.+(js|ts|tsx)') - .babel(babelClientOpts) + .babel('client') .target('dist/client') notify('Compiled client files') } @@ -180,7 +119,7 @@ export async function client(task, opts) { export async function nextbuildstatic(task, opts) { await task .source(opts.src || 'export/**/*.+(js|ts|tsx)') - .babel(babelServerOpts) + .babel('server') .target('dist/export') notify('Compiled export files') } @@ -188,26 +127,21 @@ export async function nextbuildstatic(task, opts) { export async function pages_app(task) { await task .source('pages/_app.tsx') - .babel(babelClientOpts) + .babel('client') .target('dist/pages') } export async function pages_error(task) { await task .source('pages/_error.tsx') - .babel(babelClientOpts) + .babel('client') .target('dist/pages') } export async function pages_document(task) { - const babelOpts = { - ...babelServerOpts, - presets: [...babelServerOpts.presets, '@babel/preset-react'], - } - await task .source('pages/_document.tsx') - .babel(babelOpts) + .babel('server') .target('dist/pages') } @@ -218,7 +152,7 @@ export async function pages(task, opts) { export async function telemetry(task, opts) { await task .source(opts.src || 'telemetry/**/*.+(js|ts|tsx)') - .babel(babelServerOpts) + .babel('server') .target('dist/telemetry') notify('Compiled telemetry files') } From a3f1d65eba4a28a55379da4f4696af9d33c923bd Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Wed, 22 Jan 2020 09:32:51 -0500 Subject: [PATCH 189/321] Fix ESLint Ignores and Extract Fn (#10205) --- .eslintrc.json | 9 ++ package.json | 10 +- packages/next/build/webpack-config.ts | 2 +- .../build/webpack/config/blocks/css/index.ts | 34 +---- .../blocks/css/overrideCssConfiguration.ts | 32 +++++ .../build/webpack/loaders/error-loader.ts | 4 - .../typescript/components/router.tsx | 2 +- yarn.lock | 131 ++++++++++-------- 8 files changed, 122 insertions(+), 102 deletions(-) create mode 100644 packages/next/build/webpack/config/blocks/css/overrideCssConfiguration.ts diff --git a/.eslintrc.json b/.eslintrc.json index d00a011a849420a..e9d42f59b9b3fc9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -61,6 +61,15 @@ "ignoreRestSiblings": true } ], + "no-unused-expressions": "off", + "@typescript-eslint/no-unused-expressions": [ + "error", + { + "allowShortCircuit": true, + "allowTernary": true, + "allowTaggedTemplates": true + } + ], "no-useless-constructor": "off", "@typescript-eslint/no-useless-constructor": "warn" } diff --git a/package.json b/package.json index 8af963c4e6e3d93..c1866b0dc694cd8 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "@mdx-js/loader": "0.18.0", "@types/jest": "24.0.13", "@types/string-hash": "1.1.1", - "@typescript-eslint/eslint-plugin": "2.6.1", - "@typescript-eslint/parser": "2.6.1", + "@typescript-eslint/eslint-plugin": "2.17.0", + "@typescript-eslint/parser": "2.17.0", "@zeit/next-css": "1.0.2-canary.2", "@zeit/next-sass": "1.0.2-canary.2", "@zeit/next-typescript": "1.1.2-canary.0", @@ -60,9 +60,9 @@ "cross-env": "6.0.3", "cross-spawn": "6.0.5", "escape-string-regexp": "2.0.0", - "eslint": "6.6.0", - "eslint-plugin-react": "7.16.0", - "eslint-plugin-react-hooks": "2.2.0", + "eslint": "6.8.0", + "eslint-plugin-react": "7.18.0", + "eslint-plugin-react-hooks": "2.3.0", "execa": "2.0.3", "express": "4.17.0", "faunadb": "2.6.1", diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 2352a9985f56256..777213d13dc6893 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -28,7 +28,7 @@ import { VALID_MIDDLEWARE, } from './plugins/collect-plugins' import { build as buildConfiguration } from './webpack/config' -import { __overrideCssConfiguration } from './webpack/config/blocks/css' +import { __overrideCssConfiguration } from './webpack/config/blocks/css/overrideCssConfiguration' // @ts-ignore: JS file import { pluginLoaderOptions } from './webpack/loaders/next-plugin-loader' import BuildManifestPlugin from './webpack/plugins/build-manifest-plugin' diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index ef8fb5a60185a96..fff44d5f8a70e55 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -1,6 +1,6 @@ import curry from 'lodash.curry' import path from 'path' -import webpack, { Configuration, RuleSetRule } from 'webpack' +import webpack, { Configuration } from 'webpack' import MiniCssExtractPlugin from '../../../plugins/mini-css-extract-plugin' import { loader, plugin } from '../../helpers' import { ConfigurationContext, ConfigurationFn, pipe } from '../../utils' @@ -69,38 +69,6 @@ function getClientStyleLoader({ } } -export async function __overrideCssConfiguration( - rootDirectory: string, - isProduction: boolean, - config: Configuration -) { - const postCssPlugins = await getPostCssPlugins(rootDirectory, isProduction) - - function patch(rule: RuleSetRule) { - if ( - rule.options && - typeof rule.options === 'object' && - rule.options['ident'] === '__nextjs_postcss' - ) { - rule.options.plugins = postCssPlugins - } else if (Array.isArray(rule.oneOf)) { - rule.oneOf.forEach(patch) - } else if (Array.isArray(rule.use)) { - rule.use.forEach(u => { - if (typeof u === 'object') { - patch(u) - } - }) - } - } - - // TODO: remove this rule, ESLint bug - // eslint-disable-next-line no-unused-expressions - config.module?.rules?.forEach(entry => { - patch(entry) - }) -} - export const css = curry(async function css( enabled: boolean, ctx: ConfigurationContext, diff --git a/packages/next/build/webpack/config/blocks/css/overrideCssConfiguration.ts b/packages/next/build/webpack/config/blocks/css/overrideCssConfiguration.ts new file mode 100644 index 000000000000000..5d36386181986e6 --- /dev/null +++ b/packages/next/build/webpack/config/blocks/css/overrideCssConfiguration.ts @@ -0,0 +1,32 @@ +import { Configuration, RuleSetRule } from 'webpack' +import { getPostCssPlugins } from './plugins' + +export async function __overrideCssConfiguration( + rootDirectory: string, + isProduction: boolean, + config: Configuration +) { + const postCssPlugins = await getPostCssPlugins(rootDirectory, isProduction) + + function patch(rule: RuleSetRule) { + if ( + rule.options && + typeof rule.options === 'object' && + rule.options['ident'] === '__nextjs_postcss' + ) { + rule.options.plugins = postCssPlugins + } else if (Array.isArray(rule.oneOf)) { + rule.oneOf.forEach(patch) + } else if (Array.isArray(rule.use)) { + rule.use.forEach(u => { + if (typeof u === 'object') { + patch(u) + } + }) + } + } + + config.module?.rules?.forEach(entry => { + patch(entry) + }) +} diff --git a/packages/next/build/webpack/loaders/error-loader.ts b/packages/next/build/webpack/loaders/error-loader.ts index 0097cc3c71417c9..0bf8dada332f14f 100644 --- a/packages/next/build/webpack/loaders/error-loader.ts +++ b/packages/next/build/webpack/loaders/error-loader.ts @@ -8,11 +8,7 @@ const ErrorLoader: loader.Loader = function() { const { reason = 'An unknown error has occurred' } = options - // TODO: remove this ignore -- currently an ESLint bug - // eslint-disable-next-line @typescript-eslint/no-use-before-define const resource = this._module?.issuer?.resource ?? null - // TODO: remove this ignore -- currently an ESLint bug - // eslint-disable-next-line @typescript-eslint/no-use-before-define const context = this.rootContext ?? this._compiler?.context const issuer = resource diff --git a/test/integration/typescript/components/router.tsx b/test/integration/typescript/components/router.tsx index 21c1f80d15ea62c..c33df8403d859c2 100644 --- a/test/integration/typescript/components/router.tsx +++ b/test/integration/typescript/components/router.tsx @@ -1,4 +1,4 @@ -/* eslint-disable no-unused-expressions */ +/* eslint-disable no-unused-expressions, @typescript-eslint/no-unused-expressions */ import React from 'react' import Router, { withRouter } from 'next/router' diff --git a/yarn.lock b/yarn.lock index 788305cc43a4e0b..46d1480b54c5100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2728,45 +2728,46 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.1.tgz#e34972a24f8aba0861f9ccf7130acd74fd11e079" - integrity sha512-Z0rddsGqioKbvqfohg7BwkFC3PuNLsB+GE9QkFza7tiDzuHoy0y823Y+oGNDzxNZrYyLjqkZtCTl4vCqOmEN4g== +"@typescript-eslint/eslint-plugin@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.17.0.tgz#880435a9f9bdd50b45fa286ba63fed723d73c837" + integrity sha512-tg/OMOtPeXlvk0ES8mZzEZ4gd1ruSE03nsKcK+teJhxYv5CPCXK6Mb/OK6NpB4+CqGTHs4MVeoSZXNFqpT1PyQ== dependencies: - "@typescript-eslint/experimental-utils" "2.6.1" - eslint-utils "^1.4.2" + "@typescript-eslint/experimental-utils" "2.17.0" + eslint-utils "^1.4.3" functional-red-black-tree "^1.0.1" - regexpp "^2.0.1" + regexpp "^3.0.0" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.1.tgz#eddaca17a399ebf93a8628923233b4f93793acfd" - integrity sha512-EVrrUhl5yBt7fC7c62lWmriq4MIc49zpN3JmrKqfiFXPXCM5ErfEcZYfKOhZXkW6MBjFcJ5kGZqu1b+lyyExUw== +"@typescript-eslint/experimental-utils@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.17.0.tgz#12ed4a5d656e02ff47a93efc7d1ce1b8f1242351" + integrity sha512-2bNf+mZ/3mj5/3CP56v+ldRK3vFy9jOvmCPs/Gr2DeSJh+asPZrhFniv4QmQsHWQFPJFWhFHgkGgJeRmK4m8iQ== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.6.1" + "@typescript-eslint/typescript-estree" "2.17.0" eslint-scope "^5.0.0" -"@typescript-eslint/parser@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.6.1.tgz#3c00116baa0d696bc334ca18ac5286b34793993c" - integrity sha512-PDPkUkZ4c7yA+FWqigjwf3ngPUgoLaGjMlFh6TRtbjhqxFBnkElDfckSjm98q9cMr4xRzZ15VrS/xKm6QHYf0w== +"@typescript-eslint/parser@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.17.0.tgz#627f79586d868edbab55f46a6b183cdc341aea1d" + integrity sha512-k1g3gRQ4fwfJoIfgUpz78AovicSWKFANmvTfkAHP24MgJHjWfZI6ya7tsQZt1sLczvP4G9BE5G5MgADHdmJB/w== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.6.1" - "@typescript-eslint/typescript-estree" "2.6.1" + "@typescript-eslint/experimental-utils" "2.17.0" + "@typescript-eslint/typescript-estree" "2.17.0" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.1.tgz#fb363dd4ca23384745c5ea4b7f4c867432b00d31" - integrity sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA== +"@typescript-eslint/typescript-estree@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.17.0.tgz#2ce1531ec0925ef8d22d7026235917c2638a82af" + integrity sha512-g0eVRULGnEEUakxRfJO0s0Hr1LLQqsI6OrkiCLpdHtdJJek+wyd8mb00vedqAoWldeDcOcP8plqw8/jx9Gr3Lw== dependencies: debug "^4.1.1" - glob "^7.1.4" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" is-glob "^4.0.1" - lodash.unescape "4.0.1" + lodash "^4.17.15" semver "^6.3.0" tsutils "^3.17.1" @@ -3283,7 +3284,7 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-includes@^3.0.3: +array-includes@^3.0.3, array-includes@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== @@ -5888,25 +5889,25 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-plugin-react-hooks@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.2.0.tgz#078264e9e388da6929ace09d6abe92c85963aff4" - integrity sha512-jSlnBjV2cmyIeL555H/FbvuSbQ1AtpHjLMHuPrQnt1eVA6lX8yufdygh7AArI2m8ct7ChHGx2uOaCuxq2MUn6g== +eslint-plugin-react-hooks@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz#53e073961f1f5ccf8dd19558036c1fac8c29d99a" + integrity sha512-gLKCa52G4ee7uXzdLiorca7JIQZPPXRAQDXV83J4bUEeUuc5pIEyZYAZ45Xnxe5IuupxEqHS+hUhSLIimK1EMw== -eslint-plugin-react@7.16.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.16.0.tgz#9928e4f3e2122ed3ba6a5b56d0303ba3e41d8c09" - integrity sha512-GacBAATewhhptbK3/vTP09CbFrgUJmBSaaRcWdbQLFvUZy9yVcQxigBNHGPU/KE2AyHpzj3AWXpxoMTsIDiHug== +eslint-plugin-react@7.18.0: + version "7.18.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.18.0.tgz#2317831284d005b30aff8afb7c4e906f13fa8e7e" + integrity sha512-p+PGoGeV4SaZRDsXqdj9OWcOrOpZn8gXoGPcIQTzo2IDMbAKhNDnME9myZWqO3Ic4R3YmwAZ1lDjWl2R2hMUVQ== dependencies: - array-includes "^3.0.3" + array-includes "^3.1.1" doctrine "^2.1.0" has "^1.0.3" - jsx-ast-utils "^2.2.1" - object.entries "^1.1.0" - object.fromentries "^2.0.0" - object.values "^1.1.0" + jsx-ast-utils "^2.2.3" + object.entries "^1.1.1" + object.fromentries "^2.0.2" + object.values "^1.1.1" prop-types "^15.7.2" - resolve "^1.12.0" + resolve "^1.14.2" eslint-scope@^4.0.3: version "4.0.3" @@ -5924,7 +5925,7 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.4.2, eslint-utils@^1.4.3: +eslint-utils@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== @@ -5936,10 +5937,10 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.6.0.tgz#4a01a2fb48d32aacef5530ee9c5a78f11a8afd04" - integrity sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g== +eslint@6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" @@ -5956,7 +5957,7 @@ eslint@6.6.0: file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" - globals "^11.7.0" + globals "^12.1.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -5969,7 +5970,7 @@ eslint@6.6.0: minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.2" + optionator "^0.8.3" progress "^2.0.0" regexpp "^2.0.1" semver "^6.1.2" @@ -7081,7 +7082,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@~7.1.1: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -7111,11 +7112,18 @@ global-prefix@^0.1.4: is-windows "^0.2.0" which "^1.2.12" -globals@^11.1.0, globals@^11.7.0: +globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^12.1.0: + version "12.3.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.3.0.tgz#1e564ee5c4dded2ab098b0f88f24702a3c56be13" + integrity sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw== + dependencies: + type-fest "^0.8.1" + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -8924,7 +8932,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsx-ast-utils@^2.2.1: +jsx-ast-utils@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz#8a9364e402448a3ce7f14d357738310d9248054f" integrity sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA== @@ -9380,11 +9388,6 @@ lodash.toarray@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= - lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -10573,7 +10576,7 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.entries@^1.1.0: +object.entries@^1.1.0, object.entries@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" integrity sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ== @@ -10583,7 +10586,7 @@ object.entries@^1.1.0: function-bind "^1.1.1" has "^1.0.3" -object.fromentries@^2.0.0: +object.fromentries@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" integrity sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ== @@ -10616,7 +10619,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0: +object.values@^1.1.0, object.values@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== @@ -10692,7 +10695,7 @@ optimize-css-assets-webpack-plugin@^5.0.1: cssnano "^4.1.10" last-call-webpack-plugin "^3.0.0" -optionator@^0.8.1, optionator@^0.8.2: +optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -12724,6 +12727,11 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexpp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" + integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -13045,6 +13053,13 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1: dependencies: path-parse "^1.0.6" +resolve@^1.14.2: + version "1.15.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" + integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== + dependencies: + path-parse "^1.0.6" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" From 4a2236dac3da71b743b33c9164cad76484a234b3 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Wed, 22 Jan 2020 09:50:30 -0500 Subject: [PATCH 190/321] Dedupe CSS Regexes (#10206) --- .../build/webpack/config/blocks/css/index.ts | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index fff44d5f8a70e55..1dd0283ea009429 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -13,6 +13,11 @@ import { } from './messages' import { getPostCssPlugins } from './plugins' +// RegExps for Stylesheets +const regexCssAll = /\.css$/ +const regexCssGlobal = /(? Date: Wed, 22 Jan 2020 16:24:02 +0100 Subject: [PATCH 191/321] Use builtins for React transform (#10207) * Disable core-js on Next.js core files as it's not transforming anything important * Move babel options to taskr plugin * Disable transform-runtime for pages dir * Disable correctly * Disable corejs for core files * Temporarily check if this fixes the error * Use builtIns and exclude async-to-generator * Update index.test.js --- packages/next/client/router.ts | 2 +- packages/next/taskfile-babel.js | 11 ++++++++--- test/integration/size-limit/test/index.test.js | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/next/client/router.ts b/packages/next/client/router.ts index 32da8433124f4c6..41d4dad46af9fc4 100644 --- a/packages/next/client/router.ts +++ b/packages/next/client/router.ts @@ -138,7 +138,7 @@ export function makePublicRouterInstance(router: Router): NextRouter { for (const property of urlPropertyFields) { if (typeof _router[property] === 'object') { - instance[property] = { ..._router[property] } // makes sure query is not stateful + instance[property] = Object.assign({}, _router[property]) // makes sure query is not stateful continue } diff --git a/packages/next/taskfile-babel.js b/packages/next/taskfile-babel.js index 0036821f8abb6a7..d31ced3d8bde1e4 100644 --- a/packages/next/taskfile-babel.js +++ b/packages/next/taskfile-babel.js @@ -15,10 +15,15 @@ const babelClientOpts = { esmodules: true, }, loose: true, - exclude: ['transform-typeof-symbol'], + // This is handled by the Next.js webpack config that will run next/babel over the same code. + exclude: [ + 'transform-typeof-symbol', + 'transform-async-to-generator', + 'transform-spread', + ], }, ], - '@babel/preset-react', + ['@babel/preset-react', { useBuiltIns: true }], ], plugins: [ // workaround for @taskr/esnext bug replacing `-import` with `-require(` @@ -31,7 +36,7 @@ const babelClientOpts = { const babelServerOpts = { presets: [ '@babel/preset-typescript', - '@babel/preset-react', + ['@babel/preset-react', { useBuiltIns: true }], [ '@babel/preset-env', { diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index 70fd0d332d00dd2..caedbdff0ec787b 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 235 + const delta = responseSizeKilobytes - 233 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 203 + const delta = responseSizeKilobytes - 202 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) From f67f99a29519f63b5dc32ae8c45a5345bb81e026 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Wed, 22 Jan 2020 10:50:27 -0500 Subject: [PATCH 192/321] Extract CSS Loaders into Separate Files (#10210) --- .../build/webpack/config/blocks/css/index.ts | 128 +----------------- .../config/blocks/css/loaders/client.ts | 58 ++++++++ .../{ => loaders}/getCssModuleLocalIdent.ts | 0 .../config/blocks/css/loaders/global.ts | 40 ++++++ .../config/blocks/css/loaders/index.ts | 2 + .../config/blocks/css/loaders/modules.ts | 56 ++++++++ 6 files changed, 160 insertions(+), 124 deletions(-) create mode 100644 packages/next/build/webpack/config/blocks/css/loaders/client.ts rename packages/next/build/webpack/config/blocks/css/{ => loaders}/getCssModuleLocalIdent.ts (100%) create mode 100644 packages/next/build/webpack/config/blocks/css/loaders/global.ts create mode 100644 packages/next/build/webpack/config/blocks/css/loaders/index.ts create mode 100644 packages/next/build/webpack/config/blocks/css/loaders/modules.ts diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index 1dd0283ea009429..3a7625eb2a4b4f7 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -1,10 +1,10 @@ import curry from 'lodash.curry' import path from 'path' -import webpack, { Configuration } from 'webpack' +import { Configuration } from 'webpack' import MiniCssExtractPlugin from '../../../plugins/mini-css-extract-plugin' import { loader, plugin } from '../../helpers' import { ConfigurationContext, ConfigurationFn, pipe } from '../../utils' -import { getCssModuleLocalIdent } from './getCssModuleLocalIdent' +import { getCssModuleLoader, getGlobalCssLoader } from './loaders' import { getCustomDocumentError, getGlobalImportError, @@ -18,62 +18,6 @@ const regexCssAll = /\.css$/ const regexCssGlobal = /(?. This causes ordering problems between dev - // and prod. To fix this, we render a
From a356d2f68cee9cfd0ab7d5e42b6e45ef8415a98a Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Thu, 23 Jan 2020 11:55:45 -0800 Subject: [PATCH 215/321] Add Apollo Server and Client Auth Example (#9913) * Add Apollo Server and Client Auth Example * Some updates * Updated docs Co-authored-by: Luis Alvarez D. --- .../README.md | 55 +++++++ .../apollo/client.js | 152 ++++++++++++++++++ .../apollo/resolvers.js | 95 +++++++++++ .../apollo/schema.js | 8 + .../apollo/type-defs.js | 38 +++++ .../components/field.js | 21 +++ .../lib/form.js | 13 ++ .../next.config.js | 5 + .../package.json | 32 ++++ .../pages/about.js | 11 ++ .../pages/api/graphql.js | 17 ++ .../pages/index.js | 46 ++++++ .../pages/signin.js | 75 +++++++++ .../pages/signout.js | 29 ++++ .../pages/signup.js | 73 +++++++++ 15 files changed, 670 insertions(+) create mode 100644 examples/api-routes-apollo-server-and-client-auth/README.md create mode 100644 examples/api-routes-apollo-server-and-client-auth/apollo/client.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/apollo/resolvers.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/apollo/schema.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/apollo/type-defs.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/components/field.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/lib/form.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/next.config.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/package.json create mode 100644 examples/api-routes-apollo-server-and-client-auth/pages/about.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/pages/api/graphql.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/pages/index.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/pages/signin.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/pages/signout.js create mode 100644 examples/api-routes-apollo-server-and-client-auth/pages/signup.js diff --git a/examples/api-routes-apollo-server-and-client-auth/README.md b/examples/api-routes-apollo-server-and-client-auth/README.md new file mode 100644 index 000000000000000..a449cf4c45ffb1e --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/README.md @@ -0,0 +1,55 @@ +# Apollo Server and Client Auth Example + +[Apollo](https://www.apollographql.com/client/) is a GraphQL client that allows you to easily query the exact data you need from a GraphQL server. In addition to fetching and mutating data, Apollo analyzes your queries and their results to construct a client-side cache of your data, which is kept up to date as further queries and mutations are run, fetching more results from the server. + +In this simple example, we integrate Apollo seamlessly with Next by wrapping our _pages/\_app.js_ inside a [higher-order component (HOC)](https://facebook.github.io/react/docs/higher-order-components.html). Using the HOC pattern we're able to pass down a central store of query result data created by Apollo into our React component hierarchy defined inside each page of our Next application. + +On initial page load, while on the server and inside `getInitialProps`, we invoke the Apollo method, [`getDataFromTree`](https://www.apollographql.com/docs/react/api/react-ssr/#getdatafromtree). This method returns a promise; at the point in which the promise resolves, our Apollo Client store is completely initialized. + +Note: Do not be alarmed that you see two renders being executed. Apollo recursively traverses the React render tree looking for Apollo query components. When it has done that, it fetches all these queries and then passes the result to a cache. This cache is then used to render the data on the server side (another React render). +https://www.apollographql.com/docs/react/api/react-ssr/#getdatafromtree + +## Deploy your own + +Deploy the example using [ZEIT Now](https://zeit.co/now): + +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-apollo-server-and-client-auth) + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/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 api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app +# or +yarn create next-app --example api-routes-apollo-server-and-client-auth api-routes-apollo-server-and-client-auth-app +``` + +### 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/api-routes-apollo-server-and-client-auth +cd api-routes-apollo-server-and-client-auth +``` + +Install it and run: + +```bash +npm install +npm run dev +# or +yarn +yarn dev +``` + +> If you have issues installing `bcrypt`, follow this instructions: https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions + +Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download)): + +```bash +now +``` diff --git a/examples/api-routes-apollo-server-and-client-auth/apollo/client.js b/examples/api-routes-apollo-server-and-client-auth/apollo/client.js new file mode 100644 index 000000000000000..55135ad4eb17cbe --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/apollo/client.js @@ -0,0 +1,152 @@ +import React from 'react' +import Head from 'next/head' +import { ApolloProvider } from '@apollo/react-hooks' +import { ApolloClient } from 'apollo-client' +import { InMemoryCache } from 'apollo-cache-inmemory' + +let globalApolloClient = null + +/** + * Creates and provides the apolloContext + * to a next.js PageTree. Use it by wrapping + * your PageComponent via HOC pattern. + * @param {Function|Class} PageComponent + * @param {Object} [config] + * @param {Boolean} [config.ssr=true] + */ +export function withApollo(PageComponent, { ssr = true } = {}) { + const WithApollo = ({ apolloClient, apolloState, ...pageProps }) => { + const client = apolloClient || initApolloClient(undefined, apolloState) + return ( + + + + ) + } + + // Set the correct displayName in development + if (process.env.NODE_ENV !== 'production') { + const displayName = + PageComponent.displayName || PageComponent.name || 'Component' + + if (displayName === 'App') { + console.warn('This withApollo HOC only works with PageComponents.') + } + + WithApollo.displayName = `withApollo(${displayName})` + } + + if (ssr || PageComponent.getInitialProps) { + WithApollo.getInitialProps = async ctx => { + const { AppTree } = ctx + + // Initialize ApolloClient, add it to the ctx object so + // we can use it in `PageComponent.getInitialProp`. + const apolloClient = (ctx.apolloClient = initApolloClient({ + res: ctx.res, + req: ctx.req, + })) + + // Run wrapped getInitialProps methods + let pageProps = {} + if (PageComponent.getInitialProps) { + pageProps = await PageComponent.getInitialProps(ctx) + } + + // Only on the server: + if (typeof window === 'undefined') { + // When redirecting, the response is finished. + // No point in continuing to render + if (ctx.res && ctx.res.finished) { + return pageProps + } + + // Only if ssr is enabled + if (ssr) { + try { + // Run all GraphQL queries + const { getDataFromTree } = await import('@apollo/react-ssr') + await getDataFromTree( + + ) + } catch (error) { + // Prevent Apollo Client GraphQL errors from crashing SSR. + // Handle them in components via the data.error prop: + // https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-error + console.error('Error while running `getDataFromTree`', error) + } + + // getDataFromTree does not call componentWillUnmount + // head side effect therefore need to be cleared manually + Head.rewind() + } + } + + // Extract query data from the Apollo store + const apolloState = apolloClient.cache.extract() + + return { + ...pageProps, + apolloState, + } + } + } + + return WithApollo +} + +/** + * Always creates a new apollo client on the server + * Creates or reuses apollo client in the browser. + * @param {Object} initialState + */ +function initApolloClient(ctx, initialState) { + // Make sure to create a new client for every server-side request so that data + // isn't shared between connections (which would be bad) + if (typeof window === 'undefined') { + return createApolloClient(ctx, initialState) + } + + // Reuse client on the client-side + if (!globalApolloClient) { + globalApolloClient = createApolloClient(ctx, initialState) + } + + return globalApolloClient +} + +/** + * Creates and configures the ApolloClient + * @param {Object} [initialState={}] + */ +function createApolloClient(ctx = {}, initialState = {}) { + const ssrMode = typeof window === 'undefined' + const cache = new InMemoryCache().restore(initialState) + + // Check out https://github.com/zeit/next.js/pull/4611 if you want to use the AWSAppSyncClient + return new ApolloClient({ + ssrMode, + link: createIsomorphLink(ctx), + cache, + }) +} + +function createIsomorphLink(ctx) { + if (typeof window === 'undefined') { + const { SchemaLink } = require('apollo-link-schema') + const { schema } = require('./schema') + return new SchemaLink({ schema, context: ctx }) + } else { + const { HttpLink } = require('apollo-link-http') + + return new HttpLink({ + uri: '/api/graphql', + credentials: 'same-origin', + }) + } +} diff --git a/examples/api-routes-apollo-server-and-client-auth/apollo/resolvers.js b/examples/api-routes-apollo-server-and-client-auth/apollo/resolvers.js new file mode 100644 index 000000000000000..76e6d851cdba0c0 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/apollo/resolvers.js @@ -0,0 +1,95 @@ +import { AuthenticationError, UserInputError } from 'apollo-server-micro' +import cookie from 'cookie' +import jwt from 'jsonwebtoken' +import getConfig from 'next/config' +import bcrypt from 'bcrypt' +import v4 from 'uuid/v4' + +const JWT_SECRET = getConfig().serverRuntimeConfig.JWT_SECRET + +const users = [] + +function createUser(data) { + const salt = bcrypt.genSaltSync() + + return { + id: v4(), + email: data.email, + hashedPassword: bcrypt.hashSync(data.password, salt), + } +} + +function validPassword(user, password) { + return bcrypt.compareSync(password, user.hashedPassword) +} + +export const resolvers = { + Query: { + async viewer(_parent, _args, context, _info) { + const { token } = cookie.parse(context.req.headers.cookie ?? '') + if (token) { + try { + const { id, email } = jwt.verify(token, JWT_SECRET) + + return users.find(user => user.id === id && user.email === email) + } catch { + throw new AuthenticationError( + 'Authentication token is invalid, please log in' + ) + } + } + }, + }, + Mutation: { + async signUp(_parent, args, _context, _info) { + const user = createUser(args.input) + + users.push(user) + + return { user } + }, + + async signIn(_parent, args, context, _info) { + const user = users.find(user => user.email === args.input.email) + + if (user && validPassword(user, args.input.password)) { + const token = jwt.sign( + { email: user.email, id: user.id, time: new Date() }, + JWT_SECRET, + { + expiresIn: '6h', + } + ) + + context.res.setHeader( + 'Set-Cookie', + cookie.serialize('token', token, { + httpOnly: true, + maxAge: 6 * 60 * 60, + path: '/', + sameSite: 'lax', + secure: process.env.NODE_ENV === 'production', + }) + ) + + return { user } + } + + throw new UserInputError('Invalid email and password combination') + }, + async signOut(_parent, _args, context, _info) { + context.res.setHeader( + 'Set-Cookie', + cookie.serialize('token', '', { + httpOnly: true, + maxAge: -1, + path: '/', + sameSite: 'lax', + secure: process.env.NODE_ENV === 'production', + }) + ) + + return true + }, + }, +} diff --git a/examples/api-routes-apollo-server-and-client-auth/apollo/schema.js b/examples/api-routes-apollo-server-and-client-auth/apollo/schema.js new file mode 100644 index 000000000000000..f6d70b7e86243cf --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/apollo/schema.js @@ -0,0 +1,8 @@ +import { makeExecutableSchema } from 'graphql-tools' +import { typeDefs } from './type-defs' +import { resolvers } from './resolvers' + +export const schema = makeExecutableSchema({ + typeDefs, + resolvers, +}) diff --git a/examples/api-routes-apollo-server-and-client-auth/apollo/type-defs.js b/examples/api-routes-apollo-server-and-client-auth/apollo/type-defs.js new file mode 100644 index 000000000000000..cd77f1e5b26e7d1 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/apollo/type-defs.js @@ -0,0 +1,38 @@ +import gql from 'graphql-tag' + +export const typeDefs = gql` + type User { + id: ID! + email: String! + } + + input SignUpInput { + email: String! + password: String! + } + + input SignInInput { + email: String! + password: String! + } + + type SignUpPayload { + user: User! + } + + type SignInPayload { + user: User! + } + + type Query { + user(id: ID!): User! + users: [User]! + viewer: User + } + + type Mutation { + signUp(input: SignUpInput!): SignUpPayload! + signIn(input: SignInInput!): SignInPayload! + signOut: Boolean! + } +` diff --git a/examples/api-routes-apollo-server-and-client-auth/components/field.js b/examples/api-routes-apollo-server-and-client-auth/components/field.js new file mode 100644 index 000000000000000..5ad6fa2e3548e7f --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/components/field.js @@ -0,0 +1,21 @@ +export default function Field(props) { + return ( +
+ +
+ +
+ ) +} diff --git a/examples/api-routes-apollo-server-and-client-auth/lib/form.js b/examples/api-routes-apollo-server-and-client-auth/lib/form.js new file mode 100644 index 000000000000000..7fef9d257db755c --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/lib/form.js @@ -0,0 +1,13 @@ +export function getErrorMessage(error) { + if (error.graphQLErrors) { + for (const graphQLError of error.graphQLErrors) { + if ( + graphQLError.extensions && + graphQLError.extensions.code === 'BAD_USER_INPUT' + ) { + return graphQLError.message + } + } + } + return error.message +} diff --git a/examples/api-routes-apollo-server-and-client-auth/next.config.js b/examples/api-routes-apollo-server-and-client-auth/next.config.js new file mode 100644 index 000000000000000..35db685d842d224 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/next.config.js @@ -0,0 +1,5 @@ +module.exports = { + serverRuntimeConfig: { + JWT_SECRET: 'changeme', + }, +} diff --git a/examples/api-routes-apollo-server-and-client-auth/package.json b/examples/api-routes-apollo-server-and-client-auth/package.json new file mode 100644 index 000000000000000..cc147e35e06fe6c --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/package.json @@ -0,0 +1,32 @@ +{ + "name": "with-apollo", + "version": "2.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "@apollo/react-common": "3.1.3", + "@apollo/react-hooks": "3.1.3", + "@apollo/react-ssr": "3.1.3", + "apollo-cache-inmemory": "1.6.5", + "apollo-client": "2.6.8", + "apollo-link-http": "1.5.16", + "apollo-link-schema": "1.2.4", + "apollo-server-micro": "2.9.16", + "apollo-utilities": "^1.3.2", + "bcrypt": "3.0.7", + "cookie": "0.4.0", + "graphql": "^14.0.2", + "graphql-tag": "2.10.1", + "jsonwebtoken": "8.5.1", + "next": "latest", + "prop-types": "^15.6.2", + "react": "^16.7.0", + "react-dom": "^16.7.0", + "uuid": "3.4.0" + }, + "author": "", + "license": "ISC" +} diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/about.js b/examples/api-routes-apollo-server-and-client-auth/pages/about.js new file mode 100644 index 000000000000000..37a11a9e09651f1 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/pages/about.js @@ -0,0 +1,11 @@ +import Link from 'next/link' + +export default () => ( +
+ This is a static page goto{' '} + + dynamic + {' '} + page. +
+) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/api/graphql.js b/examples/api-routes-apollo-server-and-client-auth/pages/api/graphql.js new file mode 100644 index 000000000000000..1e85d8c07dde585 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/pages/api/graphql.js @@ -0,0 +1,17 @@ +import { ApolloServer } from 'apollo-server-micro' +import { schema } from '../../apollo/schema' + +const apolloServer = new ApolloServer({ + schema, + context(ctx) { + return ctx + }, +}) + +export const config = { + api: { + bodyParser: false, + }, +} + +export default apolloServer.createHandler({ path: '/api/graphql' }) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/index.js b/examples/api-routes-apollo-server-and-client-auth/pages/index.js new file mode 100644 index 000000000000000..2ea42bf1f70f599 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/pages/index.js @@ -0,0 +1,46 @@ +import { withApollo } from '../apollo/client' +import gql from 'graphql-tag' +import Link from 'next/link' +import { useQuery } from '@apollo/react-hooks' +import { useRouter } from 'next/router' + +const ViewerQuery = gql` + query ViewerQuery { + viewer { + id + email + } + } +` + +const Index = () => { + const router = useRouter() + const { data, loading } = useQuery(ViewerQuery) + + if ( + loading === false && + data.viewer === null && + typeof window !== 'undefined' + ) { + router.push('/signin') + } + + if (data && data.viewer) { + return ( +
+ You're signed in as {data.viewer.email} goto{' '} + + static + {' '} + page. or{' '} + + signout + +
+ ) + } + + return

Loading...

+} + +export default withApollo(Index) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signin.js b/examples/api-routes-apollo-server-and-client-auth/pages/signin.js new file mode 100644 index 000000000000000..04e7d140c4976e4 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signin.js @@ -0,0 +1,75 @@ +import React from 'react' +import Link from 'next/link' +import { withApollo } from '../apollo/client' +import gql from 'graphql-tag' +import { useMutation } from '@apollo/react-hooks' +import Field from '../components/field' +import { getErrorMessage } from '../lib/form' +import { useRouter } from 'next/router' + +const SignInMutation = gql` + mutation SignInMutation($email: String!, $password: String!) { + signIn(input: { email: $email, password: $password }) { + user { + id + email + } + } + } +` + +function SignIn() { + const [signIn] = useMutation(SignInMutation) + const [errorMsg, setErrorMsg] = React.useState() + const router = useRouter() + + async function handleSubmit(event) { + event.preventDefault() + + const emailElement = event.currentTarget.elements.email + const passwordElement = event.currentTarget.elements.password + + try { + const { data } = await signIn({ + variables: { + email: emailElement.value, + password: passwordElement.value, + }, + }) + if (data.signIn.user) { + router.push('/') + } + } catch (error) { + setErrorMsg(getErrorMessage(error)) + } + } + + return ( + <> +

Sign In

+
+ {errorMsg &&

{errorMsg}

} + + + or{' '} + + Sign up + + + + ) +} + +export default withApollo(SignIn) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signout.js b/examples/api-routes-apollo-server-and-client-auth/pages/signout.js new file mode 100644 index 000000000000000..7a058862257e37c --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signout.js @@ -0,0 +1,29 @@ +import React from 'react' +import { useMutation } from '@apollo/react-hooks' + +import gql from 'graphql-tag' +import { useRouter } from 'next/router' +import { withApollo } from '../apollo/client' + +const SignOutMutation = gql` + mutation SignOutMutation { + signOut + } +` + +function SignOut() { + const router = useRouter() + const [signOut] = useMutation(SignOutMutation) + + React.useEffect(() => { + if (typeof window !== 'undefined') { + signOut().then(() => { + router.push('/signin') + }) + } + }, [signOut, router]) + + return

Signing out...

+} + +export default withApollo(SignOut) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signup.js b/examples/api-routes-apollo-server-and-client-auth/pages/signup.js new file mode 100644 index 000000000000000..77146b7759ba258 --- /dev/null +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signup.js @@ -0,0 +1,73 @@ +import React from 'react' +import Link from 'next/link' +import { withApollo } from '../apollo/client' +import gql from 'graphql-tag' +import { useMutation } from '@apollo/react-hooks' +import Field from '../components/field' +import { getErrorMessage } from '../lib/form' +import { useRouter } from 'next/router' + +const SignUpMutation = gql` + mutation SignUpMutation($email: String!, $password: String!) { + signUp(input: { email: $email, password: $password }) { + user { + id + email + } + } + } +` + +function SignUp() { + const [signUp] = useMutation(SignUpMutation) + const [errorMsg, setErrorMsg] = React.useState() + const router = useRouter() + + async function handleSubmit(event) { + event.preventDefault() + const emailElement = event.currentTarget.elements.email + const passwordElement = event.currentTarget.elements.password + + try { + await signUp({ + variables: { + email: emailElement.value, + password: passwordElement.value, + }, + }) + + router.push('/signin') + } catch (error) { + setErrorMsg(getErrorMessage(error)) + } + } + + return ( + <> +

Sign Up

+
+ {errorMsg &&

{errorMsg}

} + + + or{' '} + + Sign in + + + + ) +} + +export default withApollo(SignUp) From c713741f517e219f197b192d94674628b33de0b3 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 23 Jan 2020 15:28:37 -0500 Subject: [PATCH 216/321] Explain Ignored PostCSS Plugin (#10240) --- errors/postcss-ignored-plugin.md | 20 +++++++++++++++++++ .../webpack/config/blocks/css/plugins.ts | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 errors/postcss-ignored-plugin.md diff --git a/errors/postcss-ignored-plugin.md b/errors/postcss-ignored-plugin.md new file mode 100644 index 000000000000000..658ad57f2857575 --- /dev/null +++ b/errors/postcss-ignored-plugin.md @@ -0,0 +1,20 @@ +# Ignored PostCSS Plugin + +#### Why This Error Occurred + +The project's custom PostCSS configuration attempts to configure unnecessary plugins: + +- postcss-modules-values +- postcss-modules-scope +- postcss-modules-extract-imports +- postcss-modules-local-by-default +- postcss-modules + +#### Possible Ways to Fix It + +Remove the plugin specified in the error message from your custom PostCSS configuration. + +#### How do I configure CSS Modules? + +CSS Modules are supported in [Next.js' built-in CSS support](https://nextjs.org/docs/advanced-features/customizing-postcss-config). +You can [read more](https://nextjs.org/docs/advanced-features/customizing-postcss-config) about how to use them [here](https://nextjs.org/docs/advanced-features/customizing-postcss-config). diff --git a/packages/next/build/webpack/config/blocks/css/plugins.ts b/packages/next/build/webpack/config/blocks/css/plugins.ts index cbf5166a3cf2dd3..caa338d60a78172 100644 --- a/packages/next/build/webpack/config/blocks/css/plugins.ts +++ b/packages/next/build/webpack/config/blocks/css/plugins.ts @@ -37,7 +37,8 @@ function isIgnoredPlugin(pluginPath: string): boolean { `${chalk.yellow.bold('Warning')}: Please remove the ${chalk.underline( plugin )} plugin from your PostCSS configuration. ` + - `This plugin is automatically configured by Next.js.` + `This plugin is automatically configured by Next.js.\n` + + 'Read more: https://err.sh/next.js/postcss-ignored-plugin' ) return true } From 32ded0539eccb8d3469be52cd86df926fe2ec7dd Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 23 Jan 2020 15:39:50 -0500 Subject: [PATCH 217/321] PostCSS Error When Exporting Function (#10242) * PostCSS Error When Exporting Function * Update postcss-function.md --- errors/postcss-function.md | 30 +++++++++++++++++++ .../webpack/config/blocks/css/plugins.ts | 3 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 errors/postcss-function.md diff --git a/errors/postcss-function.md b/errors/postcss-function.md new file mode 100644 index 000000000000000..83b301eb9d0821f --- /dev/null +++ b/errors/postcss-function.md @@ -0,0 +1,30 @@ +# PostCSS Configuration Is a Function + +#### Why This Error Occurred + +The project's custom PostCSS configuration exports a function instead of an object. + +#### Possible Ways to Fix It + +Adjust the custom PostCSS configuration to not export a function. +Instead, return a plain object—if you need environment information, read it from `process.env`. + +**Before** + +```js +module.exports = ({ env }) => ({ + plugins: { + 'postcss-plugin': env === 'production' ? {} : false, + }, +}) +``` + +**After** + +```js +module.exports = { + plugins: { + 'postcss-plugin': process.env.NODE_ENV === 'production' ? {} : false, + }, +} +``` diff --git a/packages/next/build/webpack/config/blocks/css/plugins.ts b/packages/next/build/webpack/config/blocks/css/plugins.ts index caa338d60a78172..30a8e39be03997d 100644 --- a/packages/next/build/webpack/config/blocks/css/plugins.ts +++ b/packages/next/build/webpack/config/blocks/css/plugins.ts @@ -119,7 +119,8 @@ export async function getPostCssPlugins( if (typeof config === 'function') { throw new Error( - `Your custom PostCSS configuration may not export a function. Please export a plain object instead.` + `Your custom PostCSS configuration may not export a function. Please export a plain object instead.\n` + + 'Read more: https://err.sh/next.js/postcss-function' ) } From 9d7ee34d2cc026512ec05241d44d7b835f65c7d8 Mon Sep 17 00:00:00 2001 From: Arek Mytych Date: Thu, 23 Jan 2020 21:40:02 +0100 Subject: [PATCH 218/321] Add info on storing cache in GitHub Actions (#10231) * Add info on storing cache in GitHub Actions * Specify yaml for code formatting Co-Authored-By: Joe Haddad * Fix wording Co-Authored-By: Joe Haddad Co-authored-by: Joe Haddad --- errors/no-cache.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/errors/no-cache.md b/errors/no-cache.md index e6d96bfd32c68e8..2056b7c88b56d05 100644 --- a/errors/no-cache.md +++ b/errors/no-cache.md @@ -75,6 +75,17 @@ cache: - '.next/cache/**/*' # Cache Next.js for faster application rebuilds ``` +**GitHub Actions** + +Using GitHub's [actions/cache](https://github.com/actions/cache), add the following step in your workflow file: + +```yaml +uses: actions/cache@v1 +with: + path: ${{ github.workspace }}/.next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }} +``` + **Bitbucket Pipelines** Add or merge the following into your `bitbucket-pipelines.yml` at the top level (same level as `pipelines`): From 127f707c18a79fcdd20fecd2e0ccff08eca36dd3 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Thu, 23 Jan 2020 14:40:12 -0600 Subject: [PATCH 219/321] Tweak export test to be more stable (#10241) Co-authored-by: Joe Haddad --- test/integration/export-serverless/pages/index.js | 2 +- test/integration/export-serverless/test/browser.js | 4 ++-- test/integration/export/pages/index.js | 2 +- test/integration/export/test/browser.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration/export-serverless/pages/index.js b/test/integration/export-serverless/pages/index.js index ba411295915e9ad..bcdb287506d4e9d 100644 --- a/test/integration/export-serverless/pages/index.js +++ b/test/integration/export-serverless/pages/index.js @@ -40,7 +40,7 @@ export default () => ( Level1 about page - Dynamic imports page + Dynamic imports page

This is the home page

diff --git a/test/integration/export-serverless/test/browser.js b/test/integration/export-serverless/test/browser.js index 8a73de458198d61..f288fd0861399cb 100644 --- a/test/integration/export-serverless/test/browser.js +++ b/test/integration/export-serverless/test/browser.js @@ -133,12 +133,12 @@ export default function(context) { it('should render dynamic import components in the client', async () => { const browser = await webdriver(context.port, '/') await browser - .elementByCss('#dynamic-imports-page') + .elementByCss('#dynamic-imports-link') .click() .waitForElementByCss('#dynamic-imports-page') await check( - () => browser.elementByCss('#dynamic-imports-page p').text(), + () => getBrowserBodyText(browser), /Welcome to dynamic imports/ ) diff --git a/test/integration/export/pages/index.js b/test/integration/export/pages/index.js index ba411295915e9ad..bcdb287506d4e9d 100644 --- a/test/integration/export/pages/index.js +++ b/test/integration/export/pages/index.js @@ -40,7 +40,7 @@ export default () => ( Level1 about page - Dynamic imports page + Dynamic imports page

This is the home page

diff --git a/test/integration/export/test/browser.js b/test/integration/export/test/browser.js index 92ea5604a50c248..5845be17a8ad0eb 100644 --- a/test/integration/export/test/browser.js +++ b/test/integration/export/test/browser.js @@ -140,12 +140,12 @@ export default function(context) { it('should render dynamic import components in the client', async () => { const browser = await webdriver(context.port, '/') await browser - .elementByCss('#dynamic-imports-page') + .elementByCss('#dynamic-imports-link') .click() .waitForElementByCss('#dynamic-imports-page') await check( - () => browser.elementByCss('#dynamic-imports-page p').text(), + () => getBrowserBodyText(browser), /Welcome to dynamic imports/ ) From 0edd6a031ac660421fca465cbb182b4b58897d97 Mon Sep 17 00:00:00 2001 From: Prateek Bhatnagar Date: Thu, 23 Jan 2020 13:09:12 -0800 Subject: [PATCH 220/321] Adding conformance webpack plugin (#9716) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * adding Conformance Plugin behind a flag * fixing compiler ts error * fixing spelling errors 🤦🏻‍♂️ * addressing comments * bug fix * making it const enum * reverting const enum Co-authored-by: Joe Haddad --- packages/next/build/webpack-config.ts | 8 + .../TestInterface.ts | 36 +++++ .../checks/minification-conformance-check.ts | 27 ++++ .../webpack-conformance-plugin/constants.ts | 8 + .../webpack-conformance-plugin/index.ts | 149 ++++++++++++++++++ packages/next/package.json | 2 + yarn.lock | 19 ++- 7 files changed, 247 insertions(+), 2 deletions(-) create mode 100644 packages/next/build/webpack/plugins/webpack-conformance-plugin/TestInterface.ts create mode 100644 packages/next/build/webpack/plugins/webpack-conformance-plugin/checks/minification-conformance-check.ts create mode 100644 packages/next/build/webpack/plugins/webpack-conformance-plugin/constants.ts create mode 100644 packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index ab38642e45bf46d..b94f2fd6526c772 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -44,6 +44,9 @@ import { ProfilingPlugin } from './webpack/plugins/profiling-plugin' import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' import { ServerlessPlugin } from './webpack/plugins/serverless-plugin' import { TerserPlugin } from './webpack/plugins/terser-webpack-plugin/src/index' +import WebpackConformancePlugin, { + MinificationConformanceCheck, +} from './webpack/plugins/webpack-conformance-plugin' type ExcludesFalse = (x: T | false) => x is T @@ -825,6 +828,11 @@ export default async function getBaseWebpackConfig( chunkFilename: (inputChunkName: string) => inputChunkName.replace(/\.js$/, '.module.js'), }), + config.experimental.conformance && + !dev && + new WebpackConformancePlugin({ + tests: [new MinificationConformanceCheck()], + }), ].filter((Boolean as any) as ExcludesFalse), } diff --git a/packages/next/build/webpack/plugins/webpack-conformance-plugin/TestInterface.ts b/packages/next/build/webpack/plugins/webpack-conformance-plugin/TestInterface.ts new file mode 100644 index 000000000000000..47a2688b4b8400a --- /dev/null +++ b/packages/next/build/webpack/plugins/webpack-conformance-plugin/TestInterface.ts @@ -0,0 +1,36 @@ +import { NodePath } from 'ast-types/lib/node-path' + +export interface IConformanceAnomaly { + message: string + stack_trace?: string +} + +export enum IConformanceTestStatus { + SUCCESS, + FAILED, +} +export interface IConformanceTestResult { + result: IConformanceTestStatus + warnings?: Array + errors?: Array +} + +export interface IParsedModuleDetails { + request: string +} + +export type NodeInspector = ( + node: NodePath, + details: IParsedModuleDetails +) => IConformanceTestResult + +export interface IGetAstNodeResult { + visitor: string + inspectNode: NodeInspector +} + +export interface IWebpackConformanceTest { + buildStared?: (options: any) => IConformanceTestResult + getAstNode?: () => IGetAstNodeResult[] + buildCompleted?: (assets: any) => IConformanceTestResult +} diff --git a/packages/next/build/webpack/plugins/webpack-conformance-plugin/checks/minification-conformance-check.ts b/packages/next/build/webpack/plugins/webpack-conformance-plugin/checks/minification-conformance-check.ts new file mode 100644 index 000000000000000..dbef59f524cda0e --- /dev/null +++ b/packages/next/build/webpack/plugins/webpack-conformance-plugin/checks/minification-conformance-check.ts @@ -0,0 +1,27 @@ +import { + IWebpackConformanceTest, + IConformanceTestResult, + IConformanceTestStatus, +} from '../TestInterface' +import { CONFORMANCE_ERROR_PREFIX } from '../constants' + +export class MinificationConformanceCheck implements IWebpackConformanceTest { + public buildStared(options: any): IConformanceTestResult { + // TODO(prateekbh@): Implement warning for using Terser maybe? + + if (options.optimization.minimize === false) { + return { + result: IConformanceTestStatus.FAILED, + errors: [ + { + message: `${CONFORMANCE_ERROR_PREFIX}: Minification is disabled for this build.\nDisabling minification can result in serious performance degradation.`, + }, + ], + } + } else { + return { + result: IConformanceTestStatus.SUCCESS, + } + } + } +} diff --git a/packages/next/build/webpack/plugins/webpack-conformance-plugin/constants.ts b/packages/next/build/webpack/plugins/webpack-conformance-plugin/constants.ts new file mode 100644 index 000000000000000..3f0a238f0fb0021 --- /dev/null +++ b/packages/next/build/webpack/plugins/webpack-conformance-plugin/constants.ts @@ -0,0 +1,8 @@ +import chalk from 'chalk' + +const { red, yellow } = chalk + +export const CONFORMANCE_ERROR_PREFIX: string = red('[BUILD CONFORMANCE ERROR]') +export const CONFORMANCE_WARNING_PREFIX: string = yellow( + '[BUILD CONFORMANCE WARNING]' +) diff --git a/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts b/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts new file mode 100644 index 000000000000000..c52be0a5da59455 --- /dev/null +++ b/packages/next/build/webpack/plugins/webpack-conformance-plugin/index.ts @@ -0,0 +1,149 @@ +import { Compiler, compilation } from 'webpack' +import { + IConformanceTestResult, + IWebpackConformanceTest, + IConformanceAnomaly, + IGetAstNodeResult, + NodeInspector, + IConformanceTestStatus, +} from './TestInterface' +import { NodePath } from 'ast-types/lib/node-path' +import { visit } from 'recast' + +export { MinificationConformanceCheck } from './checks/minification-conformance-check' +// export { ReactSyncScriptsConformanceTest } from './tests/react-sync-scripts-conformance'; + +export interface IWebpackConformancePluginOptions { + tests: IWebpackConformanceTest[] +} + +interface VisitorMap { + [key: string]: (path: NodePath) => void +} + +export default class WebpackConformancePlugin { + private tests: IWebpackConformanceTest[] + private errors: Array + private warnings: Array + private compiler?: Compiler + + constructor(options: IWebpackConformancePluginOptions) { + this.tests = [] + if (options.tests) { + this.tests.push(...options.tests) + } + this.errors = [] + this.warnings = [] + } + + private gatherResults(results: Array): void { + results.forEach(result => { + if (result.result === IConformanceTestStatus.FAILED) { + result.errors && this.errors.push(...result.errors) + result.warnings && this.warnings.push(...result.warnings) + } + }) + } + + private buildStartedHandler = ( + compilation: compilation.Compilation, + callback: () => void + ) => { + const buildStartedResults: IConformanceTestResult[] = this.tests.map( + test => { + if (test.buildStared && this.compiler) { + return test.buildStared(this.compiler.options) + } + return { + result: IConformanceTestStatus.SUCCESS, + } as IConformanceTestResult + } + ) + + this.gatherResults(buildStartedResults) + callback() + } + + private buildCompletedHandler = ( + compilation: compilation.Compilation, + cb: () => void + ): void => { + const buildCompletedResults: IConformanceTestResult[] = this.tests.map( + test => { + if (test.buildCompleted) { + return test.buildCompleted(compilation.assets) + } + return { + result: IConformanceTestStatus.SUCCESS, + } as IConformanceTestResult + } + ) + + this.gatherResults(buildCompletedResults) + compilation.errors.push(...this.errors) + compilation.warnings.push(...this.warnings) + cb() + } + + private parserHandler = (factory: compilation.NormalModuleFactory): void => { + const JS_TYPES = ['auto', 'esm', 'dynamic'] + const collectedVisitors: Map = new Map() + // Collect all intereseted visitors from all tests. + this.tests.forEach(test => { + if (test.getAstNode) { + const getAstNodeCallbacks: IGetAstNodeResult[] = test.getAstNode() + getAstNodeCallbacks.forEach(result => { + if (!collectedVisitors.has(result.visitor)) { + collectedVisitors.set(result.visitor, []) + } + // @ts-ignore + collectedVisitors.get(result.visitor).push(result.inspectNode) + }) + } + }) + + // Do an extra walk per module and add interested visitors to the walk. + for (const type of JS_TYPES) { + factory.hooks.parser + .for('javascript/' + type) + .tap(this.constructor.name, parser => { + parser.hooks.program.tap(this.constructor.name, (ast: any) => { + const visitors: VisitorMap = {} + const that = this + for (const visitorKey of collectedVisitors.keys()) { + visitors[visitorKey] = function(path: NodePath) { + const callbacks = collectedVisitors.get(visitorKey) || [] + callbacks.forEach(cb => { + if (!cb) { + return + } + const { request } = parser.state.module + const outcome = cb(path, { request }) + that.gatherResults([outcome]) + }) + this.traverse(path) + return false + } + } + visit(ast, visitors) + }) + }) + } + } + + public apply(compiler: Compiler) { + this.compiler = compiler + compiler.hooks.make.tapAsync( + this.constructor.name, + this.buildStartedHandler + ) + compiler.hooks.emit.tapAsync( + this.constructor.name, + this.buildCompletedHandler + ) + compiler.hooks.normalModuleFactory.tap( + this.constructor.name, + this.parserHandler + ) + } +} diff --git a/packages/next/package.json b/packages/next/package.json index 82de83768bd4657..8da37d778c11020 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -122,6 +122,7 @@ "raw-body": "2.4.0", "react-error-overlay": "5.1.6", "react-is": "16.8.6", + "recast": "0.18.5", "resolve-url-loader": "3.1.1", "sass-loader": "8.0.2", "send": "0.17.1", @@ -185,6 +186,7 @@ "@types/webpack-sources": "0.1.5", "@zeit/ncc": "0.18.5", "arg": "4.1.0", + "ast-types": "0.13.2", "babel-plugin-dynamic-import-node": "2.3.0", "nanoid": "2.0.3", "resolve": "1.11.0", diff --git a/yarn.lock b/yarn.lock index 907b2f185d5e2d6..e1b0f6dd1036547 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3395,6 +3395,11 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= +ast-types@0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.2.tgz#df39b677a911a83f3a049644fb74fdded23cea48" + integrity sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA== + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" @@ -6072,7 +6077,7 @@ esprima@^3.1.3: resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= -esprima@^4.0.0: +esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -12230,7 +12235,7 @@ pretty-hrtime@^1.0.3: resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= -private@^0.1.6: +private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== @@ -12753,6 +12758,16 @@ realpath-native@^1.1.0: dependencies: util.promisify "^1.0.0" +recast@0.18.5: + version "0.18.5" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.18.5.tgz#9d5adbc07983a3c8145f3034812374a493e0fe4d" + integrity sha512-sD1WJrpLQAkXGyQZyGzTM75WJvyAd98II5CHdK3IYbt/cZlU0UzCRVU11nUFNXX9fBVEt4E9ajkMjBlUlG+Oog== + dependencies: + ast-types "0.13.2" + esprima "~4.0.0" + private "^0.1.8" + source-map "~0.6.1" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" From 3f9b930815ea17ceecb48dd41fac840f239c911b Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 23 Jan 2020 16:27:07 -0500 Subject: [PATCH 221/321] Error on Invalid PostCSS Shape (#10244) * Error on Invalid PostCSS Shape * Add link to docs --- errors/postcss-shape.md | 129 ++++++++++++++++++ .../webpack/config/blocks/css/plugins.ts | 11 +- 2 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 errors/postcss-shape.md diff --git a/errors/postcss-shape.md b/errors/postcss-shape.md new file mode 100644 index 000000000000000..889fe55bcbc680a --- /dev/null +++ b/errors/postcss-shape.md @@ -0,0 +1,129 @@ +# Invalid PostCSS Configuration + +#### Why This Error Occurred + +PostCSS configuration was provided in an unsupported shape. + +#### Possible Ways to Fix It + +PostCSS configuration must be defined in the following shape: + +```js +module.exports = { + plugins: [ + // A plugin that does not require configuration: + 'simple-plugin-example', + + // A plugin which needs a configuration object: + [ + 'plugin-with-configuration', + { + optionA: '...', + }, + ], + + // A plugin that is toggled on or off based on environment: + [ + 'plugin-toggled', + process.env.NODE_ENV === 'production' + ? { + optionA: '...', + } + : false, + ], + + // Boolean expressions are also valid. + // `true` enables the plugin, `false` disables the plugin: + ['plugin-toggled-2', true /* a === b, etc */], + ], +} +``` + +You can [read more](https://nextjs.org/docs/advanced-features/customizing-postcss-config) about configuring PostCSS in Next.js [here](https://nextjs.org/docs/advanced-features/customizing-postcss-config). + +#### Common Errors + +**Before: plugin is require()'d** + +```js +const pluginA = require('postcss-plugin-a') +module.exports = { + plugins: [require('postcss-plugin'), pluginA], +} +``` + +**After** + +```js +module.exports = { + plugins: ['postcss-plugin', 'postcss-plugin-a'], +} +``` + +--- + +**Before: plugin is instantiated with configuration** + +```js +module.exports = { + plugins: [ + require('postcss-plugin')({ + optionA: '...', + }), + ], +} +``` + +**After** + +```js +module.exports = { + plugins: [ + // Pay attention to this nested array. The first index is the plugin name, + // the second index is the configuration. + [ + 'postcss-plugin', + { + optionA: '...', + }, + ], + ], +} +``` + +--- + +**Before: plugin is missing configuration** + +```js +module.exports = { + plugins: [ + [ + 'postcss-plugin-1', + { + optionA: '...', + }, + ], + // This single-entry array is detected as misconfigured because it's + // missing the second element. To fix, unwrap the value. + ['postcss-plugin-2'], + ], +} +``` + +**After** + +```js +module.exports = { + plugins: [ + [ + 'postcss-plugin-1', + { + optionA: '...', + }, + ], + // Only string: + 'postcss-plugin-2', + ], +} +``` diff --git a/packages/next/build/webpack/config/blocks/css/plugins.ts b/packages/next/build/webpack/config/blocks/css/plugins.ts index 30a8e39be03997d..0720d341f7b4b2b 100644 --- a/packages/next/build/webpack/config/blocks/css/plugins.ts +++ b/packages/next/build/webpack/config/blocks/css/plugins.ts @@ -184,13 +184,15 @@ export async function getPostCssPlugins( 'Error' )}: A PostCSS Plugin must be provided as a ${chalk.bold( 'string' - )}. Instead, we got: '${pluginName}'.` + )}. Instead, we got: '${pluginName}'.\n` + + 'Read more: https://err.sh/next.js/postcss-shape' ) } else { console.error( `${chalk.red.bold( 'Error' - )}: A PostCSS Plugin was passed as an array but did not provide its configuration ('${pluginName}').` + )}: A PostCSS Plugin was passed as an array but did not provide its configuration ('${pluginName}').\n` + + 'Read more: https://err.sh/next.js/postcss-shape' ) } throw new Error(genericErrorText) @@ -201,14 +203,15 @@ export async function getPostCssPlugins( 'Error' )}: A PostCSS Plugin was passed as a function using require(), but it must be provided as a ${chalk.bold( 'string' - )}.` + )}.\nRead more: https://err.sh/next.js/postcss-shape` ) throw new Error(genericErrorText) } else { console.error( `${chalk.red.bold( 'Error' - )}: An unknown PostCSS plugin was provided (${plugin}).` + )}: An unknown PostCSS plugin was provided (${plugin}).\n` + + 'Read more: https://err.sh/next.js/postcss-shape' ) throw new Error(genericErrorText) } From f495ec44f17e8fd978faade12e0ac4d370cf5381 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 23 Jan 2020 16:39:43 -0500 Subject: [PATCH 222/321] v9.2.1-canary.11 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 08b92ab04161eba..cdfbf38bb8b93a4 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1-canary.10" + "version": "9.2.1-canary.11" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index e16a3f77959168d..c39fae7fe6a32fb 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 68a9f7beedf2c65..5c4927255422ce5 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index ad1e5fdbd14ac6e..8751cff633a0d41 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 7a2e1e9a9a8cd0b..3bfed9c6c1a3b14 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 29bd6f656995c18..32b5392541c16b6 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 3b775ca884a252a..447dcae60818279 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 8da37d778c11020..b6f336979765299 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1-canary.10", + "version": "9.2.1-canary.11", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 45d5535b36e1c6794dce6bfafdda2d008771b6d1 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 23 Jan 2020 17:09:26 -0500 Subject: [PATCH 223/321] v9.2.1 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index cdfbf38bb8b93a4..4224ec9796277bc 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1-canary.11" + "version": "9.2.1" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index c39fae7fe6a32fb..aeb07f1ed8bdae0 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1-canary.11", + "version": "9.2.1", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 5c4927255422ce5..e316dc84503745f 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1-canary.11", + "version": "9.2.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 8751cff633a0d41..022aaaec43d3163 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1-canary.11", + "version": "9.2.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 3bfed9c6c1a3b14..3b8e6e70716db14 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1-canary.11", + "version": "9.2.1", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 32b5392541c16b6..eab16d20f2fa2d4 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1-canary.11", + "version": "9.2.1", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 447dcae60818279..f9b2f5330bb13ed 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1-canary.11", + "version": "9.2.1", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index b6f336979765299..042409932aa3ac8 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1-canary.11", + "version": "9.2.1", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 5bcd33fccbb771d8004a568b67e6e03b301c5764 Mon Sep 17 00:00:00 2001 From: Nikita Borisowsky Date: Fri, 24 Jan 2020 05:41:48 +0200 Subject: [PATCH 224/321] Fix missing file extensions in docs (#10251) --- docs/routing/dynamic-routes.md | 2 +- docs/routing/introduction.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/routing/dynamic-routes.md b/docs/routing/dynamic-routes.md index b69af21ae98f8fe..483de9d1732fcbf 100644 --- a/docs/routing/dynamic-routes.md +++ b/docs/routing/dynamic-routes.md @@ -60,7 +60,7 @@ Client-side navigations to a dynamic route can be handled with [`next/link`](/do Dynamic routes can be extended to catch all paths by adding three dots (`...`) inside the brackets. For example: -- `pages/post/[...slug]` matches `/post/a`, but also `post/a/b`, `post/a/b/c` and so on. +- `pages/post/[...slug].js` matches `/post/a`, but also `post/a/b`, `post/a/b/c` and so on. Matched parameters will be sent as a query parameter (`slug` in the example) to the page, and it will always be an array, so, the path `/post/a` will have the following `query` object: diff --git a/docs/routing/introduction.md b/docs/routing/introduction.md index 1b92f8337825349..4191ff1d4ece9c1 100644 --- a/docs/routing/introduction.md +++ b/docs/routing/introduction.md @@ -30,7 +30,7 @@ To match a dynamic segment you can use the bracket syntax. This allows you to ma - `pages/blog/[slug].js` → `/blog/:slug` (`/blog/hello-world`) - `pages/[username]/settings.js` → `/:username/settings` (`/foo/settings`) -- `pages/post/[...all]` → `/post/*` (`/post/2020/id/title`) +- `pages/post/[...all].js` → `/post/*` (`/post/2020/id/title`) ## Linking between pages From 8579888cecc8229e32c8662bd27fe8ebf144bfda Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 24 Jan 2020 17:27:39 -0600 Subject: [PATCH 225/321] De-dupe escape-regex with escape-string-regexp (#10257) * De-dupe escape-regex with escape-string-regex * Un de-dupe for client-side file --- .../next/build/webpack/loaders/next-serverless-loader.ts | 3 ++- packages/next/package.json | 1 + test/integration/custom-routes/test/index.test.js | 3 +-- test/integration/prerender/test/index.test.js | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index a454ca739ad59e6..634b09a4d927e26 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -8,6 +8,7 @@ import { } from '../../../next-server/lib/constants' import { isDynamicRoute } from '../../../next-server/lib/router/utils' import { API_ROUTE } from '../../../lib/constants' +import escapeRegexp from 'escape-string-regexp' export type ServerlessLoaderQuery = { page: string @@ -46,7 +47,7 @@ const nextServerlessLoader: loader.Loader = function() { ) const routesManifest = join(distDir, ROUTES_MANIFEST).replace(/\\/g, '/') - const escapedBuildId = buildId.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') + const escapedBuildId = escapeRegexp(buildId) const pageIsDynamicRoute = isDynamicRoute(page) const dynamicRouteImports = pageIsDynamicRoute diff --git a/packages/next/package.json b/packages/next/package.json index 042409932aa3ac8..82e83b697851d37 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -92,6 +92,7 @@ "css-loader": "3.3.0", "cssnano-simple": "1.0.0", "devalue": "2.0.1", + "escape-string-regexp": "2.0.0", "etag": "1.8.1", "file-loader": "4.2.0", "find-up": "4.0.0", diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 8b249d82e08d392..5b954b48bd91a91 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -6,6 +6,7 @@ import fs from 'fs-extra' import { join } from 'path' import cheerio from 'cheerio' import webdriver from 'next-webdriver' +import escapeRegex from 'escape-string-regexp' import { launchApp, killApp, @@ -29,8 +30,6 @@ let stdout = '' let appPort let app -const escapeRegex = str => str.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') - const runTests = (isDev = false) => { it('should handle one-to-one rewrite successfully', async () => { const html = await renderViaHTTP(appPort, '/first') diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index 036070238794e92..d1ecf0f574a2510 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -2,8 +2,9 @@ /* global jasmine */ import fs from 'fs-extra' import { join } from 'path' -import webdriver from 'next-webdriver' import cheerio from 'cheerio' +import webdriver from 'next-webdriver' +import escapeRegex from 'escape-string-regexp' import { renderViaHTTP, fetchViaHTTP, @@ -410,7 +411,7 @@ const runTests = (dev = false) => { const manifest = JSON.parse( await fs.readFile(join(appDir, '.next/prerender-manifest.json'), 'utf8') ) - const escapedBuildId = buildId.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') + const escapedBuildId = escapeRegex(buildId) Object.keys(manifest.dynamicRoutes).forEach(key => { const item = manifest.dynamicRoutes[key] From e079cce41c852836b89f3995c45b35ce8c9968e5 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 24 Jan 2020 17:41:00 -0600 Subject: [PATCH 226/321] Update static check vars and fix types (#10260) Co-authored-by: Joe Haddad --- packages/next/build/index.ts | 10 ++++++---- packages/next/build/utils.ts | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 30585597ce51fd6..964082a2b8e1d1b 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -53,6 +53,7 @@ import { generateBuildId } from './generate-build-id' import { isWriteable } from './is-writeable' import createSpinner from './spinner' import { + isPageStatic, collectPages, getPageSizeInKb, hasCustomAppGetInitialProps, @@ -416,7 +417,8 @@ export default async function build(dir: string, conf = null): Promise { const staticCheckWorkers = new Worker(staticCheckWorker, { numWorkers: config.experimental.cpus, enableWorkerThreads: config.experimental.workerThreads, - }) + }) as Worker & { isPageStatic: typeof isPageStatic } + staticCheckWorkers.getStdout().pipe(process.stdout) staticCheckWorkers.getStderr().pipe(process.stderr) @@ -481,7 +483,7 @@ export default async function build(dir: string, conf = null): Promise { if (nonReservedPage) { try { - let result: any = await (staticCheckWorkers as any).isPageStatic( + let result = await staticCheckWorkers.isPageStatic( page, serverBundle, runtimeEnvConfig @@ -492,7 +494,7 @@ export default async function build(dir: string, conf = null): Promise { hybridAmpPages.add(page) } - if (result.prerender) { + if (result.hasStaticProps) { ssgPages.add(page) isSsg = true @@ -500,7 +502,7 @@ export default async function build(dir: string, conf = null): Promise { additionalSsgPaths.set(page, result.prerenderRoutes) ssgPageRoutes = result.prerenderRoutes } - } else if (result.static && customAppGetInitialProps === false) { + } else if (result.isStatic && customAppGetInitialProps === false) { staticPages.add(page) isStatic = true } diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 85c4f7ed728b636..ac126d9c7749445 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -479,9 +479,9 @@ export async function isPageStatic( serverBundle: string, runtimeEnvConfig: any ): Promise<{ - static?: boolean - prerender?: boolean + isStatic?: boolean isHybridAmp?: boolean + hasStaticProps?: boolean prerenderRoutes?: string[] | undefined }> { try { @@ -593,10 +593,10 @@ export async function isPageStatic( const config = mod.config || {} return { - static: !hasStaticProps && !hasGetInitialProps, + isStatic: !hasStaticProps && !hasGetInitialProps, isHybridAmp: config.amp === 'hybrid', prerenderRoutes: prerenderPaths, - prerender: hasStaticProps, + hasStaticProps, } } catch (err) { if (err.code === 'MODULE_NOT_FOUND') return {} From f143ca63be26036f4f82aaf03a2b8a171c9373ec Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 24 Jan 2020 22:25:11 -0600 Subject: [PATCH 227/321] Update SSG types and clean up RenderOpts type (#10259) * Update SSG types and clean up RenderOpts type * Move SSG types back to internal module --- .../build/babel/plugins/next-page-config.ts | 2 +- packages/next/next-server/lib/utils.ts | 2 +- packages/next/next-server/server/api-utils.ts | 2 +- .../next-server/server/load-components.ts | 48 ++++++++++++------- .../next/next-server/server/next-server.ts | 10 ++-- packages/next/next-server/server/render.tsx | 34 ++----------- 6 files changed, 46 insertions(+), 52 deletions(-) diff --git a/packages/next/build/babel/plugins/next-page-config.ts b/packages/next/build/babel/plugins/next-page-config.ts index a101ca91f463a2f..9fb733db40a1643 100644 --- a/packages/next/build/babel/plugins/next-page-config.ts +++ b/packages/next/build/babel/plugins/next-page-config.ts @@ -1,6 +1,6 @@ import { NodePath, PluginObj } from '@babel/core' import * as BabelTypes from '@babel/types' -import { PageConfig } from '../../../types' +import { PageConfig } from 'next/types' const configKeys = new Set(['amp']) const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__' diff --git a/packages/next/next-server/lib/utils.ts b/packages/next/next-server/lib/utils.ts index 9ce465d40b052b4..875e8417a733285 100644 --- a/packages/next/next-server/lib/utils.ts +++ b/packages/next/next-server/lib/utils.ts @@ -3,7 +3,7 @@ import { ParsedUrlQuery } from 'querystring' import { ComponentType } from 'react' import { format, URLFormatOptions, UrlObject } from 'url' -import { ManifestItem } from '../server/render' +import { ManifestItem } from '../server/load-components' import { NextRouter } from './router/router' /** diff --git a/packages/next/next-server/server/api-utils.ts b/packages/next/next-server/server/api-utils.ts index 10c1a229801ae5a..4fc51fec4cb6d0d 100644 --- a/packages/next/next-server/server/api-utils.ts +++ b/packages/next/next-server/server/api-utils.ts @@ -4,7 +4,7 @@ import { Stream } from 'stream' import getRawBody from 'raw-body' import { parse } from 'content-type' import { Params } from './router' -import { PageConfig } from '../../types' +import { PageConfig } from 'next/types' import { interopDefault } from './load-components' import { isResSent } from '../lib/utils' diff --git a/packages/next/next-server/server/load-components.ts b/packages/next/next-server/server/load-components.ts index a6aee255a0cc045..c8559610c9d3f77 100644 --- a/packages/next/next-server/server/load-components.ts +++ b/packages/next/next-server/server/load-components.ts @@ -5,28 +5,44 @@ import { SERVER_DIRECTORY, } from '../lib/constants' import { join } from 'path' -import { PageConfig } from '../../types' import { requirePage } from './require' +import { ParsedUrlQuery } from 'querystring' +import { BuildManifest } from './get-page-files' +import { AppType, DocumentType } from '../lib/utils' +import { PageConfig, NextPageContext } from 'next/types' export function interopDefault(mod: any) { return mod.default || mod } +export type ManifestItem = { + id: number | string + name: string + file: string + publicPath: string +} + +type ReactLoadableManifest = { [moduleId: string]: ManifestItem[] } + +type Unstable_getStaticProps = (params: { + params: ParsedUrlQuery | undefined +}) => Promise<{ + props: { [key: string]: any } + revalidate?: number | boolean +}> + +type Unstable_getStaticPaths = () => Promise> + export type LoadComponentsReturnType = { - Component: any - pageConfig: PageConfig - unstable_getStaticProps?: (params: { - params: any - }) => { - props: any - revalidate?: number | boolean - } - unstable_getStaticPaths?: () => void - buildManifest?: any - reactLoadableManifest?: any - Document?: any - DocumentMiddleware?: any - App?: any + Component: React.ComponentType + pageConfig?: PageConfig + buildManifest: BuildManifest + reactLoadableManifest: ReactLoadableManifest + Document: DocumentType + DocumentMiddleware?: (ctx: NextPageContext) => void + App: AppType + unstable_getStaticProps?: Unstable_getStaticProps + unstable_getStaticPaths?: Unstable_getStaticPaths } export async function loadComponents( @@ -42,7 +58,7 @@ export async function loadComponents( pageConfig: Component.config || {}, unstable_getStaticProps: Component.unstable_getStaticProps, unstable_getStaticPaths: Component.unstable_getStaticPaths, - } + } as LoadComponentsReturnType } const documentPath = join( distDir, diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 5f4f8f2e218a627..e2ac323dce02887 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -863,7 +863,7 @@ export default class Server { // check request state const isLikeServerless = typeof result.Component === 'object' && - typeof result.Component.renderReqToHTML === 'function' + typeof (result.Component as any).renderReqToHTML === 'function' const isSSG = !!result.unstable_getStaticProps // non-spr requests should render like normal @@ -871,7 +871,7 @@ export default class Server { // handle serverless if (isLikeServerless) { this.prepareServerlessUrl(req, query) - return result.Component.renderReqToHTML(req, res) + return (result.Component as any).renderReqToHTML(req, res) } return renderToHTML(req, res, pathname, query, { @@ -929,7 +929,11 @@ export default class Server { let renderResult // handle serverless if (isLikeServerless) { - renderResult = await result.Component.renderReqToHTML(req, res, true) + renderResult = await (result.Component as any).renderReqToHTML( + req, + res, + true + ) html = renderResult.html pageData = renderResult.renderOpts.pageData diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index be8f52450c75325..ec7fd0a4d63dfb7 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -14,31 +14,19 @@ import { NextComponentType, DocumentType, AppType, - NextPageContext, } from '../lib/utils' import Head, { defaultHead } from '../lib/head' -// @ts-ignore types will be added later as it's an internal module import Loadable from '../lib/loadable' import { LoadableContext } from '../lib/loadable-context' import { RouterContext } from '../lib/router-context' -import { getPageFiles, BuildManifest } from './get-page-files' +import { getPageFiles } from './get-page-files' import { AmpStateContext } from '../lib/amp-context' import optimizeAmp from './optimize-amp' import { isInAmpMode } from '../lib/amp' -// Uses a module path because of the compiled output directory location -import { PageConfig } from 'next/types' import { isDynamicRoute } from '../lib/router/utils/is-dynamic' import { SSG_GET_INITIAL_PROPS_CONFLICT } from '../../lib/constants' import { AMP_RENDER_TARGET } from '../lib/constants' - -export type ManifestItem = { - id: number | string - name: string - file: string - publicPath: string -} - -type ReactLoadableManifest = { [moduleId: string]: ManifestItem[] } +import { LoadComponentsReturnType, ManifestItem } from './load-components' function noRouter() { const message = @@ -122,8 +110,7 @@ function render( return { html, head } } -type RenderOpts = { - documentMiddlewareEnabled: boolean +type RenderOpts = LoadComponentsReturnType & { staticMarkup: boolean buildId: string canonicalBase: string @@ -139,22 +126,9 @@ type RenderOpts = { ampPath?: string inAmpMode?: boolean hybridAmp?: boolean - buildManifest: BuildManifest - reactLoadableManifest: ReactLoadableManifest - pageConfig: PageConfig - Component: React.ComponentType - Document: DocumentType - DocumentMiddleware: (ctx: NextPageContext) => void - App: AppType ErrorDebug?: React.ComponentType<{ error: Error }> ampValidator?: (html: string, pathname: string) => Promise - unstable_getStaticProps?: (params: { - params: any | undefined - }) => { - props: any - revalidate?: number | boolean - } - unstable_getStaticPaths?: () => void + documentMiddlewareEnabled?: boolean } function renderDocument( From 2ff2e9e12c7d5f5b10adf524eefe9a177b2334ae Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 24 Jan 2020 22:34:00 -0600 Subject: [PATCH 228/321] Update _next/data URL handling in serverless-loader (#10261) Co-authored-by: Joe Haddad --- .../build/webpack/loaders/next-serverless-loader.ts | 7 ++++--- test/integration/prerender/test/index.test.js | 12 +++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index 634b09a4d927e26..4948c38d3735cc5 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -216,13 +216,14 @@ const nextServerlessLoader: loader.Loader = function() { } let _nextData = false - if (req.url.match(/_next\\/data/)) { + const parsedUrl = handleRewrites(parse(req.url, true)) + + if (parsedUrl.pathname.match(/_next\\/data/)) { _nextData = true - req.url = req.url + parsedUrl.pathname = parsedUrl.pathname .replace(new RegExp('/_next/data/${escapedBuildId}/'), '/') .replace(/\\.json$/, '') } - const parsedUrl = handleRewrites(parse(req.url, true)) const renderOpts = Object.assign( { diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index d1ecf0f574a2510..a6ff7e056ba6858 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -265,6 +265,16 @@ const runTests = (dev = false) => { expect(JSON.parse(params)).toEqual({}) }) + it('should not supply query values to params in /_next/data request', async () => { + const data = JSON.parse( + await renderViaHTTP( + appPort, + `/_next/data/${buildId}/something.json?hello=world` + ) + ) + expect(data.pageProps.params).toEqual({}) + }) + it('should not supply query values to params or useRouter dynamic page SSR', async () => { const html = await renderViaHTTP(appPort, '/blog/post-1?hello=world') const $ = cheerio.load(html) @@ -580,7 +590,7 @@ describe('SPR Prerender', () => { await nextBuild(appDir) stderr = '' appPort = await findPort() - app = nextStart(appDir, appPort, { + app = await nextStart(appDir, appPort, { onStderr: msg => { stderr += msg }, From f13bf1e2bfd750f94bba777d09b3ad9fc4d216e7 Mon Sep 17 00:00:00 2001 From: Soichi Takamura Date: Sun, 26 Jan 2020 12:32:58 +0900 Subject: [PATCH 229/321] [example with-typescript-graphql] Fix type error (#10269) * fix: Type error * Improve README.md --- examples/with-typescript-graphql/README.md | 6 +++--- examples/with-typescript-graphql/lib/resolvers.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/with-typescript-graphql/README.md b/examples/with-typescript-graphql/README.md index bf299a32ec9389c..cd4ae272cd9c242 100644 --- a/examples/with-typescript-graphql/README.md +++ b/examples/with-typescript-graphql/README.md @@ -1,11 +1,11 @@ -# GraphQL and TypeScript Example +# TypeScript and GraphQL Example One of the strengths of GraphQL is [enforcing data types on runtime](https://graphql.github.io/graphql-spec/June2018/#sec-Value-Completion). Further, TypeScript and [GraphQL Code Generator](https://graphql-code-generator.com/) (graphql-codegen) make it safer by typing data statically, so you can write truly type-protected code with rich IDE assists. This template extends [Apollo Server and Client Example](https://github.com/zeit/next.js/tree/canary/examples/api-routes-apollo-server-and-client#readme) by rewriting in TypeScript and integrating [graphql-let](https://github.com/piglovesyou/graphql-let#readme), which runs [TypeScript React Apollo](https://graphql-code-generator.com/docs/plugins/typescript-react-apollo) in [graphql-codegen](https://github.com/dotansimha/graphql-code-generator#readme) under the hood. It enhances the typed GraphQL use as below. ```typescript jsx -import { useNewsQuery } from './news.grpahql' +import { useNewsQuery } from './news.graphql' const News: React.FC = () => { // Typed already️⚡️ @@ -59,7 +59,7 @@ now ## Notes -By default `**/*.graphqls` is recognized as GraphQL schema and `**/*.graphql` as GraphQL documents. If you prefer the other extensions, make sure the settings of the webpack loader in `next.config.js` and `.graphql-let.yml` point to the same files. +By default `**/*.graphqls` is recognized as GraphQL schema and `**/*.graphql` as GraphQL documents. If you prefer the other extensions, make sure the settings of the webpack loader in `next.config.js` and `.graphql-let.yml` are consistent. Note: Do not be alarmed that you see two renders being executed. Apollo recursively traverses the React render tree looking for Apollo query components. When it has done that, it fetches all these queries and then passes the result to a cache. This cache is then used to render the data on the server side (another React render). https://www.apollographql.com/docs/react/api/react-ssr/#getdatafromtree diff --git a/examples/with-typescript-graphql/lib/resolvers.ts b/examples/with-typescript-graphql/lib/resolvers.ts index b408e6353a9ab58..1bd9511549d683c 100644 --- a/examples/with-typescript-graphql/lib/resolvers.ts +++ b/examples/with-typescript-graphql/lib/resolvers.ts @@ -1,4 +1,6 @@ -const resolvers = { +import { IResolvers } from 'apollo-server-micro' + +const resolvers: IResolvers = { Query: { viewer(_parent, _args, _context, _info) { return { id: 1, name: 'John Smith', status: 'cached' } From c71694e28b11c9c3e909692c5614b2670cec01b2 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sun, 26 Jan 2020 16:01:22 +0100 Subject: [PATCH 230/321] Update built-in-css-support.md --- docs/basic-features/built-in-css-support.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/basic-features/built-in-css-support.md b/docs/basic-features/built-in-css-support.md index 62425b01e4919c6..ae832b021f26ec4 100644 --- a/docs/basic-features/built-in-css-support.md +++ b/docs/basic-features/built-in-css-support.md @@ -157,22 +157,10 @@ export default HelloWorld Please see the [styled-jsx documentation](https://github.com/zeit/styled-jsx) for more examples. -## Sass Support +## Sass, Less and Stylus Support -Next.js allows you to import Sass using both the `.scss` and `.sass` extensions. -You can use component-level Sass via CSS Modules and the `.module.scss` or `.module.sass` extension. - -Before you can use Next.js' built-in Sass support, be sure to install [`sass`](https://github.com/sass/sass): - -```bash -npm install sass -``` - -Sass support has the same benefits and restrictions as the built-in CSS support detailed above. - -## Less and Stylus Support - -To support importing `.less` or `.styl` files you can use the following plugins: +To support importing `.scss`, `.sass`, `.less`, or `.styl` files you can use the following plugins: +- [@zeit/next-sass](https://github.com/zeit/next-plugins/tree/master/packages/next-sass) - [@zeit/next-less](https://github.com/zeit/next-plugins/tree/master/packages/next-less) - [@zeit/next-stylus](https://github.com/zeit/next-plugins/tree/master/packages/next-stylus) From dd3bb73d8078f8206dcca2660ba706c5e9e4f6bd Mon Sep 17 00:00:00 2001 From: Danny Tatom Date: Mon, 27 Jan 2020 03:51:34 -0800 Subject: [PATCH 231/321] Update typo in typescript docs (#10276) --- docs/basic-features/typescript.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/basic-features/typescript.md b/docs/basic-features/typescript.md index aa2366a9fc2995e..f0f9a6d4700c70c 100644 --- a/docs/basic-features/typescript.md +++ b/docs/basic-features/typescript.md @@ -101,7 +101,7 @@ The following is an example of how to use the built-in types for API routes: import { NextApiRequest, NextApiResponse } from 'next' export default (req: NextApiRequest, res: NextApiResponse) => { - res.status(200).json({ name: 'Jhon Doe' }) + res.status(200).json({ name: 'John Doe' }) } ``` @@ -115,6 +115,6 @@ type Data = { } export default (req: NextApiRequest, res: NextApiResponse) => { - res.status(200).json({ name: 'Jhon Doe' }) + res.status(200).json({ name: 'John Doe' }) } ``` From b0053a4a73046a33817135c7a686b9b783f8780d Mon Sep 17 00:00:00 2001 From: Matthew Sweeney Date: Mon, 27 Jan 2020 11:52:04 +0000 Subject: [PATCH 232/321] Update FaunaDB Example Instructions (#10280) * update fauna example instructions * change key name in setup script --- examples/with-graphql-faunadb/README.md | 4 ++-- examples/with-graphql-faunadb/scripts/setup.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/with-graphql-faunadb/README.md b/examples/with-graphql-faunadb/README.md index 9201dce913aafb9..42fa330ebde3662 100644 --- a/examples/with-graphql-faunadb/README.md +++ b/examples/with-graphql-faunadb/README.md @@ -16,7 +16,7 @@ By importing a `.gql` or `.graphql` schema into FaunaDB ([see our sample schema You can start with this template [using `create-next-app`](#using-create-next-app) or by [downloading the repository manually](#download-manually). -To use a live FaunaDB database, create a database at [dashboard.fauna.com](https://dashboard.fauna.com/) and generate a server token by going to the **Security** tab on the left and then click **New Key**. Give the new key a name and select the 'Server' Role. Copy the token since the setup script will ask for it. Do not use it in the frontend, it has superpowers which you don't want to give to your users. +To use a live FaunaDB database, create a database at [dashboard.fauna.com](https://dashboard.fauna.com/) and generate an admin token by going to the **Security** tab on the left and then click **New Key**. Give the new key a name and select the 'Admin' Role. Copy the token since the setup script will ask for it. Do not use it in the frontend, it has superpowers which you don't want to give to your users. The database can then be set up with the delivered setup by running: @@ -24,7 +24,7 @@ The database can then be set up with the delivered setup by running: yarn setup ``` -This script will ask for the server token. Once you provide it with a valid token, this is what the script automatically does for you: +This script will ask for the admin token. Once you provide it with a valid token, this is what the script automatically does for you: - **Import the GraphQL schema**, by importing a GraphQL schema in FaunaDB, FaunaDB automatically sets up collections and indexes to support your queries. This is now done for you with this script but can also be done from the [dashboard.fauna.com](https://dashboard.fauna.com/) UI by going to the GraphQL tab - **Create a role suitable for the Client**, FaunaDB has a security system that allows you to define which resources can be accessed for a specific token. That's how we limit our clients powers, feel free to look at the scripts/setup.js script to see how we make roles and tokens. diff --git a/examples/with-graphql-faunadb/scripts/setup.js b/examples/with-graphql-faunadb/scripts/setup.js index f4410feda221fb2..ca701141a70642c 100644 --- a/examples/with-graphql-faunadb/scripts/setup.js +++ b/examples/with-graphql-faunadb/scripts/setup.js @@ -11,13 +11,13 @@ const readline = require('readline').createInterface({ output: process.stdout, }) -// In order to set up a database, we need a server key, so let's ask the user for a key. -readline.question(`Please provide the FaunaDB server key\n`, serverKey => { +// In order to set up a database, we need an admin key, so let's ask the user for a key. +readline.question(`Please provide the FaunaDB admin key\n`, adminKey => { // A graphql schema can be imported in override or merge mode: 'https://docs.fauna.com/fauna/current/api/graphql/endpoints#import' const options = { model: 'merge', uri: 'https://graphql.fauna.com/import', - headers: { Authorization: `Bearer ${serverKey}` }, + headers: { Authorization: `Bearer ${adminKey}` }, } const stream = fs.createReadStream('./schema.gql').pipe(request.post(options)) @@ -44,7 +44,7 @@ readline.question(`Please provide the FaunaDB server key\n`, serverKey => { .then(res => { // The GraphQL schema is important, this means that we now have a GuestbookEntry Colleciton and an entries index. // Then we create a token that can only read and write to that index and collection - var client = new faunadb.Client({ secret: serverKey }) + var client = new faunadb.Client({ secret: adminKey }) return client .query( q.CreateRole({ @@ -81,7 +81,7 @@ readline.question(`Please provide the FaunaDB server key\n`, serverKey => { .then(res => { // The GraphQL schema is important, this means that we now have a GuestbookEntry Colleciton and an entries index. // Then we create a token that can only read and write to that index and collection - var client = new faunadb.Client({ secret: serverKey }) + var client = new faunadb.Client({ secret: adminKey }) return client .query( q.CreateKey({ From 7e6e25de7cf92c9028f27f770323d839c233e7f6 Mon Sep 17 00:00:00 2001 From: Bart Deslagmulder Date: Mon, 27 Jan 2020 12:52:49 +0100 Subject: [PATCH 233/321] Add .jsx as a valid file extension in the pages directory (#10281) It's possible to use a .jsx file extension in the `pages` directory but the doc doesn't mention it. Next to the current extensions: .js, .ts & .tsx I would mention .jsx also in the list. --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 357e19d039b4a42..6f9c2e716c061fd 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -39,7 +39,7 @@ These scripts refer to the different stages of developing an application: - `build` - Runs `next build` which builds the application for production usage - `start` - Runs `next start` which starts a Next.js production server -Next.js is built around the concept of pages. A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.ts`, or `.tsx` file in the `pages` directory. +Next.js is built around the concept of pages. A page is a [React Component](https://reactjs.org/docs/components-and-props.html) exported from a `.js`, `.jsx`, `.ts`, or `.tsx` file in the `pages` directory. Pages are associated with a route based on their file name. For example `pages/about.js` is mapped to `/about`. You can even add dynamic route parameters with the filename. From 799bb42517bfacc6f688b966a5c7d7de466c462e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Kleppe-J=C3=B8rgensen?= Date: Mon, 27 Jan 2020 12:59:40 +0100 Subject: [PATCH 234/321] Improved wording in comment (#10277) --- packages/next/next-server/server/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index 564742f40bf6c93..fb47ecb9df8743a 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -97,7 +97,7 @@ function assignDefaults(userConfig: { [key: string]: any }) { `The 'public' directory is reserved in Next.js and can not be set as the 'distDir'. https://err.sh/zeit/next.js/can-not-output-to-public` ) } - // make sure distDir isn't an empty string which can result the provided + // make sure distDir isn't an empty string as it can result in the provided // directory being deleted in development mode if (userDistDir.length === 0) { throw new Error( From 569e7acab883c2aa56c0def254ef04467ae361dc Mon Sep 17 00:00:00 2001 From: Matthew Sweeney Date: Mon, 27 Jan 2020 13:05:31 +0000 Subject: [PATCH 235/321] Improve Stalled Requests Grammar (#10283) --- packages/next/next-server/server/api-utils.ts | 2 +- test/integration/api-support/test/index.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/next-server/server/api-utils.ts b/packages/next/next-server/server/api-utils.ts index 4fc51fec4cb6d0d..33c6d45f4ce73d4 100644 --- a/packages/next/next-server/server/api-utils.ts +++ b/packages/next/next-server/server/api-utils.ts @@ -59,7 +59,7 @@ export async function apiResolver( if (process.env.NODE_ENV !== 'production' && !isResSent(res)) { console.warn( - `API resolved without sending a response for ${req.url}, this may result in a stalled requests.` + `API resolved without sending a response for ${req.url}, this may result in stalled requests.` ) } } catch (err) { diff --git a/test/integration/api-support/test/index.test.js b/test/integration/api-support/test/index.test.js index 5fb522dd3019e81..a803bbdaceb261b 100644 --- a/test/integration/api-support/test/index.test.js +++ b/test/integration/api-support/test/index.test.js @@ -344,7 +344,7 @@ function runTests(dev = false) { signal: controller.signal, }).catch(() => {}) expect(stderr).toContain( - `API resolved without sending a response for /api/test-no-end, this may result in a stalled requests` + `API resolved without sending a response for /api/test-no-end, this may result in stalled requests.` ) }) } else { From c9dc17b852cfd0c6123391efca7129d3b2a0a390 Mon Sep 17 00:00:00 2001 From: James Mosier Date: Mon, 27 Jan 2020 08:19:49 -0500 Subject: [PATCH 236/321] Added support for BigInt to API routes (#10215) * Added support for bigint to API routes Closes #7980 * added BigInt test to get result Co-authored-by: Joe Haddad --- packages/next/build/babel/preset.ts | 1 + packages/next/package.json | 1 + test/integration/bigint/pages/api/bigint.js | 4 ++ test/integration/bigint/test/index.test.js | 77 +++++++++++++++++++++ yarn.lock | 12 ++++ 5 files changed, 95 insertions(+) create mode 100644 test/integration/bigint/pages/api/bigint.js create mode 100644 test/integration/bigint/test/index.test.js diff --git a/packages/next/build/babel/preset.ts b/packages/next/build/babel/preset.ts index 45beb38ece891b6..8e95a8c2c0dccc5 100644 --- a/packages/next/build/babel/preset.ts +++ b/packages/next/build/babel/preset.ts @@ -177,6 +177,7 @@ module.exports = ( ], require('@babel/plugin-proposal-optional-chaining'), require('@babel/plugin-proposal-nullish-coalescing-operator'), + isServer && require('@babel/plugin-syntax-bigint'), ].filter(Boolean), } } diff --git a/packages/next/package.json b/packages/next/package.json index 82e83b697851d37..0d48e104397a5e1 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -63,6 +63,7 @@ "@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4", "@babel/plugin-proposal-object-rest-spread": "7.6.2", "@babel/plugin-proposal-optional-chaining": "7.7.4", + "@babel/plugin-syntax-bigint": "7.8.3", "@babel/plugin-syntax-dynamic-import": "7.2.0", "@babel/plugin-transform-modules-commonjs": "7.7.0", "@babel/plugin-transform-runtime": "7.6.2", diff --git a/test/integration/bigint/pages/api/bigint.js b/test/integration/bigint/pages/api/bigint.js new file mode 100644 index 000000000000000..8baefcfb20304d4 --- /dev/null +++ b/test/integration/bigint/pages/api/bigint.js @@ -0,0 +1,4 @@ +export default (req, res) => { + res.statusCode = 200 + res.send((1n + 2n).toString()) +} diff --git a/test/integration/bigint/test/index.test.js b/test/integration/bigint/test/index.test.js new file mode 100644 index 000000000000000..b4d49886ab08bb1 --- /dev/null +++ b/test/integration/bigint/test/index.test.js @@ -0,0 +1,77 @@ +/* eslint-env jest */ +/* global jasmine */ +import fs from 'fs-extra' +import { join } from 'path' +import { + fetchViaHTTP, + launchApp, + nextBuild, + nextStart, + killApp, + findPort, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 + +const appDir = join(__dirname, '..') +const nextConfig = join(appDir, 'next.config.js') +let appPort +let app + +const runTests = () => { + it('should return 200', async () => { + const res = await fetchViaHTTP(appPort, '/api/bigint', null, { + method: 'GET', + }) + expect(res.status).toEqual(200) + }) + + it('should return the BigInt result text', async () => { + const resText = await fetchViaHTTP(appPort, '/api/bigint', null, { + method: 'GET', + }).then(res => res.ok && res.text()) + expect(resText).toEqual('3') + }) +} + +describe('bigint API route support', () => { + describe('dev mode', () => { + beforeAll(async () => { + appPort = await findPort() + app = await launchApp(appDir, appPort) + }) + afterAll(() => killApp(app)) + + runTests() + }) + + describe('server mode', () => { + beforeAll(async () => { + await fs.remove(nextConfig) + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + }) + afterAll(() => killApp(app)) + + runTests() + }) + + describe('serverless mode', () => { + beforeAll(async () => { + await fs.writeFile( + nextConfig, + `module.exports = { target: 'serverless' }` + ) + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + }) + afterAll(async () => { + await killApp(app) + await fs.remove(nextConfig) + }) + + runTests() + }) +}) diff --git a/yarn.lock b/yarn.lock index e1b0f6dd1036547..9fb92865ae14067 100644 --- a/yarn.lock +++ b/yarn.lock @@ -220,6 +220,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-plugin-utils@^7.8.0": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== + "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" @@ -384,6 +389,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-bigint@7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-dynamic-import@7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" From e1083f0e3a729c9ca6ab269ca301bd6050e66c8c Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Mon, 27 Jan 2020 05:35:12 -0800 Subject: [PATCH 237/321] docs: remove --save from npm install; avoid system-ui (#10252) * Minor edits for CSS doc * Remove unnecessary --save from npm install * Different font family Co-authored-by: Joe Haddad --- docs/basic-features/built-in-css-support.md | 3 ++- docs/getting-started.md | 2 +- examples/with-stencil/packages/test-component/readme.md | 4 ++-- packages/next-bundle-analyzer/readme.md | 2 +- packages/next-mdx/readme.md | 2 +- packages/next/bin/next.ts | 4 ++-- packages/next/server/next-dev-server.ts | 2 +- test/unit/handles-incorrect-react.test.js | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/basic-features/built-in-css-support.md b/docs/basic-features/built-in-css-support.md index ae832b021f26ec4..1fa7c5f48f36056 100644 --- a/docs/basic-features/built-in-css-support.md +++ b/docs/basic-features/built-in-css-support.md @@ -15,7 +15,8 @@ For example, consider the following stylesheet named `styles.css`: ```css body { - font-family: 'SF Pro Text', 'SF Pro Icons', system-ui; + font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', 'Helvetica', + 'Arial', sans-serif; padding: 20px 20px 60px; max-width: 680px; margin: 0 auto; diff --git a/docs/getting-started.md b/docs/getting-started.md index 6f9c2e716c061fd..64155e039104578 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -20,7 +20,7 @@ The interactive course with quizzes will guide you through everything you need t Install `next`, `react` and `react-dom` in your project: ```bash -npm install --save next react react-dom +npm install next react react-dom ``` Open `package.json` and add the following `scripts`: diff --git a/examples/with-stencil/packages/test-component/readme.md b/examples/with-stencil/packages/test-component/readme.md index 438a2241ee2a7cd..db8c4cca0c49f02 100644 --- a/examples/with-stencil/packages/test-component/readme.md +++ b/examples/with-stencil/packages/test-component/readme.md @@ -61,12 +61,12 @@ Instead, use a prefix that fits your company or any name for a group of related ### Node Modules -- Run `npm install my-component --save` +- Run `npm install my-component` - Put a script tag similar to this `` in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc ### In a stencil-starter app -- Run `npm install my-component --save` +- Run `npm install my-component` - Add an import to the npm packages `import my-component;` - Then you can use the element anywhere in your template, JSX, html etc diff --git a/packages/next-bundle-analyzer/readme.md b/packages/next-bundle-analyzer/readme.md index 18aa9dedeb1141c..1d2ac2d2f04a912 100644 --- a/packages/next-bundle-analyzer/readme.md +++ b/packages/next-bundle-analyzer/readme.md @@ -5,7 +5,7 @@ Use `webpack-bundle-analyzer` in your Next.js project ## Installation ``` -npm install --save @next/bundle-analyzer +npm install @next/bundle-analyzer ``` or diff --git a/packages/next-mdx/readme.md b/packages/next-mdx/readme.md index 2378f35272b4132..a45f28cef0dee2f 100644 --- a/packages/next-mdx/readme.md +++ b/packages/next-mdx/readme.md @@ -5,7 +5,7 @@ Use [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/ ## Installation ``` -npm install --save @next/mdx @mdx-js/loader +npm install @next/mdx @mdx-js/loader ``` or diff --git a/packages/next/bin/next.ts b/packages/next/bin/next.ts index acc1694ff2447e0..6c65b90eac861d4 100755 --- a/packages/next/bin/next.ts +++ b/packages/next/bin/next.ts @@ -7,7 +7,7 @@ import arg from 'next/dist/compiled/arg/index.js' } catch (err) { // tslint:disable-next-line console.warn( - `The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install --save ${dependency}'` + `The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'` ) } }) @@ -94,7 +94,7 @@ const React = require('react') if (typeof React.Suspense === 'undefined') { throw new Error( - `The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install --save react react-dom" https://err.sh/zeit/next.js/invalid-react-version` + `The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://err.sh/zeit/next.js/invalid-react-version` ) } diff --git a/packages/next/server/next-dev-server.ts b/packages/next/server/next-dev-server.ts index b37f5e3a0cd21a3..c2a30ecf61e3a3b 100644 --- a/packages/next/server/next-dev-server.ts +++ b/packages/next/server/next-dev-server.ts @@ -31,7 +31,7 @@ import checkCustomRoutes from '../lib/check-custom-routes' if (typeof React.Suspense === 'undefined') { throw new Error( - `The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install --save react react-dom" https://err.sh/zeit/next.js/invalid-react-version` + `The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "npm install react react-dom" https://err.sh/zeit/next.js/invalid-react-version` ) } diff --git a/test/unit/handles-incorrect-react.test.js b/test/unit/handles-incorrect-react.test.js index 965f0452a1ca941..32f5d53647b5f90 100644 --- a/test/unit/handles-incorrect-react.test.js +++ b/test/unit/handles-incorrect-react.test.js @@ -11,7 +11,7 @@ const nextBin = path.join(nextDir, 'dist/bin/next') describe('Handles Incorrect React Version', () => { it('should throw an error when building with next', async () => { expect(() => require(nextBin)).toThrow( - /The version of React you are using is lower than the minimum required version needed for Next\.js\. Please upgrade "react" and "react-dom": "npm install --save react react-dom" https:\/\/err\.sh/ + /The version of React you are using is lower than the minimum required version needed for Next\.js\. Please upgrade "react" and "react-dom": "npm install react react-dom" https:\/\/err\.sh/ ) }) }) From 57f72eac9eefb04d415f2df6692947644f63ee48 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Mon, 27 Jan 2020 13:29:05 -0500 Subject: [PATCH 238/321] Add catch all routes example and a link to it in docs (#10202) * Added example * Updated readme of the dynamic-routing example * Updated catch all docs * Simplified example * Update examples/catch-all-routes/README.md Co-Authored-By: Joe Haddad Co-authored-by: Joe Haddad --- docs/routing/dynamic-routes.md | 7 +++ examples/catch-all-routes/README.md | 55 +++++++++++++++++++ .../catch-all-routes/components/header.js | 36 ++++++++++++ examples/catch-all-routes/package.json | 15 +++++ examples/catch-all-routes/pages/about.js | 10 ++++ examples/catch-all-routes/pages/index.js | 10 ++++ .../catch-all-routes/pages/post/[...slug].js | 16 ++++++ examples/dynamic-routing/README.md | 4 +- 8 files changed, 150 insertions(+), 3 deletions(-) create mode 100644 examples/catch-all-routes/README.md create mode 100644 examples/catch-all-routes/components/header.js create mode 100644 examples/catch-all-routes/package.json create mode 100644 examples/catch-all-routes/pages/about.js create mode 100644 examples/catch-all-routes/pages/index.js create mode 100644 examples/catch-all-routes/pages/post/[...slug].js diff --git a/docs/routing/dynamic-routes.md b/docs/routing/dynamic-routes.md index 483de9d1732fcbf..0be3069dacd123a 100644 --- a/docs/routing/dynamic-routes.md +++ b/docs/routing/dynamic-routes.md @@ -58,6 +58,13 @@ Client-side navigations to a dynamic route can be handled with [`next/link`](/do ### Catch all routes +
+ Examples + +
+ Dynamic routes can be extended to catch all paths by adding three dots (`...`) inside the brackets. For example: - `pages/post/[...slug].js` matches `/post/a`, but also `post/a/b`, `post/a/b/c` and so on. diff --git a/examples/catch-all-routes/README.md b/examples/catch-all-routes/README.md new file mode 100644 index 000000000000000..b26d655e71dd23f --- /dev/null +++ b/examples/catch-all-routes/README.md @@ -0,0 +1,55 @@ +# Catch All Routes Example + +This example shows how to use [Catch all routes](https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes) in Next.js, which allows a dynamic route to catch all paths. + +The catch all page is in `pages/post/[...slug]`, it matches any path after `/post`, like the following: + +- `/post/first-post`, +- `/post/2020/first-post` +- `/post/2020/first-post/with/catch/all/routes` +- Anything that matches the glob `/post/**` + +You can use `next/link` as displayed in this example to route to these pages client side. + +## Deploy your own + +Deploy the example using [ZEIT Now](https://zeit.co/now): + +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/catch-all-routes) + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: + +```bash +npm init next-app --example catch-all-routes catch-all-routes-app +# or +yarn create next-app --example catch-all-routes catch-all-routes-app +``` + +### 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/catch-all-routes +cd catch-all-routes +``` + +Install it and run: + +```bash +npm install +npm run dev +# or +yarn +yarn dev +``` + +Deploy it to the cloud with [Now](https://zeit.co/now) ([download](https://zeit.co/download)): + +```bash +now +``` diff --git a/examples/catch-all-routes/components/header.js b/examples/catch-all-routes/components/header.js new file mode 100644 index 000000000000000..bfc1981ffb2412d --- /dev/null +++ b/examples/catch-all-routes/components/header.js @@ -0,0 +1,36 @@ +import Link from 'next/link' + +const Header = () => ( +
+ +
+) + +export default Header diff --git a/examples/catch-all-routes/package.json b/examples/catch-all-routes/package.json new file mode 100644 index 000000000000000..fd3227483d8ce62 --- /dev/null +++ b/examples/catch-all-routes/package.json @@ -0,0 +1,15 @@ +{ + "name": "catch-all-routes", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "license": "ISC", + "dependencies": { + "next": "latest", + "react": "^16.12.0", + "react-dom": "^16.12.0" + } +} diff --git a/examples/catch-all-routes/pages/about.js b/examples/catch-all-routes/pages/about.js new file mode 100644 index 000000000000000..255d0764b4467ac --- /dev/null +++ b/examples/catch-all-routes/pages/about.js @@ -0,0 +1,10 @@ +import Header from '../components/header' + +const About = () => ( + <> +
+

About page

+ +) + +export default About diff --git a/examples/catch-all-routes/pages/index.js b/examples/catch-all-routes/pages/index.js new file mode 100644 index 000000000000000..0f56525ada213df --- /dev/null +++ b/examples/catch-all-routes/pages/index.js @@ -0,0 +1,10 @@ +import Header from '../components/header' + +const Home = () => ( + <> +
+

Hello World!

+ +) + +export default Home diff --git a/examples/catch-all-routes/pages/post/[...slug].js b/examples/catch-all-routes/pages/post/[...slug].js new file mode 100644 index 000000000000000..d75fe949005d4ab --- /dev/null +++ b/examples/catch-all-routes/pages/post/[...slug].js @@ -0,0 +1,16 @@ +import { useRouter } from 'next/router' +import Header from '../../components/header' + +const Comment = () => { + const router = useRouter() + const slug = router.query.slug || [] + + return ( + <> +
+

Slug: {slug.join('/')}

+ + ) +} + +export default Comment diff --git a/examples/dynamic-routing/README.md b/examples/dynamic-routing/README.md index 9d791190e9007bd..e5611c521fe48bd 100644 --- a/examples/dynamic-routing/README.md +++ b/examples/dynamic-routing/README.md @@ -1,8 +1,6 @@ # Dynamic Routing example -This example shows usage of dynamic routing. - -This example contains two dynamic pages: +This example shows how to do [dynamic routing](https://nextjs.org/docs/routing/dynamic-routes) in Next.js. It contains two dynamic routes: 1. `pages/post/[id]/index.js` - e.g. matches `/post/my-example` (`/post/:id`) From 9145d9ea6394f7f9ce2f5a1178121479f1f5e1a7 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 14:07:31 -0600 Subject: [PATCH 239/321] Migrate CircleCi config to GitHub actions (#10274) * Add initial config * Comment out other action * Update config * Update config * Update configs * rename requires -> needs * Update configs * Update configs * Enable headless mode * Disable circleci while testing * Disable build-test-deploy in circle * Update build step * Disable fail fast * Update configs * Add runs-on to publish steps * bump * Update config * Update group count * Update checkout path * Update test all concurrency * Handle EPIPE errors * Revert "Handle EPIPE errors" This reverts commit a993565bbdd77df136e07d54eb83ed32b18e5963. * Update test to handle EPIPE in test * Remove CircleCi config * Revert "Update test to handle EPIPE in test" This reverts commit c8cb72d5303b5fd165016f9eba6c8c888d8a1907. * Update to use node 10 and see if EPIPE error is still present * Revert "Revert "Update test to handle EPIPE in test"" This reverts commit efd2abe7c35c12bf78530064796d853c171efcf1. * Revert "Update to use node 10 and see if EPIPE error is still present" This reverts commit 893da4f31279228ebec6fa208c34ef179a6ebaf4. * Add todo for node issue * undo lint change as it should be correct * Add dummy step to require * Add runs-on for dummy job --- .circleci/config.yml | 217 ------------------ .github/workflows/build_test_deploy.yml | 111 +++++++++ ...ull_request.yml => pull_request_stats.yml} | 13 +- .../{release.yml => release_stats.yml} | 4 +- .github/workflows/test_react_next.yml | 44 ++++ publish-release.sh | 21 ++ run-tests.js | 104 ++++----- .../api-support/test/index.test.js | 34 ++- 8 files changed, 258 insertions(+), 290 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build_test_deploy.yml rename .github/workflows/{pull_request.yml => pull_request_stats.yml} (50%) rename .github/workflows/{release.yml => release_stats.yml} (88%) create mode 100644 .github/workflows/test_react_next.yml create mode 100755 publish-release.sh diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 38ecb82dc824eb3..000000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,217 +0,0 @@ -version: 2.1 - -######################### -# Aliases -######################### - -aliases: - - &store_test_results - store_test_results: - path: ~/repo/test - - &persist_to_workspace - persist_to_workspace: - root: ~/repo - paths: ['.'] - - &attach_workspace - attach_workspace: - at: . - -######################### -# Executors -######################### - -orbs: - win: circleci/windows@2.2.0 - -executors: - node: - docker: - - image: circleci/node:10-browsers - working_directory: ~/repo - -######################### -# Commands -######################### - -commands: - yarn_install: - steps: - - run: - name: Installing Dependencies - command: yarn install --frozen-lockfile --check-files - yarn_lint: - steps: - - run: - name: Linting - command: yarn lint - yarn_react_integration: - steps: - - run: - name: Upgrade to most recent release in React's Next channel - command: yarn upgrade react@next react-dom@next -W --dev # upgrade (vs add) will skip re-building Next.js, which doesn't bundle React internals (so this is OK!) - yarn_info: - steps: - - run: - name: React Versions - command: yarn why react && yarn why react-dom - test_all: - steps: - - run: google-chrome --version - - run: chromedriver --version - - run: - name: Run All Tests - command: | - node run-tests.js --timings -c 3 $( - circleci tests glob "test/**/*.test.*" | \ - circleci tests split --split-by=timings - ) - environment: - NEXT_TELEMETRY_DISABLED: '1' - test_safari: - steps: - - run: - name: Test Safari - command: | - yarn testsafari --forceExit test/integration/production/ - environment: - NEXT_TELEMETRY_DISABLED: '1' - BROWSERSTACK: 'true' - test_firefox: - steps: - - run: - name: Test Firefox - command: | - yarn testfirefox --forceExit test/integration/production/ - environment: - NEXT_TELEMETRY_DISABLED: '1' - save_npm_token: - steps: - - run: - name: Potentially save npm token - command: | - ([[ ! -z $NPM_TOKEN ]] && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc) || echo "Did not write npm token" - publish_canary: - steps: - - run: - name: Potentially publish canary release - command: | - if \ - ls ~/.npmrc >/dev/null 2>&1 && \ - [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; \ - then - yarn run lerna publish from-git --npm-tag canary --yes - else - echo "Did not publish" - fi - publish_stable: - steps: - - run: - name: Potentially publish stable release - command: | - if \ - ls ~/.npmrc >/dev/null 2>&1 && \ - [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; \ - then - yarn run lerna publish from-git --yes - else - echo "Did not publish" - fi - -######################### -# Jobs -######################### - -jobs: - build: - executor: node - steps: - - checkout - - yarn_install - - *persist_to_workspace - build-react-canary: - executor: node - steps: - - *attach_workspace - - yarn_react_integration - - *persist_to_workspace - lint: - executor: node - steps: - - *attach_workspace - - yarn_lint - test: - parallelism: 6 - executor: node - steps: - - *attach_workspace - - yarn_info - - test_all - - *store_test_results - test-safari: - executor: node - steps: - - *attach_workspace - - test_safari - test-firefox: - executor: node - steps: - - *attach_workspace - - test_firefox - deploy: - executor: node - steps: - - *attach_workspace - - save_npm_token - - publish_canary - - publish_stable - -######################### -# Workflows -######################### - -workflows: - version: 2 - build-test-and-deploy: - jobs: - - build - - test-firefox: - requires: - - build - - test: - requires: - - build - - test-safari: - requires: - - build - filters: - branches: - only: - - master - - canary - - lint: - requires: - - build - - deploy: - requires: - - test - filters: - branches: - only: - - master - - canary - q12h-react-canary: - triggers: - - schedule: - cron: '0 0,12 * * *' - filters: - branches: - only: - - canary - jobs: - - build - - build-react-canary: - requires: - - build - - test: - requires: - - build-react-canary diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml new file mode 100644 index 000000000000000..e7d2458a947f9cb --- /dev/null +++ b/.github/workflows/build_test_deploy.yml @@ -0,0 +1,111 @@ +on: + push: + branches: [canary] + pull_request: + types: [opened, synchronize] + +name: Build, test, and deploy + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install --frozen-lockfile --check-files + env: + NEXT_TELEMETRY_DISABLED: 1 + + - uses: actions/cache@v1 + id: cache-build + with: + path: '.' + key: ${{ github.sha }} + + lint: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/cache@v1 + id: restore-build + with: + path: '.' + key: ${{ github.sha }} + + - run: yarn lint + + testAll: + name: Test All + runs-on: ubuntu-latest + needs: build + strategy: + fail-fast: false + matrix: + group: [1, 2, 3, 4, 5, 6] + steps: + - uses: actions/cache@v1 + id: restore-build + with: + path: '.' + key: ${{ github.sha }} + + - run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 + env: + NEXT_TELEMETRY_DISABLED: 1 + HEADLESS: true + + testsPass: + name: Tests pass + runs-on: ubuntu-latest + needs: [lint, testAll] + steps: + - run: exit 0 + + testFirefox: + name: Test Firefox (production) + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/cache@v1 + id: restore-build + with: + path: '.' + key: ${{ github.sha }} + + - run: yarn testfirefox --forceExit test/integration/production/ + env: + NEXT_TELEMETRY_DISABLED: 1 + HEADLESS: true + + testSafari: + name: Test Safari (production) + runs-on: ubuntu-latest + needs: build + if: github.ref == 'canary' + steps: + - uses: actions/cache@v1 + id: restore-build + with: + path: '.' + key: ${{ github.sha }} + + - run: yarn testsafari --forceExit test/integration/production/ + env: + NEXT_TELEMETRY_DISABLED: 1 + BROWSERSTACK: true + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + + saveNpmToken: + name: Potentially save npm token + runs-on: ubuntu-latest + if: github.ref == 'canary' + needs: [build, testAll] + steps: + - run: ([[ ! -z $NPM_TOKEN ]] && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc) || echo "Did not write npm token" + + publishRelease: + name: Potentially publish release + runs-on: ubuntu-latest + needs: saveNpmToken + steps: + - run: ./publish-release.sh diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request_stats.yml similarity index 50% rename from .github/workflows/pull_request.yml rename to .github/workflows/pull_request_stats.yml index 159caa0f5026020..722494b6a5e57b2 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request_stats.yml @@ -1,11 +1,14 @@ -on: pull_request -name: Generate pull request stats +on: + pull_request: + types: [opened, synchronize] + +name: Generate Pull Request Stats + jobs: - prStats: + stats: name: PR Stats runs-on: ubuntu-latest steps: - - name: PR Stats - uses: zeit/next-stats-action@master + - uses: zeit/next-stats-action@master env: COMMENT_ENDPOINT: https://next-stats.jjsweb.site/api/comment diff --git a/.github/workflows/release.yml b/.github/workflows/release_stats.yml similarity index 88% rename from .github/workflows/release.yml rename to .github/workflows/release_stats.yml index f4cb69babe2a3d5..96cce51f0616f37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release_stats.yml @@ -1,5 +1,7 @@ on: release -name: Generate release stats + +name: Generate Release Stats + jobs: prStats: name: PR Stats diff --git a/.github/workflows/test_react_next.yml b/.github/workflows/test_react_next.yml new file mode 100644 index 000000000000000..0cdcb04221d8569 --- /dev/null +++ b/.github/workflows/test_react_next.yml @@ -0,0 +1,44 @@ +on: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '0 0,12 * * *' + +name: Test react@next + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - run: cd repo && yarn install --frozen-lockfile --check-files + env: + NEXT_TELEMETRY_DISABLED: 1 + + - run: cd repo && yarn upgrade react@next react-dom@next -W --dev + + - uses: actions/cache@v1 + id: cache-build + with: + path: '.' + key: ${{ github.sha }} + + testAll: + name: Test All + runs-on: ubuntu-latest + needs: build + strategy: + fail-fast: false + matrix: + group: [1, 2, 3, 4, 5, 6] + steps: + - uses: actions/cache@v1 + id: restore-build + with: + path: '.' + key: ${{ github.sha }} + + - run: cd repo && node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 + env: + NEXT_TELEMETRY_DISABLED: 1 + HEADLESS: true diff --git a/publish-release.sh b/publish-release.sh new file mode 100755 index 000000000000000..e5f944b8dfb81a0 --- /dev/null +++ b/publish-release.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +if + ls ~/.npmrc >/dev/null 2>&1 && + [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; +then + # yarn run lerna publish from-git --npm-tag canary --yes + echo "publishing canary" +else + echo "Did not publish canary" +fi + +if + ls ~/.npmrc >/dev/null 2>&1 && + [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; +then + # yarn run lerna publish from-git --yes + echo "publishing stable" +else + echo "Did not publish stable" +fi diff --git a/run-tests.js b/run-tests.js index e527dda4764fade..2ed62b0fb1b5211 100644 --- a/run-tests.js +++ b/run-tests.js @@ -1,6 +1,5 @@ const path = require('path') const _glob = require('glob') -const fs = require('fs-extra') const fetch = require('node-fetch') const { promisify } = require('util') const { Sema } = require('async-sema') @@ -12,6 +11,7 @@ const exec = promisify(execOrig) const NUM_RETRIES = 2 const DEFAULT_CONCURRENCY = 2 const timings = [] +const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings` ;(async () => { let concurrencyIdx = process.argv.indexOf('-c') @@ -32,52 +32,18 @@ const timings = [] cwd: path.join(__dirname, 'test'), }) - if (outputTimings) { + if (outputTimings && groupArg) { console.log('Fetching previous timings data') - const metaRes = await fetch( - `https://circleci.com/api/v1.1/project/github/zeit/next.js/` - ) - - if (metaRes.ok) { - const buildsMeta = await metaRes.json() - let buildNumber - - for (const build of buildsMeta) { - if ( - build.status === 'success' && - build.build_parameters && - build.build_parameters.CIRCLE_JOB === 'test' - ) { - buildNumber = build.build_num - break - } - } - - const timesRes = await fetch( - `https://circleci.com/api/v1.1/project/github/zeit/next.js/${buildNumber}/tests` - ) - - if (timesRes.ok) { - const { tests } = await timesRes.json() - prevTimings = {} - - for (const test of tests) { - prevTimings[test.file] = test.run_time - } + try { + const timingsRes = await fetch(TIMINGS_API) - if (Object.keys(prevTimings).length > 0) { - console.log('Fetched previous timings data') - } else { - prevTimings = null - } - } else { - console.log( - 'Failed to fetch previous timings status:', - timesRes.status - ) + if (!timingsRes.ok) { + throw new Error(`request status: ${timingsRes.status}`) } - } else { - console.log('Failed to fetch timings meta status:', metaRes.status) + prevTimings = await timingsRes.json() + console.log('Fetched previous timings data successfully') + } catch (err) { + console.log(`Failed to fetch timings data`, err) } } } @@ -210,7 +176,8 @@ const timings = [] ) if (outputTimings) { - let junitData = `` + const curTimings = {} + // let junitData = `` /* @@ -220,20 +187,41 @@ const timings = [] for (const timing of timings) { const timeInSeconds = timing.time / 1000 - - junitData += ` - - - - ` + curTimings[timing.file] = timeInSeconds + + // junitData += ` + // + // + // + // ` } + // junitData += `` + // console.log('output timing data to junit.xml') + + if (prevTimings) { + try { + const timingsRes = await fetch(TIMINGS_API, { + method: 'POST', + headers: { + 'content-type': 'application/json', + }, + body: JSON.stringify({ timings: curTimings }), + }) - junitData += `` - await fs.writeFile('test/junit.xml', junitData, 'utf8') - console.log('output timing data to junit.xml') + if (!timingsRes.ok) { + throw new Error(`request status: ${timingsRes.status}`) + } + console.log( + 'Sent updated timings successfully', + await timingsRes.json() + ) + } catch (err) { + console.log('Failed to update timings data', err) + } + } } })() diff --git a/test/integration/api-support/test/index.test.js b/test/integration/api-support/test/index.test.js index a803bbdaceb261b..c66556733b2dbe7 100644 --- a/test/integration/api-support/test/index.test.js +++ b/test/integration/api-support/test/index.test.js @@ -118,16 +118,32 @@ function runTests(dev = false) { }) it('should return error exceeded body limit', async () => { - const data = await fetchViaHTTP(appPort, '/api/parse', null, { - method: 'POST', - headers: { - 'Content-Type': 'application/json; charset=utf-8', - }, - body: JSON.stringify(json), - }) + let res + let error + + try { + res = await fetchViaHTTP(appPort, '/api/parse', null, { + method: 'POST', + headers: { + 'Content-Type': 'application/json; charset=utf-8', + }, + body: JSON.stringify(json), + }) + } catch (err) { + error = err + } - expect(data.status).toEqual(413) - expect(data.statusText).toEqual('Body exceeded 1mb limit') + if (error) { + // This is a temporary workaround for testing since node doesn't handle + // closed connections when POSTing data to an endpoint correctly + // https://github.com/nodejs/node/issues/12339 + // TODO: investigate re-enabling this after above issue has been + // addressed in node or `node-fetch` + expect(error.code).toBe('EPIPE') + } else { + expect(res.status).toEqual(413) + expect(res.statusText).toEqual('Body exceeded 1mb limit') + } }) it('should parse bigger body then 1mb', async () => { From cf5fbb313d7d69e6649fc1530a9a2f5fa664b62d Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 14:15:42 -0600 Subject: [PATCH 240/321] Update pass job name --- .github/workflows/build_test_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index e7d2458a947f9cb..a509049e2d3c8c5 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -54,7 +54,7 @@ jobs: HEADLESS: true testsPass: - name: Tests pass + name: Mission Accomplished runs-on: ubuntu-latest needs: [lint, testAll] steps: From ac6a7f96507a0d882442a002656208015a2a1d2a Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 14:19:44 -0600 Subject: [PATCH 241/321] Update test pass job name --- .github/workflows/build_test_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index a509049e2d3c8c5..f314bd51a19cbb2 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -54,7 +54,7 @@ jobs: HEADLESS: true testsPass: - name: Mission Accomplished + name: thank you, next runs-on: ubuntu-latest needs: [lint, testAll] steps: From abd69ec4be4c46565ec102f435d9552eaee7952f Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 27 Jan 2020 15:32:45 -0500 Subject: [PATCH 242/321] Fix Experimental Modern Mode with CSS (#10289) --- .../webpack/plugins/build-manifest-plugin.ts | 4 +- .../css-client-nav/test/index.test.js | 156 ++++++++++++++++++ .../multi-module-modern/next.config.js | 9 + .../multi-module-modern/pages/blue.js | 20 +++ .../multi-module-modern/pages/blue.module.css | 3 + .../multi-module-modern/pages/none.js | 19 +++ .../multi-module-modern/pages/red.js | 20 +++ .../multi-module-modern/pages/red.module.css | 3 + .../css-fixtures/multi-module/next.config.js | 9 + 9 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 test/integration/css-fixtures/multi-module-modern/next.config.js create mode 100644 test/integration/css-fixtures/multi-module-modern/pages/blue.js create mode 100644 test/integration/css-fixtures/multi-module-modern/pages/blue.module.css create mode 100644 test/integration/css-fixtures/multi-module-modern/pages/none.js create mode 100644 test/integration/css-fixtures/multi-module-modern/pages/red.js create mode 100644 test/integration/css-fixtures/multi-module-modern/pages/red.module.css create mode 100644 test/integration/css-fixtures/multi-module/next.config.js diff --git a/packages/next/build/webpack/plugins/build-manifest-plugin.ts b/packages/next/build/webpack/plugins/build-manifest-plugin.ts index be640cbed31f613..75a3b2500d027c3 100644 --- a/packages/next/build/webpack/plugins/build-manifest-plugin.ts +++ b/packages/next/build/webpack/plugins/build-manifest-plugin.ts @@ -33,7 +33,9 @@ const generateClientManifest = ( // Filter out dependencies in the _app entry, because those will have already // been loaded by the client prior to a navigation event const filteredDeps = dependencies.filter( - dep => !appDependencies.has(dep) && /\.module\.js$/.test(dep) === isModern + dep => + !appDependencies.has(dep) && + (!dep.endsWith('.js') || dep.endsWith('.module.js') === isModern) ) // The manifest can omit the page if it has no requirements diff --git a/test/integration/css-client-nav/test/index.test.js b/test/integration/css-client-nav/test/index.test.js index d5dfc8cba184a0a..4f35823bc276cad 100644 --- a/test/integration/css-client-nav/test/index.test.js +++ b/test/integration/css-client-nav/test/index.test.js @@ -171,3 +171,159 @@ describe('CSS Module client-side navigation in Production', () => { } }) }) + +describe('CSS Module client-side navigation in Production (Modern)', () => { + const appDir = join(fixturesDir, 'multi-module-modern') + + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + let appPort + let app + beforeAll(async () => { + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + }) + afterAll(async () => { + await killApp(app) + }) + + it('should be able to client-side navigate from red to blue', async () => { + let browser + try { + browser = await webdriver(appPort, '/red') + + await browser.eval(`window.__did_not_ssr = 'make sure this is set'`) + + const redColor = await browser.eval( + `window.getComputedStyle(document.querySelector('#verify-red')).color` + ) + expect(redColor).toMatchInlineSnapshot(`"rgb(255, 0, 0)"`) + + await browser.elementByCss('#link-blue').click() + + await browser.waitForElementByCss('#verify-blue') + + const blueColor = await browser.eval( + `window.getComputedStyle(document.querySelector('#verify-blue')).color` + ) + expect(blueColor).toMatchInlineSnapshot(`"rgb(0, 0, 255)"`) + + expect(await browser.eval(`window.__did_not_ssr`)).toMatchInlineSnapshot( + `"make sure this is set"` + ) + } finally { + if (browser) { + await browser.close() + } + } + }) + + it('should be able to client-side navigate from blue to red', async () => { + const content = await renderViaHTTP(appPort, '/blue') + const $ = cheerio.load(content) + + // Ensure only `/blue` page's CSS is preloaded + const serverCssPreloads = $('link[rel="preload"][as="style"]') + expect(serverCssPreloads.length).toBe(1) + + const serverCssPrefetches = $('link[rel="prefetch"][as="style"]') + expect(serverCssPrefetches.length).toBe(0) + + let browser + try { + browser = await webdriver(appPort, '/blue') + await browser.eval(`window.__did_not_ssr = 'make sure this is set'`) + + const redColor = await browser.eval( + `window.getComputedStyle(document.querySelector('#verify-blue')).color` + ) + expect(redColor).toMatchInlineSnapshot(`"rgb(0, 0, 255)"`) + + // Check that Red was preloaded + const result = await browser.eval( + `[].slice.call(document.querySelectorAll('link[rel="prefetch"][as="style"]')).map(e=>({href:e.href})).sort()` + ) + expect(result.length).toBe(1) + + // Check that CSS was not loaded as script + const cssPreloads = await browser.eval( + `[].slice.call(document.querySelectorAll('link[rel=preload][href*=".css"]')).map(e=>e.as)` + ) + expect(cssPreloads.every(e => e === 'style')).toBe(true) + const cssPreloads2 = await browser.eval( + `[].slice.call(document.querySelectorAll('link[rel=prefetch][href*=".css"]')).map(e=>e.as)` + ) + expect(cssPreloads2.every(e => e === 'style')).toBe(true) + + await browser.elementByCss('#link-red').click() + + await browser.waitForElementByCss('#verify-red') + + const blueColor = await browser.eval( + `window.getComputedStyle(document.querySelector('#verify-red')).color` + ) + expect(blueColor).toMatchInlineSnapshot(`"rgb(255, 0, 0)"`) + + expect(await browser.eval(`window.__did_not_ssr`)).toMatchInlineSnapshot( + `"make sure this is set"` + ) + } finally { + if (browser) { + await browser.close() + } + } + }) + + it('should be able to client-side navigate from none to red', async () => { + let browser + try { + browser = await webdriver(appPort, '/none') + + await browser.eval(`window.__did_not_ssr = 'make sure this is set'`) + + await browser.elementByCss('#link-red').click() + await browser.waitForElementByCss('#verify-red') + + const blueColor = await browser.eval( + `window.getComputedStyle(document.querySelector('#verify-red')).color` + ) + expect(blueColor).toMatchInlineSnapshot(`"rgb(255, 0, 0)"`) + + expect(await browser.eval(`window.__did_not_ssr`)).toMatchInlineSnapshot( + `"make sure this is set"` + ) + } finally { + if (browser) { + await browser.close() + } + } + }) + + it('should be able to client-side navigate from none to blue', async () => { + let browser + try { + browser = await webdriver(appPort, '/none') + + await browser.eval(`window.__did_not_ssr = 'make sure this is set'`) + + await browser.elementByCss('#link-blue').click() + await browser.waitForElementByCss('#verify-blue') + + const blueColor = await browser.eval( + `window.getComputedStyle(document.querySelector('#verify-blue')).color` + ) + expect(blueColor).toMatchInlineSnapshot(`"rgb(0, 0, 255)"`) + + expect(await browser.eval(`window.__did_not_ssr`)).toMatchInlineSnapshot( + `"make sure this is set"` + ) + } finally { + if (browser) { + await browser.close() + } + } + }) +}) diff --git a/test/integration/css-fixtures/multi-module-modern/next.config.js b/test/integration/css-fixtures/multi-module-modern/next.config.js new file mode 100644 index 000000000000000..a6e26e2467154a2 --- /dev/null +++ b/test/integration/css-fixtures/multi-module-modern/next.config.js @@ -0,0 +1,9 @@ +const parent = require('../next.config') + +module.exports = { + ...parent, + experimental: { + ...parent.experimental, + modern: true, + }, +} diff --git a/test/integration/css-fixtures/multi-module-modern/pages/blue.js b/test/integration/css-fixtures/multi-module-modern/pages/blue.js new file mode 100644 index 000000000000000..49dff85067fa323 --- /dev/null +++ b/test/integration/css-fixtures/multi-module-modern/pages/blue.js @@ -0,0 +1,20 @@ +import Link from 'next/link' +import { blueText } from './blue.module.css' + +export default function Blue() { + return ( + <> +
+ This text should be blue. +
+
+ + Red + +
+ + None + + + ) +} diff --git a/test/integration/css-fixtures/multi-module-modern/pages/blue.module.css b/test/integration/css-fixtures/multi-module-modern/pages/blue.module.css new file mode 100644 index 000000000000000..4c5ac28ce4ef8d9 --- /dev/null +++ b/test/integration/css-fixtures/multi-module-modern/pages/blue.module.css @@ -0,0 +1,3 @@ +.blueText { + color: blue; +} diff --git a/test/integration/css-fixtures/multi-module-modern/pages/none.js b/test/integration/css-fixtures/multi-module-modern/pages/none.js new file mode 100644 index 000000000000000..f26c2d80b3ae0a1 --- /dev/null +++ b/test/integration/css-fixtures/multi-module-modern/pages/none.js @@ -0,0 +1,19 @@ +import Link from 'next/link' + +export default function None() { + return ( + <> +
+ This text should be black. +
+
+ + Red + +
+ + Blue + + + ) +} diff --git a/test/integration/css-fixtures/multi-module-modern/pages/red.js b/test/integration/css-fixtures/multi-module-modern/pages/red.js new file mode 100644 index 000000000000000..d67276dda2d765a --- /dev/null +++ b/test/integration/css-fixtures/multi-module-modern/pages/red.js @@ -0,0 +1,20 @@ +import Link from 'next/link' +import { redText } from './red.module.css' + +export default function Red() { + return ( + <> +
+ This text should be red. +
+
+ + Blue + +
+ + None + + + ) +} diff --git a/test/integration/css-fixtures/multi-module-modern/pages/red.module.css b/test/integration/css-fixtures/multi-module-modern/pages/red.module.css new file mode 100644 index 000000000000000..08a38e09ef8eac4 --- /dev/null +++ b/test/integration/css-fixtures/multi-module-modern/pages/red.module.css @@ -0,0 +1,3 @@ +.redText { + color: red; +} diff --git a/test/integration/css-fixtures/multi-module/next.config.js b/test/integration/css-fixtures/multi-module/next.config.js new file mode 100644 index 000000000000000..b0f299cd7564071 --- /dev/null +++ b/test/integration/css-fixtures/multi-module/next.config.js @@ -0,0 +1,9 @@ +const parent = require('../next.config') + +module.exports = { + ...parent, + experimental: { + ...parent.experimental, + modern: false, + }, +} From c24daa21722fadfce2d1d561ce65ecc0efa6a7ea Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 16:50:59 -0600 Subject: [PATCH 243/321] Add initial support for unstable_getServerProps (#10077) * Add support for unstable_getServerProps * Apply suggestions from review * Add no-cache header and update types * Revert sharing of load-components type * Add catchall test and update routes-manifest field * Update header check * Update to pass query for getServerProps data requests * Update to not cache getServerProps requests * Rename server side props identifier * Update to nest props for getServerProps * Add no-cache header in serverless-loader also * Update to throw error for mixed SSG/serverProps earlier * Add comment explaining params chosing in serverless-loader * Update invalidKeysMsg to return a string and inline throwing * Inline throwing mixed SSG/serverProps error * Update setting cache header in serverless-loader * Add separate getServerData method in router * Update checkIsSSG -> isDataIdentifier * Refactor router getData back to ternary * Apply suggestions to build/index.ts * drop return * De-dupe extra escape regex * Add param test --- .../build/babel/plugins/next-ssg-transform.ts | 37 +- packages/next/build/index.ts | 70 ++- packages/next/build/utils.ts | 19 +- .../webpack/loaders/next-serverless-loader.ts | 15 +- packages/next/export/worker.js | 2 +- packages/next/lib/constants.ts | 4 + .../next/next-server/lib/router/router.ts | 67 +-- .../next-server/server/load-components.ts | 12 +- .../next/next-server/server/next-server.ts | 60 ++- packages/next/next-server/server/render.tsx | 68 ++- .../getserverprops/pages/another/index.js | 38 ++ .../pages/blog/[post]/[comment].js | 26 ++ .../getserverprops/pages/blog/[post]/index.js | 38 ++ .../getserverprops/pages/blog/index.js | 24 ++ .../pages/catchall/[...path].js | 34 ++ .../pages/default-revalidate.js | 25 ++ .../integration/getserverprops/pages/index.js | 47 ++ .../getserverprops/pages/invalid-keys.js | 34 ++ .../getserverprops/pages/normal.js | 1 + .../getserverprops/pages/something.js | 36 ++ .../pages/user/[user]/profile.js | 24 ++ .../getserverprops/test/index.test.js | 407 ++++++++++++++++++ test/integration/getserverprops/world.txt | 1 + .../pages/index.js | 13 + .../pages/index.js.alt | 13 + .../test/index.test.js | 32 ++ 26 files changed, 1070 insertions(+), 77 deletions(-) create mode 100644 test/integration/getserverprops/pages/another/index.js create mode 100644 test/integration/getserverprops/pages/blog/[post]/[comment].js create mode 100644 test/integration/getserverprops/pages/blog/[post]/index.js create mode 100644 test/integration/getserverprops/pages/blog/index.js create mode 100644 test/integration/getserverprops/pages/catchall/[...path].js create mode 100644 test/integration/getserverprops/pages/default-revalidate.js create mode 100644 test/integration/getserverprops/pages/index.js create mode 100644 test/integration/getserverprops/pages/invalid-keys.js create mode 100644 test/integration/getserverprops/pages/normal.js create mode 100644 test/integration/getserverprops/pages/something.js create mode 100644 test/integration/getserverprops/pages/user/[user]/profile.js create mode 100644 test/integration/getserverprops/test/index.test.js create mode 100644 test/integration/getserverprops/world.txt create mode 100644 test/integration/mixed-ssg-serverprops-error/pages/index.js create mode 100644 test/integration/mixed-ssg-serverprops-error/pages/index.js.alt create mode 100644 test/integration/mixed-ssg-serverprops-error/test/index.test.js diff --git a/packages/next/build/babel/plugins/next-ssg-transform.ts b/packages/next/build/babel/plugins/next-ssg-transform.ts index 4e9731338df5039..8fc50b255a7a9b3 100644 --- a/packages/next/build/babel/plugins/next-ssg-transform.ts +++ b/packages/next/build/babel/plugins/next-ssg-transform.ts @@ -1,20 +1,25 @@ import { NodePath, PluginObj } from '@babel/core' import * as BabelTypes from '@babel/types' +import { SERVER_PROPS_SSG_CONFLICT } from '../../../lib/constants' const pageComponentVar = '__NEXT_COMP' const prerenderId = '__N_SSG' +const serverPropsId = '__N_SSP' export const EXPORT_NAME_GET_STATIC_PROPS = 'unstable_getStaticProps' export const EXPORT_NAME_GET_STATIC_PATHS = 'unstable_getStaticPaths' +export const EXPORT_NAME_GET_SERVER_PROPS = 'unstable_getServerProps' const ssgExports = new Set([ EXPORT_NAME_GET_STATIC_PROPS, EXPORT_NAME_GET_STATIC_PATHS, + EXPORT_NAME_GET_SERVER_PROPS, ]) type PluginState = { refs: Set> isPrerender: boolean + isServerProps: boolean done: boolean } @@ -44,7 +49,7 @@ function decorateSsgExport( '=', t.memberExpression( t.identifier(pageComponentVar), - t.identifier(prerenderId) + t.identifier(state.isPrerender ? prerenderId : serverPropsId) ), t.booleanLiteral(true) ), @@ -55,6 +60,24 @@ function decorateSsgExport( }) } +const isDataIdentifier = (name: string, state: PluginState): boolean => { + if (ssgExports.has(name)) { + if (name === EXPORT_NAME_GET_SERVER_PROPS) { + if (state.isPrerender) { + throw new Error(SERVER_PROPS_SSG_CONFLICT) + } + state.isServerProps = true + } else { + if (state.isServerProps) { + throw new Error(SERVER_PROPS_SSG_CONFLICT) + } + state.isPrerender = true + } + return true + } + return false +} + export default function nextTransformSsg({ types: t, }: { @@ -134,10 +157,11 @@ export default function nextTransformSsg({ enter(_, state) { state.refs = new Set>() state.isPrerender = false + state.isServerProps = false state.done = false }, exit(path, state) { - if (!state.isPrerender) { + if (!state.isPrerender && !state.isServerProps) { return } @@ -239,8 +263,7 @@ export default function nextTransformSsg({ const specifiers = path.get('specifiers') if (specifiers.length) { specifiers.forEach(s => { - if (ssgExports.has(s.node.exported.name)) { - state.isPrerender = true + if (isDataIdentifier(s.node.exported.name, state)) { s.remove() } }) @@ -259,8 +282,7 @@ export default function nextTransformSsg({ switch (decl.node.type) { case 'FunctionDeclaration': { const name = decl.node.id!.name - if (ssgExports.has(name)) { - state.isPrerender = true + if (isDataIdentifier(name, state)) { path.remove() } break @@ -274,8 +296,7 @@ export default function nextTransformSsg({ return } const name = d.node.id.name - if (ssgExports.has(name)) { - state.isPrerender = true + if (isDataIdentifier(name, state)) { d.remove() } }) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 964082a2b8e1d1b..67cbdc381bf684e 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -63,6 +63,7 @@ import { } from './utils' import getBaseWebpackConfig from './webpack-config' import { writeBuildId } from './write-build-id' +import escapeStringRegexp from 'escape-string-regexp' const fsAccess = promisify(fs.access) const fsUnlink = promisify(fs.unlink) @@ -258,22 +259,23 @@ export default async function build(dir: string, conf = null): Promise { } } + const routesManifestPath = path.join(distDir, ROUTES_MANIFEST) + const routesManifest: any = { + version: 1, + basePath: config.experimental.basePath, + redirects: redirects.map(r => buildCustomRoute(r, 'redirect')), + rewrites: rewrites.map(r => buildCustomRoute(r, 'rewrite')), + headers: headers.map(r => buildCustomRoute(r, 'header')), + dynamicRoutes: getSortedRoutes(dynamicRoutes).map(page => ({ + page, + regex: getRouteRegex(page).re.source, + })), + } + await mkdirp(distDir) - await fsWriteFile( - path.join(distDir, ROUTES_MANIFEST), - JSON.stringify({ - version: 1, - basePath: config.experimental.basePath, - redirects: redirects.map(r => buildCustomRoute(r, 'redirect')), - rewrites: rewrites.map(r => buildCustomRoute(r, 'rewrite')), - headers: headers.map(r => buildCustomRoute(r, 'header')), - dynamicRoutes: getSortedRoutes(dynamicRoutes).map(page => ({ - page, - regex: getRouteRegex(page).re.source, - })), - }), - 'utf8' - ) + // We need to write the manifest with rewrites before build + // so serverless can import the manifest + await fsWriteFile(routesManifestPath, JSON.stringify(routesManifest), 'utf8') const configs = await Promise.all([ getBaseWebpackConfig(dir, { @@ -405,6 +407,7 @@ export default async function build(dir: string, conf = null): Promise { const staticPages = new Set() const invalidPages = new Set() const hybridAmpPages = new Set() + const serverPropsPages = new Set() const additionalSsgPaths = new Map>() const pageInfos = new Map() const pagesManifest = JSON.parse(await fsReadFile(manifestPath, 'utf8')) @@ -502,6 +505,8 @@ export default async function build(dir: string, conf = null): Promise { additionalSsgPaths.set(page, result.prerenderRoutes) ssgPageRoutes = result.prerenderRoutes } + } else if (result.hasServerProps) { + serverPropsPages.add(page) } else if (result.isStatic && customAppGetInitialProps === false) { staticPages.add(page) isStatic = true @@ -525,6 +530,41 @@ export default async function build(dir: string, conf = null): Promise { ) staticCheckWorkers.end() + if (serverPropsPages.size > 0) { + // We update the routes manifest after the build with the + // serverProps routes since we can't determine this until after build + routesManifest.serverPropsRoutes = {} + + for (const page of serverPropsPages) { + const dataRoute = path.posix.join( + '/_next/data', + buildId, + `${page === '/' ? '/index' : page}.json` + ) + + routesManifest.serverPropsRoutes[page] = { + page, + dataRouteRegex: isDynamicRoute(page) + ? getRouteRegex(dataRoute.replace(/\.json$/, '')).re.source.replace( + /\(\?:\\\/\)\?\$$/, + '\\.json$' + ) + : new RegExp( + `^${path.posix.join( + '/_next/data', + escapeStringRegexp(buildId), + `${page === '/' ? '/index' : page}.json` + )}$` + ).source, + } + } + + await fsWriteFile( + routesManifestPath, + JSON.stringify(routesManifest), + 'utf8' + ) + } // Since custom _app.js can wrap the 404 page we have to opt-out of static optimization if it has getInitialProps // Only export the static 404 when there is no /_error present const useStatic404 = diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index ac126d9c7749445..2bb641ed5c7e964 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -9,7 +9,11 @@ import { Rewrite, getRedirectStatus, } from '../lib/check-custom-routes' -import { SSG_GET_INITIAL_PROPS_CONFLICT } from '../lib/constants' +import { + SSG_GET_INITIAL_PROPS_CONFLICT, + SERVER_PROPS_GET_INIT_PROPS_CONFLICT, + SERVER_PROPS_SSG_CONFLICT, +} from '../lib/constants' import prettyBytes from '../lib/pretty-bytes' import { recursiveReadDir } from '../lib/recursive-readdir' import { getRouteMatcher, getRouteRegex } from '../next-server/lib/router/utils' @@ -481,6 +485,7 @@ export async function isPageStatic( ): Promise<{ isStatic?: boolean isHybridAmp?: boolean + hasServerProps?: boolean hasStaticProps?: boolean prerenderRoutes?: string[] | undefined }> { @@ -496,6 +501,7 @@ export async function isPageStatic( const hasGetInitialProps = !!(Comp as any).getInitialProps const hasStaticProps = !!mod.unstable_getStaticProps const hasStaticPaths = !!mod.unstable_getStaticPaths + const hasServerProps = !!mod.unstable_getServerProps const hasLegacyStaticParams = !!mod.unstable_getStaticParams if (hasLegacyStaticParams) { @@ -510,6 +516,14 @@ export async function isPageStatic( throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT) } + if (hasGetInitialProps && hasServerProps) { + throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT) + } + + if (hasStaticProps && hasServerProps) { + throw new Error(SERVER_PROPS_SSG_CONFLICT) + } + // A page cannot have static parameters if it is not a dynamic page. if (hasStaticProps && hasStaticPaths && !isDynamicRoute(page)) { throw new Error( @@ -593,10 +607,11 @@ export async function isPageStatic( const config = mod.config || {} return { - isStatic: !hasStaticProps && !hasGetInitialProps, + isStatic: !hasStaticProps && !hasGetInitialProps && !hasServerProps, isHybridAmp: config.amp === 'hybrid', prerenderRoutes: prerenderPaths, hasStaticProps, + hasServerProps, } } catch (err) { if (err.code === 'MODULE_NOT_FOUND') return {} diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index 4948c38d3735cc5..9db7d8c93dbf6ea 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -186,6 +186,7 @@ const nextServerlessLoader: loader.Loader = function() { export const unstable_getStaticProps = ComponentInfo['unstable_getStaticProp' + 's'] export const unstable_getStaticParams = ComponentInfo['unstable_getStaticParam' + 's'] export const unstable_getStaticPaths = ComponentInfo['unstable_getStaticPath' + 's'] + export const unstable_getServerProps = ComponentInfo['unstable_getServerProp' + 's'] ${dynamicRouteMatcher} ${handleRewrites} @@ -207,6 +208,7 @@ const nextServerlessLoader: loader.Loader = function() { Document, buildManifest, unstable_getStaticProps, + unstable_getServerProps, unstable_getStaticPaths, reactLoadableManifest, canonicalBase: "${canonicalBase}", @@ -237,7 +239,7 @@ const nextServerlessLoader: loader.Loader = function() { ${page === '/_error' ? `res.statusCode = 404` : ''} ${ pageIsDynamicRoute - ? `const params = fromExport && !unstable_getStaticProps ? {} : dynamicRouteMatcher(parsedUrl.pathname) || {};` + ? `const params = fromExport && !unstable_getStaticProps && !unstable_getServerProps ? {} : dynamicRouteMatcher(parsedUrl.pathname) || {};` : `const params = {};` } ${ @@ -273,15 +275,22 @@ const nextServerlessLoader: loader.Loader = function() { ` : `const nowParams = null;` } + // make sure to set renderOpts to the correct params e.g. _params + // if provided from worker or params if we're parsing them here + renderOpts.params = _params || params + let result = await renderToHTML(req, res, "${page}", Object.assign({}, unstable_getStaticProps ? {} : parsedUrl.query, nowParams ? nowParams : params, _params), renderOpts) if (_nextData && !fromExport) { const payload = JSON.stringify(renderOpts.pageData) res.setHeader('Content-Type', 'application/json') res.setHeader('Content-Length', Buffer.byteLength(payload)) + res.setHeader( 'Cache-Control', - \`s-maxage=\${renderOpts.revalidate}, stale-while-revalidate\` + unstable_getServerProps + ? \`no-cache, no-store, must-revalidate\` + : \`s-maxage=\${renderOpts.revalidate}, stale-while-revalidate\` ) res.end(payload) return null @@ -295,6 +304,7 @@ const nextServerlessLoader: loader.Loader = function() { const result = await renderToHTML(req, res, "/_error", parsedUrl.query, Object.assign({}, options, { unstable_getStaticProps: undefined, unstable_getStaticPaths: undefined, + unstable_getServerProps: undefined, Component: Error })) return result @@ -304,6 +314,7 @@ const nextServerlessLoader: loader.Loader = function() { const result = await renderToHTML(req, res, "/_error", parsedUrl.query, Object.assign({}, options, { unstable_getStaticProps: undefined, unstable_getStaticPaths: undefined, + unstable_getServerProps: undefined, Component: Error, err })) diff --git a/packages/next/export/worker.js b/packages/next/export/worker.js index 30e7db5d67275fb..68a1307b519dd7b 100644 --- a/packages/next/export/worker.js +++ b/packages/next/export/worker.js @@ -191,7 +191,7 @@ export default async function({ html = components.Component queryWithAutoExportWarn() } else { - curRenderOpts = { ...components, ...renderOpts, ampPath } + curRenderOpts = { ...components, ...renderOpts, ampPath, params } html = await renderMethod(req, res, page, query, curRenderOpts) } } diff --git a/packages/next/lib/constants.ts b/packages/next/lib/constants.ts index 7692ffb747ccd1d..1bf62bb57e918f4 100644 --- a/packages/next/lib/constants.ts +++ b/packages/next/lib/constants.ts @@ -25,3 +25,7 @@ export const DOT_NEXT_ALIAS = 'private-dot-next' export const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://err.sh/zeit/next.js/public-next-folder-conflict` export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with unstable_getStaticProps. To use SSG, please remove your getInitialProps` + +export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with unstable_getServerProps. Please remove one or the other` + +export const SERVER_PROPS_SSG_CONFLICT = `You can not use unstable_getStaticProps with unstable_getServerProps. To use SSG, please remove your unstable_getServerProps` diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index a3897e261244ace..4c5a30545b8399b 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -27,6 +27,9 @@ function toRoute(path: string): string { return path.replace(/\/$/, '') || '/' } +const prepareRoute = (path: string) => + toRoute(!path || path === '/' ? '/index' : path) + type Url = UrlObject | string export type BaseRouter = { @@ -61,6 +64,33 @@ type BeforePopStateCallback = (state: any) => boolean type ComponentLoadCancel = (() => void) | null +const fetchNextData = ( + pathname: string, + query: ParsedUrlQuery | null, + cb?: (...args: any) => any +) => { + return fetch( + formatWithValidation({ + // @ts-ignore __NEXT_DATA__ + pathname: `/_next/data/${__NEXT_DATA__.buildId}${pathname}.json`, + query, + }) + ) + .then(res => { + if (!res.ok) { + throw new Error(`Failed to load static props`) + } + return res.json() + }) + .then(data => { + return cb ? cb(data) : data + }) + .catch((err: Error) => { + ;(err as any).code = 'PAGE_LOAD_ERROR' + throw err + }) +} + export default class Router implements BaseRouter { route: string pathname: string @@ -464,6 +494,8 @@ export default class Router implements BaseRouter { return this._getData(() => (Component as any).__N_SSG ? this._getStaticData(as) + : (Component as any).__N_SSP + ? this._getServerData(as) : this.getInitialProps( Component, // we provide AppTree later so this needs to be `any` @@ -676,31 +708,18 @@ export default class Router implements BaseRouter { }) } - _getStaticData = (asPath: string, _cachedData?: object): Promise => { - let pathname = parse(asPath).pathname - pathname = toRoute(!pathname || pathname === '/' ? '/index' : pathname) + _getStaticData = (asPath: string): Promise => { + const pathname = prepareRoute(parse(asPath).pathname!) - return process.env.NODE_ENV === 'production' && - (_cachedData = this.sdc[pathname]) - ? Promise.resolve(_cachedData) - : fetch( - // @ts-ignore __NEXT_DATA__ - `/_next/data/${__NEXT_DATA__.buildId}${pathname}.json` - ) - .then(res => { - if (!res.ok) { - throw new Error(`Failed to load static props`) - } - return res.json() - }) - .then(data => { - this.sdc[pathname!] = data - return data - }) - .catch((err: Error) => { - ;(err as any).code = 'PAGE_LOAD_ERROR' - throw err - }) + return process.env.NODE_ENV === 'production' && this.sdc[pathname] + ? Promise.resolve(this.sdc[pathname]) + : fetchNextData(pathname, null, data => (this.sdc[pathname] = data)) + } + + _getServerData = (asPath: string): Promise => { + let { pathname, query } = parse(asPath, true) + pathname = prepareRoute(pathname!) + return fetchNextData(pathname, query) } getInitialProps( diff --git a/packages/next/next-server/server/load-components.ts b/packages/next/next-server/server/load-components.ts index c8559610c9d3f77..78995e867d3db8a 100644 --- a/packages/next/next-server/server/load-components.ts +++ b/packages/next/next-server/server/load-components.ts @@ -1,3 +1,5 @@ +import { IncomingMessage, ServerResponse } from 'http' +import { ParsedUrlQuery } from 'querystring' import { BUILD_MANIFEST, CLIENT_STATIC_FILES_PATH, @@ -6,7 +8,6 @@ import { } from '../lib/constants' import { join } from 'path' import { requirePage } from './require' -import { ParsedUrlQuery } from 'querystring' import { BuildManifest } from './get-page-files' import { AppType, DocumentType } from '../lib/utils' import { PageConfig, NextPageContext } from 'next/types' @@ -33,6 +34,13 @@ type Unstable_getStaticProps = (params: { type Unstable_getStaticPaths = () => Promise> +type Unstable_getServerProps = (context: { + params: ParsedUrlQuery | undefined + req: IncomingMessage + res: ServerResponse + query: ParsedUrlQuery +}) => Promise<{ [key: string]: any }> + export type LoadComponentsReturnType = { Component: React.ComponentType pageConfig?: PageConfig @@ -43,6 +51,7 @@ export type LoadComponentsReturnType = { App: AppType unstable_getStaticProps?: Unstable_getStaticProps unstable_getStaticPaths?: Unstable_getStaticPaths + unstable_getServerProps?: Unstable_getServerProps } export async function loadComponents( @@ -106,6 +115,7 @@ export async function loadComponents( DocumentMiddleware, reactLoadableManifest, pageConfig: ComponentMod.config || {}, + unstable_getServerProps: ComponentMod.unstable_getServerProps, unstable_getStaticProps: ComponentMod.unstable_getStaticProps, unstable_getStaticPaths: ComponentMod.unstable_getStaticPaths, } diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index e2ac323dce02887..4c7b25dddd9c581 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -382,7 +382,7 @@ export default class Server { req, res, pathname, - { _nextDataReq: '1' }, + { ..._parsedUrl.query, _nextDataReq: '1' }, parsedUrl ) return { @@ -823,7 +823,9 @@ export default class Server { if (revalidate) { res.setHeader( 'Cache-Control', - `s-maxage=${revalidate}, stale-while-revalidate` + revalidate < 0 + ? `no-cache, no-store, must-revalidate` + : `s-maxage=${revalidate}, stale-while-revalidate` ) } else if (revalidate === false) { res.setHeader( @@ -865,25 +867,62 @@ export default class Server { typeof result.Component === 'object' && typeof (result.Component as any).renderReqToHTML === 'function' const isSSG = !!result.unstable_getStaticProps + const isServerProps = !!result.unstable_getServerProps + + // Toggle whether or not this is a Data request + const isDataReq = query._nextDataReq + delete query._nextDataReq + + // Serverless requests need its URL transformed back into the original + // request path (to emulate lambda behavior in production) + if (isLikeServerless && isDataReq) { + let { pathname } = parseUrl(req.url || '', true) + pathname = !pathname || pathname === '/' ? '/index' : pathname + req.url = formatUrl({ + pathname: `/_next/data/${this.buildId}${pathname}.json`, + query, + }) + } // non-spr requests should render like normal if (!isSSG) { // handle serverless if (isLikeServerless) { + if (isDataReq) { + const renderResult = await (result.Component as any).renderReqToHTML( + req, + res, + true + ) + + this.__sendPayload( + res, + JSON.stringify(renderResult?.renderOpts?.pageData), + 'application/json', + -1 + ) + return null + } this.prepareServerlessUrl(req, query) return (result.Component as any).renderReqToHTML(req, res) } + if (isDataReq && isServerProps) { + const props = await renderToHTML(req, res, pathname, query, { + ...result, + ...opts, + isDataReq, + }) + this.__sendPayload(res, JSON.stringify(props), 'application/json', -1) + return null + } + return renderToHTML(req, res, pathname, query, { ...result, ...opts, }) } - // Toggle whether or not this is an SPR Data request - const isDataReq = query._nextDataReq - delete query._nextDataReq - // Compute the SPR cache key const ssgCacheKey = parseUrl(req.url || '').pathname! @@ -909,14 +948,6 @@ export default class Server { // If we're here, that means data is missing or it's stale. - // Serverless requests need its URL transformed back into the original - // request path (to emulate lambda behavior in production) - if (isLikeServerless && isDataReq) { - let { pathname } = parseUrl(req.url || '', true) - pathname = !pathname || pathname === '/' ? '/index' : pathname - req.url = `/_next/data/${this.buildId}${pathname}.json` - } - const doRender = withCoalescedInvoke(async function(): Promise<{ html: string | null pageData: any @@ -1033,6 +1064,7 @@ export default class Server { result, { ...this.renderOpts, + params, amphtml, hasAmp, } diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index ec7fd0a4d63dfb7..cbc72b44a7cbca5 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -24,7 +24,11 @@ import { AmpStateContext } from '../lib/amp-context' import optimizeAmp from './optimize-amp' import { isInAmpMode } from '../lib/amp' import { isDynamicRoute } from '../lib/router/utils/is-dynamic' -import { SSG_GET_INITIAL_PROPS_CONFLICT } from '../../lib/constants' +import { + SSG_GET_INITIAL_PROPS_CONFLICT, + SERVER_PROPS_GET_INIT_PROPS_CONFLICT, + SERVER_PROPS_SSG_CONFLICT, +} from '../../lib/constants' import { AMP_RENDER_TARGET } from '../lib/constants' import { LoadComponentsReturnType, ManifestItem } from './load-components' @@ -129,6 +133,8 @@ type RenderOpts = LoadComponentsReturnType & { ErrorDebug?: React.ComponentType<{ error: Error }> ampValidator?: (html: string, pathname: string) => Promise documentMiddlewareEnabled?: boolean + isDataReq?: boolean + params?: ParsedUrlQuery } function renderDocument( @@ -222,6 +228,14 @@ function renderDocument( ) } +const invalidKeysMsg = (methodName: string, invalidKeys: string[]) => { + return ( + `Additional keys were returned from \`${methodName}\`. Properties intended for your component must be nested under the \`props\` key, e.g.:` + + `\n\n\treturn { props: { title: 'My Title', content: '...' } }` + + `\n\nKeys that need to be moved: ${invalidKeys.join(', ')}.` + ) +} + export async function renderToHTML( req: IncomingMessage, res: ServerResponse, @@ -246,6 +260,9 @@ export async function renderToHTML( ErrorDebug, unstable_getStaticProps, unstable_getStaticPaths, + unstable_getServerProps, + isDataReq, + params, } = renderOpts const callMiddleware = async (method: string, args: any[], props = false) => { @@ -281,7 +298,10 @@ export async function renderToHTML( const hasPageGetInitialProps = !!(Component as any).getInitialProps const isAutoExport = - !hasPageGetInitialProps && defaultAppGetInitialProps && !isSpr + !hasPageGetInitialProps && + defaultAppGetInitialProps && + !isSpr && + !unstable_getServerProps if ( process.env.NODE_ENV !== 'production' && @@ -301,6 +321,14 @@ export async function renderToHTML( throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT + ` ${pathname}`) } + if (hasPageGetInitialProps && unstable_getServerProps) { + throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT + ` ${pathname}`) + } + + if (unstable_getServerProps && isSpr) { + throw new Error(SERVER_PROPS_SSG_CONFLICT + ` ${pathname}`) + } + if (!!unstable_getStaticPaths && !isSpr) { throw new Error( `unstable_getStaticPaths was added without a unstable_getStaticProps in ${pathname}. Without unstable_getStaticProps, unstable_getStaticPaths does nothing` @@ -395,7 +423,7 @@ export async function renderToHTML( if (isSpr) { const data = await unstable_getStaticProps!({ - params: isDynamicRoute(pathname) ? query : undefined, + params: isDynamicRoute(pathname) ? (query as any) : undefined, }) const invalidKeys = Object.keys(data).filter( @@ -403,11 +431,7 @@ export async function renderToHTML( ) if (invalidKeys.length) { - throw new Error( - `Additional keys were returned from \`getStaticProps\`. Properties intended for your component must be nested under the \`props\` key, e.g.:` + - `\n\n\treturn { props: { title: 'My Title', content: '...' } }` + - `\n\nKeys that need to be moved: ${invalidKeys.join(', ')}.` - ) + throw new Error(invalidKeysMsg('getStaticProps', invalidKeys)) } if (typeof data.revalidate === 'number') { @@ -452,6 +476,27 @@ export async function renderToHTML( renderOpts.err = err } + if (unstable_getServerProps) { + const data = await unstable_getServerProps({ + params, + query, + req, + res, + }) + + const invalidKeys = Object.keys(data).filter(key => key !== 'props') + + if (invalidKeys.length) { + throw new Error(invalidKeysMsg('getServerProps', invalidKeys)) + } + + props.pageProps = data.props + ;(renderOpts as any).pageData = props + } + // We only need to do this if we want to support calling + // _app's getInitialProps for getServerProps if not this can be removed + if (isDataReq) return props + // the response might be finished on the getInitialProps call if (isResSent(res) && !isSpr) return null @@ -504,7 +549,10 @@ export async function renderToHTML( ) } const documentCtx = { ...ctx, renderPage } - const docProps = await loadGetInitialProps(Document, documentCtx) + const docProps: DocumentInitialProps = await loadGetInitialProps( + Document, + documentCtx + ) // the response might be finished on the getInitialProps call if (isResSent(res) && !isSpr) return null @@ -519,7 +567,7 @@ export async function renderToHTML( const dynamicImports: ManifestItem[] = [] for (const mod of reactLoadableModules) { - const manifestItem = reactLoadableManifest[mod] + const manifestItem: ManifestItem[] = reactLoadableManifest[mod] if (manifestItem) { manifestItem.forEach(item => { diff --git a/test/integration/getserverprops/pages/another/index.js b/test/integration/getserverprops/pages/another/index.js new file mode 100644 index 000000000000000..a5c3afb6343c63f --- /dev/null +++ b/test/integration/getserverprops/pages/another/index.js @@ -0,0 +1,38 @@ +import Link from 'next/link' +import fs from 'fs' +import findUp from 'find-up' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps() { + const text = fs + .readFileSync( + findUp.sync('world.txt', { + // prevent webpack from intercepting + // eslint-disable-next-line no-eval + cwd: eval(`__dirname`), + }), + 'utf8' + ) + .trim() + + return { + props: { + world: text, + time: new Date().getTime(), + }, + } +} + +export default ({ world, time }) => ( + <> +

hello {world}

+ time: {time} + + to home + +
+ + to something + + +) diff --git a/test/integration/getserverprops/pages/blog/[post]/[comment].js b/test/integration/getserverprops/pages/blog/[post]/[comment].js new file mode 100644 index 000000000000000..292c98024942dc3 --- /dev/null +++ b/test/integration/getserverprops/pages/blog/[post]/[comment].js @@ -0,0 +1,26 @@ +import React from 'react' +import Link from 'next/link' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps({ query }) { + return { + props: { + post: query.post, + comment: query.comment, + time: new Date().getTime(), + }, + } +} + +export default ({ post, comment, time }) => { + return ( + <> +

Post: {post}

+

Comment: {comment}

+ time: {time} + + to home + + + ) +} diff --git a/test/integration/getserverprops/pages/blog/[post]/index.js b/test/integration/getserverprops/pages/blog/[post]/index.js new file mode 100644 index 000000000000000..aa4e0c5cc2bd12a --- /dev/null +++ b/test/integration/getserverprops/pages/blog/[post]/index.js @@ -0,0 +1,38 @@ +import React from 'react' +import Link from 'next/link' +import { useRouter } from 'next/router' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps({ params }) { + if (params.post === 'post-10') { + await new Promise(resolve => { + setTimeout(() => resolve(), 1000) + }) + } + + if (params.post === 'post-100') { + throw new Error('such broken..') + } + + return { + props: { + params, + post: params.post, + time: (await import('perf_hooks')).performance.now(), + }, + } +} + +export default ({ post, time, params }) => { + return ( + <> +

Post: {post}

+ time: {time} +
{JSON.stringify(params)}
+
{JSON.stringify(useRouter().query)}
+ + to home + + + ) +} diff --git a/test/integration/getserverprops/pages/blog/index.js b/test/integration/getserverprops/pages/blog/index.js new file mode 100644 index 000000000000000..056a1860a3e3dfa --- /dev/null +++ b/test/integration/getserverprops/pages/blog/index.js @@ -0,0 +1,24 @@ +import React from 'react' +import Link from 'next/link' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps() { + return { + props: { + slugs: ['post-1', 'post-2'], + time: (await import('perf_hooks')).performance.now(), + }, + } +} + +export default ({ slugs, time }) => { + return ( + <> +

Posts: {JSON.stringify(slugs)}

+ time: {time} + + to home + + + ) +} diff --git a/test/integration/getserverprops/pages/catchall/[...path].js b/test/integration/getserverprops/pages/catchall/[...path].js new file mode 100644 index 000000000000000..5e1bd3543f63fec --- /dev/null +++ b/test/integration/getserverprops/pages/catchall/[...path].js @@ -0,0 +1,34 @@ +import React from 'react' +import Link from 'next/link' +import { useRouter } from 'next/router' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps({ params }) { + return { + props: { + world: 'world', + params: params || {}, + time: new Date().getTime(), + random: Math.random(), + }, + } +} + +export default ({ world, time, params, random }) => { + return ( + <> +

hello: {world}

+ time: {time} +
{random}
+
{JSON.stringify(params)}
+
{JSON.stringify(useRouter().query)}
+ + to home + +
+ + to another + + + ) +} diff --git a/test/integration/getserverprops/pages/default-revalidate.js b/test/integration/getserverprops/pages/default-revalidate.js new file mode 100644 index 000000000000000..15bb81ba617e876 --- /dev/null +++ b/test/integration/getserverprops/pages/default-revalidate.js @@ -0,0 +1,25 @@ +import Link from 'next/link' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps() { + return { + props: { + world: 'world', + time: new Date().getTime(), + }, + } +} + +export default ({ world, time }) => ( + <> +

hello {world}

+ time: {time} + + to home + +
+ + to something + + +) diff --git a/test/integration/getserverprops/pages/index.js b/test/integration/getserverprops/pages/index.js new file mode 100644 index 000000000000000..f906758f846b1d8 --- /dev/null +++ b/test/integration/getserverprops/pages/index.js @@ -0,0 +1,47 @@ +import Link from 'next/link' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps() { + return { + props: { + world: 'world', + time: new Date().getTime(), + }, + } +} + +const Page = ({ world, time }) => { + return ( + <> +

hello {world}

+ time: {time} + + to another + +
+ + to something + +
+ + to normal + +
+ + to dynamic + + + to broken + +
+ + to another dynamic + + + to something?another=thing + + + ) +} + +export default Page diff --git a/test/integration/getserverprops/pages/invalid-keys.js b/test/integration/getserverprops/pages/invalid-keys.js new file mode 100644 index 000000000000000..6eeba67fb6a7730 --- /dev/null +++ b/test/integration/getserverprops/pages/invalid-keys.js @@ -0,0 +1,34 @@ +import React from 'react' +import Link from 'next/link' +import { useRouter } from 'next/router' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps({ params, query }) { + return { + world: 'world', + query: query || {}, + params: params || {}, + time: new Date().getTime(), + random: Math.random(), + } +} + +export default ({ world, time, params, random, query }) => { + return ( + <> +

hello: {world}

+ time: {time} +
{random}
+
{JSON.stringify(params)}
+
{JSON.stringify(query)}
+
{JSON.stringify(useRouter().query)}
+ + to home + +
+ + to another + + + ) +} diff --git a/test/integration/getserverprops/pages/normal.js b/test/integration/getserverprops/pages/normal.js new file mode 100644 index 000000000000000..75ad8dfee1722d9 --- /dev/null +++ b/test/integration/getserverprops/pages/normal.js @@ -0,0 +1 @@ +export default () =>

a normal page

diff --git a/test/integration/getserverprops/pages/something.js b/test/integration/getserverprops/pages/something.js new file mode 100644 index 000000000000000..f3d5ef1ef4de2f0 --- /dev/null +++ b/test/integration/getserverprops/pages/something.js @@ -0,0 +1,36 @@ +import React from 'react' +import Link from 'next/link' +import { useRouter } from 'next/router' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps({ params, query }) { + return { + props: { + world: 'world', + query: query || {}, + params: params || {}, + time: new Date().getTime(), + random: Math.random(), + }, + } +} + +export default ({ world, time, params, random, query }) => { + return ( + <> +

hello: {world}

+ time: {time} +
{random}
+
{JSON.stringify(params)}
+
{JSON.stringify(query)}
+
{JSON.stringify(useRouter().query)}
+ + to home + +
+ + to another + + + ) +} diff --git a/test/integration/getserverprops/pages/user/[user]/profile.js b/test/integration/getserverprops/pages/user/[user]/profile.js new file mode 100644 index 000000000000000..a4fb1e13403bf04 --- /dev/null +++ b/test/integration/getserverprops/pages/user/[user]/profile.js @@ -0,0 +1,24 @@ +import React from 'react' +import Link from 'next/link' + +// eslint-disable-next-line camelcase +export async function unstable_getServerProps({ query }) { + return { + props: { + user: query.user, + time: (await import('perf_hooks')).performance.now(), + }, + } +} + +export default ({ user, time }) => { + return ( + <> +

User: {user}

+ time: {time} + + to home + + + ) +} diff --git a/test/integration/getserverprops/test/index.test.js b/test/integration/getserverprops/test/index.test.js new file mode 100644 index 000000000000000..1c932da181e2a68 --- /dev/null +++ b/test/integration/getserverprops/test/index.test.js @@ -0,0 +1,407 @@ +/* eslint-env jest */ +/* global jasmine */ +import fs from 'fs-extra' +import { join } from 'path' +import webdriver from 'next-webdriver' +import cheerio from 'cheerio' +import escapeRegex from 'escape-string-regexp' +import { + renderViaHTTP, + fetchViaHTTP, + findPort, + launchApp, + killApp, + waitFor, + nextBuild, + nextStart, + normalizeRegEx, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 +const appDir = join(__dirname, '..') +const nextConfig = join(appDir, 'next.config.js') +let app +let appPort +let buildId + +const expectedManifestRoutes = () => ({ + '/something': { + page: '/something', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/something.json$` + ), + }, + '/blog/[post]': { + page: '/blog/[post]', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/blog\\/([^/]+?)\\.json$` + ), + }, + '/': { + page: '/', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/index.json$` + ), + }, + '/default-revalidate': { + page: '/default-revalidate', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/default-revalidate.json$` + ), + }, + '/catchall/[...path]': { + page: '/catchall/[...path]', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/catchall\\/(.+?)\\.json$` + ), + }, + '/blog': { + page: '/blog', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/blog.json$` + ), + }, + '/blog/[post]/[comment]': { + page: '/blog/[post]/[comment]', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex( + buildId + )}\\/blog\\/([^/]+?)\\/([^/]+?)\\.json$` + ), + }, + '/user/[user]/profile': { + page: '/user/[user]/profile', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex( + buildId + )}\\/user\\/([^/]+?)\\/profile\\.json$` + ), + }, + '/another': { + page: '/another', + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/another.json$` + ), + }, + '/invalid-keys': { + dataRouteRegex: normalizeRegEx( + `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/invalid-keys.json$` + ), + page: '/invalid-keys', + }, +}) + +const navigateTest = (dev = false) => { + it('should navigate between pages successfully', async () => { + const toBuild = [ + '/', + '/another', + '/something', + '/normal', + '/blog/post-1', + '/blog/post-1/comment-1', + ] + + await Promise.all(toBuild.map(pg => renderViaHTTP(appPort, pg))) + + const browser = await webdriver(appPort, '/') + let text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + + // hydration + await waitFor(2500) + + // go to /another + async function goFromHomeToAnother() { + await browser.elementByCss('#another').click() + await browser.waitForElementByCss('#home') + text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + } + await goFromHomeToAnother() + + // go to / + async function goFromAnotherToHome() { + await browser.eval('window.didTransition = 1') + await browser.elementByCss('#home').click() + await browser.waitForElementByCss('#another') + text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + expect(await browser.eval('window.didTransition')).toBe(1) + } + await goFromAnotherToHome() + + await goFromHomeToAnother() + const snapTime = await browser.elementByCss('#anotherTime').text() + + // Re-visit page + await goFromAnotherToHome() + await goFromHomeToAnother() + + const nextTime = await browser.elementByCss('#anotherTime').text() + expect(snapTime).not.toMatch(nextTime) + + // Reset to Home for next test + await goFromAnotherToHome() + + // go to /something + await browser.elementByCss('#something').click() + await browser.waitForElementByCss('#home') + text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + expect(await browser.eval('window.didTransition')).toBe(1) + + // go to / + await browser.elementByCss('#home').click() + await browser.waitForElementByCss('#post-1') + + // go to /blog/post-1 + await browser.elementByCss('#post-1').click() + await browser.waitForElementByCss('#home') + text = await browser.elementByCss('p').text() + expect(text).toMatch(/Post:.*?post-1/) + expect(await browser.eval('window.didTransition')).toBe(1) + + // go to / + await browser.elementByCss('#home').click() + await browser.waitForElementByCss('#comment-1') + + // go to /blog/post-1/comment-1 + await browser.elementByCss('#comment-1').click() + await browser.waitForElementByCss('#home') + text = await browser.elementByCss('p:nth-child(2)').text() + expect(text).toMatch(/Comment:.*?comment-1/) + expect(await browser.eval('window.didTransition')).toBe(1) + + await browser.close() + }) +} + +const runTests = (dev = false) => { + navigateTest(dev) + + it('should SSR normal page correctly', async () => { + const html = await renderViaHTTP(appPort, '/') + expect(html).toMatch(/hello.*?world/) + }) + + it('should SSR getServerProps page correctly', async () => { + const html = await renderViaHTTP(appPort, '/blog/post-1') + expect(html).toMatch(/Post:.*?post-1/) + }) + + it('should supply query values SSR', async () => { + const html = await renderViaHTTP(appPort, '/blog/post-1?hello=world') + const $ = cheerio.load(html) + const params = $('#params').text() + expect(JSON.parse(params)).toEqual({ post: 'post-1' }) + const query = $('#query').text() + expect(JSON.parse(query)).toEqual({ hello: 'world', post: 'post-1' }) + }) + + it('should supply params values for catchall correctly', async () => { + const html = await renderViaHTTP(appPort, '/catchall/first') + const $ = cheerio.load(html) + const params = $('#params').text() + expect(JSON.parse(params)).toEqual({ path: ['first'] }) + const query = $('#query').text() + expect(JSON.parse(query)).toEqual({ path: ['first'] }) + + const data = JSON.parse( + await renderViaHTTP(appPort, `/_next/data/${buildId}/catchall/first.json`) + ) + + expect(data.pageProps.params).toEqual({ path: ['first'] }) + }) + + it('should return data correctly', async () => { + const data = JSON.parse( + await renderViaHTTP(appPort, `/_next/data/${buildId}/something.json`) + ) + expect(data.pageProps.world).toBe('world') + }) + + it('should pass query for data request', async () => { + const data = JSON.parse( + await renderViaHTTP( + appPort, + `/_next/data/${buildId}/something.json?another=thing` + ) + ) + expect(data.pageProps.query.another).toBe('thing') + }) + + it('should return data correctly for dynamic page', async () => { + const data = JSON.parse( + await renderViaHTTP(appPort, `/_next/data/${buildId}/blog/post-1.json`) + ) + expect(data.pageProps.post).toBe('post-1') + }) + + it('should navigate to a normal page and back', async () => { + const browser = await webdriver(appPort, '/') + let text = await browser.elementByCss('p').text() + expect(text).toMatch(/hello.*?world/) + + await browser.elementByCss('#normal').click() + await browser.waitForElementByCss('#normal-text') + text = await browser.elementByCss('#normal-text').text() + expect(text).toMatch(/a normal page/) + }) + + it('should provide correct query value for dynamic page', async () => { + const html = await renderViaHTTP( + appPort, + '/blog/post-1?post=something-else' + ) + const $ = cheerio.load(html) + const query = JSON.parse($('#query').text()) + expect(query.post).toBe('post-1') + }) + + it('should parse query values on mount correctly', async () => { + const browser = await webdriver(appPort, '/blog/post-1?another=value') + await waitFor(2000) + const text = await browser.elementByCss('#query').text() + expect(text).toMatch(/another.*?value/) + expect(text).toMatch(/post.*?post-1/) + }) + + it('should pass query for data request on navigation', async () => { + const browser = await webdriver(appPort, '/') + await browser.eval('window.beforeNav = true') + await browser.elementByCss('#something-query').click() + await browser.waitForElementByCss('#initial-query') + const query = JSON.parse( + await browser.elementByCss('#initial-query').text() + ) + expect(await browser.eval('window.beforeNav')).toBe(true) + expect(query.another).toBe('thing') + }) + + it('should reload page on failed data request', async () => { + const browser = await webdriver(appPort, '/') + await waitFor(500) + await browser.eval('window.beforeClick = true') + await browser.elementByCss('#broken-post').click() + await waitFor(1000) + expect(await browser.eval('window.beforeClick')).not.toBe('true') + }) + + it('should always call getServerProps without caching', async () => { + const initialRes = await fetchViaHTTP(appPort, '/something') + const initialHtml = await initialRes.text() + expect(initialHtml).toMatch(/hello.*?world/) + + const newRes = await fetchViaHTTP(appPort, '/something') + const newHtml = await newRes.text() + expect(newHtml).toMatch(/hello.*?world/) + expect(initialHtml !== newHtml).toBe(true) + + const newerRes = await fetchViaHTTP(appPort, '/something') + const newerHtml = await newerRes.text() + expect(newerHtml).toMatch(/hello.*?world/) + expect(newHtml !== newerHtml).toBe(true) + }) + + it('should not re-call getServerProps when updating query', async () => { + const browser = await webdriver(appPort, '/something?hello=world') + await waitFor(2000) + + const query = await browser.elementByCss('#query').text() + expect(JSON.parse(query)).toEqual({ hello: 'world' }) + + const { + props: { + pageProps: { random: initialRandom }, + }, + } = await browser.eval('window.__NEXT_DATA__') + + const curRandom = await browser.elementByCss('#random').text() + expect(curRandom).toBe(initialRandom + '') + }) + + if (dev) { + it('should show error for extra keys returned from getServerProps', async () => { + const html = await renderViaHTTP(appPort, '/invalid-keys') + expect(html).toContain( + `Additional keys were returned from \`getServerProps\`. Properties intended for your component must be nested under the \`props\` key, e.g.:` + ) + expect(html).toContain( + `Keys that need to be moved: world, query, params, time, random` + ) + }) + } else { + it('should not fetch data on mount', async () => { + const browser = await webdriver(appPort, '/blog/post-100') + await browser.eval('window.thisShouldStay = true') + await waitFor(2 * 1000) + const val = await browser.eval('window.thisShouldStay') + expect(val).toBe(true) + }) + + it('should output routes-manifest correctly', async () => { + const { serverPropsRoutes } = await fs.readJSON( + join(appDir, '.next/routes-manifest.json') + ) + for (const key of Object.keys(serverPropsRoutes)) { + const val = serverPropsRoutes[key].dataRouteRegex + serverPropsRoutes[key].dataRouteRegex = normalizeRegEx(val) + } + + expect(serverPropsRoutes).toEqual(expectedManifestRoutes()) + }) + + it('should set no-cache, no-store, must-revalidate header', async () => { + const res = await fetchViaHTTP( + appPort, + `/_next/data/${escapeRegex(buildId)}/something.json` + ) + expect(res.headers.get('cache-control')).toContain('no-cache') + }) + } +} + +describe('unstable_getServerProps', () => { + describe('dev mode', () => { + beforeAll(async () => { + appPort = await findPort() + app = await launchApp(appDir, appPort) + buildId = 'development' + }) + afterAll(() => killApp(app)) + + runTests(true) + }) + + describe('serverless mode', () => { + beforeAll(async () => { + await fs.writeFile( + nextConfig, + `module.exports = { target: 'serverless' }`, + 'utf8' + ) + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') + }) + afterAll(() => killApp(app)) + + runTests() + }) + + describe('production mode', () => { + beforeAll(async () => { + await fs.remove(nextConfig) + await nextBuild(appDir, [], { stdout: true }) + + appPort = await findPort() + app = await nextStart(appDir, appPort) + buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') + }) + afterAll(() => killApp(app)) + + runTests() + }) +}) diff --git a/test/integration/getserverprops/world.txt b/test/integration/getserverprops/world.txt new file mode 100644 index 000000000000000..04fea06420ca608 --- /dev/null +++ b/test/integration/getserverprops/world.txt @@ -0,0 +1 @@ +world \ No newline at end of file diff --git a/test/integration/mixed-ssg-serverprops-error/pages/index.js b/test/integration/mixed-ssg-serverprops-error/pages/index.js new file mode 100644 index 000000000000000..dedf3d00be14bed --- /dev/null +++ b/test/integration/mixed-ssg-serverprops-error/pages/index.js @@ -0,0 +1,13 @@ +export const unstable_getStaticProps = async () => { + return { + props: { world: 'world' }, + } +} + +export const unstable_getServerProps = async () => { + return { + props: { world: 'world' }, + } +} + +export default ({ world }) =>

Hello {world}

diff --git a/test/integration/mixed-ssg-serverprops-error/pages/index.js.alt b/test/integration/mixed-ssg-serverprops-error/pages/index.js.alt new file mode 100644 index 000000000000000..910eef220630d25 --- /dev/null +++ b/test/integration/mixed-ssg-serverprops-error/pages/index.js.alt @@ -0,0 +1,13 @@ +export const unstable_getStaticPaths = async () => { + return { + props: { world: 'world' } + } +} + +export const unstable_getServerProps = async () => { + return { + props: { world: 'world' } + } +} + +export default ({ world }) =>

Hello {world}

diff --git a/test/integration/mixed-ssg-serverprops-error/test/index.test.js b/test/integration/mixed-ssg-serverprops-error/test/index.test.js new file mode 100644 index 000000000000000..794cf77cae22f8b --- /dev/null +++ b/test/integration/mixed-ssg-serverprops-error/test/index.test.js @@ -0,0 +1,32 @@ +/* eslint-env jest */ +/* global jasmine */ +import fs from 'fs-extra' +import { join } from 'path' +import { nextBuild } from 'next-test-utils' +import { SERVER_PROPS_SSG_CONFLICT } from 'next/dist/lib/constants' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 +const appDir = join(__dirname, '..') +const indexPage = join(appDir, 'pages/index.js') +const indexPageAlt = `${indexPage}.alt` +const indexPageBak = `${indexPage}.bak` + +describe('Mixed getStaticProps and getServerProps error', () => { + it('should error when exporting both getStaticProps and getServerProps', async () => { + const { stderr } = await nextBuild(appDir, [], { stderr: true }) + expect(stderr).toContain(SERVER_PROPS_SSG_CONFLICT) + }) + + it('should error when exporting both getStaticPaths and getServerProps', async () => { + await fs.move(indexPage, indexPageBak) + await fs.move(indexPageAlt, indexPage) + + const { stderr, code } = await nextBuild(appDir, [], { stderr: true }) + + await fs.move(indexPage, indexPageAlt) + await fs.move(indexPageBak, indexPage) + + expect(code).toBe(1) + expect(stderr).toContain(SERVER_PROPS_SSG_CONFLICT) + }) +}) From e3ded1aeccaded00f6272f4c80b94a734f86e9d6 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 16:53:15 -0600 Subject: [PATCH 244/321] v9.2.2-canary.0 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 4224ec9796277bc..9804688a9e87ed5 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1" + "version": "9.2.2-canary.0" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index aeb07f1ed8bdae0..ad0eaee4e805422 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1", + "version": "9.2.2-canary.0", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index e316dc84503745f..2bc22c2ee3fb291 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1", + "version": "9.2.2-canary.0", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 022aaaec43d3163..2581aa259998adc 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1", + "version": "9.2.2-canary.0", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 3b8e6e70716db14..72bb9ef6981c443 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1", + "version": "9.2.2-canary.0", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index eab16d20f2fa2d4..9ea1b4ad6f7a226 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1", + "version": "9.2.2-canary.0", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index f9b2f5330bb13ed..c3f7f1fe010093a 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1", + "version": "9.2.2-canary.0", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 0d48e104397a5e1..be591ff082446b4 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1", + "version": "9.2.2-canary.0", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From c0eaf98d17d0f02f3ffcd94096431c6b7e2780fd Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 22:48:52 -0600 Subject: [PATCH 245/321] Update actions config for canary jobs (#10299) * Update actions config for canary jobs * Update exiting for mising value and size limit test * Update config * Update check * Update check * Remove extra check --- .github/workflows/build_test_deploy.yml | 53 +++++++++---------- publish-release.sh | 33 +++++++----- .../integration/size-limit/test/index.test.js | 2 +- 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index f314bd51a19cbb2..818696d7d303da3 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -9,12 +9,12 @@ name: Build, test, and deploy jobs: build: runs-on: ubuntu-latest + env: + NEXT_TELEMETRY_DISABLED: 1 steps: - uses: actions/checkout@v2 + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: yarn install --frozen-lockfile --check-files - env: - NEXT_TELEMETRY_DISABLED: 1 - - uses: actions/cache@v1 id: cache-build with: @@ -30,13 +30,15 @@ jobs: with: path: '.' key: ${{ github.sha }} - - run: yarn lint testAll: name: Test All runs-on: ubuntu-latest needs: build + env: + NEXT_TELEMETRY_DISABLED: 1 + HEADLESS: true strategy: fail-fast: false matrix: @@ -47,11 +49,7 @@ jobs: with: path: '.' key: ${{ github.sha }} - - run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 - env: - NEXT_TELEMETRY_DISABLED: 1 - HEADLESS: true testsPass: name: thank you, next @@ -64,48 +62,45 @@ jobs: name: Test Firefox (production) runs-on: ubuntu-latest needs: build + env: + NEXT_TELEMETRY_DISABLED: 1 + HEADLESS: true steps: - uses: actions/cache@v1 id: restore-build with: path: '.' key: ${{ github.sha }} - - run: yarn testfirefox --forceExit test/integration/production/ - env: - NEXT_TELEMETRY_DISABLED: 1 - HEADLESS: true testSafari: name: Test Safari (production) runs-on: ubuntu-latest needs: build - if: github.ref == 'canary' + env: + NEXT_TELEMETRY_DISABLED: 1 + BROWSERSTACK: true + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} steps: - uses: actions/cache@v1 id: restore-build with: path: '.' key: ${{ github.sha }} - - - run: yarn testsafari --forceExit test/integration/production/ - env: - NEXT_TELEMETRY_DISABLED: 1 - BROWSERSTACK: true - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - - saveNpmToken: - name: Potentially save npm token - runs-on: ubuntu-latest - if: github.ref == 'canary' - needs: [build, testAll] - steps: - - run: ([[ ! -z $NPM_TOKEN ]] && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc) || echo "Did not write npm token" + - run: '[[ -z "$BROWSERSTACK_ACCESS_KEY" ]] && echo "Skipping for PR" || yarn testsafari --forceExit test/integration/production/' publishRelease: name: Potentially publish release runs-on: ubuntu-latest - needs: saveNpmToken + needs: [testsPass] + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} steps: + - uses: actions/cache@v1 + id: restore-build + with: + path: '.' + key: ${{ github.sha }} + - run: ./publish-release.sh diff --git a/publish-release.sh b/publish-release.sh index e5f944b8dfb81a0..a1e6e92e94c5875 100755 --- a/publish-release.sh +++ b/publish-release.sh @@ -1,21 +1,30 @@ -#!/bin/sh +#!/bin/bash -if - ls ~/.npmrc >/dev/null 2>&1 && - [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; +git describe --exact-match + +if [[ ! $? -eq 0 ]];then + echo "Nothing to publish, exiting.." + exit 0; +fi + +if [[ -z "$NPM_TOKEN" ]];then + echo "No NPM_TOKEN, exiting.." + exit 0; +fi + +echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + +if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then - # yarn run lerna publish from-git --npm-tag canary --yes - echo "publishing canary" + echo "Publishing canary" + yarn run lerna publish from-git --npm-tag canary --yes else echo "Did not publish canary" fi -if - ls ~/.npmrc >/dev/null 2>&1 && - [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; -then - # yarn run lerna publish from-git --yes - echo "publishing stable" +if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then + echo "Publishing stable" + yarn run lerna publish from-git --yes else echo "Did not publish stable" fi diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index caedbdff0ec787b..a4e986d5265f2b3 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 233 + const delta = responseSizeKilobytes - 234 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) From 6dbc03bcb92a15b983a1bd0d508b78cb5016afd7 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 27 Jan 2020 23:07:50 -0600 Subject: [PATCH 246/321] v9.2.2-canary.1 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 9804688a9e87ed5..937a877c0964b22 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.0" + "version": "9.2.2-canary.1" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index ad0eaee4e805422..538948ed862c7e4 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 2bc22c2ee3fb291..1a7329038dadf17 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 2581aa259998adc..634c6d5dfa4499b 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 72bb9ef6981c443..8b8587079fbf183 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 9ea1b4ad6f7a226..926ef8ba5eb77db 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index c3f7f1fe010093a..c2dd05cd55ad8f1 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index be591ff082446b4..055e760a1ccc6d1 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.0", + "version": "9.2.2-canary.1", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 6f6989b8e423d9808693751b8575c7cd414ec5be Mon Sep 17 00:00:00 2001 From: Robin Cussol Date: Tue, 28 Jan 2020 16:10:26 +0100 Subject: [PATCH 247/321] Fix with-orbit-components's name in package.json (#10307) This is to be more consistent with other examples. --- examples/with-orbit-components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-orbit-components/package.json b/examples/with-orbit-components/package.json index 385fde8a129d6db..29f281938f08132 100644 --- a/examples/with-orbit-components/package.json +++ b/examples/with-orbit-components/package.json @@ -1,5 +1,5 @@ { - "name": "with-styled-components", + "name": "with-orbit-components", "version": "1.0.0", "scripts": { "dev": "next", From 372031246daf598bd2896fe923280ddfee84b5d7 Mon Sep 17 00:00:00 2001 From: Abhishek Warokar Date: Tue, 28 Jan 2020 21:00:16 +0530 Subject: [PATCH 248/321] Fix typo in FaunaDB example (#10304) Colleciton -> Collection --- examples/with-graphql-faunadb/scripts/setup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/with-graphql-faunadb/scripts/setup.js b/examples/with-graphql-faunadb/scripts/setup.js index ca701141a70642c..a313a6e0b631ad0 100644 --- a/examples/with-graphql-faunadb/scripts/setup.js +++ b/examples/with-graphql-faunadb/scripts/setup.js @@ -42,7 +42,7 @@ readline.question(`Please provide the FaunaDB admin key\n`, adminKey => { console.error(`Could not import schema, closing`) }) .then(res => { - // The GraphQL schema is important, this means that we now have a GuestbookEntry Colleciton and an entries index. + // The GraphQL schema is important, this means that we now have a GuestbookEntry Collection and an entries index. // Then we create a token that can only read and write to that index and collection var client = new faunadb.Client({ secret: adminKey }) return client @@ -79,7 +79,7 @@ readline.question(`Please provide the FaunaDB admin key\n`, adminKey => { console.error(`Failed to create role, closing`) }) .then(res => { - // The GraphQL schema is important, this means that we now have a GuestbookEntry Colleciton and an entries index. + // The GraphQL schema is important, this means that we now have a GuestbookEntry Collection and an entries index. // Then we create a token that can only read and write to that index and collection var client = new faunadb.Client({ secret: adminKey }) return client From ee9ccc84cc4062e259d4037a2796dba9669a80a6 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Tue, 28 Jan 2020 11:02:00 -0500 Subject: [PATCH 249/321] Updated PostCSS docs and added a link to it (#10292) * Updated PostCSS docs and added a link to it * Added note back * Update customizing-postcss-config.md Co-authored-by: Joe Haddad --- docs/advanced-features/customizing-postcss-config.md | 8 ++++---- docs/basic-features/built-in-css-support.md | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/advanced-features/customizing-postcss-config.md b/docs/advanced-features/customizing-postcss-config.md index de5597836deda2e..0b1cb7bbb2780ee 100644 --- a/docs/advanced-features/customizing-postcss-config.md +++ b/docs/advanced-features/customizing-postcss-config.md @@ -54,8 +54,8 @@ You can learn more about [Next.js' CSS Module support here](/docs/basic-features ## Customizing Plugins -> **Warning**: When you define a custom PostCSS configuration file, Next.js **completely disables** the defaults listed above. -> Be sure to manually configure all features you need compiled, including [Autoprefixer](https://github.com/postcss/autoprefixer). +> **Warning**: When you define a custom PostCSS configuration file, Next.js **completely disables** the [default behavior](#default-behavior). +> Be sure to manually configure all the features you need compiled, including [Autoprefixer](https://github.com/postcss/autoprefixer). To customize the PostCSS configuration, create a `postcss.config.json` file in the root of your project. @@ -110,10 +110,10 @@ module.exports = { } ``` -Do **not use `require()`** to import the PostCSS Plugins. Plugins must be provided as strings. - > **Note**: Next.js also allows the file to be named `.postcssrc.js`. +Do **not use `require()`** to import the PostCSS Plugins. Plugins must be provided as strings. + > **Note**: If your `postcss.config.js` needs to support other non-Next.js tools in the same project, you must use the interoperable object-based format instead: > > ```js diff --git a/docs/basic-features/built-in-css-support.md b/docs/basic-features/built-in-css-support.md index 1fa7c5f48f36056..e1848b6ca838480 100644 --- a/docs/basic-features/built-in-css-support.md +++ b/docs/basic-features/built-in-css-support.md @@ -165,3 +165,14 @@ To support importing `.scss`, `.sass`, `.less`, or `.styl` files you can use - [@zeit/next-sass](https://github.com/zeit/next-plugins/tree/master/packages/next-sass) - [@zeit/next-less](https://github.com/zeit/next-plugins/tree/master/packages/next-less) - [@zeit/next-stylus](https://github.com/zeit/next-plugins/tree/master/packages/next-stylus) + +## Related + +For more information on what to do next, we recommend the following sections: + + From 6a88ec1852d646a3261c372a106881da4f267f73 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 28 Jan 2020 13:03:32 -0600 Subject: [PATCH 250/321] Make sure to exit publish script with correct code (#10310) --- publish-release.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/publish-release.sh b/publish-release.sh index a1e6e92e94c5875..157a76200446fc1 100755 --- a/publish-release.sh +++ b/publish-release.sh @@ -18,6 +18,11 @@ if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then echo "Publishing canary" yarn run lerna publish from-git --npm-tag canary --yes + + # Make sure to exit script with code 1 if publish failed + if [[ ! $? -eq 0 ]];then + exit 1; + fi else echo "Did not publish canary" fi @@ -25,6 +30,11 @@ fi if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then echo "Publishing stable" yarn run lerna publish from-git --yes + + # Make sure to exit script with code 1 if publish failed + if [[ ! $? -eq 0 ]];then + exit 1; + fi else echo "Did not publish stable" fi From 858117265417dc8b347f85b235266c384e34f757 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 28 Jan 2020 13:04:00 -0600 Subject: [PATCH 251/321] Allowing skipping local selenium server when not needed (#10312) * Disable local selenium server when not needed * Disable skipping for firefox as it appears to be needed still --- .github/workflows/build_test_deploy.yml | 1 + test/jest-environment.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 818696d7d303da3..4fd8670ea8d6dd7 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -80,6 +80,7 @@ jobs: env: NEXT_TELEMETRY_DISABLED: 1 BROWSERSTACK: true + SKIP_LOCAL_SELENIUM_SERVER: true BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} steps: diff --git a/test/jest-environment.js b/test/jest-environment.js index fd5d8d640eac0b4..814798f9600d50a 100644 --- a/test/jest-environment.js +++ b/test/jest-environment.js @@ -4,7 +4,10 @@ const getPort = require('get-port') const seleniumServer = require('selenium-standalone') const NodeEnvironment = require('jest-environment-node') -const { BROWSER_NAME: browserName = 'chrome' } = process.env +const { + BROWSER_NAME: browserName = 'chrome', + SKIP_LOCAL_SELENIUM_SERVER, +} = process.env const newTabPg = ` @@ -38,7 +41,7 @@ class CustomEnvironment extends NodeEnvironment { let seleniumServerPort - if (browserName !== 'chrome') { + if (browserName !== 'chrome' && SKIP_LOCAL_SELENIUM_SERVER !== 'true') { console.log('Installing selenium server') await new Promise((resolve, reject) => { seleniumServer.install(err => { From e4a6bab23e410e16d099a1055643fb53872deb53 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 28 Jan 2020 13:17:57 -0600 Subject: [PATCH 252/321] v9.2.2-canary.2 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 937a877c0964b22..e05ed82c088fcdb 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.1" + "version": "9.2.2-canary.2" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 538948ed862c7e4..0aa347ddb1400af 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 1a7329038dadf17..aeca6fbb2f1c161 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 634c6d5dfa4499b..d2e8d5bff65509c 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 8b8587079fbf183..2f8c1b043af5497 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 926ef8ba5eb77db..f7086803d398ef3 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index c2dd05cd55ad8f1..975d4b95f5700ba 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 055e760a1ccc6d1..6734591c3f7c886 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.1", + "version": "9.2.2-canary.2", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From bd3662b52bb3d2d95d4b643e2627a5f8fd549ee8 Mon Sep 17 00:00:00 2001 From: Alexander Dreith Date: Tue, 28 Jan 2020 14:31:38 -0700 Subject: [PATCH 253/321] Fix preprocessor loader error (#10235) * Run resolve-url-loader after sass-loader * Add regression test * Update test to match * Revert global.ts * Make `preProcessors` readonly Co-authored-by: Joe Haddad --- .../webpack/config/blocks/css/loaders/global.ts | 6 +++--- .../webpack/config/blocks/css/loaders/modules.ts | 6 +++--- .../scss-fixtures/loader-order/pages/_app.js | 12 ++++++++++++ .../scss-fixtures/loader-order/pages/index.js | 3 +++ .../scss-fixtures/loader-order/styles/global.scss | 6 ++++++ test/integration/scss/test/index.test.js | 15 +++++++++++++++ 6 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 test/integration/scss-fixtures/loader-order/pages/_app.js create mode 100644 test/integration/scss-fixtures/loader-order/pages/index.js create mode 100644 test/integration/scss-fixtures/loader-order/styles/global.scss diff --git a/packages/next/build/webpack/config/blocks/css/loaders/global.ts b/packages/next/build/webpack/config/blocks/css/loaders/global.ts index a5dcf146ff130b1..645d8b5545058de 100644 --- a/packages/next/build/webpack/config/blocks/css/loaders/global.ts +++ b/packages/next/build/webpack/config/blocks/css/loaders/global.ts @@ -5,8 +5,8 @@ import { getClientStyleLoader } from './client' export function getGlobalCssLoader( ctx: ConfigurationContext, - postCssPlugins: postcss.AcceptedPlugin[], - preProcessors: webpack.RuleSetUseItem[] = [] + postCssPlugins: readonly postcss.AcceptedPlugin[], + preProcessors: readonly webpack.RuleSetUseItem[] = [] ): webpack.RuleSetUseItem[] { const loaders: webpack.RuleSetUseItem[] = [] @@ -40,7 +40,7 @@ export function getGlobalCssLoader( loaders.push( // Webpack loaders run like a stack, so we need to reverse the natural // order of preprocessors. - ...preProcessors.reverse() + ...preProcessors.slice().reverse() ) return loaders diff --git a/packages/next/build/webpack/config/blocks/css/loaders/modules.ts b/packages/next/build/webpack/config/blocks/css/loaders/modules.ts index 9069a1c9680f68c..34e3c92057f310f 100644 --- a/packages/next/build/webpack/config/blocks/css/loaders/modules.ts +++ b/packages/next/build/webpack/config/blocks/css/loaders/modules.ts @@ -6,8 +6,8 @@ import { getCssModuleLocalIdent } from './getCssModuleLocalIdent' export function getCssModuleLoader( ctx: ConfigurationContext, - postCssPlugins: postcss.AcceptedPlugin[], - preProcessors: webpack.RuleSetUseItem[] = [] + postCssPlugins: readonly postcss.AcceptedPlugin[], + preProcessors: readonly webpack.RuleSetUseItem[] = [] ): webpack.RuleSetUseItem[] { const loaders: webpack.RuleSetUseItem[] = [] @@ -56,7 +56,7 @@ export function getCssModuleLoader( loaders.push( // Webpack loaders run like a stack, so we need to reverse the natural // order of preprocessors. - ...preProcessors.reverse() + ...preProcessors.slice().reverse() ) return loaders diff --git a/test/integration/scss-fixtures/loader-order/pages/_app.js b/test/integration/scss-fixtures/loader-order/pages/_app.js new file mode 100644 index 000000000000000..b89fe16feb73145 --- /dev/null +++ b/test/integration/scss-fixtures/loader-order/pages/_app.js @@ -0,0 +1,12 @@ +import React from 'react' +import App from 'next/app' +import '../styles/global.scss' + +class MyApp extends App { + render() { + const { Component, pageProps } = this.props + return + } +} + +export default MyApp diff --git a/test/integration/scss-fixtures/loader-order/pages/index.js b/test/integration/scss-fixtures/loader-order/pages/index.js new file mode 100644 index 000000000000000..5cbac8a153d77f0 --- /dev/null +++ b/test/integration/scss-fixtures/loader-order/pages/index.js @@ -0,0 +1,3 @@ +export default function Home() { + return
This text should be red.
+} diff --git a/test/integration/scss-fixtures/loader-order/styles/global.scss b/test/integration/scss-fixtures/loader-order/styles/global.scss new file mode 100644 index 000000000000000..86fe036bcd25cdc --- /dev/null +++ b/test/integration/scss-fixtures/loader-order/styles/global.scss @@ -0,0 +1,6 @@ +// Double forward slash comment + +$var: red; +.red-text { + color: $var; +} diff --git a/test/integration/scss/test/index.test.js b/test/integration/scss/test/index.test.js index d7dfd6b46b1c8d1..531434038b117bf 100644 --- a/test/integration/scss/test/index.test.js +++ b/test/integration/scss/test/index.test.js @@ -745,6 +745,21 @@ describe('SCSS Support', () => { }) }) + describe('Preprocessor loader order', () => { + const appDir = join(fixturesDir, 'loader-order') + + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + it('should compile successfully', async () => { + const { stdout } = await nextBuild(appDir, [], { + stdout: true, + }) + expect(stdout).toMatch(/Compiled successfully/) + }) + }) + describe('Ordering with styled-jsx (dev)', () => { const appDir = join(fixturesDir, 'with-styled-jsx') From f711b77b9066238cf4fe7b70493a6a780e38059c Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 28 Jan 2020 15:39:53 -0600 Subject: [PATCH 254/321] =?UTF-8?q?Enable=20static=20404=20config=20to=20a?= =?UTF-8?q?llow=20static=20404=20page=20when=20availab=E2=80=A6=20(#10290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Enable static 404 config to allow static 404 page when available * Update static 404 suite * Fix invalid params test case --- packages/next/next-server/server/config.ts | 2 +- packages/next/next-server/server/next-server.ts | 2 +- test/integration/static-404/test/index.test.js | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index fb47ecb9df8743a..5fe42e75d34340d 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -52,7 +52,7 @@ const defaultConfig: { [key: string]: any } = { reactMode: 'legacy', workerThreads: false, basePath: '', - static404: false, + static404: true, }, future: { excludeDefaultMomentLocales: false, diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 4c7b25dddd9c581..062e51422cf45b7 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -1116,7 +1116,7 @@ export default class Server { let result: null | LoadComponentsReturnType = null // use static 404 page if available and is 404 response - if (this.nextConfig.experimental.static404 && err === null) { + if (this.nextConfig.experimental.static404 && res.statusCode === 404) { try { result = await this.findPageComponents('/_errors/404') } catch (err) { diff --git a/test/integration/static-404/test/index.test.js b/test/integration/static-404/test/index.test.js index 5e466ce9c808079..7d0fde74ad429b7 100644 --- a/test/integration/static-404/test/index.test.js +++ b/test/integration/static-404/test/index.test.js @@ -20,7 +20,6 @@ const static404 = join( const appPage = join(appDir, 'pages/_app.js') const errorPage = join(appDir, 'pages/_error.js') const buildId = `generateBuildId: () => 'test-id'` -const experimentalConfig = `experimental: { static404: true }` let app let appPort @@ -34,7 +33,10 @@ describe('Static 404 page', () => { describe('With config disabled', () => { it('should not have exported static 404 page', async () => { - await fs.writeFile(nextConfig, `module.exports = { ${buildId} }`) + await fs.writeFile( + nextConfig, + `module.exports = { ${buildId}, experimental: { static404: false } }` + ) await nextBuild(appDir) expect(await fs.exists(static404)).toBe(false) }) @@ -42,10 +44,7 @@ describe('Static 404 page', () => { describe('With config enabled', () => { beforeEach(() => - fs.writeFile( - nextConfig, - `module.exports = { ${buildId}, ${experimentalConfig} }` - ) + fs.writeFile(nextConfig, `module.exports = { ${buildId} }`) ) it('should export 404 page without custom _error', async () => { From a888bc7caf383c8748ebe05b280effd70429d219 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Tue, 28 Jan 2020 17:03:03 -0800 Subject: [PATCH 255/321] Test --- UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index 458bc5783e5d076..4668ffbe9419f6d 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -2,7 +2,7 @@ ## Preamble -#### Production Deployment on ZEIT Now v2 +#### Production Deployment on ZEIT Now v2asdasasddas If you previously configured `routes` in your `now.json` file for dynamic routes, these rules can be removed when leveraging Next.js 9's new [Dynamic Routing feature](https://github.com/zeit/next.js#dynamic-routing). From 1937e7dcfeac7d9604cc01adc217ff5473cebd99 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Tue, 28 Jan 2020 17:04:34 -0800 Subject: [PATCH 256/321] Revert "Test" This reverts commit a888bc7caf383c8748ebe05b280effd70429d219. --- UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index 4668ffbe9419f6d..458bc5783e5d076 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -2,7 +2,7 @@ ## Preamble -#### Production Deployment on ZEIT Now v2asdasasddas +#### Production Deployment on ZEIT Now v2 If you previously configured `routes` in your `now.json` file for dynamic routes, these rules can be removed when leveraging Next.js 9's new [Dynamic Routing feature](https://github.com/zeit/next.js#dynamic-routing). From 3cb7b443b08b3e205e5526461bddfe8100fb3629 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 28 Jan 2020 19:56:55 -0800 Subject: [PATCH 257/321] Small grammar fix (#10317) --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 311b788828d8d9d..ae06df7865abbed 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -66,7 +66,7 @@ description: Get to know more about Next.js with the frequently asked questions.
Can I use Next with my favorite JavaScript library or toolkit? -

Since our first release we've had many example contributions, you can check them out in the examples directory.

+

Since our first release we've had many example contributions. You can check them out in the examples directory.

From 41d1757b4ecebafa989586932366a29a6b99eefd Mon Sep 17 00:00:00 2001 From: Dmitry Rybin Date: Wed, 29 Jan 2020 09:12:30 +0100 Subject: [PATCH 258/321] =?UTF-8?q?fix:=209919=20Add=20warning=20when=20no?= =?UTF-8?q?=20config=20is=20exported=20from=20next.con=E2=80=A6=20(#10228)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 9919 no exported config found * fix: 9919 remove isolated test, add integration * fix: 9919 add check for successfull compilation and fix warnin check * Add test for development output * fix: 9919 add error page and link to it in warning * Update empty-configuration.md Co-authored-by: JJ Kasper Co-authored-by: Tim Neutkens --- errors/empty-configuration.md | 19 ++++++++ packages/next/next-server/server/config.ts | 8 ++++ test/integration/config-empty/next.config.js | 6 +++ test/integration/config-empty/pages/index.js | 1 + .../config-empty/test/index.test.js | 44 +++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 errors/empty-configuration.md create mode 100644 test/integration/config-empty/next.config.js create mode 100644 test/integration/config-empty/pages/index.js create mode 100644 test/integration/config-empty/test/index.test.js diff --git a/errors/empty-configuration.md b/errors/empty-configuration.md new file mode 100644 index 000000000000000..316f928d6d1de35 --- /dev/null +++ b/errors/empty-configuration.md @@ -0,0 +1,19 @@ +# Detected next.config.js, no exported configuration found + +#### Why This Warning Occurred + +There is no object exported from next.config.js or the object is empty. + +#### Possible Ways to Fix It + +Check if you correctly export configuration in `next.config.js` file: + +``` +module.exports = { + /* config options here */ +} +``` + +### Useful Links + +- [Introduction to next.config.js](https://nextjs.org/docs/api-reference/next.config.js/introduction) diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index 5fe42e75d34340d..eee2087ff1f03e7 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -229,6 +229,14 @@ export default function loadConfig( phase, userConfigModule.default || userConfigModule ) + + if (Object.keys(userConfig).length === 0) { + console.warn( + chalk.yellow.bold('Warning: ') + + 'Detected next.config.js, no exported configuration found. https://err.sh/zeit/next.js/empty-configuration' + ) + } + if (userConfig.target && !targets.includes(userConfig.target)) { throw new Error( `Specified target is invalid. Provided: "${ diff --git a/test/integration/config-empty/next.config.js b/test/integration/config-empty/next.config.js new file mode 100644 index 000000000000000..0c04cc72881a0fa --- /dev/null +++ b/test/integration/config-empty/next.config.js @@ -0,0 +1,6 @@ +/* eslint-disable */ +{ + experimental: { + basePath: '/docs' + } +} diff --git a/test/integration/config-empty/pages/index.js b/test/integration/config-empty/pages/index.js new file mode 100644 index 000000000000000..02d90896bf336a9 --- /dev/null +++ b/test/integration/config-empty/pages/index.js @@ -0,0 +1 @@ +export default () =>
Hello World
diff --git a/test/integration/config-empty/test/index.test.js b/test/integration/config-empty/test/index.test.js new file mode 100644 index 000000000000000..f0f3eb5ed11a050 --- /dev/null +++ b/test/integration/config-empty/test/index.test.js @@ -0,0 +1,44 @@ +/* eslint-env jest */ +/* global jasmine */ +import { join } from 'path' +import { + nextBuild, + launchApp, + findPort, + killApp, + waitFor, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 + +const appDir = join(__dirname, '..') + +describe('Empty configuration', () => { + it('should show relevant warning and compile successfully for next build', async () => { + const { stderr, stdout } = await nextBuild(appDir, [], { + stderr: true, + stdout: true, + }) + expect(stdout).toMatch(/Compiled successfully./) + expect(stderr).toMatch( + /Warning: Detected next.config.js, no exported configuration found. https:\/\/err.sh\/zeit\/next.js\/empty-configuration/ + ) + }) + + it('should show relevant warning and compile successfully for next dev', async () => { + let stderr = '' + + const appPort = await findPort() + const app = await launchApp(appDir, appPort, { + onStderr(msg) { + stderr += msg || '' + }, + }) + await waitFor(1000) + await killApp(app) + + expect(stderr).toMatch( + /Warning: Detected next.config.js, no exported configuration found. https:\/\/err.sh\/zeit\/next.js\/empty-configuration/ + ) + }) +}) From 7e2170b03e4ad3c90dc861a230b5e471851b6d6d Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 29 Jan 2020 10:39:15 -0600 Subject: [PATCH 259/321] Update workflow for testing against react@next (#10323) --- .github/workflows/test_react_next.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_react_next.yml b/.github/workflows/test_react_next.yml index 0cdcb04221d8569..c1f3ce0e09dc77e 100644 --- a/.github/workflows/test_react_next.yml +++ b/.github/workflows/test_react_next.yml @@ -11,11 +11,11 @@ jobs: steps: - uses: actions/checkout@v2 - - run: cd repo && yarn install --frozen-lockfile --check-files + - run: yarn install --frozen-lockfile --check-files env: NEXT_TELEMETRY_DISABLED: 1 - - run: cd repo && yarn upgrade react@next react-dom@next -W --dev + - run: yarn upgrade react@next react-dom@next -W --dev - uses: actions/cache@v1 id: cache-build @@ -38,7 +38,7 @@ jobs: path: '.' key: ${{ github.sha }} - - run: cd repo && node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 + - run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 env: NEXT_TELEMETRY_DISABLED: 1 HEADLESS: true From 29d1b4f326032860a0fac56b8dd0a79a84e44f85 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 29 Jan 2020 12:49:51 -0600 Subject: [PATCH 260/321] v9.2.2-canary.3 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index e05ed82c088fcdb..12153ca10ddc704 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.2" + "version": "9.2.2-canary.3" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 0aa347ddb1400af..d37125d5946f609 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index aeca6fbb2f1c161..5eff18cc1d6e6ec 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index d2e8d5bff65509c..ffd4370aa58bd3c 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 2f8c1b043af5497..5919005eb43142d 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index f7086803d398ef3..c32b1e2bd683d5a 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 975d4b95f5700ba..528c22e572b168a 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/package.json b/packages/next/package.json index 6734591c3f7c886..150476c7c674d4e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.2", + "version": "9.2.2-canary.3", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", From 6f16cef3e2f5bfff569e46ab4f5fde7e7060e0e6 Mon Sep 17 00:00:00 2001 From: Micah Alcorn Date: Wed, 29 Jan 2020 16:51:58 -0800 Subject: [PATCH 261/321] Repair advanced feature reference (#10330) * Repair advanced feature reference The explanation of the custom document feature had been moved. * Update README.md Co-authored-by: Joe Haddad --- examples/with-google-analytics/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-google-analytics/README.md b/examples/with-google-analytics/README.md index c3205e1e3065ef4..c60df262e894352 100644 --- a/examples/with-google-analytics/README.md +++ b/examples/with-google-analytics/README.md @@ -1,6 +1,6 @@ # Example app with analytics -This example shows how to use [Next.js](https://github.com/zeit/next.js) along with [Google Analytics](https://developers.google.com/analytics/devguides/collection/gtagjs/). A custom [\_document](https://github.com/zeit/next.js/#custom-document) is used to inject [tracking snippet](https://developers.google.com/analytics/devguides/collection/gtagjs/) and track [pageviews](https://developers.google.com/analytics/devguides/collection/gtagjs/pages) and [event](https://developers.google.com/analytics/devguides/collection/gtagjs/events). +This example shows how to use [Next.js](https://github.com/zeit/next.js) along with [Google Analytics](https://developers.google.com/analytics/devguides/collection/gtagjs/). A custom [\_document](https://nextjs.org/docs/advanced-features/custom-document) is used to inject [tracking snippet](https://developers.google.com/analytics/devguides/collection/gtagjs/) and track [pageviews](https://developers.google.com/analytics/devguides/collection/gtagjs/pages) and [event](https://developers.google.com/analytics/devguides/collection/gtagjs/events). ## Deploy your own From e6f401cadf7ff90f7c4431f1d181c3b0917669c6 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 29 Jan 2020 23:14:50 -0600 Subject: [PATCH 262/321] Disable caching for react@next workflow as its not supported (#10331) * Disable caching for react@next workflow as its not support * Disable needs build * Also add checkout step * Remove running on pull_request from testing --- .github/workflows/test_react_next.yml | 50 +++++++++++++++------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test_react_next.yml b/.github/workflows/test_react_next.yml index c1f3ce0e09dc77e..6718973fdeafa6d 100644 --- a/.github/workflows/test_react_next.yml +++ b/.github/workflows/test_react_next.yml @@ -6,39 +6,45 @@ on: name: Test react@next jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + # build: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 - - run: yarn install --frozen-lockfile --check-files - env: - NEXT_TELEMETRY_DISABLED: 1 + # - run: yarn install --frozen-lockfile --check-files + # env: + # NEXT_TELEMETRY_DISABLED: 1 - - run: yarn upgrade react@next react-dom@next -W --dev + # - run: yarn upgrade react@next react-dom@next -W --dev - - uses: actions/cache@v1 - id: cache-build - with: - path: '.' - key: ${{ github.sha }} + # - uses: actions/cache@v1 + # id: cache-build + # with: + # path: '.' + # key: ${{ github.sha }} testAll: name: Test All runs-on: ubuntu-latest - needs: build + # needs: build + env: + NEXT_TELEMETRY_DISABLED: 1 + HEADLESS: true strategy: fail-fast: false matrix: group: [1, 2, 3, 4, 5, 6] steps: - - uses: actions/cache@v1 - id: restore-build - with: - path: '.' - key: ${{ github.sha }} + # - uses: actions/cache@v1 + # id: restore-build + # with: + # path: '.' + # key: ${{ github.sha }} + + - uses: actions/checkout@v2 + + - run: yarn install --frozen-lockfile --check-files + + - run: yarn upgrade react@next react-dom@next -W --dev - run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 - env: - NEXT_TELEMETRY_DISABLED: 1 - HEADLESS: true From e35005c214d3cd1a414c0ce99ae25966a0a3f692 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Thu, 30 Jan 2020 07:04:29 +0100 Subject: [PATCH 263/321] [Experimental] Nomodule polyfills chunk (#10212) * Polyfill Promise in polyfills chunk * Override promise polyfill to use built-in * Update sizes * Update polyfills * Test * Add dep * Use iife * Unscope * Revert "Unscope" This reverts commit ab26bcefd551c544d5b3c577b7ce91e5ecfb9bb9. * trigger * Remove unused code * Set helpers to true * Update yarn.lock * Fix test * Update polyfills size * Add comment * Add back comment * Put polyfills optimization under experimental flag * Fix filename * bring back promise for backwards compat until experimental feature is landed * fix resolve alias check * correct loader * fix logic branches * adjust !! * adjust cache key * Conditionally branch polyfill * fix promise polyfill branching * Re-add runtime * fix base object * fix yarn lock * Add cache key * correctly set caller * add basic test * Increment h=>i * increment to j just in case Co-authored-by: Joe Haddad Co-authored-by: JJ Kasper --- packages/next-polyfill-nomodule/package.json | 19 + packages/next-polyfill-nomodule/src/index.js | 67 + packages/next/build/babel/preset.ts | 5 +- packages/next/build/webpack-config.ts | 98 +- .../webpack/loaders/next-babel-loader.js | 9 +- packages/next/client/index.js | 21 +- packages/next/client/polyfills-nomodule.js | 1 + packages/next/package.json | 2 + .../polyfilling-minimal/next.config.js | 5 + .../polyfilling-minimal/pages/index.js | 1 + .../polyfilling-minimal/test/index.test.js | 23 + yarn.lock | 1346 ++++++++++++++++- 12 files changed, 1519 insertions(+), 78 deletions(-) create mode 100644 packages/next-polyfill-nomodule/package.json create mode 100644 packages/next-polyfill-nomodule/src/index.js create mode 100644 packages/next/client/polyfills-nomodule.js create mode 100644 test/integration/polyfilling-minimal/next.config.js create mode 100644 test/integration/polyfilling-minimal/pages/index.js create mode 100644 test/integration/polyfilling-minimal/test/index.test.js diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json new file mode 100644 index 000000000000000..a941c02c6bcc44f --- /dev/null +++ b/packages/next-polyfill-nomodule/package.json @@ -0,0 +1,19 @@ +{ + "name": "@next/polyfill-nomodule", + "version": "0.0.0", + "description": "A polyfill for non-dead, nomodule browsers.", + "main": "dist/polyfill-nomodule.js", + "license": "MIT", + "scripts": { + "prepublish": "microbundle src/index.js -f iife --no-sourcemap --external none", + "build": "microbundle watch src/index.js -f iife --no-sourcemap --external none" + }, + "devDependencies": { + "core-js": "3.6.4", + "microbundle": "0.11.0", + "object-assign": "4.1.1", + "promise-polyfill": "8.1.3", + "url-polyfill": "1.1.7", + "whatwg-fetch": "3.0.0" + } +} diff --git a/packages/next-polyfill-nomodule/src/index.js b/packages/next-polyfill-nomodule/src/index.js new file mode 100644 index 000000000000000..5b4552e10a8fcfc --- /dev/null +++ b/packages/next-polyfill-nomodule/src/index.js @@ -0,0 +1,67 @@ +import 'core-js/modules/es6.array.copy-within' +import 'core-js/modules/es6.array.fill' +import 'core-js/modules/es6.array.find' +import 'core-js/modules/es6.array.find-index' +import 'core-js/modules/es7.array.flat-map' +import 'core-js/modules/es6.array.from' +import 'core-js/modules/es7.array.includes' +import 'core-js/modules/es6.array.iterator' +import 'core-js/modules/es6.array.of' +import 'core-js/modules/es6.array.species' +import 'core-js/modules/es6.function.has-instance' +import 'core-js/modules/es6.map' +import 'core-js/modules/es6.number.constructor' +import 'core-js/modules/es6.number.epsilon' +import 'core-js/modules/es6.number.is-finite' +import 'core-js/modules/es6.number.is-integer' +import 'core-js/modules/es6.number.is-nan' +import 'core-js/modules/es6.number.is-safe-integer' +import 'core-js/modules/es6.number.max-safe-integer' +import 'core-js/modules/es6.number.min-safe-integer' +import 'core-js/modules/es7.object.entries' +import 'core-js/modules/es7.object.get-own-property-descriptors' +import 'core-js/modules/es6.object.is' +import 'core-js/modules/es7.object.values' +import 'core-js/modules/es6.reflect.apply' +import 'core-js/modules/es6.reflect.construct' +import 'core-js/modules/es6.reflect.define-property' +import 'core-js/modules/es6.reflect.delete-property' +import 'core-js/modules/es6.reflect.get' +import 'core-js/modules/es6.reflect.get-own-property-descriptor' +import 'core-js/modules/es6.reflect.get-prototype-of' +import 'core-js/modules/es6.reflect.has' +import 'core-js/modules/es6.reflect.is-extensible' +import 'core-js/modules/es6.reflect.own-keys' +import 'core-js/modules/es6.reflect.prevent-extensions' +import 'core-js/modules/es6.reflect.set' +import 'core-js/modules/es6.reflect.set-prototype-of' +import 'core-js/modules/es6.regexp.constructor' +import 'core-js/modules/es6.regexp.flags' +import 'core-js/modules/es6.regexp.match' +import 'core-js/modules/es6.regexp.replace' +import 'core-js/modules/es6.regexp.split' +import 'core-js/modules/es6.regexp.search' +import 'core-js/modules/es6.set' +import 'core-js/modules/es6.symbol' +import 'core-js/modules/es7.symbol.async-iterator' +import 'core-js/modules/es6.string.code-point-at' +import 'core-js/modules/es6.string.ends-with' +import 'core-js/modules/es6.string.from-code-point' +import 'core-js/modules/es6.string.includes' +import 'core-js/modules/es6.string.iterator' +import 'core-js/modules/es7.string.pad-start' +import 'core-js/modules/es7.string.pad-end' +import 'core-js/modules/es6.string.raw' +import 'core-js/modules/es6.string.repeat' +import 'core-js/modules/es6.string.starts-with' +import 'core-js/modules/es7.string.trim-left' +import 'core-js/modules/es7.string.trim-right' +import 'core-js/modules/es6.weak-map' +import 'core-js/modules/es6.weak-set' + +// Specialized Packages: +import 'promise-polyfill/src/polyfill' +import 'whatwg-fetch' +import 'url-polyfill' +import assign from 'object-assign' +Object.assign = assign diff --git a/packages/next/build/babel/preset.ts b/packages/next/build/babel/preset.ts index 8e95a8c2c0dccc5..6980c11c4b8ddfc 100644 --- a/packages/next/build/babel/preset.ts +++ b/packages/next/build/babel/preset.ts @@ -64,6 +64,9 @@ module.exports = ( const supportsESM = api.caller(supportsStaticESM) const isServer = api.caller((caller: any) => !!caller && caller.isServer) const isModern = api.caller((caller: any) => !!caller && caller.isModern) + const isPolyfillsOptimization = api.caller( + (caller: any) => !!caller && caller.polyfillsOptimization + ) const isLaxModern = isModern || (options['preset-env']?.targets && @@ -152,7 +155,7 @@ module.exports = ( !isServer && [ require('@babel/plugin-transform-runtime'), { - corejs: 2, + corejs: isPolyfillsOptimization ? false : 2, helpers: true, regenerator: true, useESModules: supportsESM && presetEnvConfig.modules !== 'commonjs', diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index b94f2fd6526c772..9993f1201ee4dbb 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -56,7 +56,10 @@ const escapePathVariables = (value: any) => { : value } -function getOptimizedAliases(isServer: boolean): { [pkg: string]: string } { +function getOptimizedAliases( + isServer: boolean, + polyfillsOptimization: boolean +): { [pkg: string]: string } { if (isServer) { return {} } @@ -65,33 +68,48 @@ function getOptimizedAliases(isServer: boolean): { [pkg: string]: string } { const stubObjectAssign = path.join(__dirname, 'polyfills', 'object-assign.js') const shimAssign = path.join(__dirname, 'polyfills', 'object.assign') - return { + return Object.assign( + {}, // Polyfill: Window#fetch - __next_polyfill__fetch: require.resolve('whatwg-fetch'), - unfetch$: stubWindowFetch, - 'isomorphic-unfetch$': stubWindowFetch, - 'whatwg-fetch$': path.join( - __dirname, - 'polyfills', - 'fetch', - 'whatwg-fetch.js' - ), - - // Polyfill: Object.assign - __next_polyfill__object_assign: require.resolve('object-assign'), - 'object-assign$': stubObjectAssign, - '@babel/runtime-corejs2/core-js/object/assign': stubObjectAssign, - - // Stub Package: object.assign - 'object.assign/auto': path.join(shimAssign, 'auto.js'), - 'object.assign/implementation': path.join(shimAssign, 'implementation.js'), - 'object.assign$': path.join(shimAssign, 'index.js'), - 'object.assign/polyfill': path.join(shimAssign, 'polyfill.js'), - 'object.assign/shim': path.join(shimAssign, 'shim.js'), - - // Replace: full URL polyfill with platform-based polyfill - // url: require.resolve('native-url'), - } + polyfillsOptimization + ? undefined + : { + __next_polyfill__fetch: require.resolve('whatwg-fetch'), + }, + { + unfetch$: stubWindowFetch, + 'isomorphic-unfetch$': stubWindowFetch, + 'whatwg-fetch$': path.join( + __dirname, + 'polyfills', + 'fetch', + 'whatwg-fetch.js' + ), + }, + polyfillsOptimization + ? undefined + : { + // Polyfill: Object.assign + __next_polyfill__object_assign: require.resolve('object-assign'), + '@babel/runtime-corejs2/core-js/object/assign': stubObjectAssign, + }, + { + 'object-assign$': stubObjectAssign, + + // Stub Package: object.assign + 'object.assign/auto': path.join(shimAssign, 'auto.js'), + 'object.assign/implementation': path.join( + shimAssign, + 'implementation.js' + ), + 'object.assign$': path.join(shimAssign, 'index.js'), + 'object.assign/polyfill': path.join(shimAssign, 'polyfill.js'), + 'object.assign/shim': path.join(shimAssign, 'shim.js'), + + // Replace: full URL polyfill with platform-based polyfill + // url: require.resolve('native-url'), + } + ) } export default async function getBaseWebpackConfig( @@ -145,6 +163,7 @@ export default async function getBaseWebpackConfig( babelPresetPlugins, hasModern: !!config.experimental.modern, development: dev, + polyfillsOptimization: !!config.experimental.polyfillsOptimization, }, }, // Backwards compat @@ -191,7 +210,9 @@ export default async function getBaseWebpackConfig( ), [CLIENT_STATIC_FILES_RUNTIME_POLYFILLS]: path.join( NEXT_PROJECT_ROOT_DIST_CLIENT, - 'polyfills.js' + config.experimental.polyfillsOptimization + ? 'polyfills-nomodule.js' + : 'polyfills.js' ), } : undefined @@ -241,7 +262,17 @@ export default async function getBaseWebpackConfig( next: NEXT_PROJECT_ROOT, [PAGES_DIR_ALIAS]: pagesDir, [DOT_NEXT_ALIAS]: distDir, - ...getOptimizedAliases(isServer), + ...getOptimizedAliases( + isServer, + !!config.experimental.polyfillsOptimization + ), + + // Temporary to allow runtime-corejs2 to be stubbed in experimental polyfillsOptimization + ...(config.experimental.polyfillsOptimization + ? { + '@babel/runtime-corejs2': '@babel/runtime', + } + : undefined), }, mainFields: isServer ? ['main', 'module'] : ['browser', 'module', 'main'], plugins: [PnpWebpackPlugin], @@ -485,8 +516,12 @@ export default async function getBaseWebpackConfig( if ( !res.match(/next[/\\]dist[/\\]next-server[/\\]/) && (res.match(/[/\\]next[/\\]dist[/\\]/) || + // This is the @babel/plugin-transform-runtime "helpers: true" option res.match(/node_modules[/\\]@babel[/\\]runtime[/\\]/) || - res.match(/node_modules[/\\]@babel[/\\]runtime-corejs2[/\\]/)) + (!config.experimental.polyfillsOptimization && + res.match( + /node_modules[/\\]@babel[/\\]runtime-corejs2[/\\]/ + ))) ) { return callback() } @@ -684,6 +719,9 @@ export default async function getBaseWebpackConfig( 'process.env.__NEXT_MODERN_BUILD': JSON.stringify( config.experimental.modern && !dev ), + 'process.env.__NEXT_POLYFILLS_OPTIMIZATION': JSON.stringify( + !!config.experimental.polyfillsOptimization + ), 'process.env.__NEXT_GRANULAR_CHUNKS': JSON.stringify( config.experimental.granularChunks && !dev ), diff --git a/packages/next/build/webpack/loaders/next-babel-loader.js b/packages/next/build/webpack/loaders/next-babel-loader.js index ecf5c0f8056832d..8faf81c78fa7708 100644 --- a/packages/next/build/webpack/loaders/next-babel-loader.js +++ b/packages/next/build/webpack/loaders/next-babel-loader.js @@ -2,9 +2,9 @@ import babelLoader from 'babel-loader' import { basename, join } from 'path' import hash from 'string-hash' -// increment 'e' to invalidate cache +// increment 'j' to invalidate cache // eslint-disable-next-line no-useless-concat -const cacheKey = 'babel-cache-' + 'h' + '-' +const cacheKey = 'babel-cache-' + 'j' + '-' const nextBabelPreset = require('../../babel/preset') const getModernOptions = (babelOptions = {}) => { @@ -59,6 +59,7 @@ module.exports = babelLoader.custom(babel => { hasModern: opts.hasModern, babelPresetPlugins: opts.babelPresetPlugins, development: opts.development, + polyfillsOptimization: opts.polyfillsOptimization, } const filename = join(opts.cwd, 'noop.js') const loader = Object.assign( @@ -71,6 +72,7 @@ module.exports = babelLoader.custom(babel => { (opts.isServer ? '-server' : '') + (opts.isModern ? '-modern' : '') + (opts.hasModern ? '-has-modern' : '') + + (opts.polyfillsOptimization ? '-new-polyfills' : '') + (opts.development ? '-development' : '-production') + JSON.stringify( babel.loadPartialConfig({ @@ -93,6 +95,7 @@ module.exports = babelLoader.custom(babel => { delete loader.hasModern delete loader.pagesDir delete loader.babelPresetPlugins + delete loader.polyfillsOptimization delete loader.development return { loader, custom } }, @@ -107,6 +110,7 @@ module.exports = babelLoader.custom(babel => { pagesDir, babelPresetPlugins, development, + polyfillsOptimization, }, } ) { @@ -130,6 +134,7 @@ module.exports = babelLoader.custom(babel => { options.caller.isServer = isServer options.caller.isModern = isModern + options.caller.polyfillsOptimization = polyfillsOptimization options.caller.isDev = development options.plugins = options.plugins || [] diff --git a/packages/next/client/index.js b/packages/next/client/index.js index b34e55fc15402a0..61c75f7e6e901f8 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -14,13 +14,20 @@ import { isDynamicRoute } from '../next-server/lib/router/utils/is-dynamic' /// -// Polyfill Promise globally -// This is needed because Webpack's dynamic loading(common chunks) code -// depends on Promise. -// So, we need to polyfill it. -// See: https://webpack.js.org/guides/code-splitting/#dynamic-imports -if (!window.Promise) { - window.Promise = require('@babel/runtime-corejs2/core-js/promise') +if (process.env.__NEXT_POLYFILLS_OPTIMIZATION) { + if (!('finally' in Promise.prototype)) { + // eslint-disable-next-line no-extend-native + Promise.prototype.finally = require('finally-polyfill') + } +} else { + // Polyfill Promise globally + // This is needed because Webpack's dynamic loading(common chunks) code + // depends on Promise. + // So, we need to polyfill it. + // See: https://webpack.js.org/guides/code-splitting/#dynamic-imports + if (!self.Promise) { + self.Promise = require('@babel/runtime-corejs2/core-js/promise') + } } const data = JSON.parse(document.getElementById('__NEXT_DATA__').textContent) diff --git a/packages/next/client/polyfills-nomodule.js b/packages/next/client/polyfills-nomodule.js new file mode 100644 index 000000000000000..5682d2a0577ab9f --- /dev/null +++ b/packages/next/client/polyfills-nomodule.js @@ -0,0 +1 @@ +import '@next/polyfill-nomodule' diff --git a/packages/next/package.json b/packages/next/package.json index 150476c7c674d4e..f6176edea4b31c5 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -73,6 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", + "@next/polyfill-nomodule": "0.0.0", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", @@ -96,6 +97,7 @@ "escape-string-regexp": "2.0.0", "etag": "1.8.1", "file-loader": "4.2.0", + "finally-polyfill": "0.1.0", "find-up": "4.0.0", "fork-ts-checker-webpack-plugin": "3.1.1", "fresh": "0.5.2", diff --git a/test/integration/polyfilling-minimal/next.config.js b/test/integration/polyfilling-minimal/next.config.js new file mode 100644 index 000000000000000..92edca3df03281c --- /dev/null +++ b/test/integration/polyfilling-minimal/next.config.js @@ -0,0 +1,5 @@ +module.exports = { + experimental: { + polyfillsOptimization: true, + }, +} diff --git a/test/integration/polyfilling-minimal/pages/index.js b/test/integration/polyfilling-minimal/pages/index.js new file mode 100644 index 000000000000000..89d2bdd37ea496b --- /dev/null +++ b/test/integration/polyfilling-minimal/pages/index.js @@ -0,0 +1 @@ +export default () =>

hi

diff --git a/test/integration/polyfilling-minimal/test/index.test.js b/test/integration/polyfilling-minimal/test/index.test.js new file mode 100644 index 000000000000000..fbafaa3964c9239 --- /dev/null +++ b/test/integration/polyfilling-minimal/test/index.test.js @@ -0,0 +1,23 @@ +/* eslint-env jest */ +/* global jasmine */ +import { remove } from 'fs-extra' +import { nextBuild } from 'next-test-utils' +import { join } from 'path' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 + +const appDir = join(__dirname, '../') + +describe('Polyfilling (minimal)', () => { + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + it('should compile successfully', async () => { + const { code, stdout } = await nextBuild(appDir, [], { + stdout: true, + }) + expect(code).toBe(0) + expect(stdout).toMatch(/Compiled successfully/) + }) +}) diff --git a/yarn.lock b/yarn.lock index 9fb92865ae14067..0bb7a8e63c65f72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,6 +40,13 @@ dependencies: "@babel/highlight" "^7.0.0" +"@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + "@babel/core@7.7.2": version "7.7.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.2.tgz#ea5b99693bcfc058116f42fa1dd54da412b29d91" @@ -80,6 +87,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.2.2": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" + integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.3" + "@babel/helpers" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + "@babel/generator@^7.4.0", "@babel/generator@^7.7.2", "@babel/generator@^7.7.4", "@babel/generator@^7.7.7": version "7.7.7" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" @@ -90,6 +118,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03" + integrity sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug== + dependencies: + "@babel/types" "^7.8.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz#bb3faf1e74b74bd547e867e48f551fa6b098b6ce" @@ -122,6 +160,18 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-create-class-features-plugin@^7.2.1": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz#5b94be88c255f140fd2c10dd151e7f98f4bff397" + integrity sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/helper-create-class-features-plugin@^7.7.0", "@babel/helper-create-class-features-plugin@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.4.tgz#fce60939fd50618610942320a8d951b3b639da2d" @@ -168,6 +218,15 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + "@babel/helper-get-function-arity@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" @@ -175,6 +234,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== + dependencies: + "@babel/types" "^7.8.3" + "@babel/helper-hoist-variables@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.4.tgz#612384e3d823fdfaaf9fce31550fe5d4db0f3d12" @@ -189,6 +255,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-member-expression-to-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" + integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== + dependencies: + "@babel/types" "^7.8.3" + "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.7.0", "@babel/helper-module-imports@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" @@ -215,12 +288,19 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-optimise-call-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" + integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== + dependencies: + "@babel/types" "^7.8.3" + "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== -"@babel/helper-plugin-utils@^7.8.0": +"@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== @@ -253,6 +333,16 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-replace-supers@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz#91192d25f6abbcd41da8a989d4492574fb1530bc" + integrity sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + "@babel/helper-simple-access@^7.7.0", "@babel/helper-simple-access@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294" @@ -268,6 +358,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== + dependencies: + "@babel/types" "^7.8.3" + "@babel/helper-wrap-function@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz#37ab7fed5150e22d9d7266e830072c0cdd8baace" @@ -287,6 +384,15 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helpers@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.3.tgz#382fbb0382ce7c4ce905945ab9641d688336ce85" + integrity sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + "@babel/highlight@^7.0.0": version "7.5.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" @@ -296,11 +402,25 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@babel/highlight@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" + integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + "@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.2", "@babel/parser@^7.7.4", "@babel/parser@^7.7.7": version "7.7.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== +"@babel/parser@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081" + integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ== + "@babel/plugin-proposal-async-generator-functions@^7.7.0": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.4.tgz#0351c5ac0a9e927845fffd5b82af476947b7ce6d" @@ -310,6 +430,14 @@ "@babel/helper-remap-async-to-generator" "^7.7.4" "@babel/plugin-syntax-async-generators" "^7.7.4" +"@babel/plugin-proposal-class-properties@7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.1.tgz#c734a53e0a1ec40fe5c22ee5069d26da3b187d05" + integrity sha512-/4FKFChkQ2Jgb8lBDsvFX496YTi7UWTetVgS8oJUpX1e/DlaoeEK57At27ug8Hu2zI2g8bzkJ+8k9qrHZRPGPA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.2.1" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-class-properties@7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.0.tgz#ac54e728ecf81d90e8f4d2a9c05a890457107917" @@ -786,6 +914,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/polyfill@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.3.tgz#2333fc2144a542a7c07da39502ceeeb3abe4debd" + integrity sha512-0QEgn2zkCzqGIkSWWAEmvxD7e00Nm9asTtQvi7HdlYvMhjy/J38V/1Y9ode0zEJeIuxAI0uftiAzqc7nVeWUGg== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.2" + "@babel/preset-env@7.7.1": version "7.7.1" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.7.1.tgz#04a2ff53552c5885cf1083e291c8dd5490f744bb" @@ -913,6 +1049,15 @@ "@babel/parser" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/template@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" + integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + "@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.2", "@babel/traverse@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" @@ -928,6 +1073,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a" + integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.3" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.1", "@babel/types@^7.7.2", "@babel/types@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" @@ -937,6 +1097,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" + integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" @@ -2352,6 +2521,11 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + "@types/etag@1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@types/etag/-/etag-1.8.0.tgz#37f0b1f3ea46da7ae319bbedb607e375b4c99f7e" @@ -3010,6 +3184,11 @@ accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-dynamic-import@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" + integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== + acorn-globals@^4.1.0: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" @@ -3018,7 +3197,7 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" -acorn-jsx@^5.1.0: +acorn-jsx@^5.0.1, acorn-jsx@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== @@ -3033,7 +3212,7 @@ acorn@^5.5.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.0.7, acorn@^6.1.1, acorn@^6.2.1: version "6.4.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw== @@ -3118,7 +3297,7 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -alphanum-sort@^1.0.0: +alphanum-sort@^1.0.0, alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= @@ -3468,6 +3647,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +asyncro@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/asyncro/-/asyncro-3.0.0.tgz#3c7a732e263bc4a42499042f48d7d858e9c0134e" + integrity sha512-nEnWYfrBmA3taTiuiOoZYmgJ/CNrSoQLeLs29SeLcPu60yaw/mHDBHV0iOZ051fTvsTHxpCY+gXibqT9wbQYfg== + atob-lite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" @@ -3494,6 +3678,31 @@ autodll-webpack-plugin@0.4.2: webpack-merge "^4.1.0" webpack-sources "^1.0.1" +autoprefixer@^6.3.1: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + integrity sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ= + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +autoprefixer@^9.0.0: + version "9.7.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" + integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== + dependencies: + browserslist "^4.8.3" + caniuse-lite "^1.0.30001020" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.26" + postcss-value-parser "^4.0.2" + autoprefixer@^9.4.5, autoprefixer@^9.6.1: version "9.7.3" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.3.tgz#fd42ed03f53de9beb4ca0d61fb4f7268a9bb50b4" @@ -3595,6 +3804,11 @@ babel-plugin-syntax-jsx@6.18.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= +babel-plugin-transform-async-to-promises@^0.8.3: + version "0.8.15" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.15.tgz#13b6d8ef13676b4e3c576d3600b85344bb1ba346" + integrity sha512-fDXP68ZqcinZO2WCiimCL9zhGjGXOnn3D33zvbh+yheZ/qOrNVVDDIBtAaM3Faz8TRvQzHiRKsu3hfrBAhEncQ== + babel-plugin-transform-define@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-2.0.0.tgz#79c3536635f899aabaf830b194b25519465675a4" @@ -3634,11 +3848,21 @@ babel-types@6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" +babylon@^6.15.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + bail@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.4.tgz#7181b66d508aa3055d3f6c13f0a0c720641dde9b" integrity sha512-S8vuDB4w6YpRhICUDET3guPlQpaJl7od94tpZ0Fvnyp+MKW/HyDTcRDck+29C9g+d/qQHnddRH3+94kZdrW0Ww== +balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + integrity sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg= + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -3719,6 +3943,13 @@ bl@^2.2.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" +bl@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88" + integrity sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A== + dependencies: + readable-stream "^3.0.1" + block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" @@ -3816,6 +4047,14 @@ brorand@^1.0.1: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= +brotli-size@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/brotli-size/-/brotli-size-0.0.3.tgz#1d3855b38f182591a6f69da1516131676e5f62f2" + integrity sha512-bBIdd8uUGxKGldAVykxOqPegl+HlIm4FpXJamwWw5x77WCE8jO7AhXFE1YXOhOB28gS+2pTQete0FqRE6U5hQQ== + dependencies: + duplexer "^0.1.1" + iltorb "^2.0.5" + browser-process-hrtime@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" @@ -3887,7 +4126,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.8.3, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: +browserslist@4.8.3, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: version "4.8.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg== @@ -3919,6 +4158,20 @@ btoa-lite@^1.0.0: resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= +buble@^0.19.8: + version "0.19.8" + resolved "https://registry.yarnpkg.com/buble/-/buble-0.19.8.tgz#d642f0081afab66dccd897d7b6360d94030b9d3d" + integrity sha512-IoGZzrUTY5fKXVkgGHw3QeXFMUNBFv+9l8a4QJKG1JhG3nCMHTdEX1DCOg8568E2Q9qvAQIiSokv6Jsgx8p2cA== + dependencies: + acorn "^6.1.1" + acorn-dynamic-import "^4.0.0" + acorn-jsx "^5.0.1" + chalk "^2.4.2" + magic-string "^0.25.3" + minimist "^1.2.0" + os-homedir "^2.0.0" + regexpu-core "^4.5.4" + buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -3948,6 +4201,11 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" +builtin-modules@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" + integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -4150,6 +4408,16 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + integrity sha1-tTTnxzTE+B7F++isoq0kNUuWLGw= + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -4160,7 +4428,12 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019: +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634: + version "1.0.30001023" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001023.tgz#f856f71af16a5a44e81f1fcefc1673912a43da72" + integrity sha512-EnlshvE6oAum+wWwKmJNVaoqJMjIc0bLUy4Dj77VVnz1o6bzSPr1Ze9iPy6g5ycg1xD6jGU6vBmo7pLEz2MbCQ== + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019, caniuse-lite@^1.0.30001020: version "1.0.30001019" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz#857e3fccaad2b2feb3f1f6d8a8f62d747ea648e1" integrity sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g== @@ -4200,7 +4473,7 @@ chalk@2.4.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -4385,6 +4658,13 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +clap@^1.0.9: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" + integrity sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA== + dependencies: + chalk "^1.1.3" + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -4527,6 +4807,13 @@ coa@^2.0.2: chalk "^2.4.1" q "^1.1.2" +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + integrity sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0= + dependencies: + q "^1.1.2" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -4545,7 +4832,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0, color-convert@^1.9.1: +color-convert@^1.3.0, color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -4562,6 +4849,13 @@ color-name@^1.0.0: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + integrity sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE= + dependencies: + color-name "^1.0.0" + color-string@^1.5.2: version "1.5.3" resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" @@ -4570,6 +4864,15 @@ color-string@^1.5.2: color-name "^1.0.0" simple-swizzle "^0.2.2" +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + integrity sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q= + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + color@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" @@ -4578,7 +4881,16 @@ color@^3.0.0: color-convert "^1.9.1" color-string "^1.5.2" -colors@1.1.2: +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + integrity sha1-6i90IKcrlogaOKrlnsEkpvcpgTM= + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@1.1.2, colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= @@ -4690,6 +5002,13 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" +concat-with-sourcemaps@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + conf@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/conf/-/conf-5.0.0.tgz#6530308a36041bf010ab96b05a0f4aff5101c65d" @@ -4903,6 +5222,11 @@ core-js@3.1.4: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.1.4.tgz#3a2837fc48e582e1ae25907afcd6cf03b0cc7a07" integrity sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ== +core-js@3.6.4: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" + integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== + core-js@^2.4.0, core-js@^2.6.5: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" @@ -4913,6 +5237,19 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + integrity sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A== + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + cosmiconfig@^5.0.0, cosmiconfig@^5.1.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -5132,6 +5469,18 @@ css-loader@3.3.0: postcss-value-parser "^4.0.2" schema-utils "^2.6.0" +css-modules-loader-core@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz#5908668294a1becd261ae0a4ce21b0b551f21d16" + integrity sha1-WQhmgpShvs0mGuCkziGwtVHyHRY= + dependencies: + icss-replace-symbols "1.1.0" + postcss "6.0.1" + postcss-modules-extract-imports "1.1.0" + postcss-modules-local-by-default "1.2.0" + postcss-modules-scope "1.1.0" + postcss-modules-values "1.3.0" + css-prefers-color-scheme@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz#6f830a2714199d4f0d0d0bb8a27916ed65cff1f4" @@ -5299,7 +5648,45 @@ cssnano-util-same-parent@^4.0.0: resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== -cssnano@^4.1.10: +cssnano@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + integrity sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg= + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +cssnano@^4.1.10, cssnano@^4.1.7: version "4.1.10" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== @@ -5316,6 +5703,14 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.37" +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + integrity sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U= + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.8" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" @@ -5456,6 +5851,13 @@ decompress-response@^3.2.0, decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -5512,6 +5914,11 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + del@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" @@ -5583,7 +5990,7 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= -detect-libc@^1.0.2: +detect-libc@^1.0.2, detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= @@ -5944,6 +6351,11 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +es6-promisify@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.0.2.tgz#525c23725b8510f5f1f2feb5a1fbad93a93e29b4" + integrity sha512-eO6vFm0JvqGzjWIQA6QVKjxpmELfhWbDUWHm1rPfIbn55mhKPiAa5xpLmQWJrNa629ZIeQ8ZvMAi13kvrjK6Mg== + es6-symbol@^3.1.1, es6-symbol@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -6084,6 +6496,11 @@ espree@^6.1.2: acorn-jsx "^5.1.0" eslint-visitor-keys "^1.1.0" +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= + esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -6113,6 +6530,21 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estree-walker@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" + integrity sha1-va/oCVOD2EFNXcLs9MkXO225QS4= + +estree-walker@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" + integrity sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig== + +estree-walker@^0.6.0, estree-walker@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" + integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== + esutils@^2.0.0, esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -6239,6 +6671,11 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + expand-tilde@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" @@ -6516,7 +6953,7 @@ figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== -figures@^1.7.0: +figures@^1.0.1, figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= @@ -6568,7 +7005,7 @@ filename-regex@^2.0.0: resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= -filesize@^3.6.1: +filesize@^3.5.11, filesize@^3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== @@ -6614,6 +7051,11 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +finally-polyfill@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/finally-polyfill/-/finally-polyfill-0.1.0.tgz#2a17b16581d9477db16a703c7b79a898ac0b7d50" + integrity sha512-J1LEcZ5VXe1l3sEO+S//WqL5wcJ/ep7QeKJA6HhNZrcEEFj0eyC8IW3DEZhxySI2bx3r85dwAXz+vYPGuHx5UA== + find-cache-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" @@ -6730,6 +7172,14 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== +flow-remove-types@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-1.2.3.tgz#6131aefc7da43364bb8b479758c9dec7735d1a18" + integrity sha512-ypq/U3V+t9atYiOuSJd40tekCra03EHKoRsiK/wXGrsZimuum0kdwVY7Yv0HTaoXgHW1WiayomYd+Q3kkvPl9Q== + dependencies: + babylon "^6.15.0" + vlq "^0.2.1" + flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -6856,7 +7306,7 @@ fs-exists-sync@^0.1.0: resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0= -fs-extra@5.0.0: +fs-extra@5.0.0, fs-extra@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== @@ -6959,11 +7409,23 @@ gaze@^1.0.0: dependencies: globule "^1.0.0" +generic-names@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" + integrity sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ== + dependencies: + loader-utils "^1.1.0" + genfun@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" @@ -7137,6 +7599,11 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= + github-username@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/github-username/-/github-username-4.1.0.tgz#cbe280041883206da4212ae9e4b5f169c30bf417" @@ -7226,6 +7693,11 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" +globalyzer@^0.1.0: + version "0.1.4" + resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.4.tgz#bc8e273afe1ac7c24eea8def5b802340c5cc534f" + integrity sha512-LeguVWaxgHN0MNbWC6YljNMzHkrCny9fzjmEUdnF1kQ7wATFD1RHFRqA1qxaX2tgxGENlcxjOflopBwj3YZiXA== + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -7278,6 +7750,11 @@ globby@^9.2.0: pify "^4.0.1" slash "^2.0.0" +globrex@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + globule@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.0.tgz#41d0e9fb44afd4b80d93a23263714f90b3dec904" @@ -7363,6 +7840,13 @@ gzip-size@5.1.1, gzip-size@^5.0.0: duplexer "^0.1.1" pify "^4.0.1" +gzip-size@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" + integrity sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA= + dependencies: + duplexer "^0.1.1" + handlebars@^4.1.2, handlebars@^4.4.0: version "4.5.3" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" @@ -7465,7 +7949,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.0, has@^1.0.3: +has@^1.0.0, has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -7670,7 +8154,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, ic dependencies: safer-buffer ">= 2.1.2 < 3" -icss-replace-symbols@^1.1.0: +icss-replace-symbols@1.1.0, icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= @@ -7731,12 +8215,23 @@ ignore@^5.1.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== +iltorb@^2.0.5: + version "2.4.4" + resolved "https://registry.yarnpkg.com/iltorb/-/iltorb-2.4.4.tgz#7ec303bbbd8c0cd4d44a847eb6c6d8490f9c7433" + integrity sha512-7Qk6O7TK3rSWVRVRkPehcNTSN+P2i7MsG9pWmw6iVw/W6NcoNj0rFKOuBDM6fbZV6NNGuUW3JBRem6Ozn4KXhg== + dependencies: + detect-libc "^1.0.3" + nan "^2.14.0" + npmlog "^4.1.2" + prebuild-install "^5.3.2" + which-pm-runs "^1.0.0" + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= -import-cwd@^2.0.0: +import-cwd@^2.0.0, import-cwd@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" integrity sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk= @@ -8205,6 +8700,11 @@ is-lower-case@^1.1.0: dependencies: lower-case "^1.1.0" +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= + is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" @@ -8363,6 +8863,13 @@ is-string@^1.0.5: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + integrity sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk= + dependencies: + html-comment-regex "^1.1.0" + is-svg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" @@ -8883,6 +9390,13 @@ jest-worker@24.9.0, jest-worker@^24.6.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" +jest-worker@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" + integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= + dependencies: + merge-stream "^1.0.1" + js-base64@^2.1.8, js-base64@^2.1.9: version "2.5.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" @@ -8903,7 +9417,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.11.0, js-yaml@^3.13.1: +js-yaml@^3.11.0, js-yaml@^3.13.1, js-yaml@^3.4.3: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -8911,6 +9425,14 @@ js-yaml@^3.11.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + integrity sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A= + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -9405,7 +9927,7 @@ lodash.flatten@^4.2.0: resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= -lodash.foreach@^4.3.0: +lodash.foreach@^4.3.0, lodash.foreach@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= @@ -9465,6 +9987,11 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= +lodash.sumby@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.sumby/-/lodash.sumby-4.6.0.tgz#7d87737ddb216da2f7e5e7cd2dd9c403a7887346" + integrity sha1-fYdzfdshbaL35efNLdnEA6eIc0Y= + lodash.tail@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" @@ -9617,6 +10144,20 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== +magic-string@^0.22.4: + version "0.22.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" + integrity sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== + dependencies: + vlq "^0.2.2" + +magic-string@^0.25.2, magic-string@^0.25.3: + version "0.25.6" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.6.tgz#5586387d1242f919c6d223579cc938bf1420795e" + integrity sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g== + dependencies: + sourcemap-codec "^1.4.4" + make-dir@3.0.0, make-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801" @@ -9724,11 +10265,26 @@ markdown-escapes@^1.0.0: resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.3.tgz#6155e10416efaafab665d466ce598216375195f5" integrity sha512-XUi5HJhhV5R74k8/0H2oCbCiYf/u4cO/rX8tnGkRvrqhsr5BRNU6Mg0yt/8UIx1iIS8220BNJsDb7XnILhLepw== +math-expression-evaluator@^1.2.14: + version "1.2.22" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.22.tgz#c14dcb3d8b4d150e5dcea9c68c8dad80309b0d5e" + integrity sha512-L0j0tFVZBQQLeEjmWOvDLoRciIY8gQGWahvkztXUal8jH8R5Rlqo9GCvgqvXcy9LQhEWdQCVvzqAbxgYNt4blQ== + math-random@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== +maxmin@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/maxmin/-/maxmin-2.1.0.tgz#4d3b220903d95eee7eb7ac7fa864e72dc09a3166" + integrity sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY= + dependencies: + chalk "^1.0.0" + figures "^1.0.1" + gzip-size "^3.0.0" + pretty-bytes "^3.0.0" + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -9865,6 +10421,13 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= + dependencies: + readable-stream "^2.0.1" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -9880,12 +10443,51 @@ methods@^1.1.1, methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= +microbundle@0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/microbundle/-/microbundle-0.11.0.tgz#266bcf4210192698c23fe3bf3581ab81d31a14d0" + integrity sha512-Lt2f8OhC2y2uKyJ5zA8lEEiDsIAbk6yllBuoAWLIdYVIXYqOdN9mO3DI7VW7x/fw87gdnCLIJdVtpP6kaI99LA== + dependencies: + "@babel/core" "^7.2.2" + "@babel/plugin-proposal-class-properties" "7.2.1" + "@babel/plugin-syntax-jsx" "^7.2.0" + "@babel/polyfill" "^7.0.0" + asyncro "^3.0.0" + autoprefixer "^9.0.0" + babel-plugin-transform-async-to-promises "^0.8.3" + brotli-size "^0.0.3" + camelcase "^5.0.0" + chalk "^2.4.0" + cssnano "^4.1.7" + es6-promisify "^6.0.1" + gzip-size "^5.0.0" + pretty-bytes "^5.1.0" + rollup "^0.67.3" + rollup-plugin-alias "^1.5.1" + rollup-plugin-babel "^4.1.0-0" + rollup-plugin-buble "^0.19.4" + rollup-plugin-bundle-size "^1.0.1" + rollup-plugin-commonjs "^9.0.0" + rollup-plugin-es3 "^1.1.0" + rollup-plugin-flow "^1.1.1" + rollup-plugin-json "^3.1.0" + rollup-plugin-node-resolve "^4.0.0" + rollup-plugin-postcss "^1.6.1" + rollup-plugin-preserve-shebang "^0.1.6" + rollup-plugin-sizes "^0.4.2" + rollup-plugin-terser "^3.0.0" + rollup-plugin-typescript2 "^0.19.0" + sade "^1.4.0" + tiny-glob "^0.2.6" + tslib "^1.9.0" + typescript ">=2.8.3" + microevent.ts@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== -micromatch@^2.1.5: +micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= @@ -9976,6 +10578,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.0.0.tgz#996a51c60adf12cb8a87d7fb8ef24c2f3d5ebb46" + integrity sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ== + mini-css-extract-plugin@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz#81d41ec4fe58c713a96ad7c723cdb2d0bd4d70e1" @@ -9996,7 +10603,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -minimatch@^3.0.0, minimatch@^3.0.4, minimatch@~3.0.2: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -10090,6 +10697,11 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== +module-details-from-path@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b" + integrity sha1-EUyUlnPiqKNenTV4hSeqN7Z52is= + moment@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" @@ -10152,7 +10764,7 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1, nan@^2.13.2: +nan@^2.12.1, nan@^2.13.2, nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== @@ -10179,6 +10791,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +napi-build-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.1.tgz#1381a0f92c39d66bf19852e7873432fc2123e508" + integrity sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA== + native-or-bluebird@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/native-or-bluebird/-/native-or-bluebird-1.2.0.tgz#39c47bfd7825d1fb9ffad32210ae25daadf101c9" @@ -10230,6 +10847,13 @@ no-case@^2.2.0, no-case@^2.3.2: dependencies: lower-case "^1.1.1" +node-abi@^2.7.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.13.0.tgz#e2f2ec444d0aca3ea1b3874b6de41d1665828f63" + integrity sha512-9HrZGFVTR5SOu3PZAnAY2hLO36aW1wmA+FDsVkr85BTST32TLCA1H/AEcatVRAsWLyXS3bqUDYCAjq5/QGuSTA== + dependencies: + semver "^5.4.1" + node-emoji@^1.8.1: version "1.10.0" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" @@ -10411,6 +11035,11 @@ node-version@^1.0.0: resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.2.0.tgz#34fde3ffa8e1149bd323983479dda620e1b5060d" integrity sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ== +noop-logger@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" + integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= + "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -10453,7 +11082,7 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@1.9.1: +normalize-url@1.9.1, normalize-url@^1.4.0: version "1.9.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw= @@ -10585,7 +11214,7 @@ npm-run-path@^3.0.0: dependencies: path-key "^3.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2, npmlog@^4.1.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -10858,6 +11487,11 @@ os-homedir@^1.0.0, os-homedir@^1.0.1: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= +os-homedir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-2.0.0.tgz#a0c76bb001a8392a503cbd46e7e650b3423a923c" + integrity sha512-saRNz0DSC5C/I++gFIaJTXoFJMRwiP5zHar5vV3xQ2TkgEw6hDCcU5F272JjUylpiVgBrZNQHnfjkLabTfb92Q== + os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" @@ -11001,6 +11635,11 @@ p-pipe@^1.2.0: resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= +p-queue@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-2.4.2.tgz#03609826682b743be9a22dba25051bd46724fc34" + integrity sha512-n8/y+yDJwBjoLQe1GSJbbaYQLTI7QHNZI2+rpmCDbe++WLf9HC3gf6iqj5yfPAV71W4UF3ql5W1+UBPXoXTxng== + p-queue@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346" @@ -11287,7 +11926,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.5, path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== @@ -11471,6 +12110,15 @@ postcss-attribute-case-insensitive@^4.0.1: postcss "^7.0.2" postcss-selector-parser "^5.0.0" +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + integrity sha1-d7rnypKK2FcW4v2kLyYb98HWW14= + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + postcss-calc@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.1.tgz#36d77bab023b0ecbb9789d84dcb23c4941145436" @@ -11523,6 +12171,15 @@ postcss-color-rebeccapurple@^4.0.1: postcss "^7.0.2" postcss-values-parser "^2.0.0" +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + integrity sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks= + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + postcss-colormin@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" @@ -11534,6 +12191,14 @@ postcss-colormin@^4.0.3: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + integrity sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0= + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + postcss-convert-values@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" @@ -11573,6 +12238,13 @@ postcss-dir-pseudo-class@^5.0.0: postcss "^7.0.2" postcss-selector-parser "^5.0.0-rc.3" +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + integrity sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0= + dependencies: + postcss "^5.0.14" + postcss-discard-comments@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" @@ -11580,6 +12252,13 @@ postcss-discard-comments@^4.0.2: dependencies: postcss "^7.0.0" +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + integrity sha1-uavye4isGIFYpesSq8riAmO5GTI= + dependencies: + postcss "^5.0.4" + postcss-discard-duplicates@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" @@ -11587,6 +12266,13 @@ postcss-discard-duplicates@^4.0.2: dependencies: postcss "^7.0.0" +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + integrity sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU= + dependencies: + postcss "^5.0.14" + postcss-discard-empty@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" @@ -11594,6 +12280,13 @@ postcss-discard-empty@^4.0.1: dependencies: postcss "^7.0.0" +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + integrity sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg= + dependencies: + postcss "^5.0.16" + postcss-discard-overridden@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" @@ -11601,6 +12294,14 @@ postcss-discard-overridden@^4.0.1: dependencies: postcss "^7.0.0" +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + integrity sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM= + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + postcss-double-position-gradients@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-1.0.0.tgz#fc927d52fddc896cb3a2812ebc5df147e110522e" @@ -11617,6 +12318,13 @@ postcss-env-function@^2.0.2: postcss "^7.0.2" postcss-values-parser "^2.0.0" +postcss-filter-plugins@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz#82245fdf82337041645e477114d8e593aa18b8ec" + integrity sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ== + dependencies: + postcss "^5.0.4" + postcss-flexbugs-fixes@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.1.0.tgz#e094a9df1783e2200b7b19f875dcad3b3aff8b20" @@ -11695,6 +12403,16 @@ postcss-lab-function@^2.0.1: postcss "^7.0.2" postcss-values-parser "^2.0.0" +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + integrity sha1-U56a/J3chiASHr+djDZz4M5Q0oo= + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + postcss-load-config@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" @@ -11703,6 +12421,22 @@ postcss-load-config@^2.0.0: cosmiconfig "^5.0.0" import-cwd "^2.0.0" +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + integrity sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw= + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + integrity sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI= + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + postcss-loader@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" @@ -11727,6 +12461,22 @@ postcss-media-minmax@^4.0.0: dependencies: postcss "^7.0.2" +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + integrity sha1-TFUwMTwI4dWzu/PSu8dH4njuonA= + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + integrity sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg= + dependencies: + postcss "^5.0.4" + postcss-merge-longhand@^4.0.11: version "4.0.11" resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" @@ -11737,6 +12487,17 @@ postcss-merge-longhand@^4.0.11: postcss-value-parser "^3.0.0" stylehacks "^4.0.0" +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + integrity sha1-0d9d+qexrMO+VT8OnhDofGG19yE= + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + postcss-merge-rules@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" @@ -11749,6 +12510,20 @@ postcss-merge-rules@^4.0.3: postcss-selector-parser "^3.0.0" vendors "^1.0.0" +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + integrity sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4= + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + integrity sha1-S1jttWZB66fIR0qzUmyv17vey2k= + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + postcss-minify-font-values@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" @@ -11757,6 +12532,14 @@ postcss-minify-font-values@^4.0.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + integrity sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE= + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + postcss-minify-gradients@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" @@ -11767,6 +12550,16 @@ postcss-minify-gradients@^4.0.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + integrity sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM= + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + postcss-minify-params@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" @@ -11779,6 +12572,16 @@ postcss-minify-params@^4.0.2: postcss-value-parser "^3.0.0" uniqs "^2.0.0" +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + integrity sha1-ssapjAByz5G5MtGkllCBFDEXNb8= + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + postcss-minify-selectors@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" @@ -11789,6 +12592,13 @@ postcss-minify-selectors@^4.0.2: postcss "^7.0.0" postcss-selector-parser "^3.0.0" +postcss-modules-extract-imports@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" + integrity sha1-thTJcgvmgW6u41+zpfqh26agXds= + dependencies: + postcss "^6.0.1" + postcss-modules-extract-imports@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz#dc87e34148ec7eab5f791f7cd5849833375b741a" @@ -11803,7 +12613,7 @@ postcss-modules-extract-imports@^2.0.0: dependencies: postcss "^7.0.5" -postcss-modules-local-by-default@^1.2.0: +postcss-modules-local-by-default@1.2.0, postcss-modules-local-by-default@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" integrity sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk= @@ -11821,7 +12631,7 @@ postcss-modules-local-by-default@^3.0.2: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.0" -postcss-modules-scope@^1.1.0: +postcss-modules-scope@1.1.0, postcss-modules-scope@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" integrity sha1-1upkmUx5+XtipytCb75gVqGUu5A= @@ -11837,7 +12647,7 @@ postcss-modules-scope@^2.1.1: postcss "^7.0.6" postcss-selector-parser "^6.0.0" -postcss-modules-values@^1.3.0: +postcss-modules-values@1.3.0, postcss-modules-values@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" integrity sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA= @@ -11853,6 +12663,17 @@ postcss-modules-values@^3.0.0: icss-utils "^4.0.0" postcss "^7.0.6" +postcss-modules@^1.1.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-1.5.0.tgz#08da6ce43fcfadbc685a021fe6ed30ef929f0bcc" + integrity sha512-KiAihzcV0TxTTNA5OXreyIXctuHOfR50WIhqBpc8pe0Q5dcs/Uap9EVlifOI9am7zGGdGOJQ6B1MPYKo2UxgOg== + dependencies: + css-modules-loader-core "^1.1.0" + generic-names "^2.0.1" + lodash.camelcase "^4.3.0" + postcss "^7.0.1" + string-hash "^1.1.1" + postcss-nested@^4.1.1: version "4.2.1" resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.1.tgz#4bc2e5b35e3b1e481ff81e23b700da7f82a8b248" @@ -11868,6 +12689,13 @@ postcss-nesting@^7.0.0: dependencies: postcss "^7.0.2" +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + integrity sha1-757nEhLX/nWceO0WL2HtYrXLk/E= + dependencies: + postcss "^5.0.5" + postcss-normalize-charset@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" @@ -11931,6 +12759,16 @@ postcss-normalize-unicode@^4.0.1: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + integrity sha1-EI90s/L82viRov+j6kWSJ5/HgiI= + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + postcss-normalize-url@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" @@ -11949,6 +12787,14 @@ postcss-normalize-whitespace@^4.0.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + integrity sha1-7sbCpntsQSqNsgQud/6NpD+VwR0= + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + postcss-ordered-values@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" @@ -12038,6 +12884,21 @@ postcss-pseudoelements@5.0.0: dependencies: postcss "^6.0.0" +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + integrity sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM= + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + integrity sha1-aPgGlfBF0IJjqHmtJA343WT2ROo= + dependencies: + postcss "^5.0.4" + postcss-reduce-initial@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" @@ -12048,6 +12909,15 @@ postcss-reduce-initial@^4.0.3: has "^1.0.0" postcss "^7.0.0" +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + integrity sha1-/3b02CEkN7McKYpC0uFEQCV3GuE= + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + postcss-reduce-transforms@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" @@ -12081,6 +12951,15 @@ postcss-selector-not@^4.0.0: balanced-match "^1.0.0" postcss "^7.0.2" +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + integrity sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A= + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + postcss-selector-parser@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865" @@ -12115,6 +12994,16 @@ postcss-short-size@4.0.0: dependencies: postcss "^7.0.5" +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + integrity sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0= + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + postcss-svgo@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" @@ -12133,6 +13022,15 @@ postcss-trolling@0.1.7: object-assign "^4.0.1" postcss "^5.0.10" +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + integrity sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0= + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + postcss-unique-selectors@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" @@ -12142,7 +13040,7 @@ postcss-unique-selectors@^4.0.1: postcss "^7.0.0" uniqs "^2.0.0" -postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: +postcss-value-parser@^3.0.0, postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== @@ -12161,6 +13059,24 @@ postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: indexes-of "^1.0.1" uniq "^1.0.1" +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + integrity sha1-0hCd3AVbka9n/EyzsCWUZjnSryI= + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" + integrity sha1-AA29H47vIXqjaLmiEsX8QLKo8/I= + dependencies: + chalk "^1.1.3" + source-map "^0.5.6" + supports-color "^3.2.3" + postcss@7.0.21: version "7.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" @@ -12170,7 +13086,7 @@ postcss@7.0.21: source-map "^0.6.1" supports-color "^6.1.0" -postcss@^5.0.10: +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.16: version "5.2.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg== @@ -12180,7 +13096,7 @@ postcss@^5.0.10: source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.23, postcss@^6.0.9: +postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.21, postcss@^6.0.23, postcss@^6.0.9: version "6.0.23" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== @@ -12189,7 +13105,7 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.23, postcss@^6.0.9: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.23, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.23, postcss@^7.0.26, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: version "7.0.26" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587" integrity sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA== @@ -12207,6 +13123,27 @@ pre-commit@1.2.2: spawn-sync "^1.0.15" which "1.2.x" +prebuild-install@^5.3.2: + version "5.3.3" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.3.tgz#ef4052baac60d465f5ba6bf003c9c1de79b9da8e" + integrity sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.0" + mkdirp "^0.5.1" + napi-build-utils "^1.0.1" + node-abi "^2.7.0" + noop-logger "^0.1.1" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -12232,6 +13169,18 @@ prettier@1.19.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +pretty-bytes@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-3.0.1.tgz#27d0008d778063a0b4811bb35c79f1bd5d5fbccf" + integrity sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8= + dependencies: + number-is-nan "^1.0.0" + +pretty-bytes@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.3.0.tgz#f2849e27db79fb4d6cfe24764fc4134f165989f2" + integrity sha512-hjGrh+P926p4R4WbaB6OckyRtO0F0/lQBiT+0gnxjV+5kjPBrfVBFCsCLbMqVQeydvIoouYTCmmEURiH3R1Bdg== + pretty-format@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" @@ -12290,6 +13239,11 @@ promise-retry@^1.1.1: err-code "^1.0.0" retry "^0.10.0" +promise.series@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" + integrity sha1-LMfr6Vn8OmYZwEq029yeRS2GS70= + promise@7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.1.1.tgz#489654c692616b8aa55b0724fa809bb7db49c5bf" @@ -12727,6 +13681,15 @@ read@1, read@~1.0.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^3.0.1: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.5.0.tgz#465d70e6d1087f6162d079cd0b5db7fbebfd1606" + integrity sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readable-stream@~1.0.17: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -12796,6 +13759,15 @@ redent@^2.0.0: indent-string "^3.0.0" strip-indent "^2.0.0" +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + integrity sha1-dHyRTgSWFKTJz7umKYca0dKSdxY= + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + reduce-css-calc@^2.1.5, reduce-css-calc@^2.1.6: version "2.1.7" resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-2.1.7.tgz#1ace2e02c286d78abcd01fd92bfe8097ab0602c2" @@ -12804,6 +13776,13 @@ reduce-css-calc@^2.1.5, reduce-css-calc@^2.1.6: css-unit-converter "^1.1.1" postcss-value-parser "^3.3.0" +reduce-function-call@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.3.tgz#60350f7fb252c0a67eb10fd4694d16909971300f" + integrity sha512-Hl/tuV2VDgWgCSEeWMLwxLZqX7OK59eU1guxXsRKTAyeYimivsKdtcV4fu3r710tpG5GmDKDhQ0HSZLExnNmyQ== + dependencies: + balanced-match "^1.0.0" + reflect.ownkeys@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" @@ -12877,7 +13856,7 @@ regexpu-core@^1.0.0: regjsgen "^0.2.0" regjsparser "^0.1.4" -regexpu-core@^4.6.0: +regexpu-core@^4.5.4, regexpu-core@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== @@ -13125,6 +14104,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= + require-like@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa" @@ -13140,6 +14124,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +reserved-words@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" + integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE= + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -13198,6 +14187,13 @@ resolve@1.11.0: dependencies: path-parse "^1.0.6" +resolve@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== + dependencies: + path-parse "^1.0.5" + resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.1.tgz#9e018c540fcf0c427d678b9931cbf45e984bcaff" @@ -13205,7 +14201,7 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1: dependencies: path-parse "^1.0.6" -resolve@^1.14.2: +resolve@^1.14.2, resolve@^1.5.0: version "1.15.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== @@ -13319,6 +14315,168 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-alias@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-alias/-/rollup-plugin-alias-1.5.2.tgz#f15a1cc8ee0debf74ab5c2bb68a944a66b568411" + integrity sha512-ODeZXhTxpD48sfcYLAFc1BGrsXKDj7o1CSNH3uYbdK3o0NxyMmaQPTNgW+ko+am92DLC8QSTe4kyxTuEkI5S5w== + dependencies: + slash "^3.0.0" + +rollup-plugin-babel@^4.1.0-0: + version "4.3.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz#7eb5ac16d9b5831c3fd5d97e8df77ba25c72a2aa" + integrity sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + rollup-pluginutils "^2.8.1" + +rollup-plugin-buble@^0.19.4: + version "0.19.8" + resolved "https://registry.yarnpkg.com/rollup-plugin-buble/-/rollup-plugin-buble-0.19.8.tgz#f9232e2bb62a7573d04f9705c1bd6f02c2a02c6a" + integrity sha512-8J4zPk2DQdk3rxeZvxgzhHh/rm5nJkjwgcsUYisCQg1QbT5yagW+hehYEW7ZNns/NVbDCTv4JQ7h4fC8qKGOKw== + dependencies: + buble "^0.19.8" + rollup-pluginutils "^2.3.3" + +rollup-plugin-bundle-size@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-bundle-size/-/rollup-plugin-bundle-size-1.0.3.tgz#d245cd988486b4040279f9fd33f357f61673e90f" + integrity sha512-aWj0Pvzq90fqbI5vN1IvUrlf4utOqy+AERYxwWjegH1G8PzheMnrRIgQ5tkwKVtQMDP0bHZEACW/zLDF+XgfXQ== + dependencies: + chalk "^1.1.3" + maxmin "^2.1.0" + +rollup-plugin-commonjs@^9.0.0: + version "9.3.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz#2b3dddbbbded83d45c36ff101cdd29e924fd23bc" + integrity sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w== + dependencies: + estree-walker "^0.6.0" + magic-string "^0.25.2" + resolve "^1.10.0" + rollup-pluginutils "^2.6.0" + +rollup-plugin-es3@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-es3/-/rollup-plugin-es3-1.1.0.tgz#f866f91b4db839e5b475d8e4a7b9d4c77ecade14" + integrity sha512-jTMqQgMZ/tkjRW4scf4ln5c0OiTSi+Lx/IEyFd41ldgGoLvvg9AQxmVOl93+KaoyB7XRYToYjiHDvO40NPF/fA== + dependencies: + magic-string "^0.22.4" + +rollup-plugin-flow@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-flow/-/rollup-plugin-flow-1.1.1.tgz#6ce568f1dd559666b77ab76b4bae251407528db6" + integrity sha1-bOVo8d1Vlma3erdrS64lFAdSjbY= + dependencies: + flow-remove-types "^1.1.0" + rollup-pluginutils "^1.5.1" + +rollup-plugin-json@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz#7c1daf60c46bc21021ea016bd00863561a03321b" + integrity sha512-BlYk5VspvGpjz7lAwArVzBXR60JK+4EKtPkCHouAWg39obk9S61hZYJDBfMK+oitPdoe11i69TlxKlMQNFC/Uw== + dependencies: + rollup-pluginutils "^2.3.1" + +rollup-plugin-node-resolve@^4.0.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz#7d370f8d6fd3031006a0032c38262dd9be3c6250" + integrity sha512-t/64I6l7fZ9BxqD3XlX4ZeO6+5RLKyfpwE2CiPNUKa+GocPlQhf/C208ou8y3AwtNsc6bjSk/8/6y/YAyxCIvw== + dependencies: + "@types/resolve" "0.0.8" + builtin-modules "^3.1.0" + is-module "^1.0.0" + resolve "^1.10.0" + +rollup-plugin-postcss@^1.6.1: + version "1.6.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-1.6.3.tgz#18256ba66f29ecd9d42a68f4ef136b92b939ddb8" + integrity sha512-se1qftVETua9ZGViud4A4gbgEQenjYnLPvjh3kTqbBZU+f0mQ9YvJptIuzPhEk5kZAHZhkwIkk2jk+byrn1XPA== + dependencies: + chalk "^2.0.0" + concat-with-sourcemaps "^1.0.5" + cssnano "^3.10.0" + fs-extra "^5.0.0" + import-cwd "^2.1.0" + p-queue "^2.4.2" + pify "^3.0.0" + postcss "^6.0.21" + postcss-load-config "^1.2.0" + postcss-modules "^1.1.0" + promise.series "^0.2.0" + reserved-words "^0.1.2" + resolve "^1.5.0" + rollup-pluginutils "^2.0.1" + style-inject "^0.3.0" + +rollup-plugin-preserve-shebang@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/rollup-plugin-preserve-shebang/-/rollup-plugin-preserve-shebang-0.1.6.tgz#8cfc4c555d4ca87b9fbb7712869158db0e080d4a" + integrity sha512-b+psdlXZOjmlnKmL6/YAkR8PR15VPcUNXdT35urBRJ8jE6UxHyb4HXeeN3qRZJbMJJaX1eRP72XwH6IvGFh5Jw== + dependencies: + magic-string "^0.22.4" + +rollup-plugin-sizes@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-sizes/-/rollup-plugin-sizes-0.4.2.tgz#1d97ecda2667a43afbb19d801e2476f80f67d12f" + integrity sha512-6VsnWb4aBPcW++3IBMNPo4NLSheoaXh+itXk1OcaolLhYemoQFb7A9hVNocwa0j2BctdmPNFcP7UJ3g///VVaA== + dependencies: + filesize "^3.5.11" + lodash.foreach "^4.5.0" + lodash.sumby "^4.6.0" + module-details-from-path "^1.0.3" + +rollup-plugin-terser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-3.0.0.tgz#045bd7cf625ee1affcfe6971dab6fffe6fb48c65" + integrity sha512-Ed9zRD7OoCBnh0XGlEAJle5TCUsFXMLClwKzZWnS1zbNO4MelHjfCSdFZxCAdH70M40nhZ1nRrY2GZQJhSMcjA== + dependencies: + "@babel/code-frame" "^7.0.0" + jest-worker "^23.2.0" + serialize-javascript "^1.5.0" + terser "^3.8.2" + +rollup-plugin-typescript2@^0.19.0: + version "0.19.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.19.3.tgz#713063233461765f030a2baa2640905c2656164f" + integrity sha512-lsRqfBCZhMl/tq9AT5YnQvzQWzXtnx3EQYFcHD72gul7nyyoOrzx5yCEH20smpw58v6UkHHZz03FbdLEPoHWjA== + dependencies: + fs-extra "7.0.1" + resolve "1.8.1" + rollup-pluginutils "2.3.3" + tslib "1.9.3" + +rollup-pluginutils@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794" + integrity sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA== + dependencies: + estree-walker "^0.5.2" + micromatch "^2.3.11" + +rollup-pluginutils@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" + integrity sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg= + dependencies: + estree-walker "^0.2.1" + minimatch "^3.0.2" + +rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.3.3, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" + integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== + dependencies: + estree-walker "^0.6.1" + +rollup@^0.67.3: + version "0.67.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.67.4.tgz#8ed6b0993337f84ec8a0387f824fa6c197e833ec" + integrity sha512-AVuP73mkb4BBMUmksQ3Jw0jTrBTU1i7rLiUYjFxLZGb3xiFmtVEg40oByphkZAsiL0bJC3hRAJUQos/e5EBd+w== + dependencies: + "@types/estree" "0.0.39" + "@types/node" "*" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -13357,6 +14515,13 @@ rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.3: dependencies: tslib "^1.9.0" +sade@^1.4.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/sade/-/sade-1.7.0.tgz#5f16f718c80c6ba61d9031da1e22c07e1479b5d2" + integrity sha512-HSkPpZzN7q4EFN5PVW8nTfDn1rJZh4sKbPQqz33AXokIo6SMDeVJ3RA4e0ZASlnMK6PywEMZxKXudEn5dxSWew== + dependencies: + mri "^1.1.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -13436,7 +14601,7 @@ sass-loader@8.0.2: schema-utils "^2.6.1" semver "^6.3.0" -sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: +sax@>=0.6.0, sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -13568,6 +14733,11 @@ sentence-case@^2.1.0: no-case "^2.2.0" upper-case-first "^1.1.2" +serialize-javascript@^1.5.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb" + integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A== + serialize-javascript@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" @@ -13677,6 +14847,20 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= +simple-concat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" + integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= + +simple-get@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" + integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + simple-swizzle@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" @@ -13828,7 +15012,7 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6, source-map-support@~0.5.12: +source-map-support@^0.5.6, source-map-support@~0.5.10, source-map-support@~0.5.12: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -13858,11 +15042,16 @@ source-map@^0.4.2: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= +sourcemap-codec@^1.4.4: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + spawn-sync@^1.0.15: version "1.0.15" resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" @@ -14049,7 +15238,7 @@ string-argv@^0.3.0: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -string-hash@1.1.3: +string-hash@1.1.3, string-hash@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= @@ -14235,6 +15424,11 @@ strong-log-transformer@^2.0.0: minimist "^1.2.0" through "^2.3.4" +style-inject@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" + integrity sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw== + style-loader@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82" @@ -14318,6 +15512,19 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + integrity sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U= + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + svgo@^1.0.0: version "1.3.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" @@ -14403,6 +15610,16 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== +tar-fs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad" + integrity sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA== + dependencies: + chownr "^1.1.1" + mkdirp "^0.5.1" + pump "^3.0.0" + tar-stream "^2.0.0" + tar-stream@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.0.0.tgz#8829bbf83067bc0288a9089db49c56be395b6aea" @@ -14414,6 +15631,17 @@ tar-stream@2.0.0: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.0.tgz#d1aaa3661f05b38b5acc9b7020efdca5179a2cc3" + integrity sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw== + dependencies: + bl "^3.0.0" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar@4.4.10: version "4.4.10" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" @@ -14509,6 +15737,15 @@ terser@4.4.2: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^3.8.2: + version "3.17.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" + integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== + dependencies: + commander "^2.19.0" + source-map "~0.6.1" + source-map-support "~0.5.10" + terser@^4.1.2: version "4.6.0" resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.0.tgz#5c1f8d01897a718797958b8607ff7cc4a3d12055" @@ -14604,6 +15841,14 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= +tiny-glob@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.6.tgz#9e056e169d9788fe8a734dfa1ff02e9b92ed7eda" + integrity sha512-A7ewMqPu1B5PWwC3m7KVgAu96Ch5LA0w4SnEN/LbDREj/gAD0nPWboRbn8YoP9ISZXqeNAlMvKSKoEuhcfK3Pw== + dependencies: + globalyzer "^0.1.0" + globrex "^0.1.1" + tinydate@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/tinydate/-/tinydate-1.2.0.tgz#36b4bb02715f89743f3ef9073d3573d005a28d0e" @@ -14804,6 +16049,11 @@ tslib@1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== +tslib@1.9.3: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -14880,6 +16130,11 @@ typescript@3.7.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69" integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw== +typescript@>=2.8.3: + version "3.7.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" + integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== + uglify-js@^3.1.4: version "3.7.3" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.3.tgz#f918fce9182f466d5140f24bb0ff35c2d32dcc6a" @@ -15292,6 +16547,11 @@ vfile@^3.0.0: unist-util-stringify-position "^1.0.0" vfile-message "^1.0.0" +vlq@^0.2.1, vlq@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" + integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -15495,6 +16755,11 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + integrity sha1-+HfVv2SMl+WqVC+twW1qJZucEaE= + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -15505,6 +16770,11 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= +which-pm-runs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" + integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= + which@1, which@^1.2.12, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From 90015e3509fb064958b37f260ae498582b2b26bd Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Thu, 30 Jan 2020 01:13:55 -0500 Subject: [PATCH 264/321] Update note about public and pages overlap (#10287) * Updated note about public and pages overlap * Update static-file-serving.md * Update static-file-serving.md Co-authored-by: Joe Haddad --- docs/basic-features/static-file-serving.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/basic-features/static-file-serving.md b/docs/basic-features/static-file-serving.md index 6f58b8b034a2b20..ffc0525641e82cf 100644 --- a/docs/basic-features/static-file-serving.md +++ b/docs/basic-features/static-file-serving.md @@ -16,6 +16,10 @@ function MyImage() { export default MyImage ``` -> Don't name the `public` directory anything else. The name can't be changed and is the only directory that **Next.js** uses to serve static assets. +This folder is also useful for `robots.txt`, Google Site Verification, and any other static files (including `.html`)! -> If you ever add a static asset that conflicts with the name of a page in the `pages` directory, the public file will be ignored in favor of the file in `pages`. +> **Note**: Don't name the `public` directory anything else. The name cannot be changed and is the only directory used to serve static assets. + +> **Note**: Be sure to not have a static file with the same name as a file in the `pages/` directory, as this will result in an error. +> +> Read more: From 81fd704681fcac4d241e6f94bb45232ddc403e72 Mon Sep 17 00:00:00 2001 From: Paco <34928425+pacocoursey@users.noreply.github.com> Date: Wed, 29 Jan 2020 23:14:05 -0700 Subject: [PATCH 265/321] Update the default template of create-next-app (#10327) * Update the default template for create-next-app * Fix link --- .../templates/default/components/nav.js | 56 ------ .../templates/default/pages/index.js | 179 ++++++++++++++---- .../templates/default/public/zeit.svg | 10 + 3 files changed, 154 insertions(+), 91 deletions(-) delete mode 100644 packages/create-next-app/templates/default/components/nav.js create mode 100644 packages/create-next-app/templates/default/public/zeit.svg diff --git a/packages/create-next-app/templates/default/components/nav.js b/packages/create-next-app/templates/default/components/nav.js deleted file mode 100644 index 03a1a2ccaa17cb2..000000000000000 --- a/packages/create-next-app/templates/default/components/nav.js +++ /dev/null @@ -1,56 +0,0 @@ -import React from 'react' -import Link from 'next/link' - -const links = [ - { href: 'https://zeit.co/now', label: 'ZEIT' }, - { href: 'https://github.com/zeit/next.js', label: 'GitHub' }, -].map(link => ({ - ...link, - key: `nav-link-${link.href}-${link.label}`, -})) - -const Nav = () => ( - -) - -export default Nav diff --git a/packages/create-next-app/templates/default/pages/index.js b/packages/create-next-app/templates/default/pages/index.js index 36e8ea66dde04e5..77e557f4958ad57 100644 --- a/packages/create-next-app/templates/default/pages/index.js +++ b/packages/create-next-app/templates/default/pages/index.js @@ -1,85 +1,194 @@ import React from 'react' import Head from 'next/head' -import Nav from '../components/nav' const Home = () => ( -
+
- Home + Create Next App -
diff --git a/packages/create-next-app/templates/default/public/zeit.svg b/packages/create-next-app/templates/default/public/zeit.svg new file mode 100644 index 000000000000000..dd3916c5f04996d --- /dev/null +++ b/packages/create-next-app/templates/default/public/zeit.svg @@ -0,0 +1,10 @@ + + + + + + + + + + From 157a7a7b8ccc10419a534656a0db775a37575e03 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Thu, 30 Jan 2020 13:26:26 +0100 Subject: [PATCH 266/321] Upgrade with-carbon-components to built-in SCSS (#10321) Co-authored-by: Joe Haddad --- .../with-carbon-components/next.config.js | 28 ++++--------------- examples/with-carbon-components/package.json | 2 -- examples/with-carbon-components/pages/_app.js | 7 +++++ .../with-carbon-components/pages/_document.js | 17 ----------- .../with-carbon-components/pages/index.js | 2 -- .../static/myCustomTheme.scss | 3 -- .../styles/custom-theme.scss | 2 ++ .../{static => styles}/export.scss | 0 8 files changed, 14 insertions(+), 47 deletions(-) create mode 100644 examples/with-carbon-components/pages/_app.js delete mode 100644 examples/with-carbon-components/pages/_document.js delete mode 100644 examples/with-carbon-components/static/myCustomTheme.scss create mode 100644 examples/with-carbon-components/styles/custom-theme.scss rename examples/with-carbon-components/{static => styles}/export.scss (100%) diff --git a/examples/with-carbon-components/next.config.js b/examples/with-carbon-components/next.config.js index 215b0c0510badd1..67c6b64ff2bfc54 100644 --- a/examples/with-carbon-components/next.config.js +++ b/examples/with-carbon-components/next.config.js @@ -1,23 +1,5 @@ -const withSass = require('@zeit/next-sass') -const withImages = require('next-images') - -module.exports = withImages( - withSass({ - webpack(config) { - config.module.rules.push({ - test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/, - use: { - loader: 'url-loader', - options: { - limit: 100000, - publicPath: './', - outputPath: 'static/', - name: '[name].[ext]', - }, - }, - }) - - return config - }, - }) -) +module.exports = { + experimental: { + scss: true, + }, +} diff --git a/examples/with-carbon-components/package.json b/examples/with-carbon-components/package.json index c99333fb49dfcfd..3c93e60c6f24c95 100644 --- a/examples/with-carbon-components/package.json +++ b/examples/with-carbon-components/package.json @@ -10,12 +10,10 @@ }, "license": "ISC", "dependencies": { - "@zeit/next-sass": "^1.0.1", "carbon-components": "^9.6.4", "carbon-components-react": "^6.19.1", "carbon-icons": "^7.0.7", "next": "latest", - "next-images": "^0.10.6", "react": "^16.7.0", "react-dom": "^16.7.0" } diff --git a/examples/with-carbon-components/pages/_app.js b/examples/with-carbon-components/pages/_app.js new file mode 100644 index 000000000000000..790cab606bc67a2 --- /dev/null +++ b/examples/with-carbon-components/pages/_app.js @@ -0,0 +1,7 @@ +import '../styles/custom-theme.scss' + +function MyApp({ Component, pageProps }) { + return +} + +export default MyApp diff --git a/examples/with-carbon-components/pages/_document.js b/examples/with-carbon-components/pages/_document.js deleted file mode 100644 index 534bd1d59505a31..000000000000000 --- a/examples/with-carbon-components/pages/_document.js +++ /dev/null @@ -1,17 +0,0 @@ -import Document, { Head, Main, NextScript } from 'next/document' - -export default class MyDocument extends Document { - render() { - return ( - - - - - -
- - - - ) - } -} diff --git a/examples/with-carbon-components/pages/index.js b/examples/with-carbon-components/pages/index.js index 2dd762884df58e8..dd78a0423e512f7 100644 --- a/examples/with-carbon-components/pages/index.js +++ b/examples/with-carbon-components/pages/index.js @@ -1,8 +1,6 @@ import React, { Component, Fragment } from 'react' import { Button } from 'carbon-components-react' -import '../static/myCustomTheme.scss' - export default class DemoApp extends Component { render() { return ( diff --git a/examples/with-carbon-components/static/myCustomTheme.scss b/examples/with-carbon-components/static/myCustomTheme.scss deleted file mode 100644 index 4272fb81346aec6..000000000000000 --- a/examples/with-carbon-components/static/myCustomTheme.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import './export.scss'; - -@import '../node_modules/carbon-components/scss/globals/scss/styles.scss'; diff --git a/examples/with-carbon-components/styles/custom-theme.scss b/examples/with-carbon-components/styles/custom-theme.scss new file mode 100644 index 000000000000000..9b908bed73d6227 --- /dev/null +++ b/examples/with-carbon-components/styles/custom-theme.scss @@ -0,0 +1,2 @@ +@import './export.scss'; +@import '~carbon-components/scss/globals/scss/styles.scss'; diff --git a/examples/with-carbon-components/static/export.scss b/examples/with-carbon-components/styles/export.scss similarity index 100% rename from examples/with-carbon-components/static/export.scss rename to examples/with-carbon-components/styles/export.scss From 9546011ae4ce668e035391b6335a7cef4487f375 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Thu, 30 Jan 2020 13:41:40 +0100 Subject: [PATCH 267/321] v9.2.2-canary.4 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 12153ca10ddc704..0f6e1183c5b83f1 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.3" + "version": "9.2.2-canary.4" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index d37125d5946f609..377c92ceb1a15fd 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 5eff18cc1d6e6ec..04fee56d93b6ee3 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index ffd4370aa58bd3c..19a6253cd18a8df 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 5919005eb43142d..be3b5f9ee86e256 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index c32b1e2bd683d5a..647fe963873de84 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 528c22e572b168a..9cf74fb5529091a 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index a941c02c6bcc44f..e691cd6450ba7e7 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "0.0.0", + "version": "9.2.2-canary.4", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index f6176edea4b31c5..38d5cf5371babe7 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.3", + "version": "9.2.2-canary.4", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "0.0.0", + "@next/polyfill-nomodule": "9.2.2-canary.4", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From 3cd4d01d7c9b97568f86446068b5398eaf6efd92 Mon Sep 17 00:00:00 2001 From: Zhe Zhang Date: Thu, 30 Jan 2020 21:32:53 +0800 Subject: [PATCH 268/321] Fixes #10333 `with-next-seo` sample issues (#10335) --- examples/with-next-seo/pages/_app.js | 32 ++++++++------------------ examples/with-next-seo/pages/index.js | 3 +-- examples/with-next-seo/pages/jsonld.js | 1 - 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/examples/with-next-seo/pages/_app.js b/examples/with-next-seo/pages/_app.js index d1412d86fa32585..e7be87169cb655c 100644 --- a/examples/with-next-seo/pages/_app.js +++ b/examples/with-next-seo/pages/_app.js @@ -3,30 +3,16 @@ * that will apply to every page. Full info on how the default works * can be found here: https://github.com/garmeeh/next-seo#default-seo-configuration */ -import App from 'next/app' -import React from 'react' -import NextSeo from 'next-seo' +import { DefaultSeo } from 'next-seo' import SEO from '../next-seo.config' -export default class MyApp extends App { - static async getInitialProps({ Component, ctx }) { - let pageProps = {} - if (Component.getInitialProps) { - pageProps = await Component.getInitialProps(ctx) - } - - return { pageProps } - } - - render() { - const { Component, pageProps } = this.props - return ( - /* Here we call NextSeo and pass our default configuration to it */ - <> - - - - ) - } +export default function MyApp({ Component, pageProps }) { + return ( + /* Here we call NextSeo and pass our default configuration to it */ + <> + + + + ) } diff --git a/examples/with-next-seo/pages/index.js b/examples/with-next-seo/pages/index.js index 70e4aaee8daa35a..e45a06b2550d86f 100644 --- a/examples/with-next-seo/pages/index.js +++ b/examples/with-next-seo/pages/index.js @@ -1,5 +1,4 @@ -import React from 'react' -import NextSeo from 'next-seo' +import { NextSeo } from 'next-seo' import Link from 'next/link' export default () => ( diff --git a/examples/with-next-seo/pages/jsonld.js b/examples/with-next-seo/pages/jsonld.js index ab9f8fda1b98224..3800a14e7453540 100644 --- a/examples/with-next-seo/pages/jsonld.js +++ b/examples/with-next-seo/pages/jsonld.js @@ -1,4 +1,3 @@ -import React from 'react' import { ArticleJsonLd } from 'next-seo' // See all available JSON-LD here: From 74c2600b469b3402139b31affc705d8be39c5c2f Mon Sep 17 00:00:00 2001 From: Ivan Kleshnin Date: Thu, 30 Jan 2020 15:33:42 +0200 Subject: [PATCH 269/321] Fix api-routes-apollo-server-and-client-auth Example (#10334) * Fix api-routes-apollo-server-and-client-auth Example `client.resetStore()` must be called after SignIn, SignOut actions Otherwise, even the current basic auth is not working 100% of the time... For example, as caching occurs here: ``` const { data, loading } = useQuery(ViewerQuery) ``` it sometimes (race conditions!) prevents a user from signing in the current code base. Check https://github.com/apollographql/apollo-cache-persist/issues/34#issuecomment-371177206 comment for more info. * Fix api-routes-apollo-server-and-client-auth Example (linting) --- .../pages/signin.js | 4 +++- .../pages/signout.js | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signin.js b/examples/api-routes-apollo-server-and-client-auth/pages/signin.js index 04e7d140c4976e4..d5a2acfb2ab7fab 100644 --- a/examples/api-routes-apollo-server-and-client-auth/pages/signin.js +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signin.js @@ -2,7 +2,7 @@ import React from 'react' import Link from 'next/link' import { withApollo } from '../apollo/client' import gql from 'graphql-tag' -import { useMutation } from '@apollo/react-hooks' +import { useMutation, useApolloClient } from '@apollo/react-hooks' import Field from '../components/field' import { getErrorMessage } from '../lib/form' import { useRouter } from 'next/router' @@ -19,6 +19,7 @@ const SignInMutation = gql` ` function SignIn() { + const client = useApolloClient() const [signIn] = useMutation(SignInMutation) const [errorMsg, setErrorMsg] = React.useState() const router = useRouter() @@ -36,6 +37,7 @@ function SignIn() { password: passwordElement.value, }, }) + client.resetStore() if (data.signIn.user) { router.push('/') } diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signout.js b/examples/api-routes-apollo-server-and-client-auth/pages/signout.js index 7a058862257e37c..2580af34888537a 100644 --- a/examples/api-routes-apollo-server-and-client-auth/pages/signout.js +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signout.js @@ -1,6 +1,5 @@ import React from 'react' -import { useMutation } from '@apollo/react-hooks' - +import { useMutation, useApolloClient } from '@apollo/react-hooks' import gql from 'graphql-tag' import { useRouter } from 'next/router' import { withApollo } from '../apollo/client' @@ -12,16 +11,18 @@ const SignOutMutation = gql` ` function SignOut() { + const client = useApolloClient() const router = useRouter() const [signOut] = useMutation(SignOutMutation) React.useEffect(() => { if (typeof window !== 'undefined') { signOut().then(() => { + client.resetStore() router.push('/signin') }) } - }, [signOut, router]) + }, [signOut, router, client]) return

Signing out...

} From 9bbf31cae3e97f6f749e2e956ab64a0efe617549 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Thu, 30 Jan 2020 13:29:14 -0800 Subject: [PATCH 270/321] TypeScript documentation for _app.tsx (#10345) * TypeScript documentation for _app.tsx * Use relative URL * Use relative URL * Update docs/basic-features/typescript.md Co-Authored-By: Luis Alvarez D. * Update docs/basic-features/typescript.md Co-Authored-By: Luis Alvarez D. Co-authored-by: Luis Alvarez D. --- docs/advanced-features/custom-app.md | 5 +++++ docs/basic-features/typescript.md | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/docs/advanced-features/custom-app.md b/docs/advanced-features/custom-app.md index df41c6f12adb942..1eba8e6fec1c714 100644 --- a/docs/advanced-features/custom-app.md +++ b/docs/advanced-features/custom-app.md @@ -10,6 +10,7 @@ Next.js uses the `App` component to initialize pages. You can override it and co - Keeping state when navigating pages - Custom error handling using `componentDidCatch` - Inject additional data into pages +- [Add global CSS](/docs/basic-features/built-in-css-support#adding-a-global-stylesheet) To override the default `App`, create the file `./pages/_app.js` as shown below: @@ -41,6 +42,10 @@ The `Component` prop is the active `page`, so whenever you navigate between rout > Adding a custom `getInitialProps` in your `App` will disable [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md). +### TypeScript + +If you’re using TypeScript, take a look at [our TypeScript documentation](/docs/basic-features/typescript#custom-app). + ## Related For more information on what to do next, we recommend the following sections: diff --git a/docs/basic-features/typescript.md b/docs/basic-features/typescript.md index f0f9a6d4700c70c..6abba785392c211 100644 --- a/docs/basic-features/typescript.md +++ b/docs/basic-features/typescript.md @@ -118,3 +118,17 @@ export default (req: NextApiRequest, res: NextApiResponse) => { res.status(200).json({ name: 'John Doe' }) } ``` + +## Custom `App` + +If you have a [custom `App` ](/docs/advanced-features/custom-app), you can use the built-in type `AppProps`, like so: + +```ts +import { AppProps } from 'next/app' + +function MyApp({ Component, pageProps }: AppProps) { + return +} + +export default MyApp +``` From d04d9766986e3890a0ad66479b06e3fd00bbed6b Mon Sep 17 00:00:00 2001 From: Ivan Kleshnin Date: Fri, 31 Jan 2020 17:27:21 +0200 Subject: [PATCH 271/321] Improve api-routes-apollo-server-and-client-auth Example (#10358) 1. Prevent possible race conditions of cache pruning, refetching and redirects 2. Note: the original code has the following defect. SignOut action restarts the dev server effectively resetting the memory and erasing all the "registered users" data. You have to SignUp again after SignOut. I'm not sure how to properly fix it a.t.m --- .../pages/signin.js | 4 ++-- .../pages/signout.js | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signin.js b/examples/api-routes-apollo-server-and-client-auth/pages/signin.js index d5a2acfb2ab7fab..766a4bd2ca41542 100644 --- a/examples/api-routes-apollo-server-and-client-auth/pages/signin.js +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signin.js @@ -31,15 +31,15 @@ function SignIn() { const passwordElement = event.currentTarget.elements.password try { + await client.resetStore() const { data } = await signIn({ variables: { email: emailElement.value, password: passwordElement.value, }, }) - client.resetStore() if (data.signIn.user) { - router.push('/') + await router.push('/') } } catch (error) { setErrorMsg(getErrorMessage(error)) diff --git a/examples/api-routes-apollo-server-and-client-auth/pages/signout.js b/examples/api-routes-apollo-server-and-client-auth/pages/signout.js index 2580af34888537a..0d18c898278162b 100644 --- a/examples/api-routes-apollo-server-and-client-auth/pages/signout.js +++ b/examples/api-routes-apollo-server-and-client-auth/pages/signout.js @@ -16,12 +16,11 @@ function SignOut() { const [signOut] = useMutation(SignOutMutation) React.useEffect(() => { - if (typeof window !== 'undefined') { - signOut().then(() => { - client.resetStore() + signOut().then(() => { + client.resetStore().then(() => { router.push('/signin') }) - } + }) }, [signOut, router, client]) return

Signing out...

From 73972577e1dc129ab89678f804706aef26c44ae9 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 31 Jan 2020 18:57:58 -0600 Subject: [PATCH 272/321] Increase watch limit for GitHub actions testing (#10367) --- .github/workflows/build_test_deploy.yml | 4 ++++ .github/workflows/test_react_next.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 4fd8670ea8d6dd7..e38d430f6ac9cd9 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -49,6 +49,10 @@ jobs: with: path: '.' key: ${{ github.sha }} + + # TODO: remove after we fix watchpack watching too much + - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + - run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 testsPass: diff --git a/.github/workflows/test_react_next.yml b/.github/workflows/test_react_next.yml index 6718973fdeafa6d..443b0e25af51844 100644 --- a/.github/workflows/test_react_next.yml +++ b/.github/workflows/test_react_next.yml @@ -47,4 +47,7 @@ jobs: - run: yarn upgrade react@next react-dom@next -W --dev + # TODO: remove after we fix watchpack watching too much + - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + - run: node run-tests.js --timings -g ${{ matrix.group }}/6 -c 3 From 9e6689e6db17b1cc2673c42cfd33d21cb4130082 Mon Sep 17 00:00:00 2001 From: Justin Elias Date: Fri, 31 Jan 2020 17:58:46 -0700 Subject: [PATCH 273/321] added fix for #8893 (#10370) --- examples/with-firebase-hosting/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-firebase-hosting/package.json b/examples/with-firebase-hosting/package.json index 7dccb587763cc34..59c326ab39662ee 100644 --- a/examples/with-firebase-hosting/package.json +++ b/examples/with-firebase-hosting/package.json @@ -10,7 +10,7 @@ "preserve": "npm run build-public && npm run build-funcs && npm run build-app && npm run copy-deps && npm run install-deps", "serve": "cross-env NODE_ENV=production firebase serve", "predeploy": "npm run build-public && npm run build-funcs && npm run build-app && npm run copy-deps", - "deploy": "firebase deploy", + "deploy": "NODE_ENV=production firebase deploy", "clean": "rimraf \"dist/functions/**\" && rimraf \"dist/public\"", "build-public": "cpx \"src/public/**/*.*\" \"dist/public\" -C", "build-funcs": "babel \"src/functions\" --out-dir \"dist/functions\"", From e63d82216101b22047834c4d01fa449a302b6938 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 31 Jan 2020 19:19:59 -0600 Subject: [PATCH 274/321] Make sure to not override initial navigation when refreshing static page's query (#10353) * Add failing case * Make sure to only refresh query if still on initial page Co-authored-by: Joe Haddad --- packages/next/client/index.js | 5 +++-- .../pages/[name]/on-mount-redir.js | 14 +++++++++++++ .../dynamic-routing/test/index.test.js | 20 ++++++++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 test/integration/dynamic-routing/pages/[name]/on-mount-redir.js diff --git a/packages/next/client/index.js b/packages/next/client/index.js index 61c75f7e6e901f8..60e64d0cdf7feff 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -99,9 +99,10 @@ class Container extends React.Component { // If page was exported and has a querystring // If it's a dynamic route or has a querystring if ( - (data.nextExport && + router.isSsr && + ((data.nextExport && (isDynamicRoute(router.pathname) || location.search)) || - (Component && Component.__N_SSG && location.search) + (Component && Component.__N_SSG && location.search)) ) { // update query on mount for exported pages router.replace( diff --git a/test/integration/dynamic-routing/pages/[name]/on-mount-redir.js b/test/integration/dynamic-routing/pages/[name]/on-mount-redir.js new file mode 100644 index 000000000000000..0194e310ce4c436 --- /dev/null +++ b/test/integration/dynamic-routing/pages/[name]/on-mount-redir.js @@ -0,0 +1,14 @@ +import React from 'react' +import Router from 'next/router' + +class Page extends React.Component { + componentDidMount() { + Router.push('/') + } + + render() { + return

redirecting..

+ } +} + +export default Page diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index 4edbcae89075d77..ec1d8ba48dd2e06 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -83,6 +83,12 @@ function runTests(dev) { } }) + it('should allow calling Router.push on mount successfully', async () => { + const browser = await webdriver(appPort, '/post-1/on-mount-redir') + waitFor(2000) + expect(await browser.elementByCss('h3').text()).toBe('My blog') + }) + // it('should navigate optional dynamic page', async () => { // let browser // try { @@ -456,6 +462,12 @@ function runTests(dev) { page: '/[name]/comments', regex: normalizeRegEx('^\\/([^\\/]+?)\\/comments(?:\\/)?$'), }, + { + page: '/[name]/on-mount-redir', + regex: normalizeRegEx( + '^\\/([^\\/]+?)\\/on\\-mount\\-redir(?:\\/)?$' + ), + }, { page: '/[name]/[comment]', regex: normalizeRegEx('^\\/([^\\/]+?)\\/([^\\/]+?)(?:\\/)?$'), @@ -507,7 +519,10 @@ describe('Dynamic Routing', () => { }) describe('serverless mode', () => { + let origNextConfig + beforeAll(async () => { + origNextConfig = await fs.readFile(nextConfig, 'utf8') await fs.writeFile( nextConfig, ` @@ -526,7 +541,10 @@ describe('Dynamic Routing', () => { appPort = await findPort() app = await nextStart(appDir, appPort) }) - afterAll(() => killApp(app)) + afterAll(async () => { + await fs.writeFile(nextConfig, origNextConfig) + await killApp(app) + }) runTests() }) }) From afc278f56787762795368800ea79f8e7cccce612 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 1 Feb 2020 07:24:22 -0600 Subject: [PATCH 275/321] Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test --- errors/serverless-publicRuntimeConfig.md | 23 ------ packages/next/build/entries.ts | 10 +++ .../webpack/loaders/next-serverless-loader.ts | 30 ++++++- packages/next/next-server/server/config.ts | 14 ---- .../test/index.test.js | 2 +- .../pages/config.js | 5 ++ .../test/index.test.js | 79 +++++++++++++++++-- 7 files changed, 117 insertions(+), 46 deletions(-) delete mode 100644 errors/serverless-publicRuntimeConfig.md create mode 100644 test/integration/serverless-runtime-configs/pages/config.js diff --git a/errors/serverless-publicRuntimeConfig.md b/errors/serverless-publicRuntimeConfig.md deleted file mode 100644 index 800a1e664049a26..000000000000000 --- a/errors/serverless-publicRuntimeConfig.md +++ /dev/null @@ -1,23 +0,0 @@ -# Using `publicRuntimeConfig` or `serverRuntimeConfig` with `target` set to `serverless` - -#### Why This Error Occurred - -In the `serverless` target environment `next.config.js` is not loaded, so we don't support `publicRuntimeConfig` or `serverRuntimeConfig`. - -#### Possible Ways to Fix It - -Use config option `env` to set **build time** variables like such: - -```js -// next.config.js -module.exports = { - env: { - special: 'value', - }, -} -``` - -```js -// pages/index.js -console.log(process.env.special) // value -``` diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index a518b7b9877c69c..c8385cfa4d818ee 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -67,6 +67,10 @@ export function createEntrypoints( const client: WebpackEntrypoints = {} const server: WebpackEntrypoints = {} + const hasRuntimeConfig = + Object.keys(config.publicRuntimeConfig).length > 0 || + Object.keys(config.serverRuntimeConfig).length > 0 + const defaultServerlessOptions = { absoluteAppPath: pages['/_app'], absoluteDocumentPath: pages['/_document'], @@ -77,6 +81,12 @@ export function createEntrypoints( generateEtags: config.generateEtags, canonicalBase: config.canonicalBase, basePath: config.experimental.basePath, + runtimeConfig: hasRuntimeConfig + ? JSON.stringify({ + publicRuntimeConfig: config.publicRuntimeConfig, + serverRuntimeConfig: config.serverRuntimeConfig, + }) + : '', } Object.keys(pages).forEach(page => { diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index 9db7d8c93dbf6ea..d90d7ef0e69126c 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -22,6 +22,7 @@ export type ServerlessLoaderQuery = { generateEtags: string canonicalBase: string basePath: string + runtimeConfig: string } const nextServerlessLoader: loader.Loader = function() { @@ -37,6 +38,7 @@ const nextServerlessLoader: loader.Loader = function() { absoluteErrorPath, generateEtags, basePath, + runtimeConfig, }: ServerlessLoaderQuery = typeof this.query === 'string' ? parse(this.query.substr(1)) : this.query @@ -50,6 +52,19 @@ const nextServerlessLoader: loader.Loader = function() { const escapedBuildId = escapeRegexp(buildId) const pageIsDynamicRoute = isDynamicRoute(page) + const runtimeConfigImports = runtimeConfig + ? ` + import { setConfig } from 'next/dist/next-server/lib/runtime-config' + ` + : '' + + const runtimeConfigSetter = runtimeConfig + ? ` + const runtimeConfig = ${runtimeConfig} + setConfig(runtimeConfig) + ` + : 'const runtimeConfig = {}' + const dynamicRouteImports = pageIsDynamicRoute ? ` import { getRouteMatcher } from 'next/dist/next-server/lib/router/utils/route-matcher'; @@ -123,9 +138,14 @@ const nextServerlessLoader: loader.Loader = function() { import initServer from 'next-plugin-loader?middleware=on-init-server!' import onError from 'next-plugin-loader?middleware=on-error-server!' ${rewriteImports} + ${runtimeConfigImports} ${dynamicRouteMatcher} ${handleRewrites} + ${ + /* this needs to be called before importing the API method */ + runtimeConfigSetter + } export default async (req, res) => { try { @@ -177,9 +197,16 @@ const nextServerlessLoader: loader.Loader = function() { import Document from '${absoluteDocumentPath}'; import Error from '${absoluteErrorPath}'; import App from '${absoluteAppPath}'; - import * as ComponentInfo from '${absolutePagePath}'; ${dynamicRouteImports} ${rewriteImports} + ${runtimeConfigImports} + + ${ + /* this needs to be called before importing the component */ + runtimeConfigSetter + } + + const ComponentInfo = require('${absolutePagePath}') const Component = ComponentInfo.default export default Component @@ -214,6 +241,7 @@ const nextServerlessLoader: loader.Loader = function() { canonicalBase: "${canonicalBase}", buildId: "${buildId}", assetPrefix: "${assetPrefix}", + runtimeConfig: runtimeConfig.publicRuntimeConfig || {}, ..._renderOpts } let _nextData = false diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index eee2087ff1f03e7..ad975b8414d6471 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -254,20 +254,6 @@ export default function loadConfig( : canonicalBase) || '' } - if ( - userConfig.target && - userConfig.target !== 'server' && - ((userConfig.publicRuntimeConfig && - Object.keys(userConfig.publicRuntimeConfig).length !== 0) || - (userConfig.serverRuntimeConfig && - Object.keys(userConfig.serverRuntimeConfig).length !== 0)) - ) { - // TODO: change error message tone to "Only compatible with [fat] server mode" - throw new Error( - 'Cannot use publicRuntimeConfig or serverRuntimeConfig with target=serverless https://err.sh/zeit/next.js/serverless-publicRuntimeConfig' - ) - } - if ( userConfig.experimental?.reactMode && !reactModes.includes(userConfig.experimental.reactMode) diff --git a/test/integration/handle-non-page-in-pages/test/index.test.js b/test/integration/handle-non-page-in-pages/test/index.test.js index 10cb24fc467b48c..b18c13ea451aa77 100644 --- a/test/integration/handle-non-page-in-pages/test/index.test.js +++ b/test/integration/handle-non-page-in-pages/test/index.test.js @@ -11,7 +11,7 @@ describe('Handle non-page in pages when target: serverless', () => { const { stderr } = await nextBuild(appDir, [], { stderr: true }) expect(stderr).toMatch( - /webpack build failed: found page without a React Component as default export in/ + /found page without a React Component as default export in/ ) expect(stderr).toMatch(/pages\/invalid/) }) diff --git a/test/integration/serverless-runtime-configs/pages/config.js b/test/integration/serverless-runtime-configs/pages/config.js new file mode 100644 index 000000000000000..45ace3c4a933763 --- /dev/null +++ b/test/integration/serverless-runtime-configs/pages/config.js @@ -0,0 +1,5 @@ +import getConfig from 'next/config' + +const config = getConfig() + +export default () =>

{JSON.stringify(config)}

diff --git a/test/integration/serverless-runtime-configs/test/index.test.js b/test/integration/serverless-runtime-configs/test/index.test.js index d14e63635272157..81d79a75a2e9222 100644 --- a/test/integration/serverless-runtime-configs/test/index.test.js +++ b/test/integration/serverless-runtime-configs/test/index.test.js @@ -2,7 +2,15 @@ /* global jasmine */ import fs from 'fs-extra' import { join } from 'path' -import { nextBuild } from 'next-test-utils' +import { + nextBuild, + findPort, + nextStart, + killApp, + renderViaHTTP, +} from 'next-test-utils' +import cheerio from 'cheerio' +import webdriver from 'next-webdriver' const appDir = join(__dirname, '../') const nextConfigPath = join(appDir, 'next.config.js') @@ -14,7 +22,7 @@ describe('Serverless runtime configs', () => { beforeAll(() => cleanUp()) afterAll(() => cleanUp()) - it('should error on usage of publicRuntimeConfig', async () => { + it('should not error on usage of publicRuntimeConfig', async () => { await fs.writeFile( nextConfigPath, `module.exports = { @@ -25,13 +33,16 @@ describe('Serverless runtime configs', () => { }` ) - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) - expect(stderr).toMatch( + const { stderr, code } = await nextBuild(appDir, undefined, { + stderr: true, + }) + expect(code).toBe(0) + expect(stderr).not.toMatch( /Cannot use publicRuntimeConfig or serverRuntimeConfig/ ) }) - it('should error on usage of serverRuntimeConfig', async () => { + it('should not error on usage of serverRuntimeConfig', async () => { await fs.writeFile( nextConfigPath, `module.exports = { @@ -42,9 +53,63 @@ describe('Serverless runtime configs', () => { }` ) - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) - expect(stderr).toMatch( + const { stderr, code } = await nextBuild(appDir, undefined, { + stderr: true, + }) + expect(code).toBe(0) + expect(stderr).not.toMatch( /Cannot use publicRuntimeConfig or serverRuntimeConfig/ ) }) + + it('should support runtime configs in serverless mode', async () => { + await fs.writeFile( + nextConfigPath, + `module.exports = { + target: 'serverless', + serverRuntimeConfig: { + hello: 'world' + }, + publicRuntimeConfig: { + another: 'thing' + } + }` + ) + + await nextBuild(appDir, [], { stderr: true, stdout: true }) + const appPort = await findPort() + const app = await nextStart(appDir, appPort, { + onStdout: console.log, + onStderr: console.log, + }) + + const browser = await webdriver(appPort, '/config') + + const clientHTML = await browser.eval(`document.documentElement.innerHTML`) + const ssrHTML = await renderViaHTTP(appPort, '/config') + + await killApp(app) + await fs.remove(nextConfigPath) + + const ssr$ = cheerio.load(ssrHTML) + const client$ = cheerio.load(clientHTML) + + const ssrConfig = ssr$('#config').text() + const clientConfig = client$('#config').text() + + expect(JSON.parse(ssrConfig)).toEqual({ + publicRuntimeConfig: { + another: 'thing', + }, + serverRuntimeConfig: { + hello: 'world', + }, + }) + expect(JSON.parse(clientConfig)).toEqual({ + publicRuntimeConfig: { + another: 'thing', + }, + serverRuntimeConfig: {}, + }) + }) }) From 1674f2de1e435fdbf352c8d2f8ba16993d028a39 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 1 Feb 2020 08:14:50 -0600 Subject: [PATCH 276/321] Add check that dynamic route is API route in handleApiRequest (#10360) * Add failing test case * Add check that dynamic route is API route in handleApiRequest --- packages/next/next-server/server/next-server.ts | 2 +- test/integration/dynamic-routing/test/index.test.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 062e51422cf45b7..451fdedf07b372c 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -644,7 +644,7 @@ export default class Server { if (!pageFound && this.dynamicRoutes) { for (const dynamicRoute of this.dynamicRoutes) { params = dynamicRoute.match(pathname) - if (params) { + if (dynamicRoute.page.startsWith('/api') && params) { page = dynamicRoute.page pageFound = true break diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index ec1d8ba48dd2e06..7796b18f86c3d74 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -61,6 +61,12 @@ function runTests(dev) { expect(html).toMatch(/blog post.*321.*comment.*123/i) }) + it('should not error when requesting dynamic page with /api', async () => { + const res = await fetchViaHTTP(appPort, '/api') + expect(res.status).toBe(200) + expect(await res.text()).toMatch(/this is.*?api/i) + }) + it('should render dynamic route with query', async () => { const browser = await webdriver(appPort, '/') await browser.elementByCss('#view-post-1-with-query').click() From db90ffe1ea7fe4c3dde86fce8e45470c803a7063 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 1 Feb 2020 08:47:42 -0600 Subject: [PATCH 277/321] Implement experimental pages/404.js for custom 404 page (#10329) * Implement experimental pages/404.js for custom 404 page * Make sure to show error for getInitialProps in pages/404 in dev mode also * Update routes-manifest tests for new value * Make sure page404 is boolean in routes-manifest * Rename variables for consistency * Make sure to only use 404 page for 404 error --- errors/404-get-initial-props.md | 15 ++ packages/next/build/index.ts | 28 ++- packages/next/lib/constants.ts | 2 + packages/next/next-server/server/config.ts | 1 + .../next/next-server/server/next-server.ts | 40 ++- packages/next/next-server/server/render.tsx | 7 + packages/next/server/next-dev-server.ts | 10 + test/integration/404-page/next.config.js | 5 + test/integration/404-page/pages/404.js | 2 + test/integration/404-page/pages/err.js | 5 + test/integration/404-page/pages/index.js | 1 + test/integration/404-page/test/index.test.js | 233 ++++++++++++++++++ .../custom-routes/test/index.test.js | 1 + .../dynamic-routing/test/index.test.js | 1 + 14 files changed, 340 insertions(+), 11 deletions(-) create mode 100644 errors/404-get-initial-props.md create mode 100644 test/integration/404-page/next.config.js create mode 100644 test/integration/404-page/pages/404.js create mode 100644 test/integration/404-page/pages/err.js create mode 100644 test/integration/404-page/pages/index.js create mode 100644 test/integration/404-page/test/index.test.js diff --git a/errors/404-get-initial-props.md b/errors/404-get-initial-props.md new file mode 100644 index 000000000000000..dc0e1ecb3510c7f --- /dev/null +++ b/errors/404-get-initial-props.md @@ -0,0 +1,15 @@ +# 404.js Cannot Have getInitialProps + +#### Why This Error Occurred + +In your `404.js` page you added `getInitialProps` or `getServerProps` which is not allowed as this prevents the page from being static and `404.js` is meant to provide more flexibility for a static 404 page. Having a static 404 page is the most ideal as this page can be served very often and if not static puts extra strain on your server and more invocations for serverless functions which increase the cost of hosting your site unnecessarily. + +#### Possible Ways to Fix It + +Remove `getInitialProps` from `404.js` and make sure no HOC's used in `404.js` attach `getInitialProps`. + +If you want to fetch data for your `404.js` page move it to a client side fetch inside of `componentDidMount` or `useEffect(() => {}, [])`. + +### Useful Links + +- [Automatic Static Optimization](https://nextjs.org/docs/advanced-features/automatic-static-optimization) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 67cbdc381bf684e..f2ec3a9ce06e17f 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -16,7 +16,10 @@ import checkCustomRoutes, { Rewrite, Header, } from '../lib/check-custom-routes' -import { PUBLIC_DIR_MIDDLEWARE_CONFLICT } from '../lib/constants' +import { + PUBLIC_DIR_MIDDLEWARE_CONFLICT, + PAGES_404_GET_INITIAL_PROPS_ERROR, +} from '../lib/constants' import { findPagesDir } from '../lib/find-pages-dir' import { recursiveDelete } from '../lib/recursive-delete' import { recursiveReadDir } from '../lib/recursive-readdir' @@ -202,6 +205,10 @@ export default async function build(dir: string, conf = null): Promise { const hasCustomErrorPage = mappedPages['/_error'].startsWith( 'private-next-pages' ) + const hasPages404 = + config.experimental.pages404 && + mappedPages['/404'] && + mappedPages['/404'].startsWith('private-next-pages') if (hasPublicDir) { try { @@ -262,6 +269,7 @@ export default async function build(dir: string, conf = null): Promise { const routesManifestPath = path.join(distDir, ROUTES_MANIFEST) const routesManifest: any = { version: 1, + pages404: !!hasPages404, basePath: config.experimental.basePath, redirects: redirects.map(r => buildCustomRoute(r, 'redirect')), rewrites: rewrites.map(r => buildCustomRoute(r, 'rewrite')), @@ -511,6 +519,17 @@ export default async function build(dir: string, conf = null): Promise { staticPages.add(page) isStatic = true } + + if (hasPages404 && page === '/404') { + if (!result.isStatic) { + throw new Error(PAGES_404_GET_INITIAL_PROPS_ERROR) + } + // we need to ensure the 404 lambda is present since we use + // it when _app has getInitialProps + if (customAppGetInitialProps) { + staticPages.delete(page) + } + } } catch (err) { if (err.message !== 'INVALID_DEFAULT_EXPORT') throw err invalidPages.add(page) @@ -569,8 +588,7 @@ export default async function build(dir: string, conf = null): Promise { // Only export the static 404 when there is no /_error present const useStatic404 = !customAppGetInitialProps && - !hasCustomErrorPage && - config.experimental.static404 + ((!hasCustomErrorPage && config.experimental.static404) || hasPages404) if (invalidPages.size > 0) { throw new Error( @@ -640,7 +658,9 @@ export default async function build(dir: string, conf = null): Promise { }) if (useStatic404) { - defaultMap['/_errors/404'] = { page: '/_error' } + defaultMap['/_errors/404'] = { + page: hasPages404 ? '/404' : '/_error', + } } return defaultMap diff --git a/packages/next/lib/constants.ts b/packages/next/lib/constants.ts index 1bf62bb57e918f4..4391cbc755c04b2 100644 --- a/packages/next/lib/constants.ts +++ b/packages/next/lib/constants.ts @@ -29,3 +29,5 @@ export const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps w export const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with unstable_getServerProps. Please remove one or the other` export const SERVER_PROPS_SSG_CONFLICT = `You can not use unstable_getStaticProps with unstable_getServerProps. To use SSG, please remove your unstable_getServerProps` + +export const PAGES_404_GET_INITIAL_PROPS_ERROR = `\`pages/404\` can not have getInitialProps/getServerProps, https://err.sh/zeit/next.js/404-get-initial-props` diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index ad975b8414d6471..4416fbd277dd667 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -53,6 +53,7 @@ const defaultConfig: { [key: string]: any } = { workerThreads: false, basePath: '', static404: true, + pages404: false, }, future: { excludeDefaultMomentLocales: false, diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 451fdedf07b372c..a67d149c04a3bea 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -101,6 +101,7 @@ export default class Server { documentMiddlewareEnabled: boolean hasCssMode: boolean dev?: boolean + pages404?: boolean } private compression?: Middleware private onErrorMiddleware?: ({ err }: { err: Error }) => Promise @@ -148,6 +149,7 @@ export default class Server { staticMarkup, buildId: this.buildId, generateEtags, + pages404: this.nextConfig.experimental.pages404, } // Only the `publicRuntimeConfig` key is exposed to the client side @@ -857,6 +859,11 @@ export default class Server { result: LoadComponentsReturnType, opts: any ): Promise { + // we need to ensure the status code if /404 is visited directly + if (this.nextConfig.experimental.pages404 && pathname === '/404') { + res.statusCode = 404 + } + // handle static page if (typeof result.Component === 'string') { return result.Component @@ -1115,13 +1122,32 @@ export default class Server { ) { let result: null | LoadComponentsReturnType = null + const { static404, pages404 } = this.nextConfig.experimental + const is404 = res.statusCode === 404 + let using404Page = false + // use static 404 page if available and is 404 response - if (this.nextConfig.experimental.static404 && res.statusCode === 404) { - try { - result = await this.findPageComponents('/_errors/404') - } catch (err) { - if (err.code !== 'ENOENT') { - throw err + if (is404) { + if (static404) { + try { + result = await this.findPageComponents('/_errors/404') + } catch (err) { + if (err.code !== 'ENOENT') { + throw err + } + } + } + + // use 404 if /_errors/404 isn't available which occurs + // during development and when _app has getInitialProps + if (!result && pages404) { + try { + result = await this.findPageComponents('/404') + using404Page = true + } catch (err) { + if (err.code !== 'ENOENT') { + throw err + } } } } @@ -1135,7 +1161,7 @@ export default class Server { html = await this.renderToHTMLWithComponents( req, res, - '/_error', + using404Page ? '/404' : '/_error', query, result, { diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index cbc72b44a7cbca5..50eaad0e69ab273 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -28,6 +28,7 @@ import { SSG_GET_INITIAL_PROPS_CONFLICT, SERVER_PROPS_GET_INIT_PROPS_CONFLICT, SERVER_PROPS_SSG_CONFLICT, + PAGES_404_GET_INITIAL_PROPS_ERROR, } from '../../lib/constants' import { AMP_RENDER_TARGET } from '../lib/constants' import { LoadComponentsReturnType, ManifestItem } from './load-components' @@ -135,6 +136,7 @@ type RenderOpts = LoadComponentsReturnType & { documentMiddlewareEnabled?: boolean isDataReq?: boolean params?: ParsedUrlQuery + pages404?: boolean } function renderDocument( @@ -263,6 +265,7 @@ export async function renderToHTML( unstable_getServerProps, isDataReq, params, + pages404, } = renderOpts const callMiddleware = async (method: string, args: any[], props = false) => { @@ -363,6 +366,10 @@ export async function renderToHTML( req.url = pathname renderOpts.nextExport = true } + + if (pages404 && pathname === '/404' && !isAutoExport) { + throw new Error(PAGES_404_GET_INITIAL_PROPS_ERROR) + } } if (isAutoExport) renderOpts.autoExport = true if (isSpr) renderOpts.nextExport = false diff --git a/packages/next/server/next-dev-server.ts b/packages/next/server/next-dev-server.ts index c2a30ecf61e3a3b..248b38f80acbe17 100644 --- a/packages/next/server/next-dev-server.ts +++ b/packages/next/server/next-dev-server.ts @@ -432,6 +432,16 @@ export default class DevServer extends Server { }) } catch (err) { if (err.code === 'ENOENT') { + if (this.nextConfig.experimental.pages404) { + try { + await this.hotReloader!.ensurePage('/404') + } catch (err) { + if (err.code !== 'ENOENT') { + throw err + } + } + } + res.statusCode = 404 return this.renderErrorToHTML(null, req, res, pathname, query) } diff --git a/test/integration/404-page/next.config.js b/test/integration/404-page/next.config.js new file mode 100644 index 000000000000000..5a9fb106c667a05 --- /dev/null +++ b/test/integration/404-page/next.config.js @@ -0,0 +1,5 @@ +module.exports = { + experimental: { + pages404: true, + }, +} diff --git a/test/integration/404-page/pages/404.js b/test/integration/404-page/pages/404.js new file mode 100644 index 000000000000000..e5e684d08cdc958 --- /dev/null +++ b/test/integration/404-page/pages/404.js @@ -0,0 +1,2 @@ +const page = () => 'custom 404 page' +export default page diff --git a/test/integration/404-page/pages/err.js b/test/integration/404-page/pages/err.js new file mode 100644 index 000000000000000..938b5e49ac2963f --- /dev/null +++ b/test/integration/404-page/pages/err.js @@ -0,0 +1,5 @@ +const page = () => 'custom 404 page' +page.getInitialProps = () => { + throw new Error('oops') +} +export default page diff --git a/test/integration/404-page/pages/index.js b/test/integration/404-page/pages/index.js new file mode 100644 index 000000000000000..f6c15d1f66e8a6d --- /dev/null +++ b/test/integration/404-page/pages/index.js @@ -0,0 +1 @@ +export default () => 'hello from index' diff --git a/test/integration/404-page/test/index.test.js b/test/integration/404-page/test/index.test.js new file mode 100644 index 000000000000000..e6c28cee3871ac8 --- /dev/null +++ b/test/integration/404-page/test/index.test.js @@ -0,0 +1,233 @@ +/* eslint-env jest */ +/* global jasmine */ +import fs from 'fs-extra' +import { join } from 'path' +import { + killApp, + findPort, + launchApp, + nextStart, + nextBuild, + renderViaHTTP, + fetchViaHTTP, + waitFor, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 + +const appDir = join(__dirname, '../') +const pages404 = join(appDir, 'pages/404.js') +const appPage = join(appDir, 'pages/_app.js') +const nextConfig = join(appDir, 'next.config.js') + +let nextConfigContent +let buildId +let appPort +let app + +const runTests = (mode = 'server') => { + it('should use pages/404', async () => { + const html = await renderViaHTTP(appPort, '/abc') + expect(html).toContain('custom 404 page') + }) + + it('should set correct status code with pages/404', async () => { + const res = await fetchViaHTTP(appPort, '/abc') + expect(res.status).toBe(404) + }) + + it('should not error when visited directly', async () => { + const res = await fetchViaHTTP(appPort, '/404') + expect(res.status).toBe(404) + expect(await res.text()).toContain('custom 404 page') + }) + + it('should render _error for a 500 error still', async () => { + const html = await renderViaHTTP(appPort, '/err') + expect(html).not.toContain('custom 404 page') + expect(html).toContain(mode === 'dev' ? 'oops' : 'Internal Server Error') + }) + + if (mode !== 'dev') { + it('should output _errors/404.html during build', async () => { + expect( + await fs.exists( + join( + appDir, + '.next', + mode === 'serverless' + ? 'serverless/pages' + : `server/static/${buildId}/pages`, + '_errors/404.html' + ) + ) + ).toBe(true) + }) + + it('should add _errors/404 to pages-manifest correctly', async () => { + const manifest = await fs.readJSON( + join(appDir, '.next', mode, 'pages-manifest.json') + ) + expect('/_errors/404' in manifest).toBe(true) + }) + } +} + +describe('404 Page Support', () => { + describe('dev mode', () => { + beforeAll(async () => { + appPort = await findPort() + app = await launchApp(appDir, appPort) + buildId = 'development' + }) + afterAll(() => killApp(app)) + + runTests('dev') + }) + + describe('server mode', () => { + beforeAll(async () => { + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') + }) + afterAll(() => killApp(app)) + + runTests('server') + }) + + describe('serverless mode', () => { + beforeAll(async () => { + nextConfigContent = await fs.readFile(nextConfig, 'utf8') + await fs.writeFile( + nextConfig, + ` + module.exports = { + target: 'serverless', + experimental: { + pages404: true + } + } + ` + ) + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') + }) + afterAll(async () => { + await fs.writeFile(nextConfig, nextConfigContent) + await killApp(app) + }) + + runTests('serverless') + }) + + it('falls back to _error correctly without pages/404', async () => { + await fs.move(pages404, `${pages404}.bak`) + appPort = await findPort() + app = await launchApp(appDir, appPort) + const res = await fetchViaHTTP(appPort, '/abc') + + await fs.move(`${pages404}.bak`, pages404) + await killApp(app) + + expect(res.status).toBe(404) + expect(await res.text()).toContain('This page could not be found') + }) + + it('shows error with getInitialProps in pages/404 build', async () => { + await fs.move(pages404, `${pages404}.bak`) + await fs.writeFile( + pages404, + ` + const page = () => 'custom 404 page' + page.getInitialProps = () => ({ a: 'b' }) + export default page + ` + ) + const { stderr, code } = await nextBuild(appDir, [], { stderr: true }) + await fs.remove(pages404) + await fs.move(`${pages404}.bak`, pages404) + + expect(stderr).toContain( + `\`pages/404\` can not have getInitialProps/getServerProps, https://err.sh/zeit/next.js/404-get-initial-props` + ) + expect(code).toBe(1) + }) + + it('shows error with getInitialProps in pages/404 dev', async () => { + await fs.move(pages404, `${pages404}.bak`) + await fs.writeFile( + pages404, + ` + const page = () => 'custom 404 page' + page.getInitialProps = () => ({ a: 'b' }) + export default page + ` + ) + + let stderr = '' + appPort = await findPort() + app = await launchApp(appDir, appPort, { + onStderr(msg) { + stderr += msg || '' + }, + }) + await renderViaHTTP(appPort, '/abc') + await waitFor(1000) + + await killApp(app) + + await fs.remove(pages404) + await fs.move(`${pages404}.bak`, pages404) + + const error = `\`pages/404\` can not have getInitialProps/getServerProps, https://err.sh/zeit/next.js/404-get-initial-props` + + expect(stderr).toContain(error) + }) + + describe('_app with getInitialProps', () => { + beforeAll(async () => { + await fs.writeFile( + appPage, + ` + import NextApp from 'next/app' + const App = ({ Component, pageProps }) => + App.getInitialProps = NextApp.getInitialProps + export default App + ` + ) + await nextBuild(appDir) + appPort = await findPort() + app = await nextStart(appDir, appPort) + buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') + }) + afterAll(async () => { + await fs.remove(appPage) + await killApp(app) + }) + + it('should not output static 404 if _app has getInitialProps', async () => { + expect( + await fs.exists( + join(appDir, '.next/server/static', buildId, 'pages/_errors/404.html') + ) + ).toBe(false) + }) + + it('specify to use the 404 page still in the routes-manifest', async () => { + const manifest = await fs.readJSON( + join(appDir, '.next/routes-manifest.json') + ) + expect(manifest.pages404).toBe(true) + }) + + it('should still use 404 page', async () => { + const res = await fetchViaHTTP(appPort, '/abc') + expect(res.status).toBe(404) + expect(await res.text()).toContain('custom 404 page') + }) + }) +}) diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index 5b954b48bd91a91..f2c01f903adba0b 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -293,6 +293,7 @@ const runTests = (isDev = false) => { expect(manifest).toEqual({ version: 1, + pages404: false, basePath: '', redirects: [ { diff --git a/test/integration/dynamic-routing/test/index.test.js b/test/integration/dynamic-routing/test/index.test.js index 7796b18f86c3d74..756f47232367685 100644 --- a/test/integration/dynamic-routing/test/index.test.js +++ b/test/integration/dynamic-routing/test/index.test.js @@ -431,6 +431,7 @@ function runTests(dev) { expect(manifest).toEqual({ version: 1, + pages404: false, basePath: '', headers: [], rewrites: [], From aa5f918c30667cf95044a19838bdcf0403413cd0 Mon Sep 17 00:00:00 2001 From: 38elements <38elements@users.noreply.github.com> Date: Sun, 2 Feb 2020 13:56:34 +0900 Subject: [PATCH 278/321] Update Preact Example (#10380) --- examples/using-preact/README.md | 2 +- examples/using-preact/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/using-preact/README.md b/examples/using-preact/README.md index 8a87016ca4eaeec..2a958ec90ede199 100644 --- a/examples/using-preact/README.md +++ b/examples/using-preact/README.md @@ -1,6 +1,6 @@ # Preact example -This example uses [Preact](https://github.com/developit/preact) instead of React. It's a React like UI framework which is fast and small. Here we've customized Next.js to use Preact instead of React. +This example uses [Preact](https://github.com/preactjs/preact) instead of React. It's a React like UI framework which is fast and small. Here we've customized Next.js to use Preact instead of React. Here's how we did it: diff --git a/examples/using-preact/package.json b/examples/using-preact/package.json index c9f1e1c54cb2d34..6bc38905341d4de 100644 --- a/examples/using-preact/package.json +++ b/examples/using-preact/package.json @@ -9,8 +9,8 @@ "dependencies": { "module-alias": "2.2.2", "next": "latest", - "preact": "10.0.0", - "preact-render-to-string": "5.0.7" + "preact": "10.2.1", + "preact-render-to-string": "5.1.4" }, "license": "ISC", "devDependencies": { From 9ba4bee23e5a6b82261347896bf5e86e0f1d67cb Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sun, 2 Feb 2020 12:49:14 +0100 Subject: [PATCH 279/321] v9.2.2-canary.5 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 0f6e1183c5b83f1..ca2756543138ff8 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.4" + "version": "9.2.2-canary.5" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 377c92ceb1a15fd..c5b73658bc8e0f8 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 04fee56d93b6ee3..edf405a0184bded 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 19a6253cd18a8df..724b59ad4580eb4 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index be3b5f9ee86e256..3492606d754e971 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 647fe963873de84..8a6219af1406f2d 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 9cf74fb5529091a..9cb12f7bcca44c9 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index e691cd6450ba7e7..2b6e388297ec24b 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index 38d5cf5371babe7..4cc27cfd6549b6e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.4", + "version": "9.2.2-canary.5", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.4", + "@next/polyfill-nomodule": "9.2.2-canary.5", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From d715c13f41961eda13af576655c09bf96224e481 Mon Sep 17 00:00:00 2001 From: Matt Snider Date: Sun, 2 Feb 2020 10:02:56 -0800 Subject: [PATCH 280/321] Custom AMP Validator Variable Name Collision Fix (#10371) * Changing variable name internally * Add tests for custom AMP validator Co-authored-by: JJ Kasper --- packages/next/export/index.ts | 2 +- packages/next/export/worker.js | 2 +- .../amphtml-custom-validator/next.config.js | 7 +++ .../amphtml-custom-validator/pages/index.js | 5 ++ .../test/index.test.js | 49 +++++++++++++++++++ 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 test/integration/amphtml-custom-validator/next.config.js create mode 100644 test/integration/amphtml-custom-validator/pages/index.js create mode 100644 test/integration/amphtml-custom-validator/test/index.test.js diff --git a/packages/next/export/index.ts b/packages/next/export/index.ts index b23b0890f398373..40f0c33ca68852a 100644 --- a/packages/next/export/index.ts +++ b/packages/next/export/index.ts @@ -232,7 +232,7 @@ export default async function( hotReloader: null, canonicalBase: nextConfig.amp?.canonicalBase || '', isModern: nextConfig.experimental.modern, - ampValidator: nextConfig.experimental.amp?.validator || undefined, + ampValidatorPath: nextConfig.experimental.amp?.validator || undefined, } const { serverRuntimeConfig, publicRuntimeConfig } = nextConfig diff --git a/packages/next/export/worker.js b/packages/next/export/worker.js index 68a1307b519dd7b..61a2a88e2517d6e 100644 --- a/packages/next/export/worker.js +++ b/packages/next/export/worker.js @@ -214,7 +214,7 @@ export default async function({ } if (curRenderOpts.inAmpMode) { - await validateAmp(html, path, curRenderOpts.ampValidator) + await validateAmp(html, path, curRenderOpts.ampValidatorPath) } else if (curRenderOpts.hybridAmp) { // we need to render the AMP version let ampHtmlFilename = `${ampPath}${sep}index.html` diff --git a/test/integration/amphtml-custom-validator/next.config.js b/test/integration/amphtml-custom-validator/next.config.js new file mode 100644 index 000000000000000..60668d95da8fa5b --- /dev/null +++ b/test/integration/amphtml-custom-validator/next.config.js @@ -0,0 +1,7 @@ +module.exports = { + experimental: { + amp: { + validator: 'https://cdn.ampproject.org/v0/validator.js', + }, + }, +} diff --git a/test/integration/amphtml-custom-validator/pages/index.js b/test/integration/amphtml-custom-validator/pages/index.js new file mode 100644 index 000000000000000..b4d8c8f0e616e3d --- /dev/null +++ b/test/integration/amphtml-custom-validator/pages/index.js @@ -0,0 +1,5 @@ +export const config = { + amp: true, +} + +export default () =>

Hello from AMP

diff --git a/test/integration/amphtml-custom-validator/test/index.test.js b/test/integration/amphtml-custom-validator/test/index.test.js new file mode 100644 index 000000000000000..24d67151fad6d67 --- /dev/null +++ b/test/integration/amphtml-custom-validator/test/index.test.js @@ -0,0 +1,49 @@ +/* eslint-env jest */ +/* global jasmine */ +import { join } from 'path' +import { + nextBuild, + findPort, + nextStart, + killApp, + launchApp, + renderViaHTTP, +} from 'next-test-utils' + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 + +let app +let appPort +const appDir = join(__dirname, '../') + +describe('AMP Custom Validator', () => { + it('should build and start successfully', async () => { + const { code } = await nextBuild(appDir) + expect(code).toBe(0) + + appPort = await findPort() + app = await nextStart(appDir, appPort) + + const html = await renderViaHTTP(appPort, '/') + await killApp(app) + + expect(html).toContain('Hello from AMP') + }) + + it('should run in dev mode successfully', async () => { + let stderr = '' + + appPort = await findPort() + app = await launchApp(appDir, appPort, { + onStderr(msg) { + stderr += msg || '' + }, + }) + + const html = await renderViaHTTP(appPort, '/') + await killApp(app) + + expect(stderr).not.toContain('error') + expect(html).toContain('Hello from AMP') + }) +}) From e90af3f0acb68b206132f5c680aba9a5ff8b81cf Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sun, 2 Feb 2020 13:08:38 -0600 Subject: [PATCH 281/321] v9.2.2-canary.6 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index ca2756543138ff8..06e617259acf0ed 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.5" + "version": "9.2.2-canary.6" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index c5b73658bc8e0f8..229ca80488b0612 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index edf405a0184bded..c3de31ef8bb6261 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 724b59ad4580eb4..79b2fd00326d678 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 3492606d754e971..c4cbfabf6f3c35b 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 8a6219af1406f2d..b320c985396a6e4 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 9cb12f7bcca44c9..4883fee6db01457 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 2b6e388297ec24b..3836822c0d86eb0 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index 4cc27cfd6549b6e..f2d79a8d9dcd41f 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.5", + "version": "9.2.2-canary.6", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.5", + "@next/polyfill-nomodule": "9.2.2-canary.6", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From a433b9be6a3a73b300c21e28f57296471b0ced66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Dur=C3=A3o?= Date: Mon, 3 Feb 2020 03:07:45 +0000 Subject: [PATCH 282/321] Fix bug in catch-all routes with SSG (#10379) * Fix bug in catch-all routes with SSG * fix slash Co-authored-by: Joe Haddad --- packages/next/build/utils.ts | 8 +++----- test/integration/prerender/test/index.test.js | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 2bb641ed5c7e964..3c68b3d54859262 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -592,11 +592,9 @@ export async function isPageStatic( builtPage = builtPage.replace( `[${repeat ? '...' : ''}${validParamKey}]`, - encodeURIComponent( - repeat - ? (paramValue as string[]).join('/') - : (paramValue as string) - ) + repeat + ? (paramValue as string[]).map(encodeURIComponent).join('/') + : encodeURIComponent(paramValue as string) ) }) diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index a6ff7e056ba6858..a6a6fc5ec63e4a2 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -109,8 +109,8 @@ const expectedManifestRoutes = () => ({ initialRevalidateSeconds: false, srcRoute: null, }, - '/catchall/another%2Fvalue': { - dataRoute: `/_next/data/${buildId}/catchall/another%2Fvalue.json`, + '/catchall/another/value': { + dataRoute: `/_next/data/${buildId}/catchall/another/value.json`, initialRevalidateSeconds: 1, srcRoute: '/catchall/[...slug]', }, From 5a32c9cbbfefef50bc273f592383592dd3f9dba7 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Sun, 2 Feb 2020 22:20:04 -0500 Subject: [PATCH 283/321] Update create app docs (#10382) * Updated links * Added utm Co-authored-by: Joe Haddad --- .../create-next-app/templates/default/README.md | 15 ++++++--------- .../templates/default/pages/index.js | 11 +++++++++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/create-next-app/templates/default/README.md b/packages/create-next-app/templates/default/README.md index 437ab792983e96b..bdfa3f51f0d2080 100644 --- a/packages/create-next-app/templates/default/README.md +++ b/packages/create-next-app/templates/default/README.md @@ -28,9 +28,6 @@ After creating an app, it should look something like: ``` . ├── README.md -├── components -│ ├── head.js -│ └── nav.js ├── node_modules │ ├── [...] ├── package.json @@ -54,7 +51,7 @@ Out of the box, we get: - Server rendering and indexing of `./pages/` - Static file serving. `./public/` is mapped to `/` -Read more about [Next's Routing](https://github.com/zeit/next.js#routing) +Read more about [Next's Routing](https://nextjs.org/docs/routing/introduction) ## Available Scripts @@ -78,7 +75,7 @@ It correctly bundles React in production mode and optimizes the build for the be Starts the application in production mode. The application should be compiled with \`next build\` first. -See the section in Next docs about [deployment](https://github.com/zeit/next.js/wiki/Deployment) for more information. +See the section in Next docs about [deployment](https://nextjs.org/docs/deployment) for more information. ## Using CSS @@ -107,7 +104,7 @@ export default () => ( ) ``` -Read more about [Next's CSS features](https://github.com/zeit/next.js#css). +Read more about [Next's CSS features](https://nextjs.org/docs/basic-features/built-in-css-support). ## Adding Components @@ -147,7 +144,7 @@ For the initial page load, `getInitialProps` will execute on the server only. `g _Note: `getInitialProps` can **not** be used in children components. Only in `./pages/`._ -Read more about [fetching data and the component lifecycle](https://github.com/zeit/next.js#fetching-data-and-component-lifecycle) +Read more about [fetching data and the component lifecycle](https://nextjs.org/docs/basic-features/data-fetching) ## Syntax Highlighting @@ -155,7 +152,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [ ## Deploy to Now -[now](https://zeit.co/now) offers a zero-configuration single-command deployment. +[ZEIT Now](https://zeit.co/home?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App) offers a zero-configuration single-command deployment. 1. Install the `now` command-line tool either via npm `npm install -g now` or Yarn `yarn global add now`. @@ -167,7 +164,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [ Paste that URL into your browser when the build is complete, and you will see your deployed app. -You can find more details about [`now` here](https://zeit.co/now). +You can find more details about [`ZEIT Now` here](https://zeit.co/home?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App). ## Something Missing? diff --git a/packages/create-next-app/templates/default/pages/index.js b/packages/create-next-app/templates/default/pages/index.js index 77e557f4958ad57..871b2b26f22b327 100644 --- a/packages/create-next-app/templates/default/pages/index.js +++ b/packages/create-next-app/templates/default/pages/index.js @@ -36,7 +36,10 @@ const Home = () => (

Discover and deploy boilerplate example Next.js projects.

- +

Deploy →

Instantly deploy your Next.js site to a public URL with ZEIT Now. @@ -46,7 +49,11 @@ const Home = () => (

From c01534c92eea41a7847468c02b25e024b62fbe17 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sun, 2 Feb 2020 21:33:53 -0600 Subject: [PATCH 284/321] Make sure runtime config is set before any imports for serverless (#10386) Co-authored-by: Joe Haddad --- .../webpack/loaders/next-serverless-loader.ts | 53 ++++++++++--------- .../serverless-runtime-configs/pages/_app.js | 10 ++++ .../pages/_document.js | 26 +++++++++ .../pages/api/config.js | 7 +++ .../pages/config.js | 6 ++- .../serverless-runtime-configs/server.js | 31 +++++++++++ .../test/index.test.js | 47 ++++++++++++---- 7 files changed, 144 insertions(+), 36 deletions(-) create mode 100644 test/integration/serverless-runtime-configs/pages/_app.js create mode 100644 test/integration/serverless-runtime-configs/pages/_document.js create mode 100644 test/integration/serverless-runtime-configs/pages/api/config.js create mode 100644 test/integration/serverless-runtime-configs/server.js diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index d90d7ef0e69126c..8f6d29349837b56 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -54,7 +54,7 @@ const nextServerlessLoader: loader.Loader = function() { const runtimeConfigImports = runtimeConfig ? ` - import { setConfig } from 'next/dist/next-server/lib/runtime-config' + const { setConfig } = require('next/dist/next-server/lib/runtime-config') ` : '' @@ -67,8 +67,8 @@ const nextServerlessLoader: loader.Loader = function() { const dynamicRouteImports = pageIsDynamicRoute ? ` - import { getRouteMatcher } from 'next/dist/next-server/lib/router/utils/route-matcher'; - import { getRouteRegex } from 'next/dist/next-server/lib/router/utils/route-regex'; + const { getRouteMatcher } = require('next/dist/next-server/lib/router/utils/route-matcher'); + const { getRouteRegex } = require('next/dist/next-server/lib/router/utils/route-regex'); ` : '' @@ -79,8 +79,8 @@ const nextServerlessLoader: loader.Loader = function() { : '' const rewriteImports = ` - import { rewrites } from '${routesManifest}' - import pathMatch, { pathToRegexp } from 'next/dist/next-server/server/lib/path-match' + const { rewrites } = require('${routesManifest}') + const { pathToRegexp, default: pathMatch } = require('next/dist/next-server/server/lib/path-match') ` const handleRewrites = ` @@ -132,20 +132,22 @@ const nextServerlessLoader: loader.Loader = function() { if (page.match(API_ROUTE)) { return ` - ${dynamicRouteImports} - import { parse } from 'url' - import { apiResolver } from 'next/dist/next-server/server/api-utils' import initServer from 'next-plugin-loader?middleware=on-init-server!' import onError from 'next-plugin-loader?middleware=on-error-server!' - ${rewriteImports} ${runtimeConfigImports} - - ${dynamicRouteMatcher} - ${handleRewrites} ${ - /* this needs to be called before importing the API method */ + /* + this needs to be called first so its available for any other imports + */ runtimeConfigSetter } + ${dynamicRouteImports} + const { parse } = require('url') + const { apiResolver } = require('next/dist/next-server/server/api-utils') + ${rewriteImports} + + ${dynamicRouteMatcher} + ${handleRewrites} export default async (req, res) => { try { @@ -186,25 +188,24 @@ const nextServerlessLoader: loader.Loader = function() { ` } else { return ` - import {parse} from 'url' - import {parse as parseQs} from 'querystring' - import {renderToHTML} from 'next/dist/next-server/server/render'; - import {sendHTML} from 'next/dist/next-server/server/send-html'; import initServer from 'next-plugin-loader?middleware=on-init-server!' import onError from 'next-plugin-loader?middleware=on-error-server!' - import buildManifest from '${buildManifest}'; - import reactLoadableManifest from '${reactLoadableManifest}'; - import Document from '${absoluteDocumentPath}'; - import Error from '${absoluteErrorPath}'; - import App from '${absoluteAppPath}'; - ${dynamicRouteImports} - ${rewriteImports} ${runtimeConfigImports} - ${ - /* this needs to be called before importing the component */ + // this needs to be called first so its available for any other imports runtimeConfigSetter } + const {parse} = require('url') + const {parse: parseQs} = require('querystring') + const {renderToHTML} =require('next/dist/next-server/server/render'); + const {sendHTML} = require('next/dist/next-server/server/send-html'); + const buildManifest = require('${buildManifest}'); + const reactLoadableManifest = require('${reactLoadableManifest}'); + const Document = require('${absoluteDocumentPath}').default; + const Error = require('${absoluteErrorPath}').default; + const App = require('${absoluteAppPath}').default; + ${dynamicRouteImports} + ${rewriteImports} const ComponentInfo = require('${absolutePagePath}') diff --git a/test/integration/serverless-runtime-configs/pages/_app.js b/test/integration/serverless-runtime-configs/pages/_app.js new file mode 100644 index 000000000000000..9d7f9f03f9d3bbc --- /dev/null +++ b/test/integration/serverless-runtime-configs/pages/_app.js @@ -0,0 +1,10 @@ +import getConfig from 'next/config' + +const config = getConfig() + +export default ({ Component, pageProps }) => ( + <> +

{JSON.stringify(config)}

+ + +) diff --git a/test/integration/serverless-runtime-configs/pages/_document.js b/test/integration/serverless-runtime-configs/pages/_document.js new file mode 100644 index 000000000000000..6f85bbef1fdb73e --- /dev/null +++ b/test/integration/serverless-runtime-configs/pages/_document.js @@ -0,0 +1,26 @@ +import Document, { Html, Head, Main, NextScript } from 'next/document' +import getConfig from 'next/config' + +const config = getConfig() + +class MyDocument extends Document { + static async getInitialProps(ctx) { + const initialProps = await Document.getInitialProps(ctx) + return { ...initialProps } + } + + render() { + return ( + + + +
{JSON.stringify(config)}
+
+ + + + ) + } +} + +export default MyDocument diff --git a/test/integration/serverless-runtime-configs/pages/api/config.js b/test/integration/serverless-runtime-configs/pages/api/config.js new file mode 100644 index 000000000000000..8e64ae591ba48f7 --- /dev/null +++ b/test/integration/serverless-runtime-configs/pages/api/config.js @@ -0,0 +1,7 @@ +import getConfig from 'next/config' + +const config = getConfig() + +export default (req, res) => { + res.json(config) +} diff --git a/test/integration/serverless-runtime-configs/pages/config.js b/test/integration/serverless-runtime-configs/pages/config.js index 45ace3c4a933763..27341d294b8245e 100644 --- a/test/integration/serverless-runtime-configs/pages/config.js +++ b/test/integration/serverless-runtime-configs/pages/config.js @@ -2,4 +2,8 @@ import getConfig from 'next/config' const config = getConfig() -export default () =>

{JSON.stringify(config)}

+const page = () =>

{JSON.stringify(config)}

+ +page.getInitialProps = () => ({ a: 'b' }) + +export default page diff --git a/test/integration/serverless-runtime-configs/server.js b/test/integration/serverless-runtime-configs/server.js new file mode 100644 index 000000000000000..a80556e110bd001 --- /dev/null +++ b/test/integration/serverless-runtime-configs/server.js @@ -0,0 +1,31 @@ +const path = require('path') +const http = require('http') +const send = require('send') + +const server = http.createServer((req, res) => { + if (req.url === '/config') { + return require('./.next/serverless/pages/config.js').render(req, res) + } + + if (req.url === '/') { + return send( + req, + path.join(__dirname, '.next/serverless/pages/index.html') + ).pipe(res) + } + + if (req.url === '/api/config') { + return require('./.next/serverless/pages/api/config.js').default(req, res) + } + + if (req.url.startsWith('/_next')) { + send( + req, + path.join(__dirname, '.next', req.url.split('/_next').pop()) + ).pipe(res) + } +}) + +server.listen(process.env.PORT, () => { + console.log('ready on', process.env.PORT) +}) diff --git a/test/integration/serverless-runtime-configs/test/index.test.js b/test/integration/serverless-runtime-configs/test/index.test.js index 81d79a75a2e9222..b9776f2055ed230 100644 --- a/test/integration/serverless-runtime-configs/test/index.test.js +++ b/test/integration/serverless-runtime-configs/test/index.test.js @@ -5,9 +5,9 @@ import { join } from 'path' import { nextBuild, findPort, - nextStart, killApp, renderViaHTTP, + initNextServerScript, } from 'next-test-utils' import cheerio from 'cheerio' import webdriver from 'next-webdriver' @@ -18,6 +18,18 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 const cleanUp = () => fs.remove(nextConfigPath) +const nextStart = async (appDir, appPort) => { + const scriptPath = join(appDir, 'server.js') + const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }) + + return initNextServerScript( + scriptPath, + /ready on/i, + env, + /ReferenceError: options is not defined/ + ) +} + describe('Serverless runtime configs', () => { beforeAll(() => cleanUp()) afterAll(() => cleanUp()) @@ -78,15 +90,13 @@ describe('Serverless runtime configs', () => { await nextBuild(appDir, [], { stderr: true, stdout: true }) const appPort = await findPort() - const app = await nextStart(appDir, appPort, { - onStdout: console.log, - onStderr: console.log, - }) + const app = await nextStart(appDir, appPort) const browser = await webdriver(appPort, '/config') const clientHTML = await browser.eval(`document.documentElement.innerHTML`) const ssrHTML = await renderViaHTTP(appPort, '/config') + const apiJson = await renderViaHTTP(appPort, '/api/config') await killApp(app) await fs.remove(nextConfigPath) @@ -97,19 +107,38 @@ describe('Serverless runtime configs', () => { const ssrConfig = ssr$('#config').text() const clientConfig = client$('#config').text() - expect(JSON.parse(ssrConfig)).toEqual({ + const expectedSsrConfig = { publicRuntimeConfig: { another: 'thing', }, serverRuntimeConfig: { hello: 'world', }, - }) - expect(JSON.parse(clientConfig)).toEqual({ + } + + const expectedClientConfig = { publicRuntimeConfig: { another: 'thing', }, serverRuntimeConfig: {}, - }) + } + + expect(JSON.parse(ssrConfig)).toEqual(expectedSsrConfig) + expect(JSON.parse(clientConfig)).toEqual(expectedClientConfig) + + const appSsrConfig = ssr$('#app-config').text() + const appClientConfig = client$('#app-config').text() + + expect(JSON.parse(appSsrConfig)).toEqual(expectedSsrConfig) + expect(JSON.parse(appClientConfig)).toEqual(expectedClientConfig) + + const docSsrConfig = ssr$('#doc-config').text() + const docClientConfig = client$('#doc-config').text() + + // _document doesn't update on client so should be the same + expect(JSON.parse(docSsrConfig)).toEqual(expectedSsrConfig) + expect(JSON.parse(docClientConfig)).toEqual(expectedSsrConfig) + + expect(JSON.parse(apiJson)).toEqual(expectedSsrConfig) }) }) From 65de0500177893a4356908682cc550baa34ed11f Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sun, 2 Feb 2020 21:48:00 -0600 Subject: [PATCH 285/321] Update to not show API not ended warning when response is piped to (#10342) * Update to not show API not ended warning when response is piped to * Update to use res.once Co-authored-by: Joe Haddad --- packages/next/next-server/server/api-utils.ts | 10 +++++++++- .../integration/api-support/pages/api/test-res-pipe.js | 10 ++++++++++ test/integration/api-support/test/index.test.js | 8 ++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 test/integration/api-support/pages/api/test-res-pipe.js diff --git a/packages/next/next-server/server/api-utils.ts b/packages/next/next-server/server/api-utils.ts index 33c6d45f4ce73d4..85d0156b97007fe 100644 --- a/packages/next/next-server/server/api-utils.ts +++ b/packages/next/next-server/server/api-utils.ts @@ -55,9 +55,17 @@ export async function apiResolver( apiRes.json = data => sendJson(apiRes, data) const resolver = interopDefault(resolverModule) + let wasPiped = false + + if (process.env.NODE_ENV !== 'production') { + // listen for pipe event and don't show resolve warning + res.once('pipe', () => (wasPiped = true)) + } + + // Call API route method await resolver(req, res) - if (process.env.NODE_ENV !== 'production' && !isResSent(res)) { + if (process.env.NODE_ENV !== 'production' && !isResSent(res) && !wasPiped) { console.warn( `API resolved without sending a response for ${req.url}, this may result in stalled requests.` ) diff --git a/test/integration/api-support/pages/api/test-res-pipe.js b/test/integration/api-support/pages/api/test-res-pipe.js new file mode 100644 index 000000000000000..c127f79c1fb9c32 --- /dev/null +++ b/test/integration/api-support/pages/api/test-res-pipe.js @@ -0,0 +1,10 @@ +import fetch from 'node-fetch' + +export default async (req, res) => { + const dataRes = await fetch( + `http://localhost:${req.query.port}/api/query?hello=from-pipe` + ) + + res.status(dataRes.status) + dataRes.body.pipe(res) +} diff --git a/test/integration/api-support/test/index.test.js b/test/integration/api-support/test/index.test.js index c66556733b2dbe7..c4e5c7d389b37a8 100644 --- a/test/integration/api-support/test/index.test.js +++ b/test/integration/api-support/test/index.test.js @@ -363,6 +363,14 @@ function runTests(dev = false) { `API resolved without sending a response for /api/test-no-end, this may result in stalled requests.` ) }) + + it('should not show warning when the API resolves and the response is piped', async () => { + const startIdx = stderr.length > 0 ? stderr.length - 1 : stderr.length + await fetchViaHTTP(appPort, `/api/test-res-pipe`, { port: appPort }) + expect(stderr.substr(startIdx)).not.toContain( + `API resolved without sending a response for /api/test-res-pipe` + ) + }) } else { it('should build api routes', async () => { const pagesManifest = JSON.parse( From f7880f3463ad843ec5735fd576ddfc9d2a967bdd Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sun, 2 Feb 2020 21:51:12 -0600 Subject: [PATCH 286/321] v9.2.2-canary.7 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 06e617259acf0ed..6082010b22aa763 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.6" + "version": "9.2.2-canary.7" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 229ca80488b0612..92b09744a6422e1 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index c3de31ef8bb6261..a97e3f5858b491c 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 79b2fd00326d678..ceaaacfa05d5a13 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index c4cbfabf6f3c35b..50b06530631f54d 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index b320c985396a6e4..9eb0c4ad46d4c07 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 4883fee6db01457..9eea6aa51f47b5b 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 3836822c0d86eb0..8ef2f4a82ba2e3b 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index f2d79a8d9dcd41f..3603329af602234 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.6", + "version": "9.2.2-canary.7", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.6", + "@next/polyfill-nomodule": "9.2.2-canary.7", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From 683486da63d00c071ca9d08525d327e6310c0aa7 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 3 Feb 2020 00:03:42 -0500 Subject: [PATCH 287/321] Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test --- lint-staged.config.js | 2 +- package.json | 4 ++-- packages/next/types/global.d.ts | 10 ++++++++++ .../typescript/components/hello.module.sass | 2 ++ .../typescript/components/hello.module.scss | 3 +++ test/integration/typescript/components/hello.ts | 4 ++++ test/integration/typescript/next.config.js | 2 +- 7 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 test/integration/typescript/components/hello.module.sass create mode 100644 test/integration/typescript/components/hello.module.scss diff --git a/lint-staged.config.js b/lint-staged.config.js index 5bea863be5cf505..22ca8c95bd1d201 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -14,7 +14,7 @@ module.exports = { `git add ${escapedFileNames}`, ] }, - '**/*.{json,md,mdx,css,html,yml,yaml,scss,sass}': filenames => { + '**/*.{json,md,mdx,css,html,yml,yaml,scss}': filenames => { const escapedFileNames = filenames .map(filename => `"${isWin ? filename : escape([filename])}"`) .join(' ') diff --git a/package.json b/package.json index c1866b0dc694cd8..18a274008231893 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "lint-eslint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0", "lint": "run-p lint-typescript prettier-check lint-eslint", "lint-fix": "yarn prettier-fix && eslint . --ext js,jsx,ts,tsx --fix --max-warnings=0", - "prettier-check": "prettier --check \"**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss,sass}\"", - "prettier-fix": "prettier --write \"**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss,sass}\"", + "prettier-check": "prettier --check \"**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss}\"", + "prettier-fix": "prettier --write \"**/*.{js,jsx,json,ts,tsx,md,mdx,css,html,yml,yaml,scss}\"", "types": "lerna run types --stream", "typescript": "lerna run typescript", "prepublish": "lerna run prepublish", diff --git a/packages/next/types/global.d.ts b/packages/next/types/global.d.ts index 533398d22c95136..706b8a1dbd184d9 100644 --- a/packages/next/types/global.d.ts +++ b/packages/next/types/global.d.ts @@ -15,3 +15,13 @@ declare module '*.module.css' { const classes: { readonly [key: string]: string } export default classes } + +declare module '*.module.sass' { + const classes: { readonly [key: string]: string } + export default classes +} + +declare module '*.module.scss' { + const classes: { readonly [key: string]: string } + export default classes +} diff --git a/test/integration/typescript/components/hello.module.sass b/test/integration/typescript/components/hello.module.sass new file mode 100644 index 000000000000000..73ae7d767261ebb --- /dev/null +++ b/test/integration/typescript/components/hello.module.sass @@ -0,0 +1,2 @@ +.hello + content: 'hello' diff --git a/test/integration/typescript/components/hello.module.scss b/test/integration/typescript/components/hello.module.scss new file mode 100644 index 000000000000000..677d77ed34a61d7 --- /dev/null +++ b/test/integration/typescript/components/hello.module.scss @@ -0,0 +1,3 @@ +.hello { + content: 'hello'; +} diff --git a/test/integration/typescript/components/hello.ts b/test/integration/typescript/components/hello.ts index e4c1ace030fccc7..9b7c088a580a8ff 100644 --- a/test/integration/typescript/components/hello.ts +++ b/test/integration/typescript/components/hello.ts @@ -1,6 +1,10 @@ import helloStyles from './hello.module.css' +import helloStyles2 from './hello.module.scss' +import helloStyles3 from './hello.module.sass' export function hello(): string { console.log(helloStyles.hello) + console.log(helloStyles2.hello) + console.log(helloStyles3.hello) return 'Hello' } diff --git a/test/integration/typescript/next.config.js b/test/integration/typescript/next.config.js index d085452639784fb..5adba078e31d095 100644 --- a/test/integration/typescript/next.config.js +++ b/test/integration/typescript/next.config.js @@ -3,5 +3,5 @@ module.exports = { // Make sure entries are not getting disposed. maxInactiveAge: 1000 * 60 * 60, }, - experimental: { css: true }, + experimental: { scss: true }, } From f542999b302c8aadb5ee3748f1d82b15c5fc0c3d Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 3 Feb 2020 07:26:51 -0500 Subject: [PATCH 288/321] v9.2.2-canary.8 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 6082010b22aa763..e376473acfa3239 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.7" + "version": "9.2.2-canary.8" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 92b09744a6422e1..cc953a0aaa91a3b 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index a97e3f5858b491c..54eabd12228fc82 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index ceaaacfa05d5a13..30c1d7fc141166e 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 50b06530631f54d..c584fce1c92e3cf 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 9eb0c4ad46d4c07..6a819ceeca36368 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 9eea6aa51f47b5b..f8fd0e85374d051 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 8ef2f4a82ba2e3b..6c96cb47f7bcff7 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index 3603329af602234..70791c486fe0dd8 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.7", + "version": "9.2.2-canary.8", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.7", + "@next/polyfill-nomodule": "9.2.2-canary.8", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From 3d507abe0c95f5de4dffb4f6a4cf9f8f44e9aa1e Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 3 Feb 2020 11:41:43 -0500 Subject: [PATCH 289/321] Remove Old Records (#10398) --- packages/next/build/webpack-config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 9993f1201ee4dbb..1f251032242dd01 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -579,7 +579,6 @@ export default async function getBaseWebpackConfig( }), ].filter(Boolean), }, - recordsPath: path.join(outputPath, 'records.json'), context: dir, // Kept as function to be backwards compatible entry: async () => { From bf4a156dd3932036377a052ad8efac99b8c906b8 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 3 Feb 2020 11:42:05 -0500 Subject: [PATCH 290/321] v9.2.2-canary.9 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index e376473acfa3239..b1028ed5beef446 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.8" + "version": "9.2.2-canary.9" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index cc953a0aaa91a3b..875bc1f8fb9e042 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 54eabd12228fc82..9af286a0fb7fc40 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 30c1d7fc141166e..935d0731fd8e79a 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index c584fce1c92e3cf..142c65d0c0879d4 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 6a819ceeca36368..b2c0c5d0364bbc8 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index f8fd0e85374d051..b5b6926eb02f757 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 6c96cb47f7bcff7..efa3af0575bfce9 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index 70791c486fe0dd8..056f4226ebd4efc 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.8", + "version": "9.2.2-canary.9", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.8", + "@next/polyfill-nomodule": "9.2.2-canary.9", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From 1db77143f6ca8478d08b3d1f37ea6f92044c065c Mon Sep 17 00:00:00 2001 From: Jorge Cuadra Date: Mon, 3 Feb 2020 13:01:41 -0600 Subject: [PATCH 291/321] Fix with-reasonml example (#10399) --- examples/with-reasonml/next.config.js | 3 +-- examples/with-reasonml/package.json | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/with-reasonml/next.config.js b/examples/with-reasonml/next.config.js index cb6b2105024fcbd..ebeacd8e6783751 100644 --- a/examples/with-reasonml/next.config.js +++ b/examples/with-reasonml/next.config.js @@ -1,6 +1,5 @@ -const withTM = require('next-transpile-modules') +const withTM = require('next-transpile-modules')(['bs-platform']) module.exports = withTM({ pageExtensions: ['jsx', 'js', 'bs.js'], - transpileModules: ['bs-platform'], }) diff --git a/examples/with-reasonml/package.json b/examples/with-reasonml/package.json index 3061bc5c33c76c6..f39eb664f7e41a0 100644 --- a/examples/with-reasonml/package.json +++ b/examples/with-reasonml/package.json @@ -12,14 +12,14 @@ "dependencies": { "babel-plugin-bucklescript": "^0.5.3", "next": "latest", - "next-transpile-modules": "2.3.1", - "react": "^16.8.6", - "react-dom": "^16.8.6", + "next-transpile-modules": "^3.0.2", + "react": "^16.12.0", + "react-dom": "^16.12.0", "reason-react": "^0.7.0" }, "devDependencies": { - "@babel/core": "^7.4.3", - "bs-platform": "5.0.3", - "concurrently": "^4.1.0" + "@babel/core": "^7.8.4", + "bs-platform": "^7.1.0", + "concurrently": "^5.1.0" } } From 9a8c3100d204504e1eeab1416c005f3ca77287f7 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 3 Feb 2020 14:36:55 -0500 Subject: [PATCH 292/321] New Jest Example (#10396) * New Jest Example * add missing zeit logo * Revert zeit.svg * remove old jest examples * Update jest.config.js --- .eslintrc.json | 1 + examples/with-jest-flow/.babelrc | 8 -- examples/with-jest-flow/.eslintrc.json | 3 - examples/with-jest-flow/.flowconfig | 8 -- examples/with-jest-flow/README.md | 42 -------- .../__snapshots__/index.test.js.snap | 9 -- .../with-jest-flow/__tests__/index.test.js | 23 ----- examples/with-jest-flow/components/Page.js | 17 ---- .../with-jest-flow/flow-typed/next.js.flow | 35 ------- examples/with-jest-flow/jest.config.js | 4 - examples/with-jest-flow/jest.setup.js | 4 - examples/with-jest-flow/package.json | 29 ------ examples/with-jest-flow/pages/index.js | 9 -- .../with-jest-react-testing-library/.babelrc | 3 - .../with-jest-react-testing-library/README.md | 42 -------- .../__snapshots__/index.test.js.snap | 11 --- .../__tests__/index.test.js | 22 ----- .../jest.config.js | 3 - .../package.json | 21 ---- .../pages/index.js | 5 - examples/with-jest-typescript/.babelrc | 3 - examples/with-jest-typescript/README.md | 42 -------- examples/with-jest-typescript/jest.config.js | 3 - examples/with-jest-typescript/jest.setup.js | 4 - examples/with-jest-typescript/next-env.d.ts | 2 - examples/with-jest-typescript/package.json | 28 ------ examples/with-jest-typescript/pages/cars.tsx | 5 - examples/with-jest-typescript/pages/index.tsx | 5 - examples/with-jest-typescript/pages/login.tsx | 5 - .../src/components/NiceCheckbox/index.tsx | 27 ------ .../src/components/NiceCheckbox/test.tsx | 25 ----- .../src/modules/auth/Login.tsx | 71 -------------- .../src/modules/auth/__tests__/Login.test.tsx | 44 --------- .../src/modules/auth/types.ts | 4 - .../src/modules/cars/Detail.tsx | 27 ------ .../src/modules/cars/Overview.tsx | 71 -------------- .../modules/cars/__tests__/Detail.test.tsx | 37 ------- .../modules/cars/__tests__/Overview.test.tsx | 91 ------------------ .../src/modules/cars/types.ts | 10 -- examples/with-jest-typescript/tsconfig.json | 34 ------- examples/with-jest/.eslintrc | 5 - examples/with-jest/README.md | 39 ++------ .../__snapshots__/index.test.js.snap | 13 --- .../__tests__/__snapshots__/snapshot.js.snap | 89 +++++++++++++++++ examples/with-jest/__tests__/index.test.js | 21 ---- examples/with-jest/__tests__/snapshot.js | 8 ++ .../with-jest/__tests__/testing-library.js | 11 +++ .../with-jest/config/jest/cssTransform.js | 8 ++ examples/with-jest/jest.config.js | 20 +++- examples/with-jest/jest.setup.js | 4 - examples/with-jest/package.json | 27 +++--- examples/with-jest/pages/_app.js | 6 ++ examples/with-jest/pages/index.js | 63 ++++++++++-- examples/with-jest/pages/index.module.css | 82 ++++++++++++++++ examples/with-jest/public/favicon.ico | Bin 0 -> 15086 bytes examples/with-jest/public/zeit.svg | 11 +++ examples/with-jest/setupTests.js | 6 ++ examples/with-jest/styles/global.css | 53 ++++++++++ 58 files changed, 372 insertions(+), 931 deletions(-) delete mode 100644 examples/with-jest-flow/.babelrc delete mode 100644 examples/with-jest-flow/.eslintrc.json delete mode 100644 examples/with-jest-flow/.flowconfig delete mode 100644 examples/with-jest-flow/README.md delete mode 100644 examples/with-jest-flow/__tests__/__snapshots__/index.test.js.snap delete mode 100644 examples/with-jest-flow/__tests__/index.test.js delete mode 100644 examples/with-jest-flow/components/Page.js delete mode 100644 examples/with-jest-flow/flow-typed/next.js.flow delete mode 100644 examples/with-jest-flow/jest.config.js delete mode 100644 examples/with-jest-flow/jest.setup.js delete mode 100644 examples/with-jest-flow/package.json delete mode 100644 examples/with-jest-flow/pages/index.js delete mode 100644 examples/with-jest-react-testing-library/.babelrc delete mode 100644 examples/with-jest-react-testing-library/README.md delete mode 100644 examples/with-jest-react-testing-library/__tests__/__snapshots__/index.test.js.snap delete mode 100644 examples/with-jest-react-testing-library/__tests__/index.test.js delete mode 100644 examples/with-jest-react-testing-library/jest.config.js delete mode 100644 examples/with-jest-react-testing-library/package.json delete mode 100644 examples/with-jest-react-testing-library/pages/index.js delete mode 100644 examples/with-jest-typescript/.babelrc delete mode 100644 examples/with-jest-typescript/README.md delete mode 100644 examples/with-jest-typescript/jest.config.js delete mode 100644 examples/with-jest-typescript/jest.setup.js delete mode 100644 examples/with-jest-typescript/next-env.d.ts delete mode 100644 examples/with-jest-typescript/package.json delete mode 100644 examples/with-jest-typescript/pages/cars.tsx delete mode 100644 examples/with-jest-typescript/pages/index.tsx delete mode 100644 examples/with-jest-typescript/pages/login.tsx delete mode 100644 examples/with-jest-typescript/src/components/NiceCheckbox/index.tsx delete mode 100644 examples/with-jest-typescript/src/components/NiceCheckbox/test.tsx delete mode 100644 examples/with-jest-typescript/src/modules/auth/Login.tsx delete mode 100644 examples/with-jest-typescript/src/modules/auth/__tests__/Login.test.tsx delete mode 100644 examples/with-jest-typescript/src/modules/auth/types.ts delete mode 100644 examples/with-jest-typescript/src/modules/cars/Detail.tsx delete mode 100644 examples/with-jest-typescript/src/modules/cars/Overview.tsx delete mode 100644 examples/with-jest-typescript/src/modules/cars/__tests__/Detail.test.tsx delete mode 100644 examples/with-jest-typescript/src/modules/cars/__tests__/Overview.test.tsx delete mode 100644 examples/with-jest-typescript/src/modules/cars/types.ts delete mode 100644 examples/with-jest-typescript/tsconfig.json delete mode 100644 examples/with-jest/.eslintrc delete mode 100644 examples/with-jest/__tests__/__snapshots__/index.test.js.snap create mode 100644 examples/with-jest/__tests__/__snapshots__/snapshot.js.snap delete mode 100644 examples/with-jest/__tests__/index.test.js create mode 100644 examples/with-jest/__tests__/snapshot.js create mode 100644 examples/with-jest/__tests__/testing-library.js create mode 100644 examples/with-jest/config/jest/cssTransform.js delete mode 100644 examples/with-jest/jest.setup.js create mode 100644 examples/with-jest/pages/_app.js create mode 100644 examples/with-jest/pages/index.module.css create mode 100644 examples/with-jest/public/favicon.ico create mode 100644 examples/with-jest/public/zeit.svg create mode 100644 examples/with-jest/setupTests.js create mode 100644 examples/with-jest/styles/global.css diff --git a/.eslintrc.json b/.eslintrc.json index e9d42f59b9b3fc9..67688eb61c20edd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -21,6 +21,7 @@ } }, "overrides": [ + { "files": ["**/__tests__/**"], "env": { "jest": true } }, { "files": ["**/*.ts", "**/*.tsx"], "parser": "@typescript-eslint/parser", diff --git a/examples/with-jest-flow/.babelrc b/examples/with-jest-flow/.babelrc deleted file mode 100644 index 53d70241c5c66d6..000000000000000 --- a/examples/with-jest-flow/.babelrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "presets": [ - "next/babel" - ], - "plugins": [ - "transform-flow-strip-types" - ] -} \ No newline at end of file diff --git a/examples/with-jest-flow/.eslintrc.json b/examples/with-jest-flow/.eslintrc.json deleted file mode 100644 index 8dafe48e325392a..000000000000000 --- a/examples/with-jest-flow/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parser": "babel-eslint" -} diff --git a/examples/with-jest-flow/.flowconfig b/examples/with-jest-flow/.flowconfig deleted file mode 100644 index 6d3139d54da9a8a..000000000000000 --- a/examples/with-jest-flow/.flowconfig +++ /dev/null @@ -1,8 +0,0 @@ -[ignore] -.*/node_modules/* - -[include] - -[libs] - -[options] diff --git a/examples/with-jest-flow/README.md b/examples/with-jest-flow/README.md deleted file mode 100644 index 801f6874a676217..000000000000000 --- a/examples/with-jest-flow/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Example app with Jest tests and [Flow](https://flowtype.org/) - -This example features an app with jest tests and the [Flow](https://flowtype.org/) static type checker, with the transform-flow-strip-types babel plugin stripping flow type annotations from your output code. - -## How to use - -### Using `create-next-app` - -Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: - -```bash -npm init next-app --example with-jest-flow with-jest-flow-app -# or -yarn create next-app --example with-jest-flow with-jest-flow-app -``` - -### 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/with-jest-flow -cd with-jest-flow -``` - -Install it and run: - -```bash -npm install -npm run dev -# or -yarn -yarn dev -``` - -## Run Jest tests - -```bash -npm run test -# or -yarn test -``` diff --git a/examples/with-jest-flow/__tests__/__snapshots__/index.test.js.snap b/examples/with-jest-flow/__tests__/__snapshots__/index.test.js.snap deleted file mode 100644 index 8c931b4bc41b7f9..000000000000000 --- a/examples/with-jest-flow/__tests__/__snapshots__/index.test.js.snap +++ /dev/null @@ -1,9 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`With Snapshot Testing App shows "Hello World" 1`] = ` -
-
- Hello World -
-
-`; diff --git a/examples/with-jest-flow/__tests__/index.test.js b/examples/with-jest-flow/__tests__/index.test.js deleted file mode 100644 index b63d8158677d124..000000000000000 --- a/examples/with-jest-flow/__tests__/index.test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-env jest */ - -import { shallow } from 'enzyme' -import React from 'react' -import renderer from 'react-test-renderer' - -import App from '../pages/index.js' - -describe('With Enzyme', () => { - it('App shows "Hello World"', () => { - const app = shallow() - - expect(app.find('div').text()).toEqual('Hello World') - }) -}) - -describe('With Snapshot Testing', () => { - it('App shows "Hello World"', () => { - const component = renderer.create() - const tree = component.toJSON() - expect(tree).toMatchSnapshot() - }) -}) diff --git a/examples/with-jest-flow/components/Page.js b/examples/with-jest-flow/components/Page.js deleted file mode 100644 index 783e3bb20c80044..000000000000000 --- a/examples/with-jest-flow/components/Page.js +++ /dev/null @@ -1,17 +0,0 @@ -// @flow -import React, { type Node } from 'react' -import Head from 'next/head' - -type Props = { - children: Node, - title?: string, -} - -export default ({ children, title = 'This is the default title' }: Props) => ( -
- - {title} - - {children} -
-) diff --git a/examples/with-jest-flow/flow-typed/next.js.flow b/examples/with-jest-flow/flow-typed/next.js.flow deleted file mode 100644 index 102b81a5d5010b8..000000000000000 --- a/examples/with-jest-flow/flow-typed/next.js.flow +++ /dev/null @@ -1,35 +0,0 @@ -// @flow - -declare module "next" { - declare type NextApp = { - prepare(): Promise; - getRequestHandler(): any; - render(req: any, res: any, pathname: string, query: any): any; - renderToHTML(req: any, res: any, pathname: string, query: string): string; - renderError(err: Error, req: any, res: any, pathname: any, query: any): any; - renderErrorToHTML(err: Error, req: any, res: any, pathname: string, query: any): string; - }; - declare module.exports: (...opts: any) => NextApp -} - -declare module "next/head" { - declare module.exports: Class>; -} - -declare module "next/link" { - declare module.exports: Class>; -} - -declare module "next/error" { - declare module.exports: Class>; -} - -declare module "next/document" { - declare export var Head: Class>; - declare export var Main: Class>; - declare export var NextScript: Class>; - declare export default Class> & { - getInitialProps: (ctx: {pathname: string, query: any, req?: any, res?: any, err?: any}) => Promise; - renderPage(cb: Function): void; - }; -} diff --git a/examples/with-jest-flow/jest.config.js b/examples/with-jest-flow/jest.config.js deleted file mode 100644 index 50636149295f615..000000000000000 --- a/examples/with-jest-flow/jest.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - setupFiles: ['/jest.setup.js'], - testPathIgnorePatterns: ['/.next/', '/node_modules/'], -} diff --git a/examples/with-jest-flow/jest.setup.js b/examples/with-jest-flow/jest.setup.js deleted file mode 100644 index 3d6cd1d53a1142e..000000000000000 --- a/examples/with-jest-flow/jest.setup.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from 'enzyme' -import Adapter from 'enzyme-adapter-react-16' - -configure({ adapter: new Adapter() }) diff --git a/examples/with-jest-flow/package.json b/examples/with-jest-flow/package.json deleted file mode 100644 index 50824564818c0c0..000000000000000 --- a/examples/with-jest-flow/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "with-jest-flow", - "version": "1.0.0", - "scripts": { - "test": "jest", - "dev": "next", - "build": "next build", - "flow": "flow", - "start": "next start" - }, - "dependencies": { - "next": "latest", - "react": "latest", - "react-dom": "latest" - }, - "devDependencies": { - "@babel/core": "latest", - "babel-eslint": "latest", - "babel-jest": "latest", - "babel-plugin-transform-flow-strip-types": "latest", - "enzyme": "latest", - "enzyme-adapter-react-16": "latest", - "eslint": "latest", - "flow-bin": "latest", - "jest": "latest", - "react-addons-test-utils": "latest", - "react-test-renderer": "latest" - } -} diff --git a/examples/with-jest-flow/pages/index.js b/examples/with-jest-flow/pages/index.js deleted file mode 100644 index ee442ef802eb33b..000000000000000 --- a/examples/with-jest-flow/pages/index.js +++ /dev/null @@ -1,9 +0,0 @@ -// @flow -import React from 'react' -import Page from '../components/Page' - -export default () => ( - -
Hello World
-
-) diff --git a/examples/with-jest-react-testing-library/.babelrc b/examples/with-jest-react-testing-library/.babelrc deleted file mode 100644 index 1ff94f7ed28e16b..000000000000000 --- a/examples/with-jest-react-testing-library/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["next/babel"] -} diff --git a/examples/with-jest-react-testing-library/README.md b/examples/with-jest-react-testing-library/README.md deleted file mode 100644 index 16da585ef9777b6..000000000000000 --- a/examples/with-jest-react-testing-library/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Example app with React Testing Library and Jest - -This example features an app with [react testing library](https://github.com/kentcdodds/react-testing-library) by [Kent Dodds](https://github.com/kentcdodds/). This library encourages your applications to be more accessible and allows you to get your tests closer to using your components the way a user will, which allows your tests to give you more confidence that your application will work when a real user uses it. And also, is a replacement for enzyme. - -## How to use - -### Using `create-next-app` - -Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: - -```bash -npm init next-app --example with-jest-react-testing-library with-rtl-app -# or -yarn create next-app --example with-jest-react-testing-library with-rtl-app -``` - -### 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/with-jest-react-testing-library -cd with-jest-react-testing-library -``` - -Install it and run: - -```bash -npm install -npm run dev -# or -yarn -yarn dev -``` - -## Run Tests - -```bash -npm run test -# or -yarn test -``` diff --git a/examples/with-jest-react-testing-library/__tests__/__snapshots__/index.test.js.snap b/examples/with-jest-react-testing-library/__tests__/__snapshots__/index.test.js.snap deleted file mode 100644 index e804d4bc7e50609..000000000000000 --- a/examples/with-jest-react-testing-library/__tests__/__snapshots__/index.test.js.snap +++ /dev/null @@ -1,11 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`With React Testing Library Snapshot Should match Snapshot 1`] = ` - -
-

- Hello World! -

-
-
-`; diff --git a/examples/with-jest-react-testing-library/__tests__/index.test.js b/examples/with-jest-react-testing-library/__tests__/index.test.js deleted file mode 100644 index 7342d03f4ffd13f..000000000000000 --- a/examples/with-jest-react-testing-library/__tests__/index.test.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-env jest */ - -import React from 'react' -import { render } from '@testing-library/react' - -import App from '../pages/index.js' - -describe('With React Testing Library', () => { - it('Shows "Hello world!"', () => { - const { getByText } = render() - - expect(getByText('Hello World!')).not.toBeNull() - }) -}) - -describe('With React Testing Library Snapshot', () => { - it('Should match Snapshot', () => { - const { asFragment } = render() - - expect(asFragment()).toMatchSnapshot() - }) -}) diff --git a/examples/with-jest-react-testing-library/jest.config.js b/examples/with-jest-react-testing-library/jest.config.js deleted file mode 100644 index 5ea24c9c245528c..000000000000000 --- a/examples/with-jest-react-testing-library/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - testPathIgnorePatterns: ['/.next/', '/node_modules/'], -} diff --git a/examples/with-jest-react-testing-library/package.json b/examples/with-jest-react-testing-library/package.json deleted file mode 100644 index b8d173e56659643..000000000000000 --- a/examples/with-jest-react-testing-library/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "with-jest-react-testing-library", - "version": "1.0.0", - "dependencies": { - "next": "latest", - "react": "^16.11.0", - "react-dom": "^16.11.0" - }, - "devDependencies": { - "@babel/core": "7.6.4", - "@testing-library/react": "9.3.2", - "babel-jest": "24.9.0", - "jest": "24.9.0" - }, - "scripts": { - "test": "jest", - "dev": "next", - "build": "next build", - "start": "next start" - } -} diff --git a/examples/with-jest-react-testing-library/pages/index.js b/examples/with-jest-react-testing-library/pages/index.js deleted file mode 100644 index 92448923a8603c9..000000000000000 --- a/examples/with-jest-react-testing-library/pages/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export default () => ( -
-

Hello World!

-
-) diff --git a/examples/with-jest-typescript/.babelrc b/examples/with-jest-typescript/.babelrc deleted file mode 100644 index 1ff94f7ed28e16b..000000000000000 --- a/examples/with-jest-typescript/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["next/babel"] -} diff --git a/examples/with-jest-typescript/README.md b/examples/with-jest-typescript/README.md deleted file mode 100644 index 285c0755c5d5048..000000000000000 --- a/examples/with-jest-typescript/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Example app with Jest tests inside a NextJS TypeScript app - -This example shows a configuration and several examples for a running Jest tests in a NextJS TypeScript app. - -## How to use - -### Using `create-next-app` - -Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: - -```bash -npm init next-app --example with-jest-typescript with-jest-typescript-app -# or -yarn create next-app --example with-jest-typescript with-jest-typescript-app -``` - -### 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/with-jest-typescript -cd with-jest-typescript -``` - -Install it and run: - -```bash -npm install -npm run dev -# or -yarn -yarn dev -``` - -## Run Jest tests - -```bash -npm run test -# or -yarn test -``` diff --git a/examples/with-jest-typescript/jest.config.js b/examples/with-jest-typescript/jest.config.js deleted file mode 100644 index 7fa462816387d58..000000000000000 --- a/examples/with-jest-typescript/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - setupFiles: ['/jest.setup.js'], -} diff --git a/examples/with-jest-typescript/jest.setup.js b/examples/with-jest-typescript/jest.setup.js deleted file mode 100644 index 79ef380fee9ec06..000000000000000 --- a/examples/with-jest-typescript/jest.setup.js +++ /dev/null @@ -1,4 +0,0 @@ -const Enzyme = require('enzyme') -const Adapter = require('enzyme-adapter-react-16') - -Enzyme.configure({ adapter: new Adapter() }) diff --git a/examples/with-jest-typescript/next-env.d.ts b/examples/with-jest-typescript/next-env.d.ts deleted file mode 100644 index 7b7aa2c7727d88b..000000000000000 --- a/examples/with-jest-typescript/next-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/examples/with-jest-typescript/package.json b/examples/with-jest-typescript/package.json deleted file mode 100644 index 6c5062331059020..000000000000000 --- a/examples/with-jest-typescript/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "with-jest-typescript", - "version": "1.0.0", - "scripts": { - "test": "jest", - "dev": "next", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "next": "latest", - "react": "^16.8.4", - "react-dom": "^16.8.4" - }, - "devDependencies": { - "@types/jest": "^24.0.23", - "@types/react": "^16.8.8", - "@types/react-dom": "^16.8.2", - "babel-core": "^6.26.3", - "babel-jest": "^24.9.0", - "enzyme": "^3.9.0", - "enzyme-adapter-react-16": "^1.11.2", - "jest": "^24.9.0", - "react-addons-test-utils": "^15.6.2", - "react-test-renderer": "^16.8.4", - "typescript": "^3.3.3333" - } -} diff --git a/examples/with-jest-typescript/pages/cars.tsx b/examples/with-jest-typescript/pages/cars.tsx deleted file mode 100644 index 32ca8e25a18ddff..000000000000000 --- a/examples/with-jest-typescript/pages/cars.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import CarsOverview from '../src/modules/cars/Overview' - -const CarsPage = () => - -export default CarsPage diff --git a/examples/with-jest-typescript/pages/index.tsx b/examples/with-jest-typescript/pages/index.tsx deleted file mode 100644 index 5ade772248f55cc..000000000000000 --- a/examples/with-jest-typescript/pages/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -const IndexPage = () => ( -

Testing Next.js App written in TypeScript with Jest

-) - -export default IndexPage diff --git a/examples/with-jest-typescript/pages/login.tsx b/examples/with-jest-typescript/pages/login.tsx deleted file mode 100644 index 0c76839a491a21b..000000000000000 --- a/examples/with-jest-typescript/pages/login.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import Login from '../src/modules/auth/Login' - -const LoginPage = () => - -export default LoginPage diff --git a/examples/with-jest-typescript/src/components/NiceCheckbox/index.tsx b/examples/with-jest-typescript/src/components/NiceCheckbox/index.tsx deleted file mode 100644 index bdf9a28e785d561..000000000000000 --- a/examples/with-jest-typescript/src/components/NiceCheckbox/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from 'react' - -interface NiceCheckboxProps { - rootID: string - id: string - name: string - value: string - label: string -} - -const NiceCheckbox: React.SFC = ( - props: NiceCheckboxProps -): JSX.Element => { - return ( -
- - -
- ) -} - -export default NiceCheckbox diff --git a/examples/with-jest-typescript/src/components/NiceCheckbox/test.tsx b/examples/with-jest-typescript/src/components/NiceCheckbox/test.tsx deleted file mode 100644 index c32a5dfbab58291..000000000000000 --- a/examples/with-jest-typescript/src/components/NiceCheckbox/test.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-env jest */ -import React from 'react' -import { shallow } from 'enzyme' - -import NiceCheckbox from './index' - -describe('NiceCheckbox', () => { - it('renders the checkbox with correct label', () => { - const wrapper = shallow( - - ) - expect( - wrapper - .find('#NiceCarCheckbox') - .find('label') - .text() - ).toEqual('Is this car available?') - }) -}) diff --git a/examples/with-jest-typescript/src/modules/auth/Login.tsx b/examples/with-jest-typescript/src/modules/auth/Login.tsx deleted file mode 100644 index ed1b10184d46a82..000000000000000 --- a/examples/with-jest-typescript/src/modules/auth/Login.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import React, { ChangeEvent } from 'react' -import Router from 'next/router' - -import * as T from './types' - -export interface LoginProps {} - -export interface LoginState { - credentials: T.LoginCredentials - isLoginLoading: boolean -} - -export default class Login extends React.Component { - constructor(props: LoginProps) { - super(props) - - this.state = { - isLoginLoading: false, - credentials: { - email: null, - password: null, - }, - } - } - - handleCredentialsChange = (e: ChangeEvent) => { - let { credentials } = this.state - credentials[e.target.name] = e.target.value - - this.setState({ credentials }) - } - - handleLoginSubmit = (e: React.MouseEvent) => { - e.preventDefault() - this.setState({ isLoginLoading: true }) - - setTimeout(() => { - this.setState({ isLoginLoading: false }) - Router.replace('/cars') - }, 500) - } - - render() { - const { credentials } = this.state - - return ( -
-

Login

-
- - - - -
-
- ) - } -} diff --git a/examples/with-jest-typescript/src/modules/auth/__tests__/Login.test.tsx b/examples/with-jest-typescript/src/modules/auth/__tests__/Login.test.tsx deleted file mode 100644 index 87bbdfa8ad00e2c..000000000000000 --- a/examples/with-jest-typescript/src/modules/auth/__tests__/Login.test.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-env jest */ -import React from 'react' -import { shallow } from 'enzyme' - -import Login from './../Login' - -describe('Login', () => { - it('renders the h1 title', () => { - const login = shallow() - expect(login.find('h1').text()).toEqual('Login') - }) - - it('renders the form', () => { - const login = shallow() - expect(login.find('form')).toHaveLength(1) - }) - - it('changes the text of email', () => { - const login = shallow() - login.find('#formEmail').simulate('change', { - target: { - name: 'email', - value: 'some@test.com', - }, - }) - expect( - login - .update() - .find('#formEmail') - .props().value - ).toEqual('some@test.com') - }) - - it('changes the text of login button after clicking it', () => { - const login = shallow() - login.find('#loginSubmit').simulate('click', { preventDefault() {} }) - expect( - login - .update() - .find('#loginSubmit') - .text() - ).toEqual('Logging in...') - }) -}) diff --git a/examples/with-jest-typescript/src/modules/auth/types.ts b/examples/with-jest-typescript/src/modules/auth/types.ts deleted file mode 100644 index 36dc07076a31fe7..000000000000000 --- a/examples/with-jest-typescript/src/modules/auth/types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface LoginCredentials { - email: string - password: string -} diff --git a/examples/with-jest-typescript/src/modules/cars/Detail.tsx b/examples/with-jest-typescript/src/modules/cars/Detail.tsx deleted file mode 100644 index a6b57550937665e..000000000000000 --- a/examples/with-jest-typescript/src/modules/cars/Detail.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from 'react' - -import * as T from './types' - -interface DetailProps { - car: T.Car -} - -const Detail: React.SFC = ({ car }: DetailProps) => { - return ( -
-

{`${car.make} ${car.model}`}

-

Engine : {car.engine}

-

Year : {car.year}

-

Mileage : {car.mileage}

-

Equipment :

-
    - {car.equipment && - car.equipment.map((e: string, index: number) => ( -
  • {e}
  • - ))} -
-
- ) -} - -export default Detail diff --git a/examples/with-jest-typescript/src/modules/cars/Overview.tsx b/examples/with-jest-typescript/src/modules/cars/Overview.tsx deleted file mode 100644 index c9b74515c36fdd6..000000000000000 --- a/examples/with-jest-typescript/src/modules/cars/Overview.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import * as React from 'react' - -import * as T from './types' - -export interface CarsOverviewProps { - cars?: T.CarList -} - -export interface CarsOverviewState { - selectedCar: T.Car -} - -export default class CarsOverview extends React.Component< - CarsOverviewProps, - CarsOverviewState -> { - constructor(props: CarsOverviewProps) { - super(props) - - this.state = { - selectedCar: null, - } - } - - handleSelectCar = (car: T.Car): void => { - this.setState({ selectedCar: car }) - } - - renderCarsList = (cars?: T.CarList): JSX.Element => { - if (!cars || cars.length === 0) { - return

No cars

- } - - return ( -
    - {cars.map( - (car: T.Car, index: number): JSX.Element => ( -
  • this.handleSelectCar(car)}> - {car.make} {car.model} -
  • - ) - )} -
- ) - } - - renderCarInfo = (car: T.Car): JSX.Element => { - if (!car) { - return null - } - - return ( -
-

{`${car.make} ${car.model}`}

-
{car.engine}
-
- ) - } - - render() { - return ( -
-

Cars Overview

- -
{this.renderCarsList(this.props.cars)}
- - {this.renderCarInfo(this.state.selectedCar)} -
- ) - } -} diff --git a/examples/with-jest-typescript/src/modules/cars/__tests__/Detail.test.tsx b/examples/with-jest-typescript/src/modules/cars/__tests__/Detail.test.tsx deleted file mode 100644 index 7d81cc149711d50..000000000000000 --- a/examples/with-jest-typescript/src/modules/cars/__tests__/Detail.test.tsx +++ /dev/null @@ -1,37 +0,0 @@ -/* eslint-env jest */ -import React from 'react' -import { shallow } from 'enzyme' - -import Detail from './../Detail' - -const __CAR__ = { - make: 'Volvo', - model: 'XC60', - engine: 'T5', - year: 2018, - mileage: 123, - equipment: ['Leather', 'Seat heating', 'City Safety'], -} - -describe('Car detail', () => { - it('renders correct title', () => { - const detail = shallow() - expect(detail.find('h1').text()).toEqual('Volvo XC60') - }) - - it('renders correct list item', () => { - const detail = shallow() - expect(detail.childAt(1).text()).toEqual('Engine : T5') - }) - - it('renders correct equipment list item', () => { - const detail = shallow() - expect( - detail - .children() - .find('ul') - .childAt(1) - .text() - ).toEqual('Seat heating') - }) -}) diff --git a/examples/with-jest-typescript/src/modules/cars/__tests__/Overview.test.tsx b/examples/with-jest-typescript/src/modules/cars/__tests__/Overview.test.tsx deleted file mode 100644 index 196ab75786dc81a..000000000000000 --- a/examples/with-jest-typescript/src/modules/cars/__tests__/Overview.test.tsx +++ /dev/null @@ -1,91 +0,0 @@ -/* eslint-env jest */ -import React from 'react' -import { shallow } from 'enzyme' - -import Overview from './../Overview' - -const __CARS__ = [ - { - make: 'Volvo', - model: 'C30', - engine: 'T5', - year: 2018, - mileage: 123, - equipment: ['Leather', 'Seat heating', 'City Safety'], - }, - { - make: 'Volvo', - model: 'XC60', - engine: 'D5', - year: 2018, - mileage: 456, - equipment: ['Leather', 'Seat heating', 'City Safety'], - }, - { - make: 'Volvo', - model: 'XC90', - engine: 'T6', - year: 2018, - mileage: 789, - equipment: ['Leather', 'Seat heating', 'City Safety'], - }, -] - -describe('Cars overview', () => { - it('renders the h1 title', () => { - const overview = shallow() - expect(overview.find('h1').text()).toEqual('Cars Overview') - }) - - it('renders empty cars list when no cars are provided', () => { - const overview = shallow() - expect( - overview - .find('.Cars__List') - .children() - .find('p') - .text() - ).toEqual('No cars') - }) - - it('renders cars list with 3 items when 3 cars are provided', () => { - const overview = shallow() - expect( - overview - .find('.Cars__List') - .children() - .find('ul') - .children() - ).toHaveLength(3) - }) - - it('renders cars list with the expected item on third place', () => { - const overview = shallow() - expect( - overview - .find('.Cars__List') - .children() - .find('ul') - .childAt(2) - .text() - ).toEqual('Volvo XC90') - }) - - it('renders car detail after clicking on an item in cars list', () => { - const overview = shallow() - overview - .find('.Cars__List') - .children() - .find('ul') - .childAt(1) - .simulate('click', { preventDefault() {} }) - - expect( - overview - .update() - .find('.CarInfo') - .find('h2') - .text() - ).toEqual('Volvo XC60') - }) -}) diff --git a/examples/with-jest-typescript/src/modules/cars/types.ts b/examples/with-jest-typescript/src/modules/cars/types.ts deleted file mode 100644 index 5a1ee5acad47e94..000000000000000 --- a/examples/with-jest-typescript/src/modules/cars/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface Car { - make: string - model: string - engine: string - year: number - mileage: number - equipment: string[] -} - -export type CarList = Array diff --git a/examples/with-jest-typescript/tsconfig.json b/examples/with-jest-typescript/tsconfig.json deleted file mode 100644 index 14dfe3ff95d483c..000000000000000 --- a/examples/with-jest-typescript/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "target": "esnext", - "module": "esnext", - "jsx": "preserve", - "allowJs": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "skipLibCheck": true, - "baseUrl": ".", - "typeRoots": ["./node_modules/@types"], - "lib": ["dom", "es2015", "es2016"], - "strict": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "isolatedModules": true - }, - "exclude": [ - "node_modules", - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.test.ts", - "**/*.test.tsx" - ], - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] -} diff --git a/examples/with-jest/.eslintrc b/examples/with-jest/.eslintrc deleted file mode 100644 index 55f121d152d4f5c..000000000000000 --- a/examples/with-jest/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "env": { - "jest": true - } -} diff --git a/examples/with-jest/README.md b/examples/with-jest/README.md index 74c3c84fc0d211c..00ec3dfe91e2d15 100644 --- a/examples/with-jest/README.md +++ b/examples/with-jest/README.md @@ -1,42 +1,21 @@ -# Example app with Jest tests +# Next.js + Jest -This example features an app with jest tests. +This example shows how to configure Jest to work with Next.js. -## How to use +This includes Next.js' built-in support for Global CSS, CSS Modules, and TypeScript! -### Using `create-next-app` +## How to Use -Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: +Quickly get started using [Create Next App](https://github.com/zeit/next.js/tree/canary/packages/create-next-app#readme)! -```bash -npm init next-app --example with-jest with-jest-app -# or -yarn create next-app --example with-jest with-jest-app -``` - -### 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/with-jest -cd with-jest -``` - -Install it and run: +In your terminal, run the following command: ```bash -npm install -npm run dev -# or -yarn -yarn dev +npx create-next-app --example with-jest ``` -## Run Jest tests +## Run Jest Tests ```bash -npm run test -# or -yarn test +npm test ``` diff --git a/examples/with-jest/__tests__/__snapshots__/index.test.js.snap b/examples/with-jest/__tests__/__snapshots__/index.test.js.snap deleted file mode 100644 index f2f9870222723cc..000000000000000 --- a/examples/with-jest/__tests__/__snapshots__/index.test.js.snap +++ /dev/null @@ -1,13 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`With Snapshot Testing App shows "Hello world!" 1`] = ` -
-

- Hello World! -

-
-`; diff --git a/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap b/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap new file mode 100644 index 000000000000000..523644d734cab08 --- /dev/null +++ b/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap @@ -0,0 +1,89 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders homepage unchanged 1`] = ` + +`; diff --git a/examples/with-jest/__tests__/index.test.js b/examples/with-jest/__tests__/index.test.js deleted file mode 100644 index fda0f959494cc54..000000000000000 --- a/examples/with-jest/__tests__/index.test.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react' -import { shallow } from 'enzyme' -import renderer from 'react-test-renderer' - -import App from '../pages/index' - -describe('With Enzyme', () => { - it('App shows "Hello world!"', () => { - const app = shallow() - - expect(app.find('p').text()).toEqual('Hello World!') - }) -}) - -describe('With Snapshot Testing', () => { - it('App shows "Hello world!"', () => { - const component = renderer.create() - const tree = component.toJSON() - expect(tree).toMatchSnapshot() - }) -}) diff --git a/examples/with-jest/__tests__/snapshot.js b/examples/with-jest/__tests__/snapshot.js new file mode 100644 index 000000000000000..2d822e87189044a --- /dev/null +++ b/examples/with-jest/__tests__/snapshot.js @@ -0,0 +1,8 @@ +import React from 'react' +import renderer from 'react-test-renderer' +import Index from '../pages/index' + +it('renders homepage unchanged', () => { + const tree = renderer.create().toJSON() + expect(tree).toMatchSnapshot() +}) diff --git a/examples/with-jest/__tests__/testing-library.js b/examples/with-jest/__tests__/testing-library.js new file mode 100644 index 000000000000000..1c5e1bfd875569e --- /dev/null +++ b/examples/with-jest/__tests__/testing-library.js @@ -0,0 +1,11 @@ +import React from 'react' +import { render } from '@testing-library/react' +import Index from '../pages/index' + +test('renders deploy link', () => { + const { getByText } = render() + const linkElement = getByText( + /Instantly deploy your Next\.js site to a public URL with ZEIT Now\./ + ) + expect(linkElement).toBeInTheDocument() +}) diff --git a/examples/with-jest/config/jest/cssTransform.js b/examples/with-jest/config/jest/cssTransform.js new file mode 100644 index 000000000000000..24f38118fcdb601 --- /dev/null +++ b/examples/with-jest/config/jest/cssTransform.js @@ -0,0 +1,8 @@ +module.exports = { + process() { + return 'module.exports = {};' + }, + getCacheKey() { + return 'cssTransform' + }, +} diff --git a/examples/with-jest/jest.config.js b/examples/with-jest/jest.config.js index 50636149295f615..3863e5c0490dbe9 100644 --- a/examples/with-jest/jest.config.js +++ b/examples/with-jest/jest.config.js @@ -1,4 +1,20 @@ module.exports = { - setupFiles: ['/jest.setup.js'], - testPathIgnorePatterns: ['/.next/', '/node_modules/'], + collectCoverageFrom: [ + '**/*.{js,jsx,ts,tsx}', + '!**/*.d.ts', + '!**/node_modules/**', + ], + setupFilesAfterEnv: ['/setupTests.js'], + testPathIgnorePatterns: ['/node_modules/', '/.next/'], + transform: { + '^.+\\.(js|jsx|ts|tsx)$': '/node_modules/babel-jest', + '^.+\\.css$': '/config/jest/cssTransform.js', + }, + transformIgnorePatterns: [ + '/node_modules/', + '^.+\\.module\\.(css|sass|scss)$', + ], + moduleNameMapper: { + '^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy', + }, } diff --git a/examples/with-jest/jest.setup.js b/examples/with-jest/jest.setup.js deleted file mode 100644 index 3d6cd1d53a1142e..000000000000000 --- a/examples/with-jest/jest.setup.js +++ /dev/null @@ -1,4 +0,0 @@ -import { configure } from 'enzyme' -import Adapter from 'enzyme-adapter-react-16' - -configure({ adapter: new Adapter() }) diff --git a/examples/with-jest/package.json b/examples/with-jest/package.json index 8e726b971b81218..25a6fa4b0f9095f 100644 --- a/examples/with-jest/package.json +++ b/examples/with-jest/package.json @@ -1,21 +1,24 @@ { "name": "with-jest", - "version": "1.0.0", + "version": "0.1.0", + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "test": "jest --watch", + "test:ci": "jest --ci" + }, "dependencies": { - "next": "9.1.4", + "next": "latest", "react": "16.12.0", "react-dom": "16.12.0" }, "devDependencies": { - "enzyme": "3.10.0", - "enzyme-adapter-react-16": "1.15.1", - "jest": "24.9.0", - "react-test-renderer": "16.12.0" - }, - "scripts": { - "test": "jest", - "dev": "next", - "build": "next build", - "start": "next start" + "@testing-library/jest-dom": "^5.1.0", + "@testing-library/react": "^9.4.0", + "babel-jest": "^25.1.0", + "identity-obj-proxy": "^3.0.0", + "jest": "^25.1.0", + "react-test-renderer": "^16.12.0" } } diff --git a/examples/with-jest/pages/_app.js b/examples/with-jest/pages/_app.js new file mode 100644 index 000000000000000..d5694127266f207 --- /dev/null +++ b/examples/with-jest/pages/_app.js @@ -0,0 +1,6 @@ +import '../styles/global.css' + +// This default export is required in a new `pages/_app.js` file. +export default function MyApp({ Component, pageProps }) { + return +} diff --git a/examples/with-jest/pages/index.js b/examples/with-jest/pages/index.js index 2c38a6d26506066..c12de54c6a618f1 100644 --- a/examples/with-jest/pages/index.js +++ b/examples/with-jest/pages/index.js @@ -1,10 +1,57 @@ -export default () => ( -
- -

Hello World!

+import Head from 'next/head' +import React from 'react' +import styles from './index.module.css' + +const Home = () => ( + ) + +export default Home diff --git a/examples/with-jest/pages/index.module.css b/examples/with-jest/pages/index.module.css new file mode 100644 index 000000000000000..d6754a34ab1df3f --- /dev/null +++ b/examples/with-jest/pages/index.module.css @@ -0,0 +1,82 @@ +.container { + min-height: 100vh; + padding: 0 0.5rem; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title a { + color: #0070f3; + text-decoration: none; +} + +.title a:hover, +.title a:focus, +.title a:active { + text-decoration: underline; +} + +.title { + margin: 0; + line-height: 1.15; + font-size: 4rem; +} + +.title, +.description { + text-align: center; +} + +.description { + line-height: 1.5; + font-size: 1.5rem; +} + +.grid { + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + + max-width: 800px; + margin-top: 3rem; +} + +.card { + margin: 1rem; + flex-basis: 45%; + padding: 1.5rem; + text-align: left; + color: inherit; + text-decoration: none; + border: 1px solid #eaeaea; + border-radius: 10px; + transition: color 0.15s ease, border-color 0.15s ease; +} + +.card:hover, +.card:focus, +.card:active { + color: #0070f3; + border-color: #0070f3; +} + +.card h3 { + margin: 0 0 1rem 0; + font-size: 1.5rem; +} + +.card p { + margin: 0; + font-size: 1.25rem; + line-height: 1.5; +} + +@media (max-width: 600px) { + .grid { + width: 100%; + flex-direction: column; + } +} diff --git a/examples/with-jest/public/favicon.ico b/examples/with-jest/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4965832f2c9b0605eaa189b7c7fb11124d24e48a GIT binary patch literal 15086 zcmeHOOH5Q(7(R0cc?bh2AT>N@1PWL!LLfZKyG5c!MTHoP7_p!sBz0k$?pjS;^lmgJ zU6^i~bWuZYHL)9$wuvEKm~qo~(5=Lvx5&Hv;?X#m}i|`yaGY4gX+&b>tew;gcnRQA1kp zBbm04SRuuE{Hn+&1wk%&g;?wja_Is#1gKoFlI7f`Gt}X*-nsMO30b_J@)EFNhzd1QM zdH&qFb9PVqQOx@clvc#KAu}^GrN`q5oP(8>m4UOcp`k&xwzkTio*p?kI4BPtIwX%B zJN69cGsm=x90<;Wmh-bs>43F}ro$}Of@8)4KHndLiR$nW?*{Rl72JPUqRr3ta6e#A z%DTEbi9N}+xPtd1juj8;(CJt3r9NOgb>KTuK|z7!JB_KsFW3(pBN4oh&M&}Nb$Ee2 z$-arA6a)CdsPj`M#1DS>fqj#KF%0q?w50GN4YbmMZIoF{e1yTR=4ablqXHBB2!`wM z1M1ke9+<);|AI;f=2^F1;G6Wfpql?1d5D4rMr?#f(=hkoH)U`6Gb)#xDLjoKjp)1;Js@2Iy5yk zMXUqj+gyk1i0yLjWS|3sM2-1ECc;MAz<4t0P53%7se$$+5Ex`L5TQO_MMXXi04UDIU+3*7Ez&X|mj9cFYBXqM{M;mw_ zpw>azP*qjMyNSD4hh)XZt$gqf8f?eRSFX8VQ4Y+H3jAtvyTrXr`qHAD6`m;aYmH2zOhJC~_*AuT} zvUxC38|JYN94i(05R)dVKgUQF$}#cxV7xZ4FULqFCNX*Forhgp*yr6;DsIk=ub0Hv zpk2L{9Q&|uI^b<6@i(Y+iSxeO_n**4nRLc`P!3ld5jL=nZRw6;DEJ*1z6Pvg+eW|$lnnjO zjd|8>6l{i~UxI244CGn2kK@cJ|#ecwgSyt&HKA2)z zrOO{op^o*- + + + + + + + + + diff --git a/examples/with-jest/setupTests.js b/examples/with-jest/setupTests.js new file mode 100644 index 000000000000000..5aa7dfce10a7eb1 --- /dev/null +++ b/examples/with-jest/setupTests.js @@ -0,0 +1,6 @@ +// optional: configure or set up a testing framework before each test +// if you delete this file, remove `setupFilesAfterEnv` from `jest.config.js` + +// used for __tests__/testing-library.js +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom/extend-expect' diff --git a/examples/with-jest/styles/global.css b/examples/with-jest/styles/global.css new file mode 100644 index 000000000000000..0afcfbe32f1d0e8 --- /dev/null +++ b/examples/with-jest/styles/global.css @@ -0,0 +1,53 @@ +html, +body { + padding: 0; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; +} + +* { + box-sizing: border-box; +} + +main { + padding: 5rem 0; + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +footer { + width: 100%; + height: 100px; + border-top: 1px solid #eaeaea; + display: flex; + justify-content: center; + align-items: center; +} + +footer img { + margin-left: 0.5rem; +} + +footer a { + display: flex; + justify-content: center; + align-items: center; +} + +a { + color: inherit; + text-decoration: none; +} + +code { + background: #fafafa; + border-radius: 5px; + padding: 0.75rem; + font-size: 1.1rem; + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, + Bitstream Vera Sans Mono, Courier New, monospace; +} From c480c37c8e23d95fb976012e879376bb3a8bb275 Mon Sep 17 00:00:00 2001 From: Lachlan Campbell Date: Mon, 3 Feb 2020 14:55:14 -0500 Subject: [PATCH 293/321] Skip undefined attribute in Head (#9856) * Fix #8655, skip rendering meta tags with undefined props * Filter all tags, not just meta * Only render defined props * Remove filtering of undefined strings Co-Authored-By: Tim Neutkens * Replace Object.entries * Remove filtering code * Simplify code * Add test * Add tests for undefined head prop value and tweak check * Update to strip undefined prop values to match react * Update head.js Co-authored-by: Tim Neutkens Co-authored-by: Joe Haddad Co-authored-by: JJ Kasper --- packages/next/client/head-manager.js | 3 +++ test/integration/client-navigation/pages/head.js | 3 +++ test/integration/client-navigation/test/index.test.js | 9 +++++++++ test/integration/client-navigation/test/rendering.js | 8 ++++++++ 4 files changed, 23 insertions(+) diff --git a/packages/next/client/head-manager.js b/packages/next/client/head-manager.js index 865f50bc52a887d..5eec36503c0ce6e 100644 --- a/packages/next/client/head-manager.js +++ b/packages/next/client/head-manager.js @@ -95,6 +95,9 @@ function reactElementToDOM({ type, props }) { if (!props.hasOwnProperty(p)) continue if (p === 'children' || p === 'dangerouslySetInnerHTML') continue + // we don't render undefined props to the DOM + if (props[p] === undefined) continue + const attr = DOMAttributeNames[p] || p.toLowerCase() el.setAttribute(attr, props[p]) } diff --git a/test/integration/client-navigation/pages/head.js b/test/integration/client-navigation/pages/head.js index 6b868ec0de995ec..ae698dc67e70e31 100644 --- a/test/integration/client-navigation/pages/head.js +++ b/test/integration/client-navigation/pages/head.js @@ -16,6 +16,9 @@ export default () => ( + {/* this will not render the content prop */} + + {/* allow duplicates for specific tags */} diff --git a/test/integration/client-navigation/test/index.test.js b/test/integration/client-navigation/test/index.test.js index c236e8bd249ac66..81aab25d0b341e1 100644 --- a/test/integration/client-navigation/test/index.test.js +++ b/test/integration/client-navigation/test/index.test.js @@ -1097,6 +1097,15 @@ describe('Client Navigation', () => { await browser.close() }) + it('should handle undefined prop in head client-side', async () => { + const browser = await webdriver(context.appPort, '/head') + const value = await browser.eval( + `document.querySelector('meta[name="empty-content"]').hasAttribute('content')` + ) + + expect(value).toBe(false) + }) + renderingSuite( (p, q) => renderViaHTTP(context.appPort, p, q), (p, q) => fetchViaHTTP(context.appPort, p, q) diff --git a/test/integration/client-navigation/test/rendering.js b/test/integration/client-navigation/test/rendering.js index b7679fbb4579600..4bc7ef238d89d22 100644 --- a/test/integration/client-navigation/test/rendering.js +++ b/test/integration/client-navigation/test/rendering.js @@ -17,6 +17,14 @@ export default function(render, fetch) { expect(html.includes('My component!')).toBeTruthy() }) + it('should handle undefined prop in head server-side', async () => { + const html = await render('/head') + const $ = cheerio.load(html) + const value = 'content' in $('meta[name="empty-content"]').attr() + + expect(value).toBe(false) + }) + test('renders with fragment syntax', async () => { const html = await render('/fragment-syntax') expect(html.includes('My component!')).toBeTruthy() From 89b2dfc502815cbbf660c86eea34c60e58a662d8 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 3 Feb 2020 16:34:23 -0600 Subject: [PATCH 294/321] =?UTF-8?q?Make=20sure=20runtime=20config=20works?= =?UTF-8?q?=20in=20dev=20mode=20for=20serverless=20targ=E2=80=A6=20(#10402?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/next-server/server/next-server.ts | 10 ++-- .../test/index.test.js | 59 +++++++++++++------ 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index a67d149c04a3bea..9f963061ada1228 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -163,12 +163,10 @@ export default class Server { } // Initialize next/config with the environment configuration - if (this.nextConfig.target === 'server') { - envConfig.setConfig({ - serverRuntimeConfig, - publicRuntimeConfig, - }) - } + envConfig.setConfig({ + serverRuntimeConfig, + publicRuntimeConfig, + }) this.serverBuildDir = join( this.distDir, diff --git a/test/integration/serverless-runtime-configs/test/index.test.js b/test/integration/serverless-runtime-configs/test/index.test.js index b9776f2055ed230..648ff080b076ca8 100644 --- a/test/integration/serverless-runtime-configs/test/index.test.js +++ b/test/integration/serverless-runtime-configs/test/index.test.js @@ -6,6 +6,7 @@ import { nextBuild, findPort, killApp, + launchApp, renderViaHTTP, initNextServerScript, } from 'next-test-utils' @@ -74,24 +75,7 @@ describe('Serverless runtime configs', () => { ) }) - it('should support runtime configs in serverless mode', async () => { - await fs.writeFile( - nextConfigPath, - `module.exports = { - target: 'serverless', - serverRuntimeConfig: { - hello: 'world' - }, - publicRuntimeConfig: { - another: 'thing' - } - }` - ) - - await nextBuild(appDir, [], { stderr: true, stdout: true }) - const appPort = await findPort() - const app = await nextStart(appDir, appPort) - + const testRuntimeConfig = async (app, appPort) => { const browser = await webdriver(appPort, '/config') const clientHTML = await browser.eval(`document.documentElement.innerHTML`) @@ -140,5 +124,44 @@ describe('Serverless runtime configs', () => { expect(JSON.parse(docClientConfig)).toEqual(expectedSsrConfig) expect(JSON.parse(apiJson)).toEqual(expectedSsrConfig) + } + + it('should support runtime configs in serverless mode (production)', async () => { + await fs.writeFile( + nextConfigPath, + `module.exports = { + target: 'serverless', + serverRuntimeConfig: { + hello: 'world' + }, + publicRuntimeConfig: { + another: 'thing' + } + }` + ) + + await nextBuild(appDir, [], { stderr: true, stdout: true }) + const appPort = await findPort() + const app = await nextStart(appDir, appPort) + await testRuntimeConfig(app, appPort) + }) + + it('should support runtime configs in serverless mode (dev)', async () => { + await fs.writeFile( + nextConfigPath, + `module.exports = { + target: 'serverless', + serverRuntimeConfig: { + hello: 'world' + }, + publicRuntimeConfig: { + another: 'thing' + } + }` + ) + + const appPort = await findPort() + const app = await launchApp(appDir, appPort) + await testRuntimeConfig(app, appPort) }) }) From 821b32554759041d428a1d4d26aa12b0aa301515 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 3 Feb 2020 16:38:10 -0600 Subject: [PATCH 295/321] v9.2.2-canary.10 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index b1028ed5beef446..4deca3e2040ddef 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.9" + "version": "9.2.2-canary.10" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 875bc1f8fb9e042..c23ad7613e2ad26 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 9af286a0fb7fc40..bb13e2c0e1b56a1 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 935d0731fd8e79a..d5c5efea5e30e25 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 142c65d0c0879d4..352c4c722be78f4 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index b2c0c5d0364bbc8..b47f072b06c3b74 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index b5b6926eb02f757..050ced1a24dd9cf 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index efa3af0575bfce9..28661f7600192b0 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index 056f4226ebd4efc..ffc72443e88795e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.9", + "version": "9.2.2-canary.10", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.9", + "@next/polyfill-nomodule": "9.2.2-canary.10", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From 909ab3b17927a7f8f045f3fdaff43ea36037b168 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Tue, 4 Feb 2020 10:46:22 -0500 Subject: [PATCH 296/321] Check for invalid pages (#10403) * Updated event * adjust regex * adjust regexp more * Better test file regex * add tests * Update index.test.js * Rename test file Co-authored-by: Joe Haddad --- packages/next/build/index.ts | 3 +-- packages/next/telemetry/events/build.ts | 23 +++++++++++++++++-- .../telemetry/pages/__ytho__/lel.js | 3 +++ .../telemetry/pages/hello.test.skip | 1 + test/integration/telemetry/test/index.test.js | 20 ++++++++++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 test/integration/telemetry/pages/__ytho__/lel.js create mode 100644 test/integration/telemetry/pages/hello.test.skip diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index f2ec3a9ce06e17f..179ab522353869c 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -770,9 +770,8 @@ export default async function build(dir: string, conf = null): Promise { const analysisEnd = process.hrtime(analysisBegin) telemetry.record( - eventBuildOptimize({ + eventBuildOptimize(pagePaths, { durationInSeconds: analysisEnd[0], - totalPageCount: pagePaths.length, staticPageCount: staticPages.size, ssrPageCount: pagePaths.length - staticPages.size, }) diff --git a/packages/next/telemetry/events/build.ts b/packages/next/telemetry/events/build.ts index b413f0b3b86a40b..f3ba100bb721d36 100644 --- a/packages/next/telemetry/events/build.ts +++ b/packages/next/telemetry/events/build.ts @@ -19,13 +19,32 @@ type EventBuildOptimized = { totalPageCount: number staticPageCount: number ssrPageCount: number + hasDunderPages: boolean + hasTestPages: boolean } +const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(? ): { eventName: string; payload: EventBuildOptimized } { return { eventName: EVENT_BUILD_OPTIMIZE, - payload: event, + payload: { + ...event, + totalPageCount: pagePaths.length, + hasDunderPages: pagePaths.some(path => + REGEXP_DIRECTORY_DUNDER.test(path) + ), + hasTestPages: pagePaths.some( + path => REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path) + ), + }, } } diff --git a/test/integration/telemetry/pages/__ytho__/lel.js b/test/integration/telemetry/pages/__ytho__/lel.js new file mode 100644 index 000000000000000..3cbd09bcbc5a097 --- /dev/null +++ b/test/integration/telemetry/pages/__ytho__/lel.js @@ -0,0 +1,3 @@ +export default () => { + return 'oops, I happen to look like a React component' +} diff --git a/test/integration/telemetry/pages/hello.test.skip b/test/integration/telemetry/pages/hello.test.skip new file mode 100644 index 000000000000000..9780095a4d7b437 --- /dev/null +++ b/test/integration/telemetry/pages/hello.test.skip @@ -0,0 +1 @@ +export default () => 'Hello Test' diff --git a/test/integration/telemetry/test/index.test.js b/test/integration/telemetry/test/index.test.js index da2fe430ecf4dec..ea11bae5efc102c 100644 --- a/test/integration/telemetry/test/index.test.js +++ b/test/integration/telemetry/test/index.test.js @@ -92,6 +92,26 @@ describe('Telemetry CLI', () => { expect(stderr2).toMatch(/isSrcDir.*?true/) }) + it('detects tests correctly for `next build`', async () => { + await fs.rename( + path.join(appDir, 'pages', 'hello.test.skip'), + path.join(appDir, 'pages', 'hello.test.js') + ) + const { stderr } = await runNextCommand(['build', appDir], { + stderr: true, + env: { + NEXT_TELEMETRY_DEBUG: 1, + }, + }) + await fs.rename( + path.join(appDir, 'pages', 'hello.test.js'), + path.join(appDir, 'pages', 'hello.test.skip') + ) + + expect(stderr).toMatch(/hasDunderPages.*?true/) + expect(stderr).toMatch(/hasTestPages.*?true/) + }) + it('detects isSrcDir dir correctly for `next dev`', async () => { let port = await findPort() let stderr = '' From 44e234e93422819033afb92a2363cbb7d007b1f8 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 4 Feb 2020 18:52:42 +0100 Subject: [PATCH 297/321] Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json --- examples/blog-starter/now.json | 2 -- examples/with-now-env/now.json | 7 ------- examples/with-stencil/README.md | 2 ++ examples/with-stencil/now.json | 5 ----- examples/with-yarn-workspaces/README.md | 2 ++ examples/with-yarn-workspaces/now.json | 5 ----- examples/with-zones/blog/.gitignore | 2 ++ examples/with-zones/blog/now.json | 13 +++++++++++++ examples/with-zones/home/.gitignore | 2 ++ examples/with-zones/home/now.json | 8 ++++++++ examples/with-zones/now.json | 18 ------------------ examples/z-experimental-next-news/now.json | 3 --- 12 files changed, 29 insertions(+), 40 deletions(-) delete mode 100644 examples/with-stencil/now.json delete mode 100644 examples/with-yarn-workspaces/now.json create mode 100644 examples/with-zones/blog/now.json create mode 100644 examples/with-zones/home/now.json delete mode 100644 examples/with-zones/now.json delete mode 100644 examples/z-experimental-next-news/now.json diff --git a/examples/blog-starter/now.json b/examples/blog-starter/now.json index e9ab941a260121a..e2a1eb024cd292d 100644 --- a/examples/blog-starter/now.json +++ b/examples/blog-starter/now.json @@ -1,8 +1,6 @@ { - "version": 2, "name": "nextjs-blog-starter", "alias": ["nextjs-blog-starter.now.sh"], - "builds": [{ "src": "package.json", "use": "@now/next" }], "routes": [ { "src": "/feed.json", "dest": "/_next/static/feed.json" }, { "src": "/blog/(?[^/]+)$", "dest": "/blog?page=$page" } diff --git a/examples/with-now-env/now.json b/examples/with-now-env/now.json index f04eefdb3c0629b..1305f0d9a0d26f3 100644 --- a/examples/with-now-env/now.json +++ b/examples/with-now-env/now.json @@ -1,11 +1,4 @@ { - "version": 2, - "builds": [ - { - "src": "package.json", - "use": "@now/next" - } - ], "build": { "env": { "SECRET": "@my-secret-key", diff --git a/examples/with-stencil/README.md b/examples/with-stencil/README.md index ac2b873e51736b8..ae0be5300067218 100644 --- a/examples/with-stencil/README.md +++ b/examples/with-stencil/README.md @@ -47,6 +47,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit. now ``` +> Choose `packages/web-app` as root directory when deploying. + ## The idea behind the example Stencil is a compiler that generates Web Components (more specifically, Custom Elements). Stencil combines the best concepts of the most popular frameworks into a simple build-time tool. diff --git a/examples/with-stencil/now.json b/examples/with-stencil/now.json deleted file mode 100644 index 985a1b01d4007ef..000000000000000 --- a/examples/with-stencil/now.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "packages/web-app/package.json", "use": "@now/next" }], - "routes": [{ "src": "(.*)", "dest": "packages/web-app$1", "continue": true }] -} diff --git a/examples/with-yarn-workspaces/README.md b/examples/with-yarn-workspaces/README.md index 15e1d756fbb0cb9..c77eba540103d75 100644 --- a/examples/with-yarn-workspaces/README.md +++ b/examples/with-yarn-workspaces/README.md @@ -48,6 +48,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit. now ``` +> Choose `packages/web-app` as root directory when deploying. + ## Useful Links - [Documentation](https://yarnpkg.com/en/docs/workspaces) diff --git a/examples/with-yarn-workspaces/now.json b/examples/with-yarn-workspaces/now.json deleted file mode 100644 index 985a1b01d4007ef..000000000000000 --- a/examples/with-yarn-workspaces/now.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "packages/web-app/package.json", "use": "@now/next" }], - "routes": [{ "src": "(.*)", "dest": "packages/web-app$1", "continue": true }] -} diff --git a/examples/with-zones/blog/.gitignore b/examples/with-zones/blog/.gitignore index f74c78183c91794..e54e38fa532b362 100644 --- a/examples/with-zones/blog/.gitignore +++ b/examples/with-zones/blog/.gitignore @@ -1,2 +1,4 @@ .next node_modules + +.now \ No newline at end of file diff --git a/examples/with-zones/blog/now.json b/examples/with-zones/blog/now.json new file mode 100644 index 000000000000000..9dcd887d881d873 --- /dev/null +++ b/examples/with-zones/blog/now.json @@ -0,0 +1,13 @@ +{ + "build": { + "env": { + "BUILDING_FOR_NOW": "true" + } + }, + "rewrites": [ + { + "source": "/blog/_next$1", + "destination": "/_next$1" + } + ] +} diff --git a/examples/with-zones/home/.gitignore b/examples/with-zones/home/.gitignore index f74c78183c91794..e54e38fa532b362 100644 --- a/examples/with-zones/home/.gitignore +++ b/examples/with-zones/home/.gitignore @@ -1,2 +1,4 @@ .next node_modules + +.now \ No newline at end of file diff --git a/examples/with-zones/home/now.json b/examples/with-zones/home/now.json new file mode 100644 index 000000000000000..7981357aa4e9b8d --- /dev/null +++ b/examples/with-zones/home/now.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/blog(.*)", + "destination": "https://with-zones-blog.now.sh$1" + } + ] +} diff --git a/examples/with-zones/now.json b/examples/with-zones/now.json deleted file mode 100644 index 590167dd6c7ab68..000000000000000 --- a/examples/with-zones/now.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "with-zones", - "version": 2, - "builds": [ - { "src": "blog/next.config.js", "use": "@now/next" }, - { "src": "home/next.config.js", "use": "@now/next" } - ], - "routes": [ - { "src": "/blog/(_next|static)(.*)" }, - { "src": "/blog(.*)", "dest": "blog/blog$1", "continue": true }, - { "src": "(?!/?blog)(.*)", "dest": "home$1", "continue": true } - ], - "build": { - "env": { - "BUILDING_FOR_NOW": "true" - } - } -} diff --git a/examples/z-experimental-next-news/now.json b/examples/z-experimental-next-news/now.json deleted file mode 100644 index 404c3ff46d5d78e..000000000000000 --- a/examples/z-experimental-next-news/now.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "builds": [{ "src": "package.json", "use": "@now/next@canary" }] -} From bc81379618c0a4de4bff9aff2d555d2232643d18 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 4 Feb 2020 13:55:43 -0500 Subject: [PATCH 298/321] Detect Invalid Pages Before Optimize (#10418) --- packages/next/build/index.ts | 15 +++++----- packages/next/telemetry/events/build.ts | 29 ++++++++++++++----- test/integration/telemetry/test/index.test.js | 9 ++++-- 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 179ab522353869c..bf2053faeab2b8c 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -1,5 +1,6 @@ import chalk from 'chalk' import ciEnvironment from 'ci-info' +import escapeStringRegexp from 'escape-string-regexp' import findUp from 'find-up' import fs from 'fs' import Worker from 'jest-worker' @@ -11,14 +12,14 @@ import { promisify } from 'util' import formatWebpackMessages from '../client/dev/error-overlay/format-webpack-messages' import checkCustomRoutes, { getRedirectStatus, - RouteType, + Header, Redirect, Rewrite, - Header, + RouteType, } from '../lib/check-custom-routes' import { - PUBLIC_DIR_MIDDLEWARE_CONFLICT, PAGES_404_GET_INITIAL_PROPS_ERROR, + PUBLIC_DIR_MIDDLEWARE_CONFLICT, } from '../lib/constants' import { findPagesDir } from '../lib/find-pages-dir' import { recursiveDelete } from '../lib/recursive-delete' @@ -44,7 +45,7 @@ import loadConfig, { isTargetLikeServerless, } from '../next-server/server/config' import { - eventBuildDuration, + eventBuildCompleted, eventBuildOptimize, eventNextPlugins, eventVersion, @@ -56,17 +57,16 @@ import { generateBuildId } from './generate-build-id' import { isWriteable } from './is-writeable' import createSpinner from './spinner' import { - isPageStatic, collectPages, getPageSizeInKb, hasCustomAppGetInitialProps, + isPageStatic, PageInfo, printCustomRoutes, printTreeView, } from './utils' import getBaseWebpackConfig from './webpack-config' import { writeBuildId } from './write-build-id' -import escapeStringRegexp from 'escape-string-regexp' const fsAccess = promisify(fs.access) const fsUnlink = promisify(fs.unlink) @@ -394,8 +394,7 @@ export default async function build(dir: string, conf = null): Promise { } else { console.log(chalk.green('Compiled successfully.\n')) telemetry.record( - eventBuildDuration({ - totalPageCount: pagePaths.length, + eventBuildCompleted(pagePaths, { durationInSeconds: webpackBuildEnd[0], }) ) diff --git a/packages/next/telemetry/events/build.ts b/packages/next/telemetry/events/build.ts index f3ba100bb721d36..7ea9f882a2e960e 100644 --- a/packages/next/telemetry/events/build.ts +++ b/packages/next/telemetry/events/build.ts @@ -1,15 +1,34 @@ +const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(? ): { eventName: string; payload: EventBuildCompleted } { return { eventName: EVENT_BUILD_DURATION, - payload: event, + payload: { + ...event, + totalPageCount: pagePaths.length, + hasDunderPages: pagePaths.some(path => + REGEXP_DIRECTORY_DUNDER.test(path) + ), + hasTestPages: pagePaths.some( + path => REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path) + ), + }, } } @@ -23,10 +42,6 @@ type EventBuildOptimized = { hasTestPages: boolean } -const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(? { path.join(appDir, 'pages', 'hello.test.skip') ) - expect(stderr).toMatch(/hasDunderPages.*?true/) - expect(stderr).toMatch(/hasTestPages.*?true/) + const event1 = /NEXT_BUILD_COMPLETED[\s\S]+?{([\s\S]+?)}/.exec(stderr).pop() + expect(event1).toMatch(/hasDunderPages.*?true/) + expect(event1).toMatch(/hasTestPages.*?true/) + + const event2 = /NEXT_BUILD_OPTIMIZED[\s\S]+?{([\s\S]+?)}/.exec(stderr).pop() + expect(event2).toMatch(/hasDunderPages.*?true/) + expect(event2).toMatch(/hasTestPages.*?true/) }) it('detects isSrcDir dir correctly for `next dev`', async () => { From e3d298dc621c50db4a74ece68cebd0114d087daf Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 4 Feb 2020 13:08:03 -0600 Subject: [PATCH 299/321] Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens Co-authored-by: Joe Haddad --- package.json | 7 +-- packages/next/lib/check-custom-routes.ts | 9 +++- .../next/next-server/server/next-server.ts | 40 ++++++++++++---- packages/next/package.json | 1 + test/integration/custom-routes/next.config.js | 4 ++ .../custom-routes/test/index.test.js | 47 ++++++++++++++++++- .../invalid-custom-routes/test/index.test.js | 2 +- yarn.lock | 35 +++++++++++++- 8 files changed, 127 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 18a274008231893..f5bf15c7eb34c63 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@babel/preset-react": "7.7.0", "@fullhuman/postcss-purgecss": "1.3.0", "@mdx-js/loader": "0.18.0", + "@types/http-proxy": "1.17.3", "@types/jest": "24.0.13", "@types/string-hash": "1.1.1", "@typescript-eslint/eslint-plugin": "2.17.0", @@ -53,7 +54,9 @@ "babel-core": "7.0.0-bridge.0", "babel-eslint": "10.0.3", "babel-jest": "24.9.0", + "browserslist": "^4.8.3", "browserstack-local": "1.4.0", + "caniuse-lite": "^1.0.30001019", "cheerio": "0.22.0", "clone": "2.1.2", "coveralls": "3.0.3", @@ -100,9 +103,7 @@ "tree-kill": "1.2.1", "typescript": "3.7.3", "wait-port": "0.2.2", - "webpack-bundle-analyzer": "3.3.2", - "browserslist": "^4.8.3", - "caniuse-lite": "^1.0.30001019" + "webpack-bundle-analyzer": "3.3.2" }, "resolutions": { "browserslist": "^4.8.3", diff --git a/packages/next/lib/check-custom-routes.ts b/packages/next/lib/check-custom-routes.ts index 8d5f0f3a7199739..b0dd787c271dba7 100644 --- a/packages/next/lib/check-custom-routes.ts +++ b/packages/next/lib/check-custom-routes.ts @@ -127,8 +127,13 @@ export default function checkCustomRoutes( invalidParts.push('`destination` is missing') } else if (typeof _route.destination !== 'string') { invalidParts.push('`destination` is not a string') - } else if (type === 'rewrite' && !_route.destination.startsWith('/')) { - invalidParts.push('`destination` does not start with /') + } else if ( + type === 'rewrite' && + !_route.destination.match(/^(\/|https:\/\/|http:\/\/)/) + ) { + invalidParts.push( + '`destination` does not start with `/`, `http://`, or `https://`' + ) } } diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index 9f963061ada1228..c817e6890e65ca3 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -1,5 +1,6 @@ import compression from 'compression' import fs from 'fs' +import Proxy from 'http-proxy' import { IncomingMessage, ServerResponse } from 'http' import { join, resolve, sep } from 'path' import { compile as compilePathToRegex } from 'path-to-regexp' @@ -451,7 +452,7 @@ export default class Server { type: route.type, statusCode: (route as Redirect).statusCode, name: `${route.type} ${route.source} route`, - fn: async (_req, res, params, _parsedUrl) => { + fn: async (req, res, params, _parsedUrl) => { const parsedDestination = parseUrl(route.destination, true) const destQuery = parsedDestination.query let destinationCompiler = compilePathToRegex( @@ -485,15 +486,15 @@ export default class Server { throw err } - if (route.type === 'redirect') { - const parsedNewUrl = parseUrl(newUrl) - const updatedDestination = formatUrl({ - ...parsedDestination, - pathname: parsedNewUrl.pathname, - hash: parsedNewUrl.hash, - search: undefined, - }) + const parsedNewUrl = parseUrl(newUrl) + const updatedDestination = formatUrl({ + ...parsedDestination, + pathname: parsedNewUrl.pathname, + hash: parsedNewUrl.hash, + search: undefined, + }) + if (route.type === 'redirect') { res.setHeader('Location', updatedDestination) res.statusCode = getRedirectStatus(route as Redirect) @@ -508,7 +509,26 @@ export default class Server { finished: true, } } else { - ;(_req as any)._nextDidRewrite = true + // external rewrite, proxy it + if (parsedDestination.protocol) { + const proxy = new Proxy({ + target: updatedDestination, + changeOrigin: true, + ignorePath: true, + }) + proxy.web(req, res) + + proxy.on('error', (err: Error) => { + console.error( + `Error occurred proxying ${updatedDestination}`, + err + ) + }) + return { + finished: true, + } + } + ;(req as any)._nextDidRewrite = true } return { diff --git a/packages/next/package.json b/packages/next/package.json index ffc72443e88795e..b802f3bbc99d5e7 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -102,6 +102,7 @@ "fork-ts-checker-webpack-plugin": "3.1.1", "fresh": "0.5.2", "gzip-size": "5.1.1", + "http-proxy": "1.18.0", "ignore-loader": "0.1.2", "is-docker": "2.0.0", "is-wsl": "2.1.1", diff --git a/test/integration/custom-routes/next.config.js b/test/integration/custom-routes/next.config.js index 0459f37750cb93c..db3512ce9596784 100644 --- a/test/integration/custom-routes/next.config.js +++ b/test/integration/custom-routes/next.config.js @@ -55,6 +55,10 @@ module.exports = { source: '/hidden/_next/:path*', destination: '/_next/:path*', }, + { + source: '/proxy-me/:path*', + destination: 'http://localhost:__EXTERNAL_PORT__/:path*', + }, { source: '/api-hello', destination: '/api/hello', diff --git a/test/integration/custom-routes/test/index.test.js b/test/integration/custom-routes/test/index.test.js index f2c01f903adba0b..b9da3fc566d9e5a 100644 --- a/test/integration/custom-routes/test/index.test.js +++ b/test/integration/custom-routes/test/index.test.js @@ -1,5 +1,6 @@ /* eslint-env jest */ /* global jasmine */ +import http from 'http' import url from 'url' import stripAnsi from 'strip-ansi' import fs from 'fs-extra' @@ -24,9 +25,13 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 let appDir = join(__dirname, '..') const nextConfigPath = join(appDir, 'next.config.js') +let externalServerHits = new Set() +let nextConfigRestoreContent let nextConfigContent -let buildId +let externalServerPort +let externalServer let stdout = '' +let buildId let appPort let app @@ -228,6 +233,13 @@ const runTests = (isDev = false) => { expect(res.headers.get('x-second-header')).toBe('second') }) + it('should support proxying to external resource', async () => { + const res = await fetchViaHTTP(appPort, '/proxy-me/first') + expect(res.status).toBe(200) + expect([...externalServerHits]).toEqual(['/first']) + expect(await res.text()).toContain('hi from external') + }) + it('should support unnamed parameters correctly', async () => { const res = await fetchViaHTTP(appPort, '/unnamed/first/final', undefined, { redirect: 'manual', @@ -493,6 +505,13 @@ const runTests = (isDev = false) => { ), source: '/hidden/_next/:path*', }, + { + destination: `http://localhost:${externalServerPort}/:path*`, + regex: normalizeRegEx( + '^\\/proxy-me(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?$' + ), + source: '/proxy-me/:path*', + }, { destination: '/api/hello', regex: normalizeRegEx('^\\/api-hello$'), @@ -550,6 +569,32 @@ const runTests = (isDev = false) => { } describe('Custom routes', () => { + beforeEach(() => { + externalServerHits = new Set() + }) + beforeAll(async () => { + externalServerPort = await findPort() + externalServer = http.createServer((req, res) => { + externalServerHits.add(req.url) + res.end('hi from external') + }) + await new Promise((resolve, reject) => { + externalServer.listen(externalServerPort, error => { + if (error) return reject(error) + resolve() + }) + }) + nextConfigRestoreContent = await fs.readFile(nextConfigPath, 'utf8') + await fs.writeFile( + nextConfigPath, + nextConfigRestoreContent.replace(/__EXTERNAL_PORT__/, externalServerPort) + ) + }) + afterAll(async () => { + externalServer.close() + await fs.writeFile(nextConfigPath, nextConfigRestoreContent) + }) + describe('dev mode', () => { beforeAll(async () => { appPort = await findPort() diff --git a/test/integration/invalid-custom-routes/test/index.test.js b/test/integration/invalid-custom-routes/test/index.test.js index f72c40c0797111e..e2c3d82c1968bc9 100644 --- a/test/integration/invalid-custom-routes/test/index.test.js +++ b/test/integration/invalid-custom-routes/test/index.test.js @@ -167,7 +167,7 @@ const runTests = () => { ) expect(stderr).toContain( - `\`destination\` does not start with / for route {"source":"/hello","destination":"another"}` + `\`destination\` does not start with \`/\`, \`http://\`, or \`https://\` for route {"source":"/hello","destination":"another"}` ) expect(stderr).toContain( diff --git a/yarn.lock b/yarn.lock index 0bb7a8e63c65f72..87c2546129d42a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2583,6 +2583,13 @@ "@types/tough-cookie" "*" form-data "^2.5.0" +"@types/http-proxy@1.17.3": + version "1.17.3" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.3.tgz#348e1b808ff9585423cb909e9992d89ccdbf4c14" + integrity sha512-wIPqXANye5BbORbuh74exbwNzj+UWCwWyeEFJzUQ7Fq3W2NSAy+7x7nX1fgbEypr2/TdKqpeuxLnXWgzN533/Q== + dependencies: + "@types/node" "*" + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -5802,7 +5809,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@^3.1.0, debug@^3.2.6: +debug@^3.0.0, debug@^3.1.0, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -6578,6 +6585,11 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + events@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" @@ -7193,6 +7205,13 @@ fn-annotate@^1.1.3: resolved "https://registry.yarnpkg.com/fn-annotate/-/fn-annotate-1.2.0.tgz#28da000117dea61842fe61f353f41cf4c93a7a7e" integrity sha1-KNoAARfephhC/mHzU/Qc9Mk6en4= +follow-redirects@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" + integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A== + dependencies: + debug "^3.0.0" + for-in@^0.1.3: version "0.1.8" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1" @@ -8110,6 +8129,15 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" +http-proxy@1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" + integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -14124,6 +14152,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + reserved-words@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" From 21fea2ce619cd2702b0ceaee9f160a5f34ccbaf3 Mon Sep 17 00:00:00 2001 From: Alex Castle Date: Tue, 4 Feb 2020 11:22:26 -0800 Subject: [PATCH 300/321] Modify splitChunksPlugin to give shared CSS chunks different names (#10408) * Modify splitChunksPlugin to give shared CSS chunks different names * fix lint Co-authored-by: Joe Haddad --- packages/next/build/webpack-config.ts | 42 +++++++++++++++------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 1f251032242dd01..12aedaf210d435e 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -311,6 +311,17 @@ export default async function getBaseWebpackConfig( const devtool = dev ? 'cheap-module-source-map' : false + const isModuleCSS = (module: { type: string }): boolean => { + return ( + // mini-css-extract-plugin + module.type === `css/mini-extract` || + // extract-css-chunks-webpack-plugin (old) + module.type === `css/extract-chunks` || + // extract-css-chunks-webpack-plugin (new) + module.type === `css/extract-css-chunks` + ) + } + // Contains various versions of the Webpack SplitChunksPlugin used in different build types const splitChunksConfigs: { [propName: string]: webpack.Options.SplitChunksOptions @@ -368,14 +379,7 @@ export default async function getBaseWebpackConfig( updateHash: (hash: crypto.Hash) => void }): string { const hash = crypto.createHash('sha1') - if ( - // mini-css-extract-plugin - module.type === `css/mini-extract` || - // extract-css-chunks-webpack-plugin (old) - module.type === `css/extract-chunks` || - // extract-css-chunks-webpack-plugin (new) - module.type === `css/extract-css-chunks` - ) { + if (isModuleCSS(module)) { module.updateHash(hash) } else { if (!module.libIdent) { @@ -400,17 +404,19 @@ export default async function getBaseWebpackConfig( }, shared: { name(module, chunks) { - return crypto - .createHash('sha1') - .update( - chunks.reduce( - (acc: string, chunk: webpack.compilation.Chunk) => { - return acc + chunk.name - }, - '' + return ( + crypto + .createHash('sha1') + .update( + chunks.reduce( + (acc: string, chunk: webpack.compilation.Chunk) => { + return acc + chunk.name + }, + '' + ) ) - ) - .digest('hex') + .digest('hex') + (isModuleCSS(module) ? '_CSS' : '') + ) }, priority: 10, minChunks: 2, From 4009f99234f6d4adc38d1421e4d360e2fd66307a Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 4 Feb 2020 14:23:46 -0500 Subject: [PATCH 301/321] v9.2.2-canary.11 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 4deca3e2040ddef..335e45abeee52bc 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.10" + "version": "9.2.2-canary.11" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index c23ad7613e2ad26..5b0f26036bee652 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index bb13e2c0e1b56a1..8738a7c444eb15b 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index d5c5efea5e30e25..ce3ce36d8df5a92 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 352c4c722be78f4..7e49cbbc4e24c00 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index b47f072b06c3b74..52649c66c81853f 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 050ced1a24dd9cf..47e638b87315dd2 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 28661f7600192b0..2deb7a18b80ff79 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index b802f3bbc99d5e7..713ef233fe55a06 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.10", + "version": "9.2.2-canary.11", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.10", + "@next/polyfill-nomodule": "9.2.2-canary.11", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From ecd628b7e0619da7677b57138a7dd59c1b581b59 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 4 Feb 2020 14:58:22 -0500 Subject: [PATCH 302/321] Re-enable `native-url` (#10419) * Re-enable `native-url` * update sizes --- packages/next/build/webpack-config.ts | 2 +- packages/next/package.json | 1 + .../integration/size-limit/test/index.test.js | 4 +-- yarn.lock | 34 +++++++++++++++++-- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 12aedaf210d435e..46b587c59f05727 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -107,7 +107,7 @@ function getOptimizedAliases( 'object.assign/shim': path.join(shimAssign, 'shim.js'), // Replace: full URL polyfill with platform-based polyfill - // url: require.resolve('native-url'), + url: require.resolve('native-url'), } ) } diff --git a/packages/next/package.json b/packages/next/package.json index 713ef233fe55a06..1dabed45b9fe61f 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -114,6 +114,7 @@ "lru-cache": "5.1.1", "mini-css-extract-plugin": "0.8.0", "mkdirp": "0.5.1", + "native-url": "0.2.6", "node-fetch": "2.6.0", "object-assign": "4.1.1", "ora": "3.4.0", diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index a4e986d5265f2b3..f1d7c0af660eb45 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 234 + const delta = responseSizeKilobytes - 227 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 202 + const delta = responseSizeKilobytes - 195 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) diff --git a/yarn.lock b/yarn.lock index 87c2546129d42a5..344301d01b2c4d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4133,7 +4133,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.8.3, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: +browserslist@4.8.3, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: version "4.8.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg== @@ -4142,6 +4142,14 @@ browserslist@4.8.3, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7. electron-to-chromium "^1.3.322" node-releases "^1.1.44" +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + integrity sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk= + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + browserstack-local@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/browserstack-local/-/browserstack-local-1.4.0.tgz#d979cac056f57b9af159b3bcd7fdc09b4354537c" @@ -4440,11 +4448,21 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634: resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001023.tgz#f856f71af16a5a44e81f1fcefc1673912a43da72" integrity sha512-EnlshvE6oAum+wWwKmJNVaoqJMjIc0bLUy4Dj77VVnz1o6bzSPr1Ze9iPy6g5ycg1xD6jGU6vBmo7pLEz2MbCQ== -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019, caniuse-lite@^1.0.30001020: +caniuse-db@^1.0.30000639: + version "1.0.30001025" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001025.tgz#33b6b126f3070a54fa8017bb5c4a0fd6b787d6f1" + integrity sha512-HtUBOYgagTFMOa8/OSVkXbDS/YiByZZoi4H+ksKgoDfNmMVoodxnH373bXleumM1kg1IXvLspLMKIS7guWEBhg== + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019: version "1.0.30001019" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz#857e3fccaad2b2feb3f1f6d8a8f62d747ea648e1" integrity sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g== +caniuse-lite@^1.0.30001020: + version "1.0.30001025" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001025.tgz#30336a8aca7f98618eb3cf38e35184e13d4e5fe6" + integrity sha512-SKyFdHYfXUZf5V85+PJgLYyit27q4wgvZuf8QTOk1osbypcROihMBlx9GRar2/pIcKH2r4OehdlBr9x6PXetAQ== + capitalize@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capitalize/-/capitalize-1.0.0.tgz#dc802c580aee101929020d2ca14b4ca8a0ae44be" @@ -6202,6 +6220,11 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== +electron-to-chromium@^1.2.7: + version "1.3.345" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.345.tgz#2569d0d54a64ef0f32a4b7e8c80afa5fe57c5d98" + integrity sha512-f8nx53+Z9Y+SPWGg3YdHrbYYfIJAtbUjpFfW4X1RwTZ94iUG7geg9tV8HqzAXX7XTNgyWgAFvce4yce8ZKxKmg== + electron-to-chromium@^1.3.322: version "1.3.327" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.327.tgz#516f28b4271727004362b4ac814494ae64d9dde7" @@ -10829,6 +10852,13 @@ native-or-bluebird@^1.2.0: resolved "https://registry.yarnpkg.com/native-or-bluebird/-/native-or-bluebird-1.2.0.tgz#39c47bfd7825d1fb9ffad32210ae25daadf101c9" integrity sha1-OcR7/Xgl0fuf+tMiEK4l2q3xAck= +native-url@0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.2.6.tgz#ca1258f5ace169c716ff44eccbddb674e10399ae" + integrity sha512-k4bDC87WtgrdD362gZz6zoiXQrl40kYlBmpfmSjwRO1VU0V5ccwJTlxuE72F6m3V0vc1xOf6n3UCP9QyerRqmA== + dependencies: + querystring "^0.2.0" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" From ec39aa46dc40e4b2a86e6500fdf5b48d30c1fa0d Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 4 Feb 2020 14:10:40 -0600 Subject: [PATCH 303/321] Update optimize event with static 404 status (#10420) Co-authored-by: Joe Haddad --- packages/next/build/index.ts | 1 + packages/next/telemetry/events/build.ts | 1 + test/integration/telemetry/test/index.test.js | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index bf2053faeab2b8c..4d4307882bf0c25 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -773,6 +773,7 @@ export default async function build(dir: string, conf = null): Promise { durationInSeconds: analysisEnd[0], staticPageCount: staticPages.size, ssrPageCount: pagePaths.length - staticPages.size, + hasStatic404: useStatic404, }) ) diff --git a/packages/next/telemetry/events/build.ts b/packages/next/telemetry/events/build.ts index 7ea9f882a2e960e..8ab16b812ae208b 100644 --- a/packages/next/telemetry/events/build.ts +++ b/packages/next/telemetry/events/build.ts @@ -40,6 +40,7 @@ type EventBuildOptimized = { ssrPageCount: number hasDunderPages: boolean hasTestPages: boolean + hasStatic404: boolean } export function eventBuildOptimize( diff --git a/test/integration/telemetry/test/index.test.js b/test/integration/telemetry/test/index.test.js index 32b0979b71cd2ca..51ccb25fa1c0578 100644 --- a/test/integration/telemetry/test/index.test.js +++ b/test/integration/telemetry/test/index.test.js @@ -8,6 +8,7 @@ import { findPort, killApp, waitFor, + nextBuild, } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 @@ -117,6 +118,16 @@ describe('Telemetry CLI', () => { expect(event2).toMatch(/hasTestPages.*?true/) }) + it('detect static 404 correctly for `next build`', async () => { + const { stderr } = await nextBuild(appDir, [], { + stderr: true, + env: { NEXT_TELEMETRY_DEBUG: 1 }, + }) + + const event1 = /NEXT_BUILD_OPTIMIZED[\s\S]+?{([\s\S]+?)}/.exec(stderr).pop() + expect(event1).toMatch(/hasStatic404.*?true/) + }) + it('detects isSrcDir dir correctly for `next dev`', async () => { let port = await findPort() let stderr = '' From 5ae7fe534e6e395266821b757e28da37bc68c9de Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 4 Feb 2020 20:55:11 -0600 Subject: [PATCH 304/321] De-dupe paths returned in getStaticPaths (#10423) * De-dupe paths returned in getStaticPaths * Remove warning --- packages/next/build/utils.ts | 10 +++---- .../prerender/pages/blog/[post]/index.js | 1 + yarn.lock | 27 ++----------------- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 3c68b3d54859262..0ff3ee4a50db5fc 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -531,9 +531,9 @@ export async function isPageStatic( ) } - let prerenderPaths: string[] | undefined + let prerenderPaths: Set | undefined if (hasStaticProps && hasStaticPaths) { - prerenderPaths = [] as string[] + prerenderPaths = new Set() const _routeRegex = getRouteRegex(page) const _routeMatcher = getRouteMatcher(_routeRegex) @@ -555,7 +555,7 @@ export async function isPageStatic( ) } - prerenderPaths!.push(entry) + prerenderPaths?.add(entry) } // For the object-provided path, we must make sure it specifies all // required keys. @@ -598,7 +598,7 @@ export async function isPageStatic( ) }) - prerenderPaths!.push(builtPage) + prerenderPaths?.add(builtPage) } }) } @@ -607,7 +607,7 @@ export async function isPageStatic( return { isStatic: !hasStaticProps && !hasGetInitialProps && !hasServerProps, isHybridAmp: config.amp === 'hybrid', - prerenderRoutes: prerenderPaths, + prerenderRoutes: prerenderPaths && [...prerenderPaths], hasStaticProps, hasServerProps, } diff --git a/test/integration/prerender/pages/blog/[post]/index.js b/test/integration/prerender/pages/blog/[post]/index.js index 7d44195d3bd8a38..89ed5a94c9d6372 100644 --- a/test/integration/prerender/pages/blog/[post]/index.js +++ b/test/integration/prerender/pages/blog/[post]/index.js @@ -10,6 +10,7 @@ export async function unstable_getStaticPaths() { '/blog/[post3]', '/blog/post-4', '/blog/post.1', + '/blog/post.1', // handle duplicates ] } diff --git a/yarn.lock b/yarn.lock index 344301d01b2c4d2..11c5f42701ef9f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4133,7 +4133,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.8.3, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: +browserslist@4.8.3, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: version "4.8.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg== @@ -4142,14 +4142,6 @@ browserslist@4.8.3, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6. electron-to-chromium "^1.3.322" node-releases "^1.1.44" -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - integrity sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk= - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - browserstack-local@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/browserstack-local/-/browserstack-local-1.4.0.tgz#d979cac056f57b9af159b3bcd7fdc09b4354537c" @@ -4448,21 +4440,11 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634: resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001023.tgz#f856f71af16a5a44e81f1fcefc1673912a43da72" integrity sha512-EnlshvE6oAum+wWwKmJNVaoqJMjIc0bLUy4Dj77VVnz1o6bzSPr1Ze9iPy6g5ycg1xD6jGU6vBmo7pLEz2MbCQ== -caniuse-db@^1.0.30000639: - version "1.0.30001025" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001025.tgz#33b6b126f3070a54fa8017bb5c4a0fd6b787d6f1" - integrity sha512-HtUBOYgagTFMOa8/OSVkXbDS/YiByZZoi4H+ksKgoDfNmMVoodxnH373bXleumM1kg1IXvLspLMKIS7guWEBhg== - -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017, caniuse-lite@^1.0.30001019, caniuse-lite@^1.0.30001020: version "1.0.30001019" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz#857e3fccaad2b2feb3f1f6d8a8f62d747ea648e1" integrity sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g== -caniuse-lite@^1.0.30001020: - version "1.0.30001025" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001025.tgz#30336a8aca7f98618eb3cf38e35184e13d4e5fe6" - integrity sha512-SKyFdHYfXUZf5V85+PJgLYyit27q4wgvZuf8QTOk1osbypcROihMBlx9GRar2/pIcKH2r4OehdlBr9x6PXetAQ== - capitalize@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capitalize/-/capitalize-1.0.0.tgz#dc802c580aee101929020d2ca14b4ca8a0ae44be" @@ -6220,11 +6202,6 @@ ejs@^2.6.1: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -electron-to-chromium@^1.2.7: - version "1.3.345" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.345.tgz#2569d0d54a64ef0f32a4b7e8c80afa5fe57c5d98" - integrity sha512-f8nx53+Z9Y+SPWGg3YdHrbYYfIJAtbUjpFfW4X1RwTZ94iUG7geg9tV8HqzAXX7XTNgyWgAFvce4yce8ZKxKmg== - electron-to-chromium@^1.3.322: version "1.3.327" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.327.tgz#516f28b4271727004362b4ac814494ae64d9dde7" From 4203d7fd52633bbf67e7aa6cd313236e82e3a4d7 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 4 Feb 2020 21:44:06 -0600 Subject: [PATCH 305/321] v9.2.2-canary.12 --- lerna.json | 2 +- packages/create-next-app/package.json | 2 +- packages/next-bundle-analyzer/package.json | 2 +- packages/next-mdx/package.json | 2 +- packages/next-plugin-google-analytics/package.json | 2 +- packages/next-plugin-material-ui/package.json | 2 +- packages/next-plugin-sentry/package.json | 2 +- packages/next-polyfill-nomodule/package.json | 2 +- packages/next/package.json | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lerna.json b/lerna.json index 335e45abeee52bc..6987f62510d9aa9 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.2-canary.11" + "version": "9.2.2-canary.12" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 5b0f26036bee652..d7ae204f608bca4 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 8738a7c444eb15b..caad0f5d68fff8f 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index ce3ce36d8df5a92..415e161699ff2c7 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index 7e49cbbc4e24c00..f9c08bc02b8b57d 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 52649c66c81853f..1c2d25edc627a0b 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index 47e638b87315dd2..ef164ca151db808 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index 2deb7a18b80ff79..ee8a42b7c745714 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/package.json b/packages/next/package.json index 1dabed45b9fe61f..fcfd317e93fe469 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.2-canary.11", + "version": "9.2.2-canary.12", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/runtime-corejs2": "7.7.2", - "@next/polyfill-nomodule": "9.2.2-canary.11", + "@next/polyfill-nomodule": "9.2.2-canary.12", "amphtml-validator": "1.0.23", "async-retry": "1.2.3", "async-sema": "3.0.0", From c8e5f925a0bd441fd8a01d96bc757add5d3918f0 Mon Sep 17 00:00:00 2001 From: Roman Ernst Date: Wed, 5 Feb 2020 17:02:45 +0100 Subject: [PATCH 306/321] Make apollo HOC composable (#10422) * Wraps config in higher-order function --- examples/with-apollo/lib/apollo.js | 9 +++------ examples/with-apollo/pages/client-only.js | 6 ++---- examples/with-apollo/pages/index.js | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/examples/with-apollo/lib/apollo.js b/examples/with-apollo/lib/apollo.js index 54e4e3b8c8a4c22..2c96ca96f72d0a9 100644 --- a/examples/with-apollo/lib/apollo.js +++ b/examples/with-apollo/lib/apollo.js @@ -12,11 +12,8 @@ let globalApolloClient = null * Creates and provides the apolloContext * to a next.js PageTree. Use it by wrapping * your PageComponent via HOC pattern. - * @param {Function|Class} PageComponent - * @param {Object} [config] - * @param {Boolean} [config.ssr=true] */ -export function withApollo(PageComponent, { ssr = true } = {}) { +export const withApollo = ({ ssr = true } = {}) => PageComponent => { const WithApollo = ({ apolloClient, apolloState, ...pageProps }) => { const client = apolloClient || initApolloClient(apolloState) return ( @@ -104,7 +101,7 @@ export function withApollo(PageComponent, { ssr = true } = {}) { * Creates or reuses apollo client in the browser. * @param {Object} initialState */ -function initApolloClient(initialState) { +const initApolloClient = initialState => { // Make sure to create a new client for every server-side request so that data // isn't shared between connections (which would be bad) if (typeof window === 'undefined') { @@ -123,7 +120,7 @@ function initApolloClient(initialState) { * Creates and configures the ApolloClient * @param {Object} [initialState={}] */ -function createApolloClient(initialState = {}) { +const createApolloClient = (initialState = {}) => { // Check out https://github.com/zeit/next.js/pull/4611 if you want to use the AWSAppSyncClient return new ApolloClient({ ssrMode: typeof window === 'undefined', // Disables forceFetch on the server (so queries are only run once) diff --git a/examples/with-apollo/pages/client-only.js b/examples/with-apollo/pages/client-only.js index 1866c0941bf5256..7fa37e3ca22b520 100644 --- a/examples/with-apollo/pages/client-only.js +++ b/examples/with-apollo/pages/client-only.js @@ -26,7 +26,5 @@ const ClientOnlyPage = props => ( ) -export default withApollo(ClientOnlyPage, { - // Disable apollo ssr fetching in favour of automatic static optimization - ssr: false, -}) +// Disable apollo ssr fetching in favour of automatic static optimization +export default withApollo({ ssr: false })(ClientOnlyPage) diff --git a/examples/with-apollo/pages/index.js b/examples/with-apollo/pages/index.js index fd7361809593d79..d40059d1a4620c2 100644 --- a/examples/with-apollo/pages/index.js +++ b/examples/with-apollo/pages/index.js @@ -26,4 +26,4 @@ const IndexPage = props => ( ) -export default withApollo(IndexPage) +export default withApollo()(IndexPage) From 0b1ef7cbf45ee23694b83b9efbf62eb9bd29f6c9 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 5 Feb 2020 17:03:41 +0100 Subject: [PATCH 307/321] Adjust README of example (#10426) --- examples/with-zones/README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/examples/with-zones/README.md b/examples/with-zones/README.md index 4eb263d57c88d50..a10e282471baa6b 100644 --- a/examples/with-zones/README.md +++ b/examples/with-zones/README.md @@ -31,21 +31,15 @@ cd with-zones ## Notes -In this example, we have two apps: 'home' and 'blog'. We'll start both apps with [Now](https://zeit.co/now): - -```bash -now dev -``` - -Then, you can visit and develop for both apps as a single app. - -You can also start the apps separately, for example: +In this example, we have two apps: 'home' and 'blog'. You can start each app separately, for example: ```bash cd blog yarn dev ``` +Then, you can visit and develop your app. + ## Special Notes - All pages should be unique across zones. For example, the 'home' app should not have a `pages/blog/index.js` page. @@ -55,8 +49,11 @@ yarn dev ## Production Deployment -We only need to run `now`, the same `now.json` used for development will be used for the deployment: +We only need to run `now `, to deploy the app: ```bash -now +now blog +now home ``` + +> The rewrite destination in your `now.json` file in the `home` app must be adjusted to point to your deployment. From 924f8ae3b643b0ffba2fb9dbb5bdc3eb33642fdc Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 5 Feb 2020 10:52:34 -0600 Subject: [PATCH 308/321] Remove old ts-ignores and extra value in routeInfo (#10429) --- packages/next/next-server/lib/router/router.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/next/next-server/lib/router/router.ts b/packages/next/next-server/lib/router/router.ts index 4c5a30545b8399b..954ed71636e404e 100644 --- a/packages/next/next-server/lib/router/router.ts +++ b/packages/next/next-server/lib/router/router.ts @@ -150,7 +150,6 @@ export default class Router implements BaseRouter { // Backwards compat for Router.router.events // TODO: Should be remove the following major version as it was never documented - // @ts-ignore backwards compatibility this.events = Router.events this.pageLoader = pageLoader @@ -355,7 +354,6 @@ export default class Router implements BaseRouter { method = 'replaceState' } - // @ts-ignore pathname is always a string const route = toRoute(pathname) const { shallow = false } = options @@ -394,7 +392,6 @@ export default class Router implements BaseRouter { Router.events.emit('routeChangeStart', as) // If shallow is true and the route exists in the router cache we reuse the previous result - // @ts-ignore pathname is always a string this.getRouteInfo(route, pathname, query, as, shallow).then(routeInfo => { const { error } = routeInfo @@ -404,7 +401,6 @@ export default class Router implements BaseRouter { Router.events.emit('beforeHistoryChange', as) this.changeState(method, url, addBasePath(as), options) - const hash = window.location.hash.substring(1) if (process.env.NODE_ENV !== 'production') { const appComp: any = this.components['/_app'].Component @@ -413,8 +409,7 @@ export default class Router implements BaseRouter { !(routeInfo.Component as any).getInitialProps } - // @ts-ignore pathname is always defined - this.set(route, pathname, query, as, { ...routeInfo, hash }) + this.set(route, pathname, query, as, routeInfo) if (error) { Router.events.emit('routeChangeError', error, as) @@ -658,7 +653,6 @@ export default class Router implements BaseRouter { return } - // @ts-ignore pathname is always defined const route = toRoute(pathname) this.pageLoader.prefetch(route).then(resolve, reject) }) From a4c507d5b45988091df26d0a1bbbcc82daee1530 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 5 Feb 2020 15:10:39 -0600 Subject: [PATCH 309/321] Update to use existing util to de-dupe path check (#10431) * Update to use existing util to de-dupe path check * Update error message for requested/resolved mismatch * Use correct dataRoute value for prerender manifest * Fix pageUrl having double slash on Windows --- packages/next/build/entries.ts | 3 ++- packages/next/build/index.ts | 20 +++++++++---------- packages/next/export/index.ts | 3 ++- packages/next/export/worker.js | 3 ++- .../next/next-server/server/next-server.ts | 3 ++- .../next-server/server/normalize-page-path.ts | 4 +++- packages/next/next-server/server/require.ts | 1 - packages/next/next-server/server/spr-cache.ts | 4 ++-- .../next/server/on-demand-entry-handler.ts | 10 +++++++--- 9 files changed, 29 insertions(+), 22 deletions(-) diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index c8385cfa4d818ee..b6049f2bc96a57e 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -6,6 +6,7 @@ import { API_ROUTE, DOT_NEXT_ALIAS, PAGES_DIR_ALIAS } from '../lib/constants' import { isTargetLikeServerless } from '../next-server/server/config' import { warn } from './output/log' import { ServerlessLoaderQuery } from './webpack/loaders/next-serverless-loader' +import { normalizePagePath } from '../next-server/server/normalize-page-path' type PagesMapping = { [page: string]: string @@ -91,7 +92,7 @@ export function createEntrypoints( Object.keys(pages).forEach(page => { const absolutePagePath = pages[page] - const bundleFile = page === '/' ? '/index.js' : `${page}.js` + const bundleFile = `${normalizePagePath(page)}.js` const isApiRoute = page.match(API_ROUTE) const bundlePath = join('static', buildId, 'pages', bundleFile) diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 4d4307882bf0c25..22e0d4d1ba2cc3b 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -67,6 +67,7 @@ import { } from './utils' import getBaseWebpackConfig from './webpack-config' import { writeBuildId } from './write-build-id' +import { normalizePagePath } from '../next-server/server/normalize-page-path' const fsAccess = promisify(fs.access) const fsUnlink = promisify(fs.unlink) @@ -435,7 +436,7 @@ export default async function build(dir: string, conf = null): Promise { const analysisBegin = process.hrtime() await Promise.all( pageKeys.map(async page => { - const actualPage = page === '/' ? '/index' : page + const actualPage = normalizePagePath(page) const [selfSize, allSize] = await getPageSizeInKb( actualPage, distDir, @@ -554,10 +555,11 @@ export default async function build(dir: string, conf = null): Promise { routesManifest.serverPropsRoutes = {} for (const page of serverPropsPages) { + const pagePath = normalizePagePath(page) const dataRoute = path.posix.join( '/_next/data', buildId, - `${page === '/' ? '/index' : page}.json` + `${pagePath}.json` ) routesManifest.serverPropsRoutes[page] = { @@ -571,7 +573,7 @@ export default async function build(dir: string, conf = null): Promise { `^${path.posix.join( '/_next/data', escapeStringRegexp(buildId), - `${page === '/' ? '/index' : page}.json` + `${pagePath}.json` )}$` ).source, } @@ -709,7 +711,7 @@ export default async function build(dir: string, conf = null): Promise { for (const page of combinedPages) { const isSsg = ssgPages.has(page) const isDynamic = isDynamicRoute(page) - let file = page === '/' ? '/index' : page + const file = normalizePagePath(page) // The dynamic version of SSG pages are not prerendered. Below, we handle // the specific prerenders of these. if (!(isSsg && isDynamic)) { @@ -729,11 +731,7 @@ export default async function build(dir: string, conf = null): Promise { initialRevalidateSeconds: exportConfig.initialPageRevalidationMap[page], srcRoute: null, - dataRoute: path.posix.join( - '/_next/data', - buildId, - `${page === '/' ? '/index' : page}.json` - ), + dataRoute: path.posix.join('/_next/data', buildId, `${file}.json`), } } else { // For a dynamic SSG page, we did not copy its html nor data exports. @@ -750,7 +748,7 @@ export default async function build(dir: string, conf = null): Promise { dataRoute: path.posix.join( '/_next/data', buildId, - `${route === '/' ? '/index' : route}.json` + `${normalizePagePath(route)}.json` ), } } @@ -783,7 +781,7 @@ export default async function build(dir: string, conf = null): Promise { const dataRoute = path.posix.join( '/_next/data', buildId, - `${tbdRoute === '/' ? '/index' : tbdRoute}.json` + `${normalizePagePath(tbdRoute)}.json` ) finalDynamicRoutes[tbdRoute] = { diff --git a/packages/next/export/index.ts b/packages/next/export/index.ts index 40f0c33ca68852a..386928105af9922 100644 --- a/packages/next/export/index.ts +++ b/packages/next/export/index.ts @@ -33,6 +33,7 @@ import loadConfig, { } from '../next-server/server/config' import { eventVersion } from '../telemetry/events' import { Telemetry } from '../telemetry/storage' +import { normalizePagePath } from '../next-server/server/normalize-page-path' const mkdirp = promisify(mkdirpModule) const copyFile = promisify(copyFileOrig) @@ -352,7 +353,7 @@ export default async function( if (!options.buildExport && prerenderManifest) { await Promise.all( Object.keys(prerenderManifest.routes).map(async route => { - route = route === '/' ? '/index' : route + route = normalizePagePath(route) const orig = join(distPagesDir, route) const htmlDest = join( outDir, diff --git a/packages/next/export/worker.js b/packages/next/export/worker.js index 61a2a88e2517d6e..2ca8fb688cb2337 100644 --- a/packages/next/export/worker.js +++ b/packages/next/export/worker.js @@ -9,6 +9,7 @@ import { loadComponents } from '../next-server/server/load-components' import { isDynamicRoute } from '../next-server/lib/router/utils/is-dynamic' import { getRouteMatcher } from '../next-server/lib/router/utils/route-matcher' import { getRouteRegex } from '../next-server/lib/router/utils/route-regex' +import { normalizePagePath } from '../next-server/server/normalize-page-path' const envConfig = require('../next-server/lib/runtime-config') const writeFileP = promisify(writeFile) @@ -39,7 +40,7 @@ export default async function({ try { const { query: originalQuery = {} } = pathMap const { page } = pathMap - const filePath = path === '/' ? '/index' : path + const filePath = normalizePagePath(path) const ampPath = `${filePath}.amp` let query = { ...originalQuery } let params diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index c817e6890e65ca3..a1b3a75bdce2e08 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -52,6 +52,7 @@ import { Header, getRedirectStatus, } from '../../lib/check-custom-routes' +import { normalizePagePath } from './normalize-page-path' const getCustomRouteMatcher = pathMatch(true) @@ -815,7 +816,7 @@ export default class Server { return await loadComponents( this.distDir, this.buildId, - (pathname === '/' ? '/index' : pathname) + '.amp', + normalizePagePath(pathname) + '.amp', serverless ) } catch (err) { diff --git a/packages/next/next-server/server/normalize-page-path.ts b/packages/next/next-server/server/normalize-page-path.ts index 1102a4ec91aa8a9..13728d1d326dce2 100644 --- a/packages/next/next-server/server/normalize-page-path.ts +++ b/packages/next/next-server/server/normalize-page-path.ts @@ -11,7 +11,9 @@ export function normalizePagePath(page: string): string { // Throw when using ../ etc in the pathname const resolvedPage = posix.normalize(page) if (page !== resolvedPage) { - throw new Error('Requested and resolved page mismatch') + throw new Error( + `Requested and resolved page mismatch: ${page} ${resolvedPage}` + ) } return page } diff --git a/packages/next/next-server/server/require.ts b/packages/next/next-server/server/require.ts index c846fedf5be52ec..bd2251cc4c0c7eb 100644 --- a/packages/next/next-server/server/require.ts +++ b/packages/next/next-server/server/require.ts @@ -30,7 +30,6 @@ export function getPagePath( try { page = normalizePagePath(page) - page = page === '/' ? '/index' : page } catch (err) { // tslint:disable-next-line console.error(err) diff --git a/packages/next/next-server/server/spr-cache.ts b/packages/next/next-server/server/spr-cache.ts index 4e7a9c1f9858c7d..0de1a419e6049b8 100644 --- a/packages/next/next-server/server/spr-cache.ts +++ b/packages/next/next-server/server/spr-cache.ts @@ -146,12 +146,12 @@ export async function setSprCache( ) { if (sprOptions.dev) return if (typeof revalidateSeconds !== 'undefined') { - // TODO: This is really bad. We shouldn't be mutating the manifest from the + // TODO: Update this to not mutate the manifest from the // build. prerenderManifest.routes[pathname] = { dataRoute: path.posix.join( '/_next/data', - `${pathname === '/' ? '/index' : pathname}.json` + `${normalizePagePath(pathname)}.json` ), srcRoute: null, // FIXME: provide actual source route, however, when dynamically appending it doesn't really matter initialRevalidateSeconds: revalidateSeconds, diff --git a/packages/next/server/on-demand-entry-handler.ts b/packages/next/server/on-demand-entry-handler.ts index fc10177df54e40f..550fd09adb3f26a 100644 --- a/packages/next/server/on-demand-entry-handler.ts +++ b/packages/next/server/on-demand-entry-handler.ts @@ -285,11 +285,15 @@ export default function onDemandEntryHandler( throw pageNotFoundError(normalizedPagePath) } - let pageUrl = `/${pagePath + let pageUrl = pagePath.replace(/\\/g, '/') + + pageUrl = `${pageUrl[0] !== '/' ? '/' : ''}${pageUrl .replace(new RegExp(`\\.+(?:${pageExtensions.join('|')})$`), '') - .replace(/\\/g, '/')}`.replace(/\/index$/, '') + .replace(/\/index$/, '')}` + pageUrl = pageUrl === '' ? '/' : pageUrl - const bundleFile = pageUrl === '/' ? '/index.js' : `${pageUrl}.js` + + const bundleFile = `${normalizePagePath(pageUrl)}.js` const name = join('static', buildId, 'pages', bundleFile) const absolutePagePath = pagePath.startsWith('next/dist/pages') ? require.resolve(pagePath) From 238202ec115c093574f263d0cf59e3e05f1baeb1 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 5 Feb 2020 15:27:22 -0600 Subject: [PATCH 310/321] Make missing param error message more specific (#10433) --- packages/next/build/utils.ts | 2 +- .../prerender-invalid-catchall-params/test/index.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 0ff3ee4a50db5fc..d21c7be858a82a4 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -586,7 +586,7 @@ export async function isPageStatic( throw new Error( `A required parameter (${validParamKey}) was not provided as ${ repeat ? 'an array' : 'a string' - }.` + } in unstable_getStaticPaths for ${page}` ) } diff --git a/test/integration/prerender-invalid-catchall-params/test/index.test.js b/test/integration/prerender-invalid-catchall-params/test/index.test.js index a213b919d7a3563..d2b47c0c8b0978e 100644 --- a/test/integration/prerender-invalid-catchall-params/test/index.test.js +++ b/test/integration/prerender-invalid-catchall-params/test/index.test.js @@ -11,7 +11,7 @@ describe('Invalid Prerender Catchall Params', () => { const out = await nextBuild(appDir, [], { stderr: true }) expect(out.stderr).toMatch(`Build error occurred`) expect(out.stderr).toMatch( - 'A required parameter (slug) was not provided as an array' + 'A required parameter (slug) was not provided as an array in unstable_getStaticPaths for /[...slug]' ) }) }) From 5dfc20dcc7d2503e54e8e96e1ff8c7ea5db31f55 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 5 Feb 2020 15:40:08 -0600 Subject: [PATCH 311/321] Update size-limit test to be more fine grained (#10434) * Update size-limit test to be more fine grained * Decrease default build expected size * Update failing diff amount to be 1kb --- .../integration/size-limit/test/index.test.js | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index f1d7c0af660eb45..a156295d8ea0114 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -5,7 +5,7 @@ import { join } from 'path' import cheerio from 'cheerio' import fetch from 'node-fetch' -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 let server let scriptsUrls @@ -23,12 +23,11 @@ function getResponseSizes(resourceUrls) { ) } -function getResponseSizesKB(responseSizes) { - const responseSizeBytes = responseSizes.reduce( +function getResponseSizesBytes(responseSizes) { + return responseSizes.reduce( (accumulator, responseSizeObj) => accumulator + responseSizeObj.bytes, 0 ) - return Math.ceil(responseSizeBytes / 1024) } describe('Production response size', () => { @@ -73,17 +72,17 @@ describe('Production response size', () => { scriptsUrls.filter(path => !path.endsWith('.module.js')) )), ] - const responseSizeKilobytes = getResponseSizesKB(responseSizes) + const responseSizesBytes = getResponseSizesBytes(responseSizes) console.log( `Response Sizes for default:\n${responseSizes .map(obj => ` ${obj.url}: ${obj.bytes} (bytes)`) - .join('\n')} \nOverall: ${responseSizeKilobytes} KB` + .join('\n')} \nOverall: ${responseSizesBytes} KB` ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 227 - expect(delta).toBeLessThanOrEqual(0) // don't increase size - expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target + const delta = responseSizesBytes - 226 * 1024 + expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb + expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target }) it('should not increase the overall response size of modern build', async () => { @@ -93,16 +92,16 @@ describe('Production response size', () => { scriptsUrls.filter(path => path.endsWith('.module.js')) )), ] - const responseSizeKilobytes = getResponseSizesKB(responseSizes) + const responseSizesBytes = getResponseSizesBytes(responseSizes) console.log( `Response Sizes for modern:\n${responseSizes .map(obj => ` ${obj.url}: ${obj.bytes} (bytes)`) - .join('\n')} \nOverall: ${responseSizeKilobytes} KB` + .join('\n')} \nOverall: ${responseSizesBytes} bytes` ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 195 - expect(delta).toBeLessThanOrEqual(0) // don't increase size - expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target + const delta = responseSizesBytes - 195 * 1024 + expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb + expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target }) }) From ea5c5164b2c8102743c1cc80c534871ef5a8800f Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Thu, 6 Feb 2020 18:03:51 -0500 Subject: [PATCH 312/321] Update utm links in create-next-app (#10442) * Updated links * Use default-example as the medium * Apply suggestion Co-authored-by: JJ Kasper --- packages/create-next-app/templates/default/README.md | 4 ++-- packages/create-next-app/templates/default/pages/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/create-next-app/templates/default/README.md b/packages/create-next-app/templates/default/README.md index bdfa3f51f0d2080..007329cc4b829a8 100644 --- a/packages/create-next-app/templates/default/README.md +++ b/packages/create-next-app/templates/default/README.md @@ -152,7 +152,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [ ## Deploy to Now -[ZEIT Now](https://zeit.co/home?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App) offers a zero-configuration single-command deployment. +[ZEIT Now](https://zeit.co/home?utm_source=create-next-app&utm_medium=readme&utm_campaign=create-next-app) offers a zero-configuration single-command deployment. 1. Install the `now` command-line tool either via npm `npm install -g now` or Yarn `yarn global add now`. @@ -164,7 +164,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [ Paste that URL into your browser when the build is complete, and you will see your deployed app. -You can find more details about [`ZEIT Now` here](https://zeit.co/home?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App). +You can find more details about [`ZEIT Now` here](https://zeit.co/home?utm_source=create-next-app&utm_medium=readme&utm_campaign=create-next-app). ## Something Missing? diff --git a/packages/create-next-app/templates/default/pages/index.js b/packages/create-next-app/templates/default/pages/index.js index 871b2b26f22b327..7310dd0dddf5d1a 100644 --- a/packages/create-next-app/templates/default/pages/index.js +++ b/packages/create-next-app/templates/default/pages/index.js @@ -37,7 +37,7 @@ const Home = () => (

Deploy →

@@ -50,7 +50,7 @@ const Home = () => (