Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix build for all packages

Also adds support for @urql/exchange-graphcache/extras

+168 -24
+1
exchanges/graphcache/.gitignore
··· 1 + extras/
+18 -5
exchanges/graphcache/package.json
··· 23 23 "module": "dist/urql-exchange-graphcache.esm.js", 24 24 "types": "dist/types/index.d.ts", 25 25 "source": "src/index.ts", 26 + "exports": { 27 + ".": { 28 + "import": "dist/urql-core.esm.js", 29 + "require": "dist/urql-core.cjs.js", 30 + "types": "dist/types/index.d.ts", 31 + "source": "src/index.ts" 32 + }, 33 + "./extras": { 34 + "import": "dist/urql-core-extras.esm.js", 35 + "require": "dist/urql-core-extras.cjs.js", 36 + "types": "dist/types/extras/index.d.ts", 37 + "source": "src/extras/index.ts" 38 + } 39 + }, 26 40 "scripts": { 27 41 "build": "rollup -c ../../scripts/rollup/config.js" 28 42 }, ··· 30 44 "preset": "../../scripts/jest/preset" 31 45 }, 32 46 "dependencies": { 33 - "wonka": "^3.2.1 || ^4.0.0" 47 + "wonka": "^3.2.1 || ^4.0.0", 48 + "@urql/core": "^1.7.0" 34 49 }, 35 50 "peerDependencies": { 36 - "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0", 37 - "urql": ">= 1.7.0" 51 + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0" 38 52 }, 39 53 "devDependencies": { 40 54 "graphql": "^14.5.8", 41 - "graphql-tag": "^2.10.1", 42 - "urql": "*" 55 + "graphql-tag": "^2.10.1" 43 56 } 44 57 }
+1
package.json
··· 68 68 "rimraf": "^3.0.1", 69 69 "rollup": "^1.31.0", 70 70 "rollup-plugin-babel": "^4.3.3", 71 + "rollup-plugin-generate-package-json": "^3.2.0", 71 72 "rollup-plugin-terser": "^5.2.0", 72 73 "rollup-plugin-typescript2": "^0.25.3", 73 74 "terser": "^4.6.3",
+1 -1
packages/preact-urql/package.json
··· 40 40 "preact": ">= 10.0.0" 41 41 }, 42 42 "dependencies": { 43 - "urql": "^1.8.0", 43 + "@urql/core": "^1.8.0", 44 44 "wonka": "^4.0.6" 45 45 } 46 46 }
+1
packages/react-urql/package.json
··· 48 48 "react": ">= 16.8.0" 49 49 }, 50 50 "dependencies": { 51 + "@urql/core": "^1.7.0", 51 52 "use-subscription": "^1.3.0", 52 53 "wonka": "^4.0.7" 53 54 }
-2
packages/react-urql/src/index.ts
··· 1 - // This is the entrypoint for the urql bundle. 2 - // It'll be output to dist/es/urql.js and dist/cjs/urql.js 3 1 export * from '@urql/core'; 4 2 export * from './context'; 5 3 export * from './components';
+1 -1
packages/svelte-urql/package.json
··· 35 35 "svelte": "^3.0.0" 36 36 }, 37 37 "dependencies": { 38 - "urql": "^1.8.2", 38 + "@urql/core": "^1.8.0", 39 39 "wonka": "^4.0.7" 40 40 }, 41 41 "devDependencies": {
+26 -5
scripts/rollup/config.js
··· 1 + import genPackageJson from 'rollup-plugin-generate-package-json'; 2 + import { relative, join } from 'path'; 1 3 import { makePlugins } from './plugins'; 2 4 import * as settings from './settings'; 3 5 4 - const input = { 5 - [settings.name]: settings.source, 6 - }; 6 + const plugins = makePlugins({ isProduction: false }); 7 + 8 + const input = settings.sources.reduce((acc, source) => { 9 + acc[source.name] = source.source; 10 + if (source.name !== settings.name) { 11 + const rel = relative(source.dir, process.cwd()); 12 + plugins.push(genPackageJson({ 13 + outputFolder: source.dir, 14 + baseContents: { 15 + name: source.name, 16 + private: true, 17 + main: join(rel, source.main), 18 + module: join(rel, source.module), 19 + types: join(rel, source.types), 20 + source: join(rel, source.source), 21 + } 22 + })); 23 + } 24 + 25 + return acc; 26 + }, {}); 7 27 8 28 const config = { 9 29 input, 10 30 external: settings.isExternal, 31 + onwarn() {}, 11 32 treeshake: { 12 33 unknownGlobalSideEffects: false, 13 34 tryCatchDeoptimization: false, ··· 16 37 }; 17 38 18 39 const output = (format = 'cjs', ext = '.js') => ({ 19 - chunkFileNames: '[name]-[hash].[format]' + ext, 40 + chunkFileNames: '[hash].[format]' + ext, 20 41 entryFileNames: '[name].[format]' + ext, 21 42 dir: './dist', 22 43 exports: 'named', ··· 32 53 export default [ 33 54 { 34 55 ...config, 35 - plugins: makePlugins({ isProduction: false }), 56 + plugins, 36 57 output: [ 37 58 output('cjs', '.js'), 38 59 output('esm', '.js'),
+1
scripts/rollup/plugins.js
··· 42 42 'src/**/test-utils/*' 43 43 ], 44 44 compilerOptions: { 45 + baseUrl: '.', 45 46 declaration: !isProduction, 46 47 declarationDir: './dist/types', 47 48 target: 'es6',
+22 -7
scripts/rollup/settings.js
··· 1 1 const path = require('path'); 2 2 const cwd = process.cwd(); 3 3 4 - const pkg = require(path.resolve(cwd, './package.json')); 4 + export const pkg = require(path.resolve(cwd, './package.json')); 5 5 6 - export const name = pkg.name 7 - .replace(/[@\s\/]+/g, ' ') 6 + const normalize = name => name 7 + .replace(/[@\s\/\.]+/g, ' ') 8 8 .trim() 9 9 .replace(/\s+/, '-') 10 10 .toLowerCase(); 11 11 12 - export const source = pkg.source || './src/index.ts'; 12 + export const name = normalize(pkg.name); 13 + 14 + export const sources = pkg.exports 15 + ? Object.keys(pkg.exports).map(entry => { 16 + const exports = pkg.exports[entry]; 17 + const dir = normalize(entry); 18 + return { 19 + name: dir ? `${name}-${dir}` : name, 20 + dir: dir || '.', 21 + main: exports.require, 22 + module: exports.import, 23 + types: exports.types, 24 + source: exports.source, 25 + }; 26 + }) : [{ 27 + name, 28 + source: pkg.source || './src/index.ts' 29 + }]; 13 30 14 31 export const externalModules = ['dns', 'fs', 'path', 'url']; 15 32 if (pkg.peerDependencies) ··· 20 37 const externalPredicate = new RegExp(`^(${externalModules.join('|')})($|/)`); 21 38 22 39 export const isExternal = id => { 23 - if (id === 'babel-plugin-transform-async-to-promises/helpers') { 40 + if (id === 'babel-plugin-transform-async-to-promises/helpers') 24 41 return false; 25 - } 26 - 27 42 return externalPredicate.test(id); 28 43 }; 29 44
+96 -3
yarn.lock
··· 591 591 resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4" 592 592 integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ== 593 593 594 + "@types/normalize-package-data@^2.4.0": 595 + version "2.4.0" 596 + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" 597 + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== 598 + 594 599 "@types/parse-json@^4.0.0": 595 600 version "4.0.0" 596 601 resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" ··· 1509 1514 resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 1510 1515 integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= 1511 1516 1517 + detect-indent@^5.0.0: 1518 + version "5.0.0" 1519 + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" 1520 + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= 1521 + 1512 1522 detect-newline@^3.0.0: 1513 1523 version "3.1.0" 1514 1524 resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" ··· 2204 2214 google-closure-compiler-osx "^20191111.0.0" 2205 2215 google-closure-compiler-windows "^20191111.0.0" 2206 2216 2207 - graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: 2217 + 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.3: 2208 2218 version "4.2.3" 2209 2219 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" 2210 2220 integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== ··· 2585 2595 dependencies: 2586 2596 path-is-inside "^1.0.2" 2587 2597 2598 + is-plain-obj@^1.0.0: 2599 + version "1.1.0" 2600 + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" 2601 + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= 2602 + 2588 2603 is-plain-object@^2.0.3, is-plain-object@^2.0.4: 2589 2604 version "2.0.4" 2590 2605 resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" ··· 3430 3445 integrity sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g== 3431 3446 dependencies: 3432 3447 sourcemap-codec "^1.4.4" 3448 + 3449 + make-dir@^2.1.0: 3450 + version "2.1.0" 3451 + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" 3452 + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== 3453 + dependencies: 3454 + pify "^4.0.1" 3455 + semver "^5.6.0" 3433 3456 3434 3457 make-dir@^3.0.0: 3435 3458 version "3.0.0" ··· 3642 3665 shellwords "^0.1.1" 3643 3666 which "^1.3.1" 3644 3667 3645 - normalize-package-data@^2.3.2: 3668 + normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: 3646 3669 version "2.5.0" 3647 3670 resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" 3648 3671 integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== ··· 4026 4049 resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" 4027 4050 integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= 4028 4051 4052 + pify@^4.0.1: 4053 + version "4.0.1" 4054 + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" 4055 + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== 4056 + 4029 4057 pirates@^4.0.1: 4030 4058 version "4.0.1" 4031 4059 resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" ··· 4229 4257 normalize-package-data "^2.3.2" 4230 4258 path-type "^3.0.0" 4231 4259 4260 + read-pkg@^5.2.0: 4261 + version "5.2.0" 4262 + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" 4263 + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== 4264 + dependencies: 4265 + "@types/normalize-package-data" "^2.4.0" 4266 + normalize-package-data "^2.5.0" 4267 + parse-json "^5.0.0" 4268 + type-fest "^0.6.0" 4269 + 4232 4270 readable-stream@^2.3.5: 4233 4271 version "2.3.7" 4234 4272 resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" ··· 4471 4509 dependencies: 4472 4510 "@babel/helper-module-imports" "^7.0.0" 4473 4511 rollup-pluginutils "^2.8.1" 4512 + 4513 + rollup-plugin-generate-package-json@^3.2.0: 4514 + version "3.2.0" 4515 + resolved "https://registry.yarnpkg.com/rollup-plugin-generate-package-json/-/rollup-plugin-generate-package-json-3.2.0.tgz#e9c1d358f2be6c58b49853af58205292d45a33ff" 4516 + integrity sha512-+Kq1kFVr+maxW/mZB+E+XuaieCXVZqjl2tNU9k3TtAMs3NOaeREa5sRHy67qKDmcnFtZZukIQ3dFCcnV+r0xyw== 4517 + dependencies: 4518 + read-pkg "^5.2.0" 4519 + write-pkg "^4.0.0" 4474 4520 4475 4521 rollup-plugin-terser@^5.2.0: 4476 4522 version "5.2.0" ··· 4598 4644 resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" 4599 4645 integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== 4600 4646 4601 - "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5, semver@^5.5.0: 4647 + "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.6.0: 4602 4648 version "5.7.1" 4603 4649 resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" 4604 4650 integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== ··· 4733 4779 source-map "^0.5.6" 4734 4780 source-map-resolve "^0.5.0" 4735 4781 use "^3.1.0" 4782 + 4783 + sort-keys@^2.0.0: 4784 + version "2.0.0" 4785 + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" 4786 + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= 4787 + dependencies: 4788 + is-plain-obj "^1.0.0" 4736 4789 4737 4790 source-map-resolve@^0.5.0: 4738 4791 version "0.5.3" ··· 5251 5304 resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" 5252 5305 integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== 5253 5306 5307 + type-fest@^0.4.1: 5308 + version "0.4.1" 5309 + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" 5310 + integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== 5311 + 5312 + type-fest@^0.6.0: 5313 + version "0.6.0" 5314 + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" 5315 + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== 5316 + 5254 5317 type-fest@^0.8.1: 5255 5318 version "0.8.1" 5256 5319 resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" ··· 5518 5581 resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 5519 5582 integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 5520 5583 5584 + write-file-atomic@^2.4.2: 5585 + version "2.4.3" 5586 + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" 5587 + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== 5588 + dependencies: 5589 + graceful-fs "^4.1.11" 5590 + imurmurhash "^0.1.4" 5591 + signal-exit "^3.0.2" 5592 + 5521 5593 write-file-atomic@^3.0.0: 5522 5594 version "3.0.1" 5523 5595 resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.1.tgz#558328352e673b5bb192cf86500d60b230667d4b" ··· 5527 5599 is-typedarray "^1.0.0" 5528 5600 signal-exit "^3.0.2" 5529 5601 typedarray-to-buffer "^3.1.5" 5602 + 5603 + write-json-file@^3.2.0: 5604 + version "3.2.0" 5605 + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" 5606 + integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== 5607 + dependencies: 5608 + detect-indent "^5.0.0" 5609 + graceful-fs "^4.1.15" 5610 + make-dir "^2.1.0" 5611 + pify "^4.0.1" 5612 + sort-keys "^2.0.0" 5613 + write-file-atomic "^2.4.2" 5614 + 5615 + write-pkg@^4.0.0: 5616 + version "4.0.0" 5617 + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039" 5618 + integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA== 5619 + dependencies: 5620 + sort-keys "^2.0.0" 5621 + type-fest "^0.4.1" 5622 + write-json-file "^3.2.0" 5530 5623 5531 5624 write@1.0.3: 5532 5625 version "1.0.3"