From e2b99942b3c422ae641ed5b25ab158fd50f44cd2 Mon Sep 17 00:00:00 2001 From: Pavel Denisjuk Date: Thu, 6 Dec 2018 15:22:25 +0100 Subject: [PATCH] fix: simplify package filtering during release. (#312) Fixes #311 --- .../demo-admin/src/config/userIdentity.js | 44 ------- packages/webiny-app/package.json | 1 + packages/webiny-app/src/components/Image.js | 2 +- .../src/components/withFileUpload.js | 2 +- packages/webiny-cra-utils/index.js | 1 - packages/webiny-cra-utils/package.json | 27 ---- packages/webiny-cra-utils/src/babelrc.js | 18 --- packages/webiny-cra-utils/src/index.js | 3 - scripts/release/utils/getPackages.js | 31 +---- yarn.lock | 121 +++++++++++++++++- 10 files changed, 119 insertions(+), 131 deletions(-) delete mode 100644 packages/demo-admin/src/config/userIdentity.js delete mode 100644 packages/webiny-cra-utils/index.js delete mode 100644 packages/webiny-cra-utils/package.json delete mode 100644 packages/webiny-cra-utils/src/babelrc.js delete mode 100644 packages/webiny-cra-utils/src/index.js diff --git a/packages/demo-admin/src/config/userIdentity.js b/packages/demo-admin/src/config/userIdentity.js deleted file mode 100644 index 1de06cc4040..00000000000 --- a/packages/demo-admin/src/config/userIdentity.js +++ /dev/null @@ -1,44 +0,0 @@ -// @flow -import gql from "graphql-tag"; - -// TODO: move this into a client-side `credentials` strategy -// which knows the query structure and default fields - -const fields = ` - id - email - firstName - lastName - fullName - avatar { id src } - groups { - slug - } -`; - -const query = gql` - query authenticate($username: String!, $password: String!) { - Security { - Users { - authenticate(username: $username, password: $password) { - identity { - ${fields} - } - token - expiresOn - } - } - } - } -`; - -export default { - identity: "SecurityUser", - fields, - authenticate: [ - { - strategy: "credentials", - query - } - ] -}; diff --git a/packages/webiny-app/package.json b/packages/webiny-app/package.json index 57a5f8c1684..cb0bc9c9fe1 100644 --- a/packages/webiny-app/package.json +++ b/packages/webiny-app/package.json @@ -32,6 +32,7 @@ "react": "^16.4.0", "react-dom": "^16.4.0", "react-error-boundary": "^1.2.3", + "react-apollo": "^2.3.2", "warning": "^4.0.2", "webiny-compose": "0.0.0-semantically-released", "webiny-i18n": "0.0.0-semantically-released", diff --git a/packages/webiny-app/src/components/Image.js b/packages/webiny-app/src/components/Image.js index bd3108cb534..dddda7665d9 100644 --- a/packages/webiny-app/src/components/Image.js +++ b/packages/webiny-app/src/components/Image.js @@ -14,7 +14,7 @@ type ImageProps = Object & { }; export type ImagePlugin = PluginType & { - type: "image-component", + type: string, render: ImageProps => React.Node }; diff --git a/packages/webiny-app/src/components/withFileUpload.js b/packages/webiny-app/src/components/withFileUpload.js index 7bcfa90a5c7..8609b48abe6 100644 --- a/packages/webiny-app/src/components/withFileUpload.js +++ b/packages/webiny-app/src/components/withFileUpload.js @@ -13,7 +13,7 @@ type WithFileUploadOptions = { }; export type WithFileUploadPlugin = PluginType & { - type: "with-file-upload", + type: string, upload: (file: FileBrowserFile, options: Object) => Promise }; diff --git a/packages/webiny-cra-utils/index.js b/packages/webiny-cra-utils/index.js deleted file mode 100644 index 58d9ca979f2..00000000000 --- a/packages/webiny-cra-utils/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./src"); \ No newline at end of file diff --git a/packages/webiny-cra-utils/package.json b/packages/webiny-cra-utils/package.json deleted file mode 100644 index e09be9bd31f..00000000000 --- a/packages/webiny-cra-utils/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "webiny-cra-utils", - "version": "0.0.0-semantically-released", - "repository": { - "type": "git", - "url": "https://github.com/webiny/webiny-js.git" - }, - "main": "index.js", - "contributors": [ - "Pavel Denisjuk ", - "Sven Al Hamad ", - "Adrian Smijulj " - ], - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.0.0" - }, - "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0" - }, - "scripts": { - "build": "babel src -d ${DEST:-build} --source-maps --copy-files", - "flow-copy-source": "flow-copy-source src ${DEST:-build}", - "postbuild": "yarn flow-copy-source" - } -} diff --git a/packages/webiny-cra-utils/src/babelrc.js b/packages/webiny-cra-utils/src/babelrc.js deleted file mode 100644 index 85a710f6f98..00000000000 --- a/packages/webiny-cra-utils/src/babelrc.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = () => ({ - presets: ["babel-preset-react-app"], - plugins: [ - ["react-hot-loader/babel"], - ["babel-plugin-emotion", { autoLabel: true }], - [ - "babel-plugin-named-asset-import", - { - loaderMap: { - svg: { - ReactComponent: "@svgr/webpack![path]" - } - } - } - ], - ["babel-plugin-lodash", { id: ["lodash", "recompose"] }] - ] -}); diff --git a/packages/webiny-cra-utils/src/index.js b/packages/webiny-cra-utils/src/index.js deleted file mode 100644 index 6de17db60f8..00000000000 --- a/packages/webiny-cra-utils/src/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - babelConfig: require("./babelrc") -}; \ No newline at end of file diff --git a/scripts/release/utils/getPackages.js b/scripts/release/utils/getPackages.js index 5132229db09..e2bab30afd8 100644 --- a/scripts/release/utils/getPackages.js +++ b/scripts/release/utils/getPackages.js @@ -2,35 +2,6 @@ const path = require("path"); const readPkg = require("read-pkg"); const globby = require("globby"); -const toPublish = [ - "webiny-api", - "webiny-api-cms", - "webiny-app", - "webiny-app-admin", - "webiny-app-cms", - "webiny-ui", - "webiny-compose", - "webiny-data-extractor", - "webiny-entity-memory", - "webiny-entity-mysql", - "webiny-entity", - "webiny-file-storage-local", - "webiny-file-storage-s3", - "webiny-file-storage", - "webiny-form", - "webiny-i18n-react", - "webiny-i18n", - "webiny-jimp", - "webiny-model", - "webiny-mysql-connection", - "webiny-react-router", - "webiny-service-manager", - "webiny-sql-table-mysql", - "webiny-sql-table-sync", - "webiny-sql-table", - "webiny-validation" -]; - // Get packages to process module.exports = glob => { if (!glob) { @@ -47,5 +18,5 @@ module.exports = glob => { package: pkg }; }) - .filter(pkg => !pkg.package.private && toPublish.includes(pkg.name)); + .filter(pkg => !pkg.package.private); }; diff --git a/yarn.lock b/yarn.lock index 2b6d5f6139a..b5414cd18f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2404,6 +2404,26 @@ "@svgr/core" "^2.4.1" loader-utils "^1.1.0" +"@typeform/embed@^0.5.12": + version "0.5.12" + resolved "https://registry.yarnpkg.com/@typeform/embed/-/embed-0.5.12.tgz#f3b68817df8859bdc2bcb49cc258e92331a91c26" + integrity sha512-50sr39Ua0MIcpmLfR6xHvHUHfU3TwdLMwKkfkjmwsTTOHijOcf5OcUhhKZGBMn79m4BCWH5GmAtKJdB50Hri+w== + dependencies: + classnames "^2.2.5" + create-emotion "^9.0.2" + create-emotion-styled "^9.0.1" + custom-event "^1.0.1" + fetch-jsonp "^1.0.6" + is-url "^1.2.2" + preact "^8.2.7" + preact-compat "^3.15.0" + prop-types "^15.5.10" + scrollbar-width "^3.1.1" + spin.js "^2.3.2" + tinycolor2 "^1.4.1" + url-parse "^1.1.7" + webfontloader "^1.6.27" + "@types/async@2.0.50": version "2.0.50" resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.50.tgz#117540e026d64e1846093abbd5adc7e27fda7bcb" @@ -6413,14 +6433,23 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-emotion-styled@^9.2.8: +create-emotion-styled@^9.0.1, create-emotion-styled@^9.2.8: version "9.2.8" resolved "https://registry.yarnpkg.com/create-emotion-styled/-/create-emotion-styled-9.2.8.tgz#c0050e768ba439609bec108600467adf2de67cc3" integrity sha512-2LrNM5MREWzI5hZK+LyiBHglwE18WE3AEbBQgpHQ1+zmyLSm/dJsUZBeFAwuIMb+TjNZP0KsMZlV776ufOtFdg== dependencies: "@emotion/is-prop-valid" "^0.6.1" -create-emotion@^9.2.12: +create-emotion@9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.0.2.tgz#a8680b9f02f736112b68b9e9b47401dfbb4d9260" + integrity sha512-mZ9Q1kFI+EUXWTP7cBMsUe61PZh77AisgBrkRXrHp5HhwS4/JdPhbcqrTizJw3L07Yug3KLA4iqikOWZ1u6f3Q== + dependencies: + emotion-utils "^9.0.1" + stylis "^3.3.2" + stylis-rule-sheet "^0.0.5" + +create-emotion@^9.0.2, create-emotion@^9.2.12: version "9.2.12" resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.12.tgz#0fc8e7f92c4f8bb924b0fef6781f66b1d07cb26f" integrity sha512-P57uOF9NL2y98Xrbl2OuiDQUZ30GVmASsv5fbsjF4Hlraip2kyAvMm+2PoYUvFFw03Fhgtxk3RqZSm2/qHL9hA== @@ -6806,6 +6835,11 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +custom-event@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= + cycle@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" @@ -7684,6 +7718,11 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= +emotion-utils@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/emotion-utils/-/emotion-utils-9.1.0.tgz#7484dbf18f3b1dc1de68559d1ff35a74caa998dc" + integrity sha512-Zdy9TiZzMDRsCufivL/ZhQ0JdfGGSOc20opRjaBOemF5h2kYI/MD/bLcXfAZgzYVL12WNQegZIme6l+N/JFE4Q== + emotion@^9.2.4, emotion@^9.2.5, emotion@^9.2.6: version "9.2.12" resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9" @@ -8586,6 +8625,11 @@ fecha@^2.3.2, fecha@^2.3.3: resolved "https://registry.yarnpkg.com/fecha/-/fecha-2.3.3.tgz#948e74157df1a32fd1b12c3a3c3cdcb6ec9d96cd" integrity sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg== +fetch-jsonp@^1.0.6: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fetch-jsonp/-/fetch-jsonp-1.1.3.tgz#9eb9e585ba08aaf700563538d17bbebbcd5a3db2" + integrity sha1-nrnlhboIqvcAVjU40Xu+u81aPbI= + fibers@*: version "3.1.1" resolved "https://registry.yarnpkg.com/fibers/-/fibers-3.1.1.tgz#0238902ca938347bd779523692fbeefdf4f688ab" @@ -10352,6 +10396,13 @@ immer@1.7.2: resolved "https://registry.yarnpkg.com/immer/-/immer-1.7.2.tgz#a51e9723c50b27e132f6566facbec1c85fc69547" integrity sha512-4Urocwu9+XLDJw4Tc6ZCg7APVjjLInCFvO4TwGsAYV5zT6YYSor14dsZR0+0tHlDIN92cFUOq+i7fC00G5vTxA== +immutability-helper@^2.7.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/immutability-helper/-/immutability-helper-2.8.1.tgz#3c5ec05fcd83676bfae7146f319595243ad904f4" + integrity sha512-8AVB5EUpRBUdXqfe4cFsFECsOIZ9hX/Arl8B8S9/tmwpYv3UWvOsXUPOjkuZIMaVxfSWkxCzkng1rjmEoSWrxQ== + dependencies: + invariant "^2.2.0" + immutable-tuple@^0.4.9: version "0.4.9" resolved "https://registry.yarnpkg.com/immutable-tuple/-/immutable-tuple-0.4.9.tgz#473ebdd6c169c461913a454bf87ef8f601a20ff0" @@ -10627,7 +10678,7 @@ into-stream@^3.1.0: from2 "^2.1.1" p-is-promise "^1.1.0" -invariant@^2.0.0, invariant@^2.1.0, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: +invariant@^2.0.0, invariant@^2.1.0, invariant@^2.2.0, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -11126,6 +11177,11 @@ is-unc-path@^1.0.0: dependencies: unc-path-regex "^0.1.2" +is-url@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -15563,6 +15619,34 @@ pre-commit@^1.2.2: spawn-sync "^1.0.15" which "1.2.x" +preact-compat@^3.15.0: + version "3.18.4" + resolved "https://registry.yarnpkg.com/preact-compat/-/preact-compat-3.18.4.tgz#fbe76ddd30356c68e3ccde608107104946f2cf8d" + integrity sha512-aR5CvCIDerE2Y201ERVkWQdTAQKhKGNYujEk4tbyfQDInFTrnCCa3KCeGtULZrwy0PNRBjdQa2/Za7qv7ALNFg== + dependencies: + immutability-helper "^2.7.1" + preact-render-to-string "^3.8.2" + preact-transition-group "^1.1.1" + prop-types "^15.6.2" + standalone-react-addons-pure-render-mixin "^0.1.1" + +preact-render-to-string@^3.8.2: + version "3.8.2" + resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-3.8.2.tgz#bd72964d705a57da3a9e72098acaa073dd3ceff9" + integrity sha512-przuZPajiurStGgxMoJP0EJeC4xj5CgHv+M7GfF3YxAdhGgEWAkhOSE0xympAFN20uMayntBZpttIZqqLl77fw== + dependencies: + pretty-format "^3.5.1" + +preact-transition-group@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/preact-transition-group/-/preact-transition-group-1.1.1.tgz#f0a49327ea515ece34ea2be864c4a7d29e5d6e10" + integrity sha1-8KSTJ+pRXs406ivoZMSn0p5dbhA= + +preact@^8.2.7: + version "8.3.1" + resolved "https://registry.yarnpkg.com/preact/-/preact-8.3.1.tgz#ed34f79d09edc5efd32a378a3416ef5dc531e3ac" + integrity sha512-s8H1Y8O9e+mOBo3UP1jvWqArPmjCba2lrrGLlq/0kN1XuIINUbYtf97iiXKxCuG3eYwmppPKnyW2DBrNj/TuTg== + prebuild-install@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.2.2.tgz#237888f21bfda441d0ee5f5612484390bccd4046" @@ -15644,6 +15728,11 @@ pretty-format@^23.6.0: ansi-regex "^3.0.0" ansi-styles "^3.2.0" +pretty-format@^3.5.1: + version "3.8.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" + integrity sha1-v77VbV6ad2ZF9LH/eqGjrE+jw4U= + private@^0.1.6, private@^0.1.8, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -17454,6 +17543,11 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +scrollbar-width@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/scrollbar-width/-/scrollbar-width-3.1.1.tgz#c62e63efa5934dac37b43da34f7550caca8444a2" + integrity sha1-xi5j76WTTaw3tD2jT3VQysqERKI= + scss-tokenizer@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" @@ -18205,6 +18299,11 @@ spdy@^3.4.1: select-hose "^2.0.0" spdy-transport "^2.0.18" +spin.js@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/spin.js/-/spin.js-2.3.2.tgz#6caa56d520673450fd5cfbc6971e6d0772c37a1a" + integrity sha1-bKpW1SBnNFD9XPvGlx5tB3LDeho= + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -18290,6 +18389,11 @@ staged-git-files@1.1.1: resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.1.tgz#37c2218ef0d6d26178b1310719309a16a59f8f7b" integrity sha512-H89UNKr1rQJvI1c/PIR3kiAMBV23yvR7LItZiV74HWZwzt7f3YHuujJ9nJZlt58WlFox7XQsOahexwk7nTe69A== +standalone-react-addons-pure-render-mixin@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/standalone-react-addons-pure-render-mixin/-/standalone-react-addons-pure-render-mixin-0.1.1.tgz#3c7409f4c79c40de9ac72c616cf679a994f37551" + integrity sha1-PHQJ9MecQN6axyxhbPZ5qZTzdVE= + state-toggle@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.1.tgz#c3cb0974f40a6a0f8e905b96789eb41afa1cde3a" @@ -18634,7 +18738,12 @@ stylis-rule-sheet@^0.0.10: resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== -stylis@^3.5.0: +stylis-rule-sheet@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.5.tgz#ebae935cc1f6fb31b9b62dba47f2ea8b833dad9f" + integrity sha512-d1i8CktqcZI8oR239dRh/tZmWRxje/WR8rTAiXcN+oJehNhSD8OIYObP34qPdlOn37iu1ysBEm186WIRKpUU2w== + +stylis@^3.3.2, stylis@^3.5.0: version "3.5.4" resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== @@ -19689,7 +19798,7 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.1.8, url-parse@^1.3.0, url-parse@^1.4.3: +url-parse@^1.1.7, url-parse@^1.1.8, url-parse@^1.3.0, url-parse@^1.4.3: version "1.4.4" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.4.tgz#cac1556e95faa0303691fec5cf9d5a1bc34648f8" integrity sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg== @@ -20049,7 +20158,7 @@ wbuf@^1.1.0, wbuf@^1.7.2: dependencies: minimalistic-assert "^1.0.0" -webfontloader@^1.6.28: +webfontloader@^1.6.27, webfontloader@^1.6.28: version "1.6.28" resolved "https://registry.yarnpkg.com/webfontloader/-/webfontloader-1.6.28.tgz#db786129253cb6e8eae54c2fb05f870af6675bae" integrity sha1-23hhKSU8tujq5UwvsF+HCvZnW64=