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.

Replace Travis with Circle

+151 -41
+87
.circleci/config.yml
··· 1 + version: 2 2 + 3 + aliases: 4 + - &docker 5 + - image: circleci/node:12-buster 6 + - &yarn_cache 7 + restore_cache: 8 + name: Restore Yarn cache 9 + keys: 10 + - yarn-{{ .Branch }}-{{ checksum "yarn.lock" }} 11 + - yarn-{{ .Branch }}- 12 + - &yarn 13 + run: 14 + name: Install Packages 15 + command: yarn --frozen-lockfile --non-interactive 16 + 17 + jobs: 18 + setup: 19 + docker: *docker 20 + steps: 21 + - checkout 22 + - *yarn_cache 23 + - *yarn 24 + - save_cache: 25 + name: Save Yarn cache 26 + key: yarn-{{ .Branch }}-{{ checksum "yarn.lock" }} 27 + paths: 28 + - ~/.cache/yarn 29 + 30 + lint: 31 + docker: *docker 32 + steps: 33 + - checkout 34 + - *yarn_cache 35 + - *yarn 36 + - run: 37 + name: ESLint 38 + command: yarn run lint 39 + 40 + typescript: 41 + docker: *docker 42 + steps: 43 + - checkout 44 + - *yarn_cache 45 + - *yarn 46 + - run: 47 + name: TypeScript 48 + command: yarn run check 49 + 50 + test: 51 + docker: *docker 52 + steps: 53 + - checkout 54 + - *yarn_cache 55 + - *yarn 56 + - run: 57 + name: Unit Tests 58 + command: yarn run test --maxWorkers=2 59 + 60 + build: 61 + docker: *docker 62 + parallelism: 4 63 + steps: 64 + - checkout 65 + - *yarn_cache 66 + - *yarn 67 + - run: 68 + name: Build 69 + command: yarn run build 70 + 71 + workflows: 72 + version: 2 73 + stable: 74 + jobs: 75 + - setup 76 + - lint: 77 + requires: 78 + - setup 79 + - typescript: 80 + requires: 81 + - setup 82 + - test: 83 + requires: 84 + - setup 85 + - build: 86 + requires: 87 + - setup
-33
.travis.yml
··· 1 - notifications: 2 - email: false 3 - 4 - branches: 5 - only: 6 - - master 7 - - develop 8 - - singularity 9 - - /^v\d+\.\d+\.\d+/ 10 - 11 - language: node_js 12 - cache: 13 - yarn: true 14 - node_js: 15 - - '12' 16 - 17 - install: 18 - - yarn install --frozen-lockfile --non-interactive 19 - 20 - jobs: 21 - include: 22 - - stage: Build 23 - script: 24 - - yarn run build 25 - 26 - - stage: Lint and Check 27 - script: 28 - - yarn run check 29 - - yarn run lint 30 - 31 - - stage: Test 32 - script: 33 - - yarn run test
+3 -2
package.json
··· 6 6 ], 7 7 "scripts": { 8 8 "test": "jest", 9 - "build": "wsrun build", 10 9 "check": "tsc --noEmit", 11 - "lint": "eslint ." 10 + "lint": "eslint .", 11 + "build": "./scripts/rollup/build.js" 12 12 }, 13 13 "jest": { 14 14 "projects": [ ··· 59 59 "eslint-plugin-import": "^2.20.0", 60 60 "eslint-plugin-react": "^7.18.0", 61 61 "eslint-plugin-react-hooks": "^2.3.0", 62 + "execa": "^4.0.0", 62 63 "graphql": "^14.6.0", 63 64 "graphql-tag": "^2.10.1", 64 65 "husky": "^4.2.1",
+1 -1
packages/svelte-urql/src/operations/observe.ts
··· 1 1 import { readable, Readable } from 'svelte/store'; 2 2 import { pipe, subscribe } from 'wonka'; 3 - import { OperationResult } from 'urql'; 3 + import { OperationResult } from '@urql/core'; 4 4 5 5 export interface Resolve<T> { 6 6 fulfill: (value: T) => void;
+43
scripts/rollup/build.js
··· 1 + #!/usr/bin/env node 2 + 3 + const path = require('path'); 4 + const execa = require('execa'); 5 + 6 + const { compilerOptions: { paths } } = require('../../tsconfig.json'); 7 + const workspaceRoot = path.resolve(__dirname, '../../'); 8 + const rollupConfig = path.resolve(__dirname, './config.js'); 9 + 10 + let packages = Object.keys(paths).map(package => { 11 + return path.resolve(workspaceRoot, paths[package][0], '../'); 12 + }); 13 + 14 + // CircleCI parallelism 15 + // See: https://github.com/facebook/react/blob/901d76bc5c8dcd0fa15bb32d1dfe05709aa5d273/scripts/rollup/build.js#L705-L710 16 + if (process.env.CIRCLE_NODE_TOTAL) { 17 + const nodeTotal = parseInt(process.env.CIRCLE_NODE_TOTAL, 10); 18 + const nodeIndex = parseInt(process.env.CIRCLE_NODE_INDEX, 10); 19 + packages = packages.filter((_, i) => i % nodeTotal === nodeIndex); 20 + } 21 + 22 + (async () => { 23 + for (const package of packages) { 24 + const packageName = path.relative(workspaceRoot, package); 25 + console.log('> Building', packageName); 26 + 27 + try { 28 + await execa( 29 + 'rollup', 30 + ['--silent', '-c', rollupConfig], 31 + { 32 + preferLocal: true, 33 + localDir: workspaceRoot, 34 + cwd: package, 35 + } 36 + ); 37 + } catch (error) { 38 + console.error('> Build failed', packageName); 39 + console.error(error.message); 40 + process.exit(-1); 41 + } 42 + } 43 + })();
+2 -5
scripts/rollup/plugins.js
··· 30 30 typescript({ 31 31 useTsconfigDeclarationDir: true, 32 32 objectHashIgnoreUnknownHack: true, 33 - tsconfigDefaults: { 34 - compilerOptions: { 35 - sourceMap: true 36 - }, 37 - }, 33 + tsconfigDefaults: require('../../tsconfig.json'), 38 34 tsconfigOverride: { 39 35 exclude: [ 40 36 'src/**/*.test.ts', ··· 42 38 'src/**/test-utils/*' 43 39 ], 44 40 compilerOptions: { 41 + sourceMap: true, 45 42 baseUrl: '.', 46 43 declaration: !isProduction, 47 44 declarationDir: './dist/types',
+15
yarn.lock
··· 1878 1878 signal-exit "^3.0.2" 1879 1879 strip-final-newline "^2.0.0" 1880 1880 1881 + execa@^4.0.0: 1882 + version "4.0.0" 1883 + resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.0.tgz#7f37d6ec17f09e6b8fc53288611695b6d12b9daf" 1884 + integrity sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA== 1885 + dependencies: 1886 + cross-spawn "^7.0.0" 1887 + get-stream "^5.0.0" 1888 + human-signals "^1.1.1" 1889 + is-stream "^2.0.0" 1890 + merge-stream "^2.0.0" 1891 + npm-run-path "^4.0.0" 1892 + onetime "^5.1.0" 1893 + signal-exit "^3.0.2" 1894 + strip-final-newline "^2.0.0" 1895 + 1881 1896 exit@^0.1.2: 1882 1897 version "0.1.2" 1883 1898 resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"