From 52bed2c3fb2178df812eb9798ac4f447425d4ad4 Mon Sep 17 00:00:00 2001 From: Yuhei Yasuda Date: Wed, 18 Oct 2017 00:21:46 +0900 Subject: [PATCH 1/2] fix missing `extends` for custom elements --- content/docs/web-components.md | 2 +- yarn.lock | 33 +++------------------------------ 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/content/docs/web-components.md b/content/docs/web-components.md index 0cdc057e..d29453a8 100644 --- a/content/docs/web-components.md +++ b/content/docs/web-components.md @@ -42,7 +42,7 @@ function BrickFlipbox() { ## Using React in your Web Components ```javascript -class XSearch { +class XSearch extends HTMLElement { connectedCallback() { const mountPoint = document.createElement('span'); this.attachShadow({ mode: 'open' }).appendChild(mountPoint); diff --git a/yarn.lock b/yarn.lock index a86fa6c6..b5290bcf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2332,14 +2332,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-react-class@^15.6.0: - version "15.6.2" - resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.2.tgz#cf1ed15f12aad7f14ef5f2dfe05e6c42f91ef02a" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - object-assign "^4.1.1" - cross-env@^3.1.1: version "3.2.4" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.2.4.tgz#9e0585f277864ed421ce756f81a980ff0d698aba" @@ -4438,7 +4430,7 @@ graphql-skip-limit@^1.0.5: dependencies: babel-runtime "^6.26.0" -graphql@^0.10.3, graphql@^0.10.5: +graphql@0.10.5, graphql@^0.10.3, graphql@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.5.tgz#c9be17ca2bdfdbd134077ffd9bbaa48b8becd298" dependencies: @@ -7755,16 +7747,7 @@ react-deep-force-update@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.0.1.tgz#4f7f6c12c3e7de42f345992a3c518236fa1ecad3" -react-dom@^15.6.0: - version "15.6.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.1.0" - object-assign "^4.1.0" - prop-types "^15.5.10" - -react-dom@^16.0.0: +react-dom@16.0.0, react-dom@^15.6.0, react-dom@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58" dependencies: @@ -7827,17 +7810,7 @@ react-side-effect@^1.1.0: exenv "^1.2.1" shallowequal "^1.0.1" -react@^15.6.0: - version "15.6.2" - resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72" - dependencies: - create-react-class "^15.6.0" - fbjs "^0.8.9" - loose-envify "^1.1.0" - object-assign "^4.1.0" - prop-types "^15.5.10" - -react@^16.0.0: +react@16.0.0, react@^15.6.0, react@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d" dependencies: From c7fa7e438781281ae33099f7b2b2153fa6d7f156 Mon Sep 17 00:00:00 2001 From: Yuhei Yasuda Date: Wed, 18 Oct 2017 01:38:58 +0900 Subject: [PATCH 2/2] revert modification to `yarn.lock` --- yarn.lock | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b5290bcf..a86fa6c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2332,6 +2332,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-react-class@^15.6.0: + version "15.6.2" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.2.tgz#cf1ed15f12aad7f14ef5f2dfe05e6c42f91ef02a" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + cross-env@^3.1.1: version "3.2.4" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.2.4.tgz#9e0585f277864ed421ce756f81a980ff0d698aba" @@ -4430,7 +4438,7 @@ graphql-skip-limit@^1.0.5: dependencies: babel-runtime "^6.26.0" -graphql@0.10.5, graphql@^0.10.3, graphql@^0.10.5: +graphql@^0.10.3, graphql@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.5.tgz#c9be17ca2bdfdbd134077ffd9bbaa48b8becd298" dependencies: @@ -7747,7 +7755,16 @@ react-deep-force-update@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.0.1.tgz#4f7f6c12c3e7de42f345992a3c518236fa1ecad3" -react-dom@16.0.0, react-dom@^15.6.0, react-dom@^16.0.0: +react-dom@^15.6.0: + version "15.6.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.1.0" + object-assign "^4.1.0" + prop-types "^15.5.10" + +react-dom@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58" dependencies: @@ -7810,7 +7827,17 @@ react-side-effect@^1.1.0: exenv "^1.2.1" shallowequal "^1.0.1" -react@16.0.0, react@^15.6.0, react@^16.0.0: +react@^15.6.0: + version "15.6.2" + resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72" + dependencies: + create-react-class "^15.6.0" + fbjs "^0.8.9" + loose-envify "^1.1.0" + object-assign "^4.1.0" + prop-types "^15.5.10" + +react@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d" dependencies: