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

chore: upgrade dependencies #583

Merged
merged 3 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@
"code",
"bug"
]
},
{
"login": "CreativeTechGuy",
"name": "Jason O'Neill",
"avatar_url": "https://avatars1.githubusercontent.com/u/12002072?v=4",
"profile": "https://github.com/CreativeTechGuy",
"contributions": [
"maintenance",
"test"
]
}
],
"contributorsPerLine": 7,
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/size-comments.yml

This file was deleted.

73 changes: 36 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,54 +36,53 @@
"scripts"
],
"dependencies": {
"@scarf/scarf": "^1.0.0",
"ts-toolbelt": "^6.4.2"
"@scarf/scarf": "^1.0.6",
"ts-toolbelt": "^6.9.4"
},
"peerDependencies": {
"react": "^16.6.3"
"react": "^16.8.0"
},
"devDependencies": {
"@babel/core": "^7.8.6",
"@babel/preset-env": "^7.8.6",
"@babel/preset-react": "^7.8.3",
"@rollup/plugin-replace": "^2.3.1",
"@svgr/rollup": "^4.3.0",
"@testing-library/react": "^9.4.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.x",
"babel-jest": "^24.9.0",
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@babel/preset-react": "^7.10.1",
"@rollup/plugin-replace": "^2.3.3",
"@svgr/rollup": "^5.4.0",
"@testing-library/react": "^10.2.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.0.1",
"babel-plugin-transform-async-to-promises": "^0.8.15",
"cross-env": "^5.1.4",
"dtslint": "^3.4.1",
"eslint": "5.x",
"eslint-config-prettier": "^4.3.0",
"eslint-config-react-app": "^4.0.1",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-react": "^7.0.2",
"eslint-plugin-flowtype": "2.x",
"cross-env": "^7.0.2",
"dtslint": "^3.6.12",
"eslint": "7.x",
"eslint-config-prettier": "^6.11.0",
"eslint-config-react-app": "^5.2.1",
"eslint-config-standard": "^14.1.1",
"eslint-config-standard-react": "^9.2.0",
"eslint-plugin-flowtype": "5.x",
"eslint-plugin-import": "2.x",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "7.18.3",
"eslint-plugin-react-hooks": "1.5.0",
"eslint-plugin-standard": "^4.0.0",
"is-ci-cli": "^2.0.0",
"jest": "^24.9.0",
"prettier": "^1.19.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "7.20.0",
"eslint-plugin-react-hooks": "4.0.4",
"eslint-plugin-standard": "^4.0.1",
"is-ci-cli": "^2.1.1",
"jest": "^26.0.1",
"prettier": "^2.0.5",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-error-boundary": "^2.2.1",
"rollup": "^1.32.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.0",
"react-dom": "^16.13.1",
"react-error-boundary": "^2.2.2",
"rollup": "^2.16.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-jscc": "^1.0.0",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-peer-deps-external": "^2.2.2",
"rollup-plugin-prettier": "^0.6.0",
"rollup-plugin-prettier": "^2.1.0",
"rollup-plugin-size": "^0.2.2",
"rollup-plugin-terser": "^5.2.0",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-visualizer": "^4.0.4"
},
"release": {}
Expand Down
12 changes: 6 additions & 6 deletions src/tests/ReactQueryCacheProvider.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect } from 'react'
import { render, cleanup, waitForElement } from '@testing-library/react'
import { render, cleanup, waitFor } from '@testing-library/react'
import {
ReactQueryCacheProvider,
makeQueryCache,
Expand Down Expand Up @@ -31,7 +31,7 @@ describe('ReactQueryCacheProvider', () => {

const rendered = render(<Page />)

await waitForElement(() => rendered.getByText('test'))
await waitFor(() => rendered.getByText('test'))

expect(queryCache.getQuery('test')).toBeDefined()
})
Expand All @@ -57,7 +57,7 @@ describe('ReactQueryCacheProvider', () => {
</ReactQueryCacheProvider>
)

await waitForElement(() => rendered.getByText('test'))
await waitFor(() => rendered.getByText('test'))

expect(queryCache.getQuery('test')).not.toBeDefined()
expect(cache.getQuery('test')).toBeDefined()
Expand All @@ -82,7 +82,7 @@ describe('ReactQueryCacheProvider', () => {
</ReactQueryCacheProvider>
)

await waitForElement(() => rendered.getByText('test'))
await waitFor(() => rendered.getByText('test'))

expect(queryCache.getQuery('test')).not.toBeDefined()
})
Expand Down Expand Up @@ -126,8 +126,8 @@ describe('ReactQueryCacheProvider', () => {
</>
)

await waitForElement(() => rendered.getByText('test1'))
await waitForElement(() => rendered.getByText('test2'))
await waitFor(() => rendered.getByText('test1'))
await waitFor(() => rendered.getByText('test2'))

expect(cache1.getQuery('test1')).toBeDefined()
expect(cache1.getQuery('test2')).not.toBeDefined()
Expand Down
6 changes: 3 additions & 3 deletions src/tests/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
act,
fireEvent,
render,
waitForElement,
waitFor,
cleanup,
} from '@testing-library/react'
import {
Expand Down Expand Up @@ -49,7 +49,7 @@ describe('config', () => {
</ReactQueryConfigProvider>
)

await waitForElement(() => rendered.getByText('Status: success'))
await waitFor(() => rendered.getByText('Status: success'))

expect(onSuccess).toHaveBeenCalledWith('data')
})
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('config', () => {
cleanup()

// wipe query cache/stored config
act(() => queryCache.clear())
await act(() => queryCache.clear())
onSuccess.mockClear()

// rerender WITHOUT config provider,
Expand Down
8 changes: 4 additions & 4 deletions src/tests/suspense.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
render,
waitForElement,
waitFor,
fireEvent,
cleanup,
} from '@testing-library/react'
Expand Down Expand Up @@ -32,7 +32,7 @@ describe("useQuery's in Suspense mode", () => {
</ReactQueryCacheProvider>
)

await waitForElement(() => rendered.getByText('rendered'))
await waitFor(() => rendered.getByText('rendered'))

expect(queryFn).toHaveBeenCalledTimes(1)
})
Expand Down Expand Up @@ -63,7 +63,7 @@ describe("useQuery's in Suspense mode", () => {
expect(queryCache.getQuery(QUERY_KEY)).toBeFalsy()

fireEvent.click(rendered.getByLabelText('toggle'))
await waitForElement(() => rendered.getByText('rendered'))
await waitFor(() => rendered.getByText('rendered'))

expect(queryCache.getQuery(QUERY_KEY).instances.length).toBe(1)

Expand Down Expand Up @@ -93,7 +93,7 @@ describe("useQuery's in Suspense mode", () => {
</ReactQueryCacheProvider>
)

await waitForElement(() => rendered.getByText('rendered'))
await waitFor(() => rendered.getByText('rendered'))

expect(successFn).toHaveBeenCalledTimes(1)
})
Expand Down
56 changes: 28 additions & 28 deletions src/tests/useInfiniteQuery.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
render,
waitForElement,
waitFor,
fireEvent,
cleanup,
} from '@testing-library/react'
Expand Down Expand Up @@ -111,29 +111,29 @@ describe('useInfiniteQuery', () => {

rendered.getByText('Loading...')

await waitForElement(() => [
rendered.getByText('Item: 9'),
rendered.getByText('Page 0: 0'),
])
await waitFor(() => {
rendered.getByText('Item: 9')
rendered.getByText('Page 0: 0')
})

fireEvent.click(rendered.getByText('Load More'))

await waitForElement(() => rendered.getByText('Loading more...'))
await waitFor(() => rendered.getByText('Loading more...'))

await waitForElement(() => [
rendered.getByText('Item: 19'),
rendered.getByText('Page 0: 0'),
rendered.getByText('Page 1: 1'),
])
await waitFor(() => {
rendered.getByText('Item: 19')
rendered.getByText('Page 0: 0')
rendered.getByText('Page 1: 1')
})

fireEvent.click(rendered.getByText('Refetch'))

await waitForElement(() => rendered.getByText('Background Updating...'))
await waitForElement(() => [
rendered.getByText('Item: 19'),
rendered.getByText('Page 0: 2'),
rendered.getByText('Page 1: 3'),
])
await waitFor(() => rendered.getByText('Background Updating...'))
await waitFor(() => {
rendered.getByText('Item: 19')
rendered.getByText('Page 0: 2')
rendered.getByText('Page 1: 3')
})
})

it('should compute canFetchMore correctly using initialData', async () => {
Expand Down Expand Up @@ -214,21 +214,21 @@ describe('useInfiniteQuery', () => {

fireEvent.click(rendered.getByText('Load More'))

await waitForElement(() => rendered.getByText('Loading more...'))
await waitFor(() => rendered.getByText('Loading more...'))

await waitForElement(() => [
rendered.getByText('Item: 19'),
rendered.getByText('Page 1: 0'),
])
await waitFor(() => {
rendered.getByText('Item: 19')
rendered.getByText('Page 1: 0')
})

fireEvent.click(rendered.getByText('Refetch'))

await waitForElement(() => rendered.getByText('Background Updating...'))
await waitForElement(() => [
rendered.getByText('Item: 19'),
rendered.getByText('Page 0: 1'),
rendered.getByText('Page 1: 2'),
])
await waitFor(() => rendered.getByText('Background Updating...'))
await waitFor(() => {
rendered.getByText('Item: 19')
rendered.getByText('Page 0: 1')
rendered.getByText('Page 1: 2')
})
})

it('should build fresh cursors on refetch', async () => {
Expand Down
6 changes: 3 additions & 3 deletions src/tests/useIsFetching.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
cleanup,
render,
fireEvent,
waitForElement,
waitFor,
} from '@testing-library/react'
import * as React from 'react'

Expand Down Expand Up @@ -42,7 +42,7 @@ describe('useIsFetching', () => {

rendered.getByText('isFetching: 0')
fireEvent.click(rendered.getByText('setReady'))
await waitForElement(() => rendered.getByText('isFetching: 1'))
await waitForElement(() => rendered.getByText('isFetching: 0'))
await waitFor(() => rendered.getByText('isFetching: 1'))
await waitFor(() => rendered.getByText('isFetching: 0'))
})
})
8 changes: 4 additions & 4 deletions src/tests/useMutation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
cleanup,
render,
fireEvent,
waitForElement,
waitFor,
} from '@testing-library/react'
import * as React from 'react'

Expand Down Expand Up @@ -32,13 +32,13 @@ describe('useMutation', () => {

fireEvent.click(getByText('mutate'))

await waitForElement(() => getByTestId('title'))
await waitFor(() => getByTestId('title'))

expect(getByTestId('title').textContent).toBe('mutation')

fireEvent.click(getByText('reset'))

await waitForElement(() => getByTestId('title'))
await waitFor(() => getByTestId('title'))

expect(getByTestId('title').textContent).toBe('')
})
Expand Down Expand Up @@ -76,7 +76,7 @@ describe('useMutation', () => {

fireEvent.click(getByText('mutate'))

await waitForElement(() => getByTestId('error'))
await waitFor(() => getByTestId('error'))

expect(getByTestId('error').textContent).toBe(
'Expected mock error. All is well!'
Expand Down
Loading