Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v10 #214

Merged
merged 253 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
0ef2f6c
Update dependency babel-eslint to v10.0.3 (#90)
renovate[bot] Aug 26, 2019
f5dda65
Update contribution guide.
ghengeveld Aug 26, 2019
9e7dac7
Text wrapping.
ghengeveld Aug 28, 2019
24ea2b0
Clarify behavior when 'initialValue' is set.
ghengeveld Aug 28, 2019
e7f9ab3
Update dependency eslint-plugin-jest to v22.16.0 (#94)
renovate[bot] Aug 29, 2019
4b179bc
Auto detect React version for ESLint.
ghengeveld Aug 30, 2019
bd48e66
Add Discord badge.
ghengeveld Aug 30, 2019
58a98d8
Add brand images.
ghengeveld Aug 30, 2019
be2f03f
Update dependency @storybook/react to v5.2.0-rc.2 (#91)
renovate[bot] Sep 2, 2019
0bd142d
Update dependency eslint to v6.3.0 (#95)
renovate[bot] Sep 2, 2019
202d3e0
Setup Chromatic.
ghengeveld Sep 4, 2019
d068194
rename files to TS
Khartir Sep 6, 2019
5665d4a
convert react-async to TS
Khartir Sep 6, 2019
797ef86
add linting for TS
Khartir Sep 6, 2019
c22687b
remove old types
Khartir Sep 6, 2019
3159615
Update babel monorepo to v7.6.0 (#106)
renovate[bot] Sep 6, 2019
91a7d88
Update dependency eslint-plugin-jest to v22.17.0 (#101)
renovate[bot] Sep 6, 2019
3381fbe
Merge branch 'next' into switch-to-ts
ghengeveld Sep 6, 2019
1e3b57d
Update dependency @testing-library/react to v9.1.4 (#99)
renovate[bot] Sep 6, 2019
8125fbf
Pin dependency storybook-chromatic to 2.2.2 (#100)
renovate[bot] Sep 6, 2019
7552f1a
Add displayName to the createInstance type signature. (#102)
artdent Sep 6, 2019
5c9d146
fix storybook
Khartir Sep 6, 2019
89b1c08
rge branch 'next' into switch-to-ts
Khartir Sep 6, 2019
1797535
Transferred ownership of the repo to async-library.
ghengeveld Sep 6, 2019
ced2ba2
Fix merge error.
ghengeveld Sep 6, 2019
352875a
remove non implemented types (#107)
Khartir Sep 6, 2019
1ea71b6
Add a unit test for the createInstance displayName arg. (#108)
artdent Sep 9, 2019
85ffab0
Update dependency eslint-config-prettier to v6.2.0 (#98)
renovate[bot] Sep 9, 2019
c3fe2cc
Update dependency now to v16.2.0 (#96)
renovate[bot] Sep 9, 2019
0321c69
add @pika/plugin-bundle-types
phryneas Sep 12, 2019
d21d7df
updated contribute.md to run examples (#110)
Avi98 Sep 14, 2019
702a32f
Replace occurences of Async.Loading with Async.Pending and isLoading …
ghengeveld Sep 14, 2019
bef2266
Update bootstrap script to include building packages.
ghengeveld Sep 14, 2019
70393af
hotfix for type generation
phryneas Sep 16, 2019
42f68fb
Replace synthetic default imports with star import in ts definit… (#112)
rokoroku Sep 16, 2019
5d545c9
add missing exports, lint
phryneas Sep 16, 2019
2e41b88
Update Chromatic app code.
ghengeveld Sep 16, 2019
491d7ec
Merge branch 'master' into next
ghengeveld Sep 17, 2019
5b53428
Add delay for Chromatic to avoid flake.
ghengeveld Sep 17, 2019
ff9e875
Add Chromatic badge.
ghengeveld Sep 17, 2019
b9ca8ce
Use the right color for Chromatic.
ghengeveld Sep 17, 2019
2a99f66
Setup CodeSandbox CI.
ghengeveld Sep 18, 2019
62cbfd1
Fix a merge issue.
ghengeveld Sep 18, 2019
d162c3f
Update dependency @storybook/react to v5.2.0-rc.6 (#97)
renovate[bot] Sep 18, 2019
7c926dc
docs: add Khartir as a contributor (#117)
allcontributors[bot] Sep 19, 2019
da64f0c
docs: add phryneas as a contributor (#118)
allcontributors[bot] Sep 19, 2019
e63d58a
docs: add FredKSchott as a contributor (#120)
allcontributors[bot] Sep 19, 2019
7940c5a
docs: add Avi98 as a contributor (#119)
allcontributors[bot] Sep 19, 2019
2bd3875
Update README.md
ghengeveld Sep 19, 2019
b530856
Update README.md
ghengeveld Sep 19, 2019
37a952f
docs: add byCedric as a contributor (#121)
allcontributors[bot] Sep 19, 2019
713d50b
docs: add tomshane as a contributor (#122)
allcontributors[bot] Sep 19, 2019
dba4d2f
docs: add ghengeveld as a contributor (#123)
allcontributors[bot] Sep 19, 2019
a8ab4ba
docs: add philip-peterson as a contributor (#124)
allcontributors[bot] Sep 19, 2019
3dcad77
docs: add sibelius as a contributor (#125)
allcontributors[bot] Sep 19, 2019
a67f736
docs: add jimthedev as a contributor (#126)
allcontributors[bot] Sep 19, 2019
4a1b18c
docs: add msokk as a contributor (#127)
allcontributors[bot] Sep 19, 2019
965601e
docs: add brabeji as a contributor (#128)
allcontributors[bot] Sep 19, 2019
9a709ae
docs: add unorsk as a contributor (#129)
allcontributors[bot] Sep 19, 2019
66d864a
docs: add matthisk as a contributor (#130)
allcontributors[bot] Sep 19, 2019
9306af2
docs: add dhurlburtusa as a contributor (#131)
allcontributors[bot] Sep 19, 2019
a6834b8
docs: add dhurlburtusa as a contributor (#132)
allcontributors[bot] Sep 19, 2019
35d4449
docs: add noelyoo as a contributor (#133)
allcontributors[bot] Sep 19, 2019
61d81ec
docs: add aratcliffe as a contributor (#134)
allcontributors[bot] Sep 19, 2019
c045219
docs: add kentcdodds as a contributor (#135)
allcontributors[bot] Sep 19, 2019
c05ac0b
docs: add noelyoo as a contributor (#136)
allcontributors[bot] Sep 19, 2019
b6db87d
docs: add walter-ind as a contributor (#137)
allcontributors[bot] Sep 19, 2019
7cf04ae
docs: add phryneas as a contributor (#138)
allcontributors[bot] Sep 19, 2019
bdb47b2
docs: add artdent as a contributor (#139)
allcontributors[bot] Sep 19, 2019
2dea878
docs: add Avi98 as a contributor (#140)
allcontributors[bot] Sep 19, 2019
a59c985
docs: add rokoroku as a contributor (#141)
allcontributors[bot] Sep 19, 2019
df67695
Update README.md
ghengeveld Sep 19, 2019
e107a1d
Drop the avatar size and add the badge back.
ghengeveld Sep 19, 2019
95c27d1
Add the All Contributors badge.
ghengeveld Sep 19, 2019
69a13cc
No need to brag.
ghengeveld Sep 19, 2019
b678e3c
docs: add elsangedy as a contributor (#142)
allcontributors[bot] Sep 19, 2019
428256a
Make sure useFetch rejects with an Error type. (#114)
artdent Sep 19, 2019
6aaa045
prevent multiple different typescript versions to be installed
phryneas Sep 20, 2019
65eebf3
move common types to types.ts
phryneas Sep 20, 2019
d370e89
jest config: also transform tsx files
phryneas Sep 20, 2019
430f7c3
readability of globalScope
phryneas Sep 20, 2019
f3d2284
move inline typecast to variable
phryneas Sep 20, 2019
2e5333c
better typings for createInstance and default Async
phryneas Sep 20, 2019
436e49b
remove unneccesary genererics
phryneas Sep 20, 2019
8dd1086
remove accidental types
phryneas Sep 20, 2019
e08b6ed
inline nullify into render
phryneas Sep 20, 2019
d709416
wildcard-export all types
phryneas Sep 20, 2019
9c5d5ce
introduce ReducerAsyncState type, type promise as optional undefined
phryneas Sep 20, 2019
e320bb2
Merge branch 'next' into switch-to-ts
Khartir Sep 20, 2019
663b060
remove unused imports
Khartir Sep 20, 2019
0512a0c
fix react being included in types rollup
Khartir Sep 20, 2019
a978568
fix enum names
Khartir Sep 20, 2019
825c9ba
implements MockAbortController
Khartir Sep 20, 2019
850aab7
set default options
Khartir Sep 20, 2019
ade7fe1
set types for fetch-callback
Khartir Sep 20, 2019
ca118fe
Fix failing test
Khartir Sep 20, 2019
306befa
Match propTypes to TS-types
Khartir Sep 20, 2019
c40d5d8
add tests for helpers with missing state
Khartir Sep 25, 2019
11d753c
Bump all dependencies. (#147)
ghengeveld Sep 28, 2019
fabbc25
Make sure the promise render prop is always defined (#148)
ghengeveld Sep 28, 2019
3508370
Fix test for promise prop.
ghengeveld Sep 28, 2019
23f8d1e
Use catch instead of then(..., onReject).
ghengeveld Sep 28, 2019
16b9385
Merge branch 'master' into next
ghengeveld Sep 28, 2019
ebe1802
Allow overriding the 'resource' argument of 'fetch' when invokin… (#150)
ghengeveld Sep 28, 2019
69c7d08
Lock down all version ranges.
ghengeveld Sep 29, 2019
09d9914
Fix eslint config.
ghengeveld Sep 29, 2019
9faff46
Attempt at fixing CircleCI memory issue.
ghengeveld Sep 29, 2019
3e51b7c
Bump deps.
ghengeveld Sep 29, 2019
11f8996
Update lockfile.
ghengeveld Sep 29, 2019
4cfaa0c
Add experimental Suspense support (#153)
ghengeveld Sep 30, 2019
10352c2
Disable propType eslint rule for stories.
ghengeveld Sep 30, 2019
ae4f0fd
Merge branch 'master' into next
ghengeveld Sep 30, 2019
8b8d761
Update dependency now to v16.3.0 (#156)
renovate[bot] Sep 30, 2019
2c769e8
Add CodeFund sponsorship message to README (#144)
Oct 1, 2019
edad9f5
Merge branch 'master' into next
ghengeveld Oct 2, 2019
93c7cbd
Setup gitbook.
ghengeveld Oct 5, 2019
e36cd0f
Fix gitbook config.
ghengeveld Oct 5, 2019
80585db
Use gitbook summary.
ghengeveld Oct 5, 2019
a0567e7
GitBook: [next] 7 pages modified
ghengeveld Oct 5, 2019
fde7e09
Clean up usage examples.
ghengeveld Oct 5, 2019
d3fedaa
Add shortcut links to API docs.
ghengeveld Oct 6, 2019
4c851a4
Move gitbook to docs.
ghengeveld Oct 6, 2019
b6df223
Clean up the readme and docs.
ghengeveld Oct 6, 2019
87dbdef
Fix introduction link.
ghengeveld Oct 6, 2019
86d8051
Restructure docs.
ghengeveld Oct 6, 2019
60b26b0
Place introduction outside the getting started section.
ghengeveld Oct 6, 2019
17496c2
Improve interfaces docs.
ghengeveld Oct 6, 2019
54ce390
Minor improvements.
ghengeveld Oct 6, 2019
00a5820
Fix links.
ghengeveld Oct 6, 2019
fa88098
Fix links.
ghengeveld Oct 6, 2019
3e13ec3
Fix links.
ghengeveld Oct 6, 2019
90b7891
Add createInstance to interfaces.
ghengeveld Oct 6, 2019
3f267a9
Upgrade dependencies and remove the lockfile.
ghengeveld Oct 6, 2019
554b75c
Fix Travis link.
ghengeveld Oct 6, 2019
f6514b8
Minor clarification.
ghengeveld Oct 6, 2019
39d38a5
Make a clear distinction between 'state' and 'options' by avoiding 'p…
ghengeveld Oct 7, 2019
34e2f01
Fix link.
ghengeveld Oct 7, 2019
1223710
Merge branch 'master' into next
ghengeveld Oct 7, 2019
3f51efd
Merge branch 'master' into next
ghengeveld Oct 7, 2019
ac09f5f
Add upgrading docs to toc.
ghengeveld Oct 7, 2019
365075c
Merge branch 'master' into next
ghengeveld Oct 7, 2019
b7f11b5
Fix upgrade link.
ghengeveld Oct 7, 2019
9d67bb7
Update dependency @storybook/react to v5.2.2 (#168)
renovate[bot] Oct 7, 2019
0367ed7
Update dependency @storybook/react to v5.2.3 (#169)
renovate[bot] Oct 7, 2019
f7b4036
Restructure docs files.
ghengeveld Oct 7, 2019
a5bb323
Add Suspense to list of features.
ghengeveld Oct 8, 2019
4c60795
Add guide to docs.
ghengeveld Oct 8, 2019
c8ef288
Fix links.
ghengeveld Oct 8, 2019
1be5794
Update babel monorepo to v7.6.3 (#173)
renovate[bot] Oct 9, 2019
6332df7
Avoid extending built-in JS classes (#175)
ghengeveld Oct 11, 2019
e51346b
Update dependency @storybook/react to v5.2.4 (#178)
renovate[bot] Oct 15, 2019
dde644f
Update dependency eslint-plugin-jest to v22.19.0 (#177)
renovate[bot] Oct 15, 2019
073a4c7
Update dependency storybook-chromatic to v3.0.3 (#171)
renovate[bot] Oct 15, 2019
240916d
Update dependency lerna to v3.17.0 (#172)
renovate[bot] Oct 15, 2019
971f321
Update dependency @babel/core to v7.6.4 (#176)
renovate[bot] Oct 15, 2019
6336851
Update dependency lerna to v3.18.1 (#179)
renovate[bot] Oct 16, 2019
e959418
Update dependency @testing-library/jest-dom to v4.1.2 (#170)
renovate[bot] Oct 16, 2019
2cb5c78
prevent Async context consumers to be used outside of Async components
Oct 18, 2019
ef8deff
alias AsyncState<T> & AsyncConstructor<T> for readability
Oct 18, 2019
8ccfc0f
move MockAbortController out and also use it in Async component
Oct 18, 2019
e95a542
Revert "Allow overriding the 'resource' argument of 'fetch' when invo…
Khartir Oct 18, 2019
e73b0e0
Merge branch 'next' into switch-to-ts
Khartir Oct 18, 2019
bf9d08a
Reapply #150
Khartir Oct 18, 2019
3251b08
Update project website link.
ghengeveld Oct 18, 2019
f373596
Add contribution docs.
ghengeveld Oct 18, 2019
a727d1c
Add links to contribution docs.
ghengeveld Oct 18, 2019
f6245df
fix typo
Khartir Oct 21, 2019
bce7795
cleanup config
Khartir Oct 21, 2019
8bbcec4
remove yarn.lock
Khartir Oct 21, 2019
4e04af2
remove TS-dependency in package
Khartir Oct 21, 2019
dc0a8a3
Add similar projects
ghengeveld Oct 21, 2019
a4104a6
Clean up badges.
ghengeveld Oct 21, 2019
e0b5f15
Update dependency lerna to v3.18.3
renovate-bot Oct 22, 2019
7d55881
remove resolutions
Khartir Oct 23, 2019
3dc3fc1
update pika-packages
Khartir Oct 23, 2019
372c536
update dependencies
Khartir Oct 23, 2019
326b3bd
fix test
Khartir Oct 23, 2019
caf3b5d
remove dependency of react-async to fix chromatic
Khartir Oct 23, 2019
e8f8099
Update dependency lerna to v3.18.3 (#182)
ghengeveld Oct 26, 2019
46b68df
Update all dependencies.
ghengeveld Oct 26, 2019
c8f99ed
Merge remote-tracking branch 'origin/next' into switch-to-ts
phryneas Oct 26, 2019
c23f462
add typescript as a dev dependency
phryneas Oct 26, 2019
46bbabb
fix resolutions for tests that switch react versions
phryneas Oct 26, 2019
4c6abfb
Pin dependencies
renovate-bot Oct 26, 2019
9331a96
Merge pull request #194 from async-library/renovate/pin-dependencies
ghengeveld Oct 26, 2019
638a1ee
add umd build, add fields for module, unpkgs, jsdelivr to final packa…
phryneas Oct 28, 2019
3f7c51c
Merge remote-tracking branch 'origin/next' into switch-to-ts
phryneas Oct 28, 2019
374429a
Update separating-view-logic.md
AlixWang Oct 30, 2019
d9911ac
Update separating-view-logic.md (#199)
ghengeveld Oct 30, 2019
0c295f7
docs: update README.md
allcontributors[bot] Oct 30, 2019
357fc23
docs: update .all-contributorsrc
allcontributors[bot] Oct 30, 2019
b2f54ae
Merge pull request #200 from async-library/all-contributors/add-AlixWang
ghengeveld Oct 30, 2019
5995272
Add npm config to make save-exact the default.
ghengeveld Oct 30, 2019
3bc18ce
Apply suggestions from code review
phryneas Oct 30, 2019
cac7094
Upgrade all dependencies.
ghengeveld Nov 8, 2019
fa7181b
Upgrade all dependencies. (#206)
ghengeveld Nov 8, 2019
bc66519
Update dependency @storybook/react to v5.2.6
renovate-bot Nov 9, 2019
f0ef628
Update dependency prettier to v1.19.1
renovate-bot Nov 9, 2019
d2f84fd
Enable silent dependency auto update, except for major releases.
ghengeveld Nov 9, 2019
23b025e
Update dependency prettier to v1.19.1 (#207)
ghengeveld Nov 9, 2019
5f1c1b1
Update dependency @storybook/react to v5.2.6 (#208)
ghengeveld Nov 9, 2019
b4cbfd4
Merge branch 'next' into pr/Khartir/105
ghengeveld Nov 10, 2019
9a50543
Bump dependencies.
ghengeveld Nov 10, 2019
d7d76c1
Migrate to TypeScript (#105)
ghengeveld Nov 10, 2019
e796dff
Now in TypeScript!
ghengeveld Nov 10, 2019
6bf5211
Add GraphQL example.
ghengeveld Nov 10, 2019
059b1d6
update tests pertaining to watch/watchFn to ensure new props are bein…
salolivares Oct 17, 2019
d5681a9
Pass options into promiseFn instead of lastOptions
salolivares Oct 21, 2019
85ca6a3
alternate solution: set lastOptions.current on watchfn
salolivares Oct 31, 2019
dffd39f
bring in latest typescript changes
salolivares Nov 10, 2019
2538607
fix stale props being passed to promiseFn when using watchFn (#181)
ghengeveld Nov 11, 2019
4f9ff61
docs: update README.md
allcontributors[bot] Nov 11, 2019
0cf13b8
docs: update .all-contributorsrc
allcontributors[bot] Nov 11, 2019
da22705
docs: add salolivares as a contributor (#209)
ghengeveld Nov 11, 2019
6908e33
docs: update README.md
allcontributors[bot] Nov 11, 2019
7869c62
docs: update .all-contributorsrc
allcontributors[bot] Nov 11, 2019
a937a3f
docs: add salolivares as a contributor (#210)
ghengeveld Nov 11, 2019
e7d01c7
Fix line wrapping.
ghengeveld Nov 10, 2019
f6183df
chore(deps): update dependency now to v16.5.0
renovate-bot Nov 12, 2019
e87d31b
Fix CircleCI cache.
ghengeveld Nov 11, 2019
9522e90
chore(deps): update typescript-eslint monorepo to v2.7.0
renovate-bot Nov 14, 2019
dd003c3
Merge pull request #211 from async-library/renovate/typescript-eslint…
renovate[bot] Nov 14, 2019
a06ace2
Setup a GitHub Action for the examples.
ghengeveld Nov 14, 2019
5541d7a
Add the environment matrix.
ghengeveld Nov 14, 2019
edb033f
Add yarn install.
ghengeveld Nov 14, 2019
9736149
Add back some required parenthesis.
ghengeveld Nov 14, 2019
6af03a3
Drop the examples step from the CircleCI workflow.
ghengeveld Nov 14, 2019
ebdce58
Update dependency @testing-library/jest-dom to v4.2.4
renovate-bot Nov 14, 2019
f425052
Update dependency eslint-plugin-jest to v23.0.4
renovate-bot Nov 14, 2019
b8d4bb6
Update dependency now to v16.5.2
renovate-bot Nov 15, 2019
56ab1c0
Merge pull request #212 from async-library/renovate/now-16.x
renovate[bot] Nov 15, 2019
469c95a
Update react monorepo
renovate-bot Nov 15, 2019
08aa3ba
Update dependency eslint-config-prettier to v6.7.0
renovate-bot Nov 19, 2019
9872142
Merge pull request #213 from async-library/renovate/eslint-config-pre…
renovate[bot] Nov 19, 2019
9e5991d
Update typescript-eslint monorepo to v2.8.0
renovate-bot Nov 19, 2019
97b04ae
Update dependency lerna to v3.19.0
renovate-bot Nov 20, 2019
d1e0fd2
Merge branch 'master' into release
ghengeveld Nov 21, 2019
8eaa22f
v10.0.0-alpha.0
ghengeveld Nov 21, 2019
e9579cc
Improve release docs.
ghengeveld Nov 21, 2019
3b67e89
Improve release docs.
ghengeveld Nov 21, 2019
7d8544f
Update dependency now to v16.6.0
renovate-bot Nov 21, 2019
d9a8781
yarn ci doesn't always do a yarn install on Travis.
ghengeveld Nov 24, 2019
b95fafb
Fix local version of react-async.
ghengeveld Nov 24, 2019
0a53785
Don't overwrite package.json if jq fails.
ghengeveld Nov 24, 2019
6032822
Don't let Chromatic fail the pipeline.
ghengeveld Nov 24, 2019
129385c
Fix generix type declaration
Khartir Nov 30, 2019
2488924
Merge pull request #229 from Khartir/fix-generic-type
ghengeveld Nov 30, 2019
79bee9d
Merge branch 'next' into release
ghengeveld Dec 1, 2019
6b90026
Add type packages for react.
ghengeveld Dec 2, 2019
c78dfea
Use resolutions to determine the correct version for @types/react.
ghengeveld Dec 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,25 @@
"contributions": [
"ideas"
]
},
{
"login": "AlixWang",
"name": "AlixWang",
"avatar_url": "https://avatars0.githubusercontent.com/u/5417459?v=4",
"profile": "https://github.com/AlixWang",
"contributions": [
"doc"
]
},
{
"login": "salolivares",
"name": "Sal Olivares",
"avatar_url": "https://avatars0.githubusercontent.com/u/1812749?v=4",
"profile": "http://salolivares.com",
"contributions": [
"code",
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
30 changes: 2 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- restore_cache:
name: Restore root dependencies from cache
keys:
- root-dependencies-v1-{{ checksum "yarn.lock" }}
- root-dependencies-v1-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: yarn install
Expand All @@ -27,15 +27,14 @@ jobs:
command: yarn bootstrap
- save_cache:
name: Cache root dependencies
key: root-dependencies-v1-{{ checksum "yarn.lock" }}
key: root-dependencies-v1-{{ checksum "package.json" }}
paths:
- ~/.cache/yarn
- run: yarn build:packages
- persist_to_workspace:
root: .
paths:
- node_modules
- examples
- packages
lint:
<<: *defaults
Expand Down Expand Up @@ -64,28 +63,6 @@ jobs:
- attach_workspace:
at: .
- run: bash <(curl -s https://codecov.io/bash)
examples:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Bootstrap
command: yarn bootstrap
- run:
name: Build examples
command: yarn build:examples
- run:
name: 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:
Expand All @@ -108,9 +85,6 @@ workflows:
- coverage:
requires:
- test
- examples:
requires:
- build
- chromatic:
requires:
- build
16 changes: 14 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,17 @@
"react": {
"version": "detect"
}
}
}
},
"overrides": [{
"files": "packages/**/*.{ts,tsx}",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
}
}]
}
39 changes: 39 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build, test and deploy examples

on: [push]

jobs:
build:
name: Build on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [10]
steps:
- uses: actions/setup-node@v1
with:
node-version: "10.x"
- uses: actions/checkout@v1
- name: Cache node modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install
- name: Bootstrap
run: yarn bootstrap
- name: Build examples
run: yarn build:examples
- name: Test examples
run: yarn test:examples --maxWorkers=2
- name: Deploy examples
if: github.ref == 'master'
run: yarn deploy:examples
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
8 changes: 8 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
module.exports = async ({ config }) => {
delete config.module.rules[0].include
config.module.rules.push({
test: /\.(ts|tsx)$/,
loader: require.resolve('babel-loader'),
options: {
presets: [['react-app', { flow: false, typescript: true }]],
},
});
config.resolve.extensions.push('.ts', '.tsx');
return config
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ cache:
yarn: true
directories:
- node_modules
script: yarn ci
script: yarn && yarn ci
after_success:
- bash <(curl -s https://codecov.io/bash) -e TRAVIS_NODE_VERSION
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,12 @@
<img src="https://badgen.net/npm/dm/react-async" alt="montly downloads">
</a>
<a href="https://bundlephobia.com/result?p=react-async">
<img src="https://badgen.net/bundlephobia/min/react-async" alt="minified size">
<img src="https://badgen.net/bundlephobia/minzip/react-async" alt="minzipped size">
</a>
<a href="https://opensource.org/licenses/ISC">
<img src="https://badgen.net/npm/license/react-async" alt="license">
</a>
<br/>
<a href="https://github.com/async-library/react-async/issues">
<img src="https://badgen.net/github/open-issues/async-library/react-async?icon=github" alt="issues">
</a>
<a href="https://github.com/async-library/react-async/pulls">
<img src="https://badgen.net/github/open-prs/async-library/react-async?icon=github" alt="pull requests">
</a>
<a href="https://github.com/async-library/react-async/releases">
<img src="https://badgen.net/github/releases/async-library/react-async?icon=github" alt="releases">
</a>
<a href="https://github.com/async-library/react-async/graphs/contributors">
<img src="https://badgen.net/github/contributors/async-library/react-async?icon=github" alt="contributors">
</a>
<br/>
<a href="https://circleci.com/gh/async-library/react-async">
<img src="https://badgen.net/circleci/github/async-library/react-async/master?icon=circleci" alt="circleci status">
</a>
Expand All @@ -52,10 +39,6 @@
<img src="https://deepscan.io/api/teams/5549/projects/7406/branches/74183/badge/grade.svg" alt="DeepScan grade">
</a>
<br/>
<img src="https://badgen.net/david/dep/async-library/react-async/packages/react-async" alt="dependencies">
<img src="https://badgen.net/david/dev/async-library/react-async" alt="devDependencies">
<img src="https://badgen.net/david/peer/async-library/react-async/packages/react-async" alt="peerDependencies">
<br/>
<a href="https://discord.gg/CAYQ6mU">
<img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" />
</a>
Expand All @@ -74,6 +57,7 @@ Use it with `fetch`, Axios or other data fetching libraries, even GraphQL.

- Zero dependencies
- Works with promises, async/await and the Fetch API
- Now with experimental Suspense support
- Choose between Render Props, Context-based helper components or the `useAsync` and `useFetch` hooks
- Debug and develop every part of the loading sequence with the React Async DevTools
- Provides convenient `isPending`, `startedAt`, `finishedAt`, et al metadata
Expand All @@ -83,7 +67,7 @@ Use it with `fetch`, Axios or other data fetching libraries, even GraphQL.
- Supports [abortable fetch] by providing an AbortController
- Supports optimistic updates using `setData`
- Supports server-side rendering through `initialValue`
- Comes with type definitions for TypeScript
- Written in TypeScript, ships with type definitions
- Works well in React Native too!

[abortable fetch]: https://developers.google.com/web/updates/2017/09/abortable-fetch
Expand Down Expand Up @@ -111,6 +95,22 @@ Use it with `fetch`, Axios or other data fetching libraries, even GraphQL.
- [State properties](https://docs.react-async.com/api/state)
- [Helper components](https://docs.react-async.com/api/helpers)

## Guide

- [Async components](https://docs.react-async.com/guide/async-components)
- [Separating view and logic](https://docs.react-async.com/guide/separating-view-logic)
- [Async actions](https://docs.react-async.com/guide/async-actions)
- [Optimistic updates](https://docs.react-async.com/guide/optimistic-updates)
- [Server-side rendering](https://docs.react-async.com/guide/server-side-rendering)

## Contributing

- [Introduction](https://docs.react-async.com/contributing/introduction)
- [Setting up](https://docs.react-async.com/contributing/setting-up)
- [Development](https://docs.react-async.com/contributing/development)
- [Testing](https://docs.react-async.com/contributing/testing)
- [Releasing](https://docs.react-async.com/contributing/releasing)

# Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down Expand Up @@ -147,9 +147,19 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center"><a href="https://munir.dev"><img src="https://avatars3.githubusercontent.com/u/5339664?v=4" width="75px;" alt="Munir Ahmed Elsangedy"/><br /><sub><b>Munir Ahmed Elsangedy</b></sub></a><br /><a href="#ideas-elsangedy" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/AlixWang"><img src="https://avatars0.githubusercontent.com/u/5417459?v=4" width="75px;" alt="AlixWang"/><br /><sub><b>AlixWang</b></sub></a><br /><a href="https://github.com/async-library/react-async/commits?author=AlixWang" title="Documentation">📖</a></td>
<td align="center"><a href="http://salolivares.com"><img src="https://avatars0.githubusercontent.com/u/1812749?v=4" width="75px;" alt="Sal Olivares"/><br /><sub><b>Sal Olivares</b></sub></a><br /><a href="https://github.com/async-library/react-async/commits?author=salolivares" title="Code">💻</a> <a href="https://github.com/async-library/react-async/issues?q=author%3Asalolivares" title="Bug reports">🐛</a></td>
</tr>
</table>

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## Similar projects

- [@slorber/react-async-hook](https://github.com/slorber/react-async-hook)
- [@dai-shi/react-hooks-async](https://github.com/dai-shi/react-hooks-async)
- [@cristovao-trevisan/async-resource](https://github.com/cristovao-trevisan/async-resource)
- [@ilyalesik/react-fetch-hook](https://github.com/ilyalesik/react-fetch-hook)
- [@marcin-piela/react-fetching-library](https://github.com/marcin-piela/react-fetching-library)
6 changes: 3 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
presets: ["@babel/preset-react"],
plugins: ["@babel/plugin-proposal-object-rest-spread"],
plugins: ["@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-class-properties"],

env: {
test: {
presets: ["@babel/preset-env", "@babel/preset-react"],
plugins: ["@babel/plugin-transform-runtime"],
presets: ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"],
plugins: ["@babel/plugin-transform-runtime", "@babel/plugin-proposal-class-properties"],
},
},
}
32 changes: 24 additions & 8 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,30 @@

## Getting started

- [Installation](installation.md)
- [Upgrading](upgrading.md)
- [Usage](usage.md)
- [DevTools](devtools.md)
- [Installation](getting-started/installation.md)
- [Upgrading](getting-started/upgrading.md)
- [Usage](getting-started/usage.md)
- [DevTools](getting-started/devtools.md)

## API

- [Interfaces](interfaces.md)
- [Configuration options](options.md)
- [State properties](state.md)
- [Helper components](helpers.md)
- [Interfaces](api/interfaces.md)
- [Configuration options](api/options.md)
- [State properties](api/state.md)
- [Helper components](api/helpers.md)

## Guide

- [Async components](guide/async-components.md)
- [Separating view and logic](guide/separating-view-logic.md)
- [Async actions](guide/async-actions.md)
- [Optimistic updates](guide/optimistic-updates.md)
- [Server-side rendering](guide/server-side-rendering.md)

## Contributing

- [Introduction](contributing/introduction.md)
- [Setting up](contributing/setting-up.md)
- [Development](contributing/development.md)
- [Testing](contributing/testing.md)
- [Releasing](contributing/releasing.md)
File renamed without changes.
3 changes: 2 additions & 1 deletion docs/interfaces.md → docs/api/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

React Async provides several ways to use it. The classic interface is through the `<Async>` component, which is
backwards compatible to React v16.3. More recent React applications will be using hooks, of which two are provided:
`useAsync` and `useFetch`. Functionally, `<Async>` and `useAsync` are equivalent. `useFetch` is a special type of `useAsync` which is tied to the native `fetch` API.
`useAsync` and `useFetch`. Functionally, `<Async>` and `useAsync` are equivalent. `useFetch` is a special version of
`useAsync` which is tied to the native `fetch` API.

React Async accepts a wide range of [configuration options](options.md) and returns a set of [state props](state.md).
The way you use these differs slightly between the `useAsync` and `useFetch` hooks, and the `<Async>` component.
Expand Down
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions docs/contributing/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Development

React Async is a library without visual parts. Only the DevTools have a user interface you can spin up in a browser.
Therefore the development workflow for the core library might be different from what you're used to. Generally, we use a
TDD approach:

- Write a unit test for the new feature or bug you want to fix. Sometimes you can just extend an existing test.
- Fix the test by implementing the feature or bugfix. Now all tests should pass.
- Optionally refactor the code for performance, readability and style. Probably this will come up during PR review.

We use the GitHub pull request workflow. In practice this means your workflow looks like this:

- Fork the repo (or pull the latest upstream) under your own account.
- Make your changes, commit and push them. We don't enforce any commit message format.
- Open a pull request on the main repository against the `next` branch. Make sure to follow the template.
- We'll review your PR and will probably ask for some changes.
- Once ready, we'll merge your PR.
- Your changes will be in the next release.

## Working with Storybook

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

```sh
yarn start:storybook
```

This should open up Storybook in a browser at http://localhost:6006/
Run it side-by-side with `yarn test --watch` during development. See [Testing](#testing).

## Working with the examples

In the `examples` folder, you will find sample React applications that use React Async in various ways with various other libraries. Please add a new example when introducing a major new feature. Make sure to add it to `now.json` so it is automatically deployed when merged to `master`.

To run sample examples on your local environments

```sh
yarn build:examples
yarn test:examples
yarn start:examples
```

## Resolving issues

Sometimes your dependencies might end up in a weird state, causing random issues, especially when working with the examples. In this case it often helps to run `yarn clean -y && yarn bootstrap`. This will delete `node_modules` from all packages/examples and do a clean install.
Loading