Skip to content
Permalink
Browse files

Release v9.0.0 (#151)

* Update upgrade instructions.

* Update dependency eslint to v6.2.2 (#89)

* Change root package name to avoid ambiguity.

* Update dependency babel-eslint to v10.0.3 (#90)

* Update contribution guide.

* Text wrapping.

* Clarify behavior when 'initialValue' is set.

* Update dependency eslint-plugin-jest to v22.16.0 (#94)

* Auto detect React version for ESLint.

* Add Discord badge.

* Add brand images.

* Update dependency @storybook/react to v5.2.0-rc.2 (#91)

* Update dependency eslint to v6.3.0 (#95)

* Setup Chromatic.

* Update babel monorepo to v7.6.0 (#106)

* Update dependency eslint-plugin-jest to v22.17.0 (#101)

* Update dependency @testing-library/react to v9.1.4 (#99)

* Pin dependency storybook-chromatic to 2.2.2 (#100)

* Add displayName to the createInstance type signature. (#102)

* Transferred ownership of the repo to async-library.

* Fix merge error.

* remove non implemented types (#107)

* Add a unit test for the createInstance displayName arg. (#108)

* Update dependency eslint-config-prettier to v6.2.0 (#98)

* Update dependency now to v16.2.0 (#96)

* updated contribute.md  to run examples (#110)

* updated contribute to run examples

* updated examples md

* Replace occurences of Async.Loading with Async.Pending and isLoading with isPending, since this is the preferred terminology.

* Update bootstrap script to include building packages.

* Replace synthetic default imports with star import in ts definit… (#112)

* Update Chromatic app code.

* Add delay for Chromatic to avoid flake.

* Add Chromatic badge.

* Use the right color for Chromatic.

* Setup CodeSandbox CI.

* Fix a merge issue.

* Update dependency @storybook/react to v5.2.0-rc.6 (#97)

* docs: add Khartir as a contributor (#117)

* docs: update README.md

* docs: create .all-contributorsrc

* Update README.md

* docs: add phryneas as a contributor (#118)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add FredKSchott as a contributor (#120)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Avi98 as a contributor (#119)

* docs: update README.md

* docs: update .all-contributorsrc

* Update README.md

* Update README.md

* docs: add byCedric as a contributor (#121)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add tomshane as a contributor (#122)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add ghengeveld as a contributor (#123)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add philip-peterson as a contributor (#124)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add sibelius as a contributor (#125)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add jimthedev as a contributor (#126)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add msokk as a contributor (#127)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add brabeji as a contributor (#128)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add unorsk as a contributor (#129)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add matthisk as a contributor (#130)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dhurlburtusa as a contributor (#131)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add dhurlburtusa as a contributor (#132)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add noelyoo as a contributor (#133)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add aratcliffe as a contributor (#134)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add kentcdodds as a contributor (#135)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add noelyoo as a contributor (#136)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add walter-ind as a contributor (#137)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add phryneas as a contributor (#138)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add artdent as a contributor (#139)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add Avi98 as a contributor (#140)

* docs: update README.md

* docs: update .all-contributorsrc

* docs: add rokoroku as a contributor (#141)

* docs: update README.md

* docs: update .all-contributorsrc

* Update README.md

* Drop the avatar size and add the badge back.

* Add the All Contributors badge.

* No need to brag.

* docs: add elsangedy as a contributor (#142)

* docs: update README.md

* docs: update .all-contributorsrc

* Make sure useFetch rejects with an Error type. (#114)

* Make sure useFetch rejects with an Error type.

Previously, a non-ok http response would reject with the response
object. It's better for rejections to be of type Error so that the
full stack trace information is available; plus, the TypeScript type
definition assumes that the error object is always instanceof Error.

Instead, failed responses reject with a FetchError, with the
underlying Response object available as error.response.

This is a backward-incompatible change: users who expected `error` to
be of type Response now have to refer to `error.response` instead.

* FetchError: add status code to the error message.

* Define FetchError as a class, not just an interface.

This is necessary for TypeScript code to be permitted to use
FetchError as a value at runtime, e.g. to perform an `instanceof
FetchError` check.

* Bump all dependencies. (#147)

* Make sure the promise render prop is always defined (#148)

* Make sure the promise render prop is always a Promise.

* Add a warning about providing a rejection handler.

* Fix test for promise prop.

* Use catch instead of then(..., onReject).

* Allow overriding the 'resource' argument of 'fetch' when invokin… (#150)

* Add upgrade note for v9.

* Lock down all version ranges.

* Fix eslint config.

* Attempt at fixing CircleCI memory issue.

* Bump deps.

* Update lockfile.

* Add experimental Suspense support (#153)

* Add experimental Suspense support.

* Add PropType and type definition.

* Skip Suspense test when running against 16.3.

* Lock down all version ranges.

* Fix eslint config.

* Disable rules of hooks for examples.

* Attempt at fixing CircleCI memory issue.

* Update lockfile.

* Bump deps.

* Revert "Disable rules of hooks for examples."

This reverts commit d3d931a.

* Disable propType eslint rule for stories.

* Update dependency now to v16.3.0 (#156)

* Add CodeFund sponsorship message to README (#144)

[CodeFund](https://codefund.io) provides ethical sponsorships to open source maintainers. This PR will place the "Sponsored by" image at the top of the README. The sponsoring companies are not paying per click nor impression. They are paying the maintainer(s) on a per-month basis to be the primary sponsor of this project.

* Setup gitbook.

* Fix gitbook config.

* Use gitbook summary.

* GitBook: [next] 7 pages modified

* Clean up usage examples.

* Add shortcut links to API docs.

* Move gitbook to docs.

* Clean up the readme and docs.

* Fix introduction link.

* Restructure docs.

* Place introduction outside the getting started section.

* Improve interfaces docs.

* Minor improvements.

* Fix links.

* Fix links.

* Fix links.

* Add createInstance to interfaces.

* Upgrade dependencies and remove the lockfile.

* Fix Travis link.

* Minor clarification.

* Make a clear distinction between 'state' and 'options' by avoiding 'props'.

* Fix link.

* Add upgrade docs.

* Change the way to override 'resource' from useFetch's 'run' function.

* Avoid memory leaks by using a mock promise.

* Fix FetchError prototype chain.

* Avoid using ESLint config override file because CodeFactor doesn't support it properly.

* Make sure neverSettle is an instance of Promise.

* Exclude some impossible to test paths from code coverage.
  • Loading branch information...
ghengeveld committed Oct 7, 2019
1 parent add133c commit 8aa141755ad0b1fd876a53788acf9883ebdc9c76
Showing with 1,558 additions and 19,703 deletions.
  1. +222 βˆ’0 .all-contributorsrc
  2. +11 βˆ’1 .circleci/config.yml
  3. +9 βˆ’0 .codesandbox/ci.json
  4. +1 βˆ’1 .eslintrc
  5. +5 βˆ’0 .gitbook.yaml
  6. +6 βˆ’1 .gitignore
  7. +2 βˆ’0 .storybook/config.js
  8. +5 βˆ’3 CONTRIBUTING.md
  9. +70 βˆ’911 README.md
  10. BIN brand/icon-circle-bg.png
  11. BIN brand/icon-circle-fit.png
  12. BIN brand/icon.png
  13. BIN brand/logo-outlined.png
  14. BIN brand/logo-outlined@2x.png
  15. BIN brand/logo-social.png
  16. BIN brand/logo.png
  17. BIN brand/logo@2x.png
  18. +16 βˆ’0 docs/_summary.md
  19. +26 βˆ’0 docs/devtools.md
  20. +124 βˆ’0 docs/helpers.md
  21. +15 βˆ’0 docs/installation.md
  22. +62 βˆ’0 docs/interfaces.md
  23. +17 βˆ’0 docs/introduction.md
  24. +134 βˆ’0 docs/options.md
  25. +161 βˆ’0 docs/state.md
  26. +39 βˆ’0 docs/upgrading.md
  27. +194 βˆ’0 docs/usage.md
  28. +2 βˆ’2 examples/.eslintrc
  29. +6 βˆ’6 examples/basic-fetch/package.json
  30. +6 βˆ’6 examples/basic-hook/package.json
  31. +6 βˆ’6 examples/custom-instance/package.json
  32. +6 βˆ’6 examples/movie-app/package.json
  33. +6 βˆ’6 examples/with-abortcontroller/package.json
  34. +7 βˆ’7 examples/with-nextjs/package.json
  35. +7 βˆ’7 examples/with-react-native/package.json
  36. +9 βˆ’9 examples/with-react-router/package.json
  37. +1 βˆ’0 examples/with-suspense/.env
  38. +7 βˆ’0 examples/with-suspense/README.md
  39. +42 βˆ’0 examples/with-suspense/package.json
  40. BIN examples/with-suspense/public/favicon.ico
  41. +13 βˆ’0 examples/with-suspense/public/index.html
  42. +29 βˆ’0 examples/with-suspense/src/index.css
  43. +61 βˆ’0 examples/with-suspense/src/index.js
  44. +9 βˆ’0 examples/with-suspense/src/index.test.js
  45. +11 βˆ’11 examples/with-typescript/package.json
  46. +25 βˆ’24 package.json
  47. +28 βˆ’18 packages/react-async/src/Async.js
  48. +13 βˆ’2 packages/react-async/src/Async.spec.js
  49. +12 βˆ’14 packages/react-async/src/index.d.ts
  50. +1 βˆ’1 packages/react-async/src/index.js
  51. +1 βˆ’0 packages/react-async/src/propTypes.js
  52. +24 βˆ’1 packages/react-async/src/reducer.js
  53. +18 βˆ’3 packages/react-async/src/specs.js
  54. +43 βˆ’15 packages/react-async/src/useAsync.js
  55. +31 βˆ’15 packages/react-async/src/useAsync.spec.js
  56. +15 βˆ’5 stories/index.stories.js
  57. +0 βˆ’18,622 yarn.lock
@@ -0,0 +1,222 @@
{
"files": [
"README.md"
],
"badgeTemplate": "<a href=\"#contributors\"><img src=\"https://badgen.net/badge/all%20contributors/<%= contributors.length %>/6d60e6\" alt=\"All Contributors\"></a>",
"imageSize": 75,
"commit": false,
"contributors": [
{
"login": "ghengeveld",
"name": "Gert Hengeveld",
"avatar_url": "https://avatars1.githubusercontent.com/u/321738?v=4",
"profile": "https://medium.com/@ghengeveld",
"contributions": [
"code",
"review",
"question"
]
},
{
"login": "Khartir",
"name": "Khartir",
"avatar_url": "https://avatars3.githubusercontent.com/u/5592420?v=4",
"profile": "https://github.com/Khartir",
"contributions": [
"code",
"platform"
]
},
{
"login": "phryneas",
"name": "Lenz Weber",
"avatar_url": "https://avatars1.githubusercontent.com/u/4282439?v=4",
"profile": "https://twitter.com/phry",
"contributions": [
"code",
"platform",
"ideas"
]
},
{
"login": "Avi98",
"name": "Avinash",
"avatar_url": "https://avatars1.githubusercontent.com/u/26133749?v=4",
"profile": "https://github.com/Avi98",
"contributions": [
"review",
"doc"
]
},
{
"login": "FredKSchott",
"name": "Fred K. Schott",
"avatar_url": "https://avatars1.githubusercontent.com/u/622227?v=4",
"profile": "http://www.fredkschott.com",
"contributions": [
"tool"
]
},
{
"login": "byCedric",
"name": "Cedric van Putten",
"avatar_url": "https://avatars2.githubusercontent.com/u/1203991?v=4",
"profile": "https://bycedric.com",
"contributions": [
"code"
]
},
{
"login": "tomshane",
"name": "Tom Shane",
"avatar_url": "https://avatars1.githubusercontent.com/u/11005356?v=4",
"profile": "https://github.com/tomshane",
"contributions": [
"review"
]
},
{
"login": "philip-peterson",
"name": "Philip Peterson",
"avatar_url": "https://avatars1.githubusercontent.com/u/1326208?v=4",
"profile": "http://philippeterson.com/",
"contributions": [
"code"
]
},
{
"login": "sibelius",
"name": "Sibelius Seraphini",
"avatar_url": "https://avatars3.githubusercontent.com/u/2005841?v=4",
"profile": "https://twitter.com/sseraphini",
"contributions": [
"review"
]
},
{
"login": "jimthedev",
"name": "Jim Cummins",
"avatar_url": "https://avatars0.githubusercontent.com/u/108938?v=4",
"profile": "https://jimthedev.com",
"contributions": [
"review"
]
},
{
"login": "msokk",
"name": "Mihkel Sokk",
"avatar_url": "https://avatars3.githubusercontent.com/u/231978?v=4",
"profile": "http://mihkel.sokk.ee",
"contributions": [
"review"
]
},
{
"login": "brabeji",
"name": "JiΕ™Γ­ Brabec",
"avatar_url": "https://avatars3.githubusercontent.com/u/2237954?v=4",
"profile": "https://github.com/brabeji",
"contributions": [
"code"
]
},
{
"login": "unorsk",
"name": "Andrii U",
"avatar_url": "https://avatars0.githubusercontent.com/u/25188?v=4",
"profile": "https://github.com/unorsk",
"contributions": [
"example"
]
},
{
"login": "matthisk",
"name": "Matthisk Heimensen",
"avatar_url": "https://avatars0.githubusercontent.com/u/602837?v=4",
"profile": "http://matthisk.nl",
"contributions": [
"code"
]
},
{
"login": "dhurlburtusa",
"name": "Danny Hurlburt",
"avatar_url": "https://avatars3.githubusercontent.com/u/4006431?v=4",
"profile": "https://github.com/dhurlburtusa",
"contributions": [
"ideas",
"doc"
]
},
{
"login": "noelyoo",
"name": "Noel Yoo",
"avatar_url": "https://avatars2.githubusercontent.com/u/25740248?v=4",
"profile": "https://noelyoo.github.io/resume",
"contributions": [
"test",
"code",
"ideas"
]
},
{
"login": "aratcliffe",
"name": "Adam Ratcliffe",
"avatar_url": "https://avatars3.githubusercontent.com/u/491126?v=4",
"profile": "https://github.com/aratcliffe",
"contributions": [
"code"
]
},
{
"login": "kentcdodds",
"name": "Kent C. Dodds",
"avatar_url": "https://avatars0.githubusercontent.com/u/1500684?v=4",
"profile": "https://kentcdodds.com",
"contributions": [
"code"
]
},
{
"login": "walter-ind",
"name": "walter-ind",
"avatar_url": "https://avatars2.githubusercontent.com/u/52423075?v=4",
"profile": "https://github.com/walter-ind",
"contributions": [
"doc"
]
},
{
"login": "artdent",
"name": "Jacob Lee",
"avatar_url": "https://avatars3.githubusercontent.com/u/80536?v=4",
"profile": "https://twitter.com/arthurdenture",
"contributions": [
"code"
]
},
{
"login": "rokoroku",
"name": "Youngrok Kim",
"avatar_url": "https://avatars1.githubusercontent.com/u/5208632?v=4",
"profile": "http://rokoroku.github.io",
"contributions": [
"code"
]
},
{
"login": "elsangedy",
"name": "Munir Ahmed Elsangedy",
"avatar_url": "https://avatars3.githubusercontent.com/u/5339664?v=4",
"profile": "https://munir.dev",
"contributions": [
"ideas"
]
}
],
"contributorsPerLine": 7,
"projectName": "react-async",
"projectOwner": "async-library",
"repoType": "github",
"repoHost": "https://github.com"
}
@@ -78,14 +78,21 @@ jobs:
command: yarn build:examples
- run:
name: Test examples
command: yarn test:examples
command: yarn test:examples --maxWorkers=2
- run:
name: Deploy examples
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
yarn deploy:examples
fi
no_output_timeout: 30m
chromatic:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run: yarn test:chromatic

workflows:
version: 2
@@ -104,3 +111,6 @@ workflows:
- examples:
requires:
- build
- chromatic:
requires:
- build
@@ -0,0 +1,9 @@
{
"buildCommand": "build:packages",
"packages": ["packages/react-async", "packages/react-async-devtools"],
"publishDirectory": {
"react-async": "packages/react-async/pkg",
"react-async-devtools": "packages/react-async-devtools/pkg"
},
"sandboxes": ["new"]
}
@@ -18,7 +18,7 @@
},
"settings": {
"react": {
"version": "16.8"
"version": "detect"
}
}
}
@@ -0,0 +1,5 @@
root: ./docs/

structure:
readme: ./introduction.md
summary: ./_summary.md
@@ -1,7 +1,7 @@
build/
coverage/
dist/
docs/
storybook/
node_modules/
pkg/
.cache
@@ -10,3 +10,8 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# these cause more harm than good
# when working with contributors
package-lock.json
yarn.lock
@@ -1,4 +1,6 @@
import { configure } from "@storybook/react"

import "storybook-chromatic"

const req = require.context("../stories", true, /\.stories\.js$/)
configure(() => req.keys().forEach(filename => req(filename)), module)
@@ -21,12 +21,14 @@ cd react-async
yarn && yarn bootstrap && yarn test
```

Note that all work is done against the `next` branch, we only merge to `master` when doing a release.

### Working with Storybook

We use Storybook as a development environment, particularly for the DevTools. Spin it up using:

```sh
yarn storybook
yarn start:storybook
```

This should open up Storybook in a browser at http://localhost:6006/
@@ -60,7 +62,7 @@ This should enable auto-fix for all source files, and give linting warnings and
Use the following command to test all packages in watch mode. Refer to the [Jest CLI options](https://jestjs.io/docs/en/cli#options) for details.

```sh
yarn test --watch
yarn test:watch
```

In general, this is sufficient during development. Travis CI will apply a more rigorous set of tests.
@@ -71,7 +73,7 @@ In general, this is sufficient during development. Travis CI will apply a more r
yarn test:compat
```

This runs all tests using various versions of `react` and `react-dom`, to check for compatibility with older/newer versions of React. This is what Travis runs.
This runs all tests using various versions of `react` and `react-dom`, to check for compatibility with older/newer versions of React. This is what CircleCI and Travis run.

### Working with the examples

0 comments on commit 8aa1417

Please sign in to comment.
You can’t perform that action at this time.