From 6740a522f823df3bdcd8d6f8177959f04fb9caab Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Mon, 4 Jun 2018 14:09:11 -0300 Subject: [PATCH 1/9] test(eslint): Update eslint rules and fix all codes. --- .eslintrc.json | 53 ++++++++++++++++++-- package.json | 23 +++++++-- tests/library.test.js | 1 + yarn.lock | 111 ++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 178 insertions(+), 10 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9757049..bdd75eb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,51 @@ { - "extends": ["cheesecakelabs"], - "settings": { - "import/resolver": 0 - } + "parser": "babel-eslint", + "extends": ["airbnb", "prettier", "prettier/react"], + "env": { + "browser": true, + "node": true, + "jest": true + }, + "rules": { + "semi": ["error", "never"], + "no-console": [ + "error", + { + "allow": ["warn", "info", "error"] + } + ], + "import/named": "error", + "import/prefer-default-export": "off", + "no-multiple-empty-lines": [ + "error", + { + "max": 1, + "maxEOF": 1, + "maxBOF": 0 + } + ], + "jsx-a11y/href-no-hash": 0, + "import/order": [ + "error", + { + "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], + "newlines-between": "always" + } + ], + "react/jsx-filename-extension": "off", + "arrow-parens": ["error", "as-needed"], + "prettier/prettier": [ + "error", + { + "singleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "semi": false, + "parser": "babylon", + "printWidth": 100 + } + ] + }, + "plugins": ["react", "prettier"] } diff --git a/package.json b/package.json index a6e4a9d..8daf276 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,22 @@ "name": "react-fetches", "version": "0.1.0-alpha.0", "description": "A new way to perform fetch requests with react.", - "main": "src/index.js", + "main": "./lib/module.js", "scripts": { "test": "BABEL_ENV=development jest --config .jestrc.json", + "build": "BABEL_ENV=rollup rollup -c", "eslint": "eslint src tests" }, - "author": "Daniel Leite de Oliveira (https://github.com/dleitee)", + "repository": { + "type": "git", + "url": "git+https://github.com/dleitee/fetches.git" + }, "license": "ISC", + "bugs": { + "url": "https://github.com/dleitee/fetches/issues" + }, + "homepage": "https://github.com/dleitee/fetches#readme", + "author": "Daniel Leite de Oliveira (https://github.com/dleitee)", "dependencies": { "fetches": "^0.1.3", "lodash.frompairs": "^4.0.1", @@ -26,12 +35,20 @@ "babel-preset-react": "^6.24.1", "dom-testing-library": "^2.3.2", "eslint": "^4.19.1", + "eslint-config-airbnb": "^16.1.0", "eslint-config-cheesecakelabs": "^2.0.3", + "eslint-plugin-import": "^2.12.0", + "eslint-plugin-jsx-a11y": "^6.0.3", + "eslint-plugin-react": "^7.9.1", "form-data": "^2.3.2", "jest": "^22.4.4", "lodash.get": "^4.4.2", "nock": "^9.2.6", "node-fetch": "^2.1.2", - "react-testing-library": "^3.1.3" + "react-testing-library": "^3.1.3", + "rollup": "^0.59.4", + "rollup-plugin-babel": "^3.0.4", + "rollup-plugin-commonjs": "^9.1.3", + "rollup-plugin-node-resolve": "^3.3.0" } } diff --git a/tests/library.test.js b/tests/library.test.js index 30b22e8..8308655 100644 --- a/tests/library.test.js +++ b/tests/library.test.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line import/extensions, import/no-unresolved import { Provider, connect } from '../' describe('Library exports', () => { diff --git a/yarn.lock b/yarn.lock index f57a4b3..9972bcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -92,6 +92,14 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + +"@types/node@*": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.0.tgz#078516315a84d56216b5d4fed8f75d59d3b16cac" + abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -1074,6 +1082,10 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +builtin-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e" + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -1657,12 +1669,24 @@ eslint-config-airbnb-base@^11.3.0: dependencies: eslint-restricted-globals "^0.1.1" +eslint-config-airbnb-base@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz#386441e54a12ccd957b0a92564a4bafebd747944" + dependencies: + eslint-restricted-globals "^0.1.1" + eslint-config-airbnb@^15.1.0: version "15.1.0" resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e" dependencies: eslint-config-airbnb-base "^11.3.0" +eslint-config-airbnb@^16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-16.1.0.tgz#2546bfb02cc9fe92284bf1723ccf2e87bc45ca46" + dependencies: + eslint-config-airbnb-base "^12.1.0" + eslint-config-cheesecakelabs@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/eslint-config-cheesecakelabs/-/eslint-config-cheesecakelabs-2.0.3.tgz#1cb80853e5c4f7f81463276241ed14ef858e7509" @@ -1712,7 +1736,7 @@ eslint-module-utils@^2.2.0: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-import@^2.7.0: +eslint-plugin-import@^2.12.0, eslint-plugin-import@^2.7.0: version "2.12.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.12.0.tgz#dad31781292d6664b25317fd049d2e2b2f02205d" dependencies: @@ -1727,7 +1751,7 @@ eslint-plugin-import@^2.7.0: read-pkg-up "^2.0.0" resolve "^1.6.0" -eslint-plugin-jsx-a11y@^6.0.2: +eslint-plugin-jsx-a11y@^6.0.2, eslint-plugin-jsx-a11y@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.3.tgz#54583d1ae442483162e040e13cc31865465100e5" dependencies: @@ -1755,6 +1779,15 @@ eslint-plugin-react@^7.3.0: jsx-ast-utils "^2.0.1" prop-types "^15.6.0" +eslint-plugin-react@^7.9.1: + version "7.9.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.9.1.tgz#101aadd15e7c7b431ed025303ac7b421a8e3dc15" + dependencies: + doctrine "^2.1.0" + has "^1.0.2" + jsx-ast-utils "^2.0.1" + prop-types "^15.6.1" + eslint-restricted-globals@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" @@ -1844,6 +1877,14 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" +estree-walker@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" + +estree-walker@^0.5.1, estree-walker@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" + esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -2301,6 +2342,12 @@ has@^1.0.1: dependencies: function-bind "^1.0.2" +has@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + dependencies: + function-bind "^1.1.1" + hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" @@ -2576,6 +2623,10 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" @@ -3280,6 +3331,12 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +magic-string@^0.22.4: + version "0.22.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" + dependencies: + vlq "^0.2.2" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -4248,7 +4305,7 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.2.0, resolve@^1.5.0, resolve@^1.6.0: +resolve@^1.1.6, resolve@^1.2.0, resolve@^1.5.0, resolve@^1.6.0: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" dependencies: @@ -4284,6 +4341,50 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-babel@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.4.tgz#41b3e762fe64450dd61da3105a2cf7ad76be4edc" + dependencies: + rollup-pluginutils "^1.5.0" + +rollup-plugin-commonjs@^9.1.3: + version "9.1.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.3.tgz#37bfbf341292ea14f512438a56df8f9ca3ba4d67" + dependencies: + estree-walker "^0.5.1" + magic-string "^0.22.4" + resolve "^1.5.0" + rollup-pluginutils "^2.0.1" + +rollup-plugin-node-resolve@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713" + dependencies: + builtin-modules "^2.0.0" + is-module "^1.0.0" + resolve "^1.1.6" + +rollup-pluginutils@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" + dependencies: + estree-walker "^0.2.1" + minimatch "^3.0.2" + +rollup-pluginutils@^2.0.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.0.tgz#478ace04bd7f6da2e724356ca798214884738fc4" + dependencies: + estree-walker "^0.5.2" + micromatch "^2.3.11" + +rollup@^0.59.4: + version "0.59.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.59.4.tgz#6f80f7017c22667ff1bf3e62adf8624a44cc44aa" + dependencies: + "@types/estree" "0.0.39" + "@types/node" "*" + rsvp@^3.3.3: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" @@ -4883,6 +4984,10 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vlq@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" + vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" From 5b53fcdc62b9edfa3ffae72310bcf1a3a0f4e1c3 Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Mon, 4 Jun 2018 14:09:34 -0300 Subject: [PATCH 2/9] build(rollup): Add rollup config file. --- rollup.config.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 rollup.config.js diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..7f6fbca --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,23 @@ +import resolve from 'rollup-plugin-node-resolve' +import commonjs from 'rollup-plugin-commonjs' +import babel from 'rollup-plugin-babel' + +export default { + input: 'src/index.js', + output: { + file: 'lib/module.js', + format: 'cjs', + }, + plugins: [ + resolve({ + modulesOnly: true, + jsnext: true, + customResolveOptions: { + moduleDirectory: 'node_modules', + }, + }), + commonjs(), + babel({ exclude: 'node_modules/**' }), + ], + external: ['fetches', 'lodash.frompairs', 'p-is-promise', 'prop-types', 'react', 'react-dom'], +} From e23dd185a12c162d04c2c551cf25ce7eb2b33996 Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:01:53 -0300 Subject: [PATCH 3/9] build(rollup): Update build process. --- .babelrc | 17 ++++++++--------- .gitignore | 1 + package.json | 5 +++-- rollup.config.js | 2 +- src/provider.js | 2 +- tests/library.test.js | 3 +-- yarn.lock | 9 ++++++++- 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.babelrc b/.babelrc index ab2d24f..9702a3e 100644 --- a/.babelrc +++ b/.babelrc @@ -1,15 +1,14 @@ { + "presets": [ + ["env", {"modules": false}] + ], + "plugins": ["transform-object-rest-spread", "external-helpers"], "env": { - "development": { + "test": { "presets": ["env", "react"] }, - "rollup": { - "presets": [ - ["env", { - "modules": false, - }], "react" - ], - "plugins": ["external-helpers"] - } + "rollup": { + "presets": [["env", {"modules": false}], "react"] + }, } } diff --git a/.gitignore b/.gitignore index 62562b7..fb1c4b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ coverage node_modules +lib diff --git a/package.json b/package.json index 8daf276..ff03ff4 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "A new way to perform fetch requests with react.", "main": "./lib/module.js", "scripts": { - "test": "BABEL_ENV=development jest --config .jestrc.json", - "build": "BABEL_ENV=rollup rollup -c", + "test": "BABEL_ENV=test jest --config .jestrc.json", + "build": "NODE_ENV=rollup rollup -c", "eslint": "eslint src tests" }, "repository": { @@ -31,6 +31,7 @@ "babel-eslint": "^8.2.3", "babel-jest": "^22.4.4", "babel-plugin-external-helpers": "^6.22.0", + "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.7.0", "babel-preset-react": "^6.24.1", "dom-testing-library": "^2.3.2", diff --git a/rollup.config.js b/rollup.config.js index 7f6fbca..7c54cef 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,6 +9,7 @@ export default { format: 'cjs', }, plugins: [ + babel({ exclude: 'node_modules/**' }), resolve({ modulesOnly: true, jsnext: true, @@ -17,7 +18,6 @@ export default { }, }), commonjs(), - babel({ exclude: 'node_modules/**' }), ], external: ['fetches', 'lodash.frompairs', 'p-is-promise', 'prop-types', 'react', 'react-dom'], } diff --git a/src/provider.js b/src/provider.js index 1ebaf58..1e149de 100644 --- a/src/provider.js +++ b/src/provider.js @@ -1,4 +1,4 @@ -import * as React from 'react' +import React from 'react' import PropTypes from 'prop-types' import { Client } from 'fetches' diff --git a/tests/library.test.js b/tests/library.test.js index 8308655..b7f99ea 100644 --- a/tests/library.test.js +++ b/tests/library.test.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line import/extensions, import/no-unresolved -import { Provider, connect } from '../' +import { Provider, connect } from '../src/' describe('Library exports', () => { test('should export Provider and connect', () => { diff --git a/yarn.lock b/yarn.lock index 9972bcc..7194395 100644 --- a/yarn.lock +++ b/yarn.lock @@ -564,7 +564,7 @@ babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" -babel-plugin-syntax-object-rest-spread@^6.13.0: +babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -763,6 +763,13 @@ babel-plugin-transform-flow-strip-types@^6.22.0: babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" +babel-plugin-transform-object-rest-spread@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + babel-plugin-transform-react-display-name@^6.23.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" From cc8422646a573cf11617d1dacf52d45577338a17 Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:02:17 -0300 Subject: [PATCH 4/9] build(npm): Update .npmignore file. --- .npmignore | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..bdcfb06 --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +src +.circleci +coverage +tests +.babelrc +.eslintrc.json +.prettierrc.json +codecov.yml +rollup.config.js +yarn.lock diff --git a/package.json b/package.json index ff03ff4..fd765a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-fetches", - "version": "0.1.0-alpha.0", + "version": "0.1.0", "description": "A new way to perform fetch requests with react.", "main": "./lib/module.js", "scripts": { From 45755eb43c740942f15eb439ca38e5b199d700e4 Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:18:00 -0300 Subject: [PATCH 5/9] ci(config): Rename circle folder to circleci --- {.circle => .circleci}/config.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.circle => .circleci}/config.yml (100%) diff --git a/.circle/config.yml b/.circleci/config.yml similarity index 100% rename from .circle/config.yml rename to .circleci/config.yml From 43e089c727f0dfaf86e29586884513e15df2327d Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:21:24 -0300 Subject: [PATCH 6/9] fix(babel): Fix error that was ocurring on babel config. ReferenceError: babelHelpers is not defined --- .babelrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 9702a3e..b372a0a 100644 --- a/.babelrc +++ b/.babelrc @@ -2,13 +2,14 @@ "presets": [ ["env", {"modules": false}] ], - "plugins": ["transform-object-rest-spread", "external-helpers"], + "plugins": ["transform-object-rest-spread"], "env": { "test": { "presets": ["env", "react"] }, "rollup": { - "presets": [["env", {"modules": false}], "react"] + "presets": [["env", {"modules": false}], "react"], + "plugins": ["transform-object-rest-spread", "external-helpers"] }, } } From e50925d19a3c63b5e1cb558047235c45f7d0463e Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:31:43 -0300 Subject: [PATCH 7/9] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b27aa38..ce8a66d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # react-fetches +[![codecov](https://codecov.io/gh/dleitee/react-fetches/branch/master/graph/badge.svg?token=HGzOPgq5AL)](https://codecov.io/gh/dleitee/react-fetches) +[![CircleCI](https://circleci.com/gh/dleitee/react-fetches/tree/master.svg?style=svg&circle-token=317c7e90c40a084e9de799bfa3fd963a85c1acb7)](https://circleci.com/gh/dleitee/react-fetches/tree/master) + React Fetches is a simple and efficient way to make requests into your REST API's. ## Table of Contents From 26ff3955998a446864416d477df6470cdbe5a448 Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:38:36 -0300 Subject: [PATCH 8/9] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce8a66d..43fc6e7 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ So I created the `react-fetches`. ## Install ```sh -npm install --save react-fetches +npm install --save fetches react-fetches ``` ## Basic Example @@ -53,6 +53,7 @@ npm install --save react-fetches ```es6 import React from 'react' import { render } from 'react-dom' +import { createClient } from 'fetches' import { Provider } from 'react-fetches' import View from './view' @@ -71,7 +72,7 @@ render(, document.getElementById('root')) **view.js** ```es6 import React, { Component, Fragment } from 'react' -import { connect } from 'fetches' +import { connect } from 'react-fetches' const mapRequestsToProps = (http, map) => ({ userID: map(http.get('user'), (user) => user.id), From e3b879c6a50d2466a1549fccb86be4f011d329f7 Mon Sep 17 00:00:00 2001 From: Daniel Leite de Oliveira Date: Tue, 5 Jun 2018 21:43:42 -0300 Subject: [PATCH 9/9] 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd765a8..4ae4a08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-fetches", - "version": "0.1.0", + "version": "1.0.0", "description": "A new way to perform fetch requests with react.", "main": "./lib/module.js", "scripts": {