Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit 5b56c23

Browse files
authored
Merge pull request #18 from data-provider/release
Update dependencies
2 parents 04e3e3b + f3ab250 commit 5b56c23

File tree

45 files changed

+3183
-2709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3183
-2709
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Fixed
1111
### Removed
1212

13+
## [1.0.1] - 2020-03-22
14+
15+
### Changed
16+
- chore(deps): update dependencies
17+
1318
## [1.0.0] - 2020-03-16
1419
### Added
1520
- docs(readme): Add docs

package-lock.json

Lines changed: 2409 additions & 1986 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@data-provider/react",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "React bindings for @data-provider",
55
"keywords": [
66
"data-provider",
@@ -44,13 +44,13 @@
4444
"@babel/core": "7.8.7",
4545
"@babel/preset-env": "7.8.7",
4646
"@babel/preset-react": "7.8.3",
47-
"@data-provider/core": "2.0.0",
47+
"@data-provider/core": "2.1.1",
4848
"@rollup/plugin-commonjs": "11.0.2",
4949
"@rollup/plugin-json": "4.0.2",
5050
"@rollup/plugin-node-resolve": "7.1.1",
5151
"babel-core": "7.0.0-bridge.0",
5252
"babel-eslint": "10.1.0",
53-
"babel-jest": "24.9.0",
53+
"babel-jest": "25.1.0",
5454
"babel-polyfill": "6.26.0",
5555
"coveralls": "3.0.9",
5656
"eslint": "6.8.0",
@@ -59,9 +59,9 @@
5959
"eslint-plugin-react": "7.19.0",
6060
"eslint-plugin-react-hooks": "2.5.0",
6161
"husky": "4.2.3",
62-
"jest": "24.9.0",
63-
"lint-staged": "9.5.0",
64-
"prettier": "1.19.1",
62+
"jest": "25.1.0",
63+
"lint-staged": "10.0.8",
64+
"prettier": "2.0.1",
6565
"react": "16.13.0",
6666
"react-dom": "16.13.0",
6767
"react-test-renderer": "16.13.0",
@@ -70,7 +70,7 @@
7070
"rollup": "1.32.1",
7171
"rollup-plugin-babel": "4.4.0",
7272
"rollup-plugin-uglify": "6.0.4",
73-
"sinon": "9.0.0"
73+
"sinon": "9.0.1"
7474
},
7575
"lint-staged": {
7676
"src/**/*.js": "eslint",

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.organization=data-provider
22
sonar.projectKey=data-provider-react
3-
sonar.projectVersion=1.0.0
3+
sonar.projectVersion=1.0.1
44

55
sonar.sources=src,test
66
sonar.exclusions=node_modules/**

src/useDataProvider.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { useEffect } from "react";
22
import { useSelector } from "react-redux";
33

4-
export const useRefresh = dataProvider => {
4+
export const useRefresh = (dataProvider) => {
55
useEffect(() => {
66
if (dataProvider) {
7-
const catchError = err => {
7+
const catchError = (err) => {
88
console.error(
99
`@data-provider/react: Error "${err.message}" in provider "${dataProvider.id}"`
1010
);
@@ -22,12 +22,12 @@ export const useData = (dataProvider, comparator) => {
2222
return useSelector(() => dataProvider && dataProvider.state.data, comparator);
2323
};
2424

25-
export const useLoading = dataProvider => {
25+
export const useLoading = (dataProvider) => {
2626
useRefresh(dataProvider);
2727
return useSelector(() => dataProvider && dataProvider.state.loading);
2828
};
2929

30-
export const useError = dataProvider => {
30+
export const useError = (dataProvider) => {
3131
useRefresh(dataProvider);
3232
return useSelector(() => dataProvider && dataProvider.state.error);
3333
};
@@ -37,6 +37,6 @@ export const useDataProvider = (dataProvider, comparator) => {
3737
return [
3838
useData(dataProvider, comparator),
3939
useLoading(dataProvider, comparator),
40-
useError(dataProvider, comparator)
40+
useError(dataProvider, comparator),
4141
];
4242
};

src/withDataProvider.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useMemo } from "react";
22

33
import { useRefresh, useDataProvider, useData, useLoading, useError } from "./useDataProvider";
44

5-
const isFunction = provider => {
5+
const isFunction = (provider) => {
66
return typeof provider === "function";
77
};
88

@@ -57,7 +57,7 @@ export const withDataProviderBranch = (provider, keys) => (
5757
Component,
5858
LoadingComponent,
5959
ErrorComponent
60-
) => props => {
60+
) => (props) => {
6161
const providerToRead = useProvider(provider, props);
6262
const { dataProp, loadingProp, errorProp, loading, error } = useDataProviderCustomProps(
6363
providerToRead,
@@ -78,31 +78,31 @@ export const withDataProviderBranch = (provider, keys) => (
7878
return <Component {...props} {...dataProp} />;
7979
};
8080

81-
export const withDataProvider = (provider, keys) => Component => props => {
81+
export const withDataProvider = (provider, keys) => (Component) => (props) => {
8282
const providerToRead = useProvider(provider, props);
8383
const { dataProp, loadingProp, errorProp } = useDataProviderCustomProps(providerToRead, keys);
8484
return <Component {...props} {...dataProp} {...loadingProp} {...errorProp} />;
8585
};
8686

87-
export const withData = (provider, key) => Component => props => {
87+
export const withData = (provider, key) => (Component) => (props) => {
8888
const providerToRead = useProvider(provider, props);
8989
const { dataProp } = useDataCustomProp(providerToRead, key);
9090
return <Component {...props} {...dataProp} />;
9191
};
9292

93-
export const withLoading = (provider, key) => Component => props => {
93+
export const withLoading = (provider, key) => (Component) => (props) => {
9494
const providerToRead = useProvider(provider, props);
9595
const { loadingProp } = useLoadingCustomProp(providerToRead, key);
9696
return <Component {...props} {...loadingProp} />;
9797
};
9898

99-
export const withError = (provider, key) => Component => props => {
99+
export const withError = (provider, key) => (Component) => (props) => {
100100
const providerToRead = useProvider(provider, props);
101101
const { errorProp } = useErrorCustomProp(providerToRead, key);
102102
return <Component {...props} {...errorProp} />;
103103
};
104104

105-
export const withRefresh = provider => Component => props => {
105+
export const withRefresh = (provider) => (Component) => (props) => {
106106
const providerToRead = useProvider(provider, props);
107107
useRefresh(providerToRead);
108108
return <Component {...props} />;

test-e2e/cypress/support/page-objects/Authors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class Authors extends List {
77
COLUMN: "#authors-column",
88
CONTAINER: "#authors-container",
99
INPUT: "#author-new",
10-
SUBMIT: "#author-submit"
10+
SUBMIT: "#author-submit",
1111
});
1212

1313
this._search = new Search({
1414
CONTAINER: "#authors-search-container",
15-
SEARCH: "#search-author"
15+
SEARCH: "#search-author",
1616
});
1717
}
1818

test-e2e/cypress/support/page-objects/Books.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ class Books extends List {
88
CONTAINER: "#books-container",
99
INPUT: "#book-new",
1010
SUBMIT: "#book-submit",
11-
SELECT: "#book-author-select"
11+
SELECT: "#book-author-select",
1212
});
1313

1414
this._search = new Search({
1515
CONTAINER: "#books-search-container",
16-
SEARCH: "#search-book"
16+
SEARCH: "#search-book",
1717
});
1818
}
1919

test-e2e/cypress/support/page-objects/common/List.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ class List {
2828
}
2929

3030
getDelete(index) {
31-
return this.getItem(index)
32-
.find("span")
33-
.eq(0);
31+
return this.getItem(index).find("span").eq(0);
3432
}
3533

3634
shouldDisplayItems(number) {

0 commit comments

Comments
 (0)