From 899dec0997ac1b7ddb6deedb1232c4146fc44b11 Mon Sep 17 00:00:00 2001 From: Ben Junya Date: Mon, 7 Jan 2019 10:21:15 -0800 Subject: [PATCH] Update @emotion/core to fix flowtype context.js issues --- .flowconfig | 7 +-- package-lock.json | 62 +++++++++++++++---- package.json | 4 +- src/components/ChapterLayout/ChapterLayout.js | 2 +- .../ChapterLayout/ChapterLayout.style.js | 2 +- src/components/Header/Header.style.js | 4 +- src/components/Layout/Layout.style.js | 3 +- src/components/Menu/Menu.style.js | 3 +- src/pages/index.js | 2 +- 9 files changed, 59 insertions(+), 30 deletions(-) diff --git a/.flowconfig b/.flowconfig index d48a694c..2cc37522 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,10 +1,5 @@ -# Note: @emotion/core is throwing a bad 'context.js' typecheck error. -# I'm ignoring @emotion/core for now and supressing flow checking -# on any files that are importing it for now. -# There's a pull request that supposedly fixes this issue here: -# https://github.com/emotion-js/emotion/pull/1126 [ignore] -.*/node_modules/@emotion/core + [include] [libs] diff --git a/package-lock.json b/package-lock.json index 0a6c33d0..18c9fc3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1120,25 +1120,44 @@ } }, "@emotion/core": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.0.5.tgz", - "integrity": "sha512-kCw+JNXy5DmtS4qbCklz8hEobdJ0m9q0tAVzpAjHDAsbRwfSL/Kj3ObMG0DiLhbUPXOGAHSWCVXa4DmXvgup+Q==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@emotion/core/-/core-10.0.6.tgz", + "integrity": "sha512-S5KkrodTKby1S6pKZnH8LzjzlebHvjactujfVzzu/mYYdVdKYegJuJdrAz3m9zhIeizzeQGD8xWF490ioGpUtw==", "requires": { "@emotion/cache": "10.0.0", - "@emotion/css": "^10.0.5", + "@emotion/css": "^10.0.6", "@emotion/serialize": "^0.11.3", "@emotion/sheet": "0.9.2", "@emotion/utils": "0.11.1" } }, "@emotion/css": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/@emotion/css/-/css-10.0.5.tgz", - "integrity": "sha512-FKFdXjvQw+xpDxE7SW6lA0LzP5lmUqXlzejOGEDlJtQO3FsaqE+sU3q2efV/IPxSku8TyPJ0l7C3TUaOv/WO4g==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@emotion/css/-/css-10.0.6.tgz", + "integrity": "sha512-/suYOvP0zeKC3UNoIeN/3zvr/ghUKgfWx0Pht5ZY9qgHis68fB+V45OjonzMbdOw4mGX0vjZzJhINk9JbRWVrg==", "requires": { "@emotion/serialize": "^0.11.3", "@emotion/utils": "0.11.1", - "babel-plugin-emotion": "^10.0.5" + "babel-plugin-emotion": "^10.0.6" + }, + "dependencies": { + "babel-plugin-emotion": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.0.6.tgz", + "integrity": "sha512-JD2st8enZJn8h7W1s8kcb40r3RBCJwV9E8ZAhyyhELUMP8OYwyI9K1rz7MxRi0CoorX15kVo2NXZ+OJ6CeMY8A==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@emotion/hash": "0.7.1", + "@emotion/memoize": "0.7.1", + "@emotion/serialize": "^0.11.3", + "babel-plugin-macros": "^2.0.0", + "babel-plugin-syntax-jsx": "^6.18.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^1.0.5", + "find-root": "^1.1.0", + "source-map": "^0.5.7" + } + } } }, "@emotion/hash": { @@ -1177,12 +1196,31 @@ "integrity": "sha512-pVBLzIbC/QCHDKJF2E82V2H/W/B004mDFQZiyo/MSR+VC4pV5JLG0TF/zgQDFvP3fZL/5RTPGEmXlYJBMUuJ+A==" }, "@emotion/styled": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-10.0.5.tgz", - "integrity": "sha512-aCBYANdi57jG0Zqk1EfbpHkOTvl9iftd1uGc4GyFaBzviWfWSsKu7pdkJ6vNwhpSn7TEj32WM1D4Z4SRk3GHfQ==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-10.0.6.tgz", + "integrity": "sha512-tJqeGmNueLcdVqQKsaXJq8fGsYg5O8E6GFxNCALHhS+BKl8kXZKn1fnPnz2iNTHuXGsxolt4uzAuj0UD/MF4NQ==", "requires": { "@emotion/styled-base": "^10.0.5", - "babel-plugin-emotion": "^10.0.5" + "babel-plugin-emotion": "^10.0.6" + }, + "dependencies": { + "babel-plugin-emotion": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/babel-plugin-emotion/-/babel-plugin-emotion-10.0.6.tgz", + "integrity": "sha512-JD2st8enZJn8h7W1s8kcb40r3RBCJwV9E8ZAhyyhELUMP8OYwyI9K1rz7MxRi0CoorX15kVo2NXZ+OJ6CeMY8A==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@emotion/hash": "0.7.1", + "@emotion/memoize": "0.7.1", + "@emotion/serialize": "^0.11.3", + "babel-plugin-macros": "^2.0.0", + "babel-plugin-syntax-jsx": "^6.18.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^1.0.5", + "find-root": "^1.1.0", + "source-map": "^0.5.7" + } + } } }, "@emotion/styled-base": { diff --git a/package.json b/package.json index 612b2e1a..8115ef36 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "main": "index.js", "dependencies": { "@babel/core": "^7.2.2", - "@emotion/core": "^10.0.5", - "@emotion/styled": "^10.0.5", + "@emotion/core": "^10.0.6", + "@emotion/styled": "^10.0.6", "classnames": "^2.2.6", "font-awesome": "^4.7.0", "gatsby": "^2.0.85", diff --git a/src/components/ChapterLayout/ChapterLayout.js b/src/components/ChapterLayout/ChapterLayout.js index cfb356c9..b0c25a66 100644 --- a/src/components/ChapterLayout/ChapterLayout.js +++ b/src/components/ChapterLayout/ChapterLayout.js @@ -1,4 +1,4 @@ -// supress@flow +// @flow import React, { type Node } from 'react'; import { graphql } from 'gatsby'; diff --git a/src/components/ChapterLayout/ChapterLayout.style.js b/src/components/ChapterLayout/ChapterLayout.style.js index 36fd4ec0..e6b6131a 100644 --- a/src/components/ChapterLayout/ChapterLayout.style.js +++ b/src/components/ChapterLayout/ChapterLayout.style.js @@ -1,4 +1,4 @@ -// supress@flow +// @flow import { css } from '@emotion/core'; import { COLORS as c } from '../../constants'; import { HEADER_HEIGHT } from '../Header'; diff --git a/src/components/Header/Header.style.js b/src/components/Header/Header.style.js index 321d7651..8a2911b0 100644 --- a/src/components/Header/Header.style.js +++ b/src/components/Header/Header.style.js @@ -1,9 +1,7 @@ -// supress@flow +// @flow import { css } from '@emotion/core'; import { COLORS as c, BREAKPOINTS as BP } from '../../constants'; - - export const HEADER_HEIGHT = '5rem'; export default css` diff --git a/src/components/Layout/Layout.style.js b/src/components/Layout/Layout.style.js index c3208747..f3db7c83 100644 --- a/src/components/Layout/Layout.style.js +++ b/src/components/Layout/Layout.style.js @@ -1,4 +1,4 @@ -// supress@flow +// @flow import { css } from '@emotion/core'; import { COLORS as c } from '../../constants'; @@ -10,5 +10,4 @@ export default css` .container-with-header { padding-top: ${HEADER_HEIGHT}; } - `; diff --git a/src/components/Menu/Menu.style.js b/src/components/Menu/Menu.style.js index 51e99471..a6d168ae 100644 --- a/src/components/Menu/Menu.style.js +++ b/src/components/Menu/Menu.style.js @@ -1,4 +1,4 @@ -// supress@flow +// @flow import { css } from '@emotion/core'; import { COLORS as c, BREAKPOINTS as BP } from '../../constants'; @@ -8,7 +8,6 @@ const ICON_SPACING = 1; const MOBILE_MENU_WIDTH = '100%'; const DESKTOP_MENU_WIDTH = '30vw'; - export default css` .menu-icon { position: fixed; diff --git a/src/pages/index.js b/src/pages/index.js index 936ba33f..714cbcd2 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,4 +1,4 @@ -// supress@flow +// @flow import React, { type Node } from 'react'; import { css } from '@emotion/core';