Skip to content

Commit cd4a5af

Browse files
committed
chore: update dependencies
1 parent 8e7f83d commit cd4a5af

File tree

8 files changed

+4974
-5260
lines changed

8 files changed

+4974
-5260
lines changed

Diff for: .babelrc.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ module.exports = {
1010
],
1111
env: {
1212
test: {
13-
plugins: [
14-
'@babel/plugin-transform-modules-commonjs',
15-
],
16-
}
17-
}
13+
plugins: ['@babel/plugin-transform-modules-commonjs'],
14+
},
15+
},
1816
};

Diff for: .eslintrc.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
module.exports = {
2-
extends: [
3-
'eslint-config-airbnb',
4-
'prettier',
5-
'prettier/react'
6-
],
2+
extends: ['eslint-config-airbnb', 'prettier', 'prettier/react'],
73
parser: 'babel-eslint',
84
env: {
95
browser: true,
10-
jest: true
6+
jest: true,
117
},
128
rules: {
139
'react/destructuring-assignment': 0,
1410
'react/jsx-filename-extension': 0,
1511
'react/prefer-stateless-function': 0,
1612
'react/no-did-mount-set-state': 0,
17-
'react/sort-comp': 0
13+
'react/sort-comp': 0,
14+
'react/jsx-props-no-spreading': 0,
15+
'react/prop-types': 0,
16+
'no-shadow': 0,
17+
'jsx-a11y/label-has-associated-control': 0,
1818
},
19-
}
19+
};

Diff for: package.json

+44-42
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
"description": "Drag-and-drop sortable component for nested data and hierarchies",
55
"scripts": {
66
"start": "parcel website/index.html",
7-
"prebuild": "npm run lint && npm run clean",
7+
"prebuild": "yarn run lint && yarn run clean",
88
"build": "rollup -c",
99
"buildOnly": "rollup -c",
10-
"build:storybook": "npm run clean:storybook && build-storybook -o build/storybook",
11-
"build:website": "npm run clean:website && parcel build website/index.html -d build --public-url /react-sortable-tree/",
10+
"build:storybook": "yarn run clean:storybook && build-storybook -o build/storybook",
11+
"build:website": "yarn run clean:website && parcel build website/index.html -d build --public-url /react-sortable-tree/",
1212
"clean": "rimraf dist",
1313
"clean:storybook": "rimraf build/storybook",
1414
"clean:website": "rimraf build",
15-
"lint": "eslint src",
15+
"lint": "eslint src website",
1616
"prettier": "prettier --write \"{src,example/src,stories}/**/*.{js,css,md}\"",
17-
"prepublishOnly": "npm run test && npm run build",
17+
"prepublishOnly": "yarn run test && yarn run build",
1818
"release": "standard-version",
1919
"test": "jest",
2020
"test:watch": "jest --watchAll",
@@ -38,7 +38,9 @@
3838
],
3939
"license": "MIT",
4040
"jest": {
41-
"setupTestFrameworkScriptFile": "./node_modules/jest-enzyme/lib/index.js",
41+
"setupFilesAfterEnv": [
42+
"./node_modules/jest-enzyme/lib/index.js"
43+
],
4244
"setupFiles": [
4345
"./test-config/shim.js",
4446
"./test-config/test-setup.js"
@@ -70,61 +72,61 @@
7072
"frontend-collective-react-dnd-scrollzone": "^1.0.2",
7173
"lodash.isequal": "^4.5.0",
7274
"prop-types": "^15.6.1",
73-
"react-dnd": "^9.3.4",
75+
"react-dnd": "^9.4.0",
7476
"react-dnd-html5-backend": "^9.3.4",
7577
"react-lifecycles-compat": "^3.0.4",
76-
"react-virtualized": "^9.19.1"
78+
"react-virtualized": "^9.21.2"
7779
},
7880
"peerDependencies": {
7981
"react": "^16.3.0",
8082
"react-dnd": "^7.3.0",
8183
"react-dom": "^16.3.0"
8284
},
8385
"devDependencies": {
84-
"@babel/cli": "^7.1.5",
85-
"@babel/core": "^7.1.6",
86+
"@babel/cli": "^7.7.0",
87+
"@babel/core": "^7.7.2",
8688
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
87-
"@babel/preset-env": "^7.1.6",
88-
"@babel/preset-react": "^7.0.0",
89-
"@storybook/addon-options": "^4.0.0-alpha.4",
90-
"@storybook/addon-storyshots": "^4.0.0-alpha.4",
91-
"@storybook/react": "^4.0.0-alpha.4",
92-
"autoprefixer": "^9.3.1",
89+
"@babel/preset-env": "^7.7.1",
90+
"@babel/preset-react": "^7.7.0",
91+
"@storybook/addon-options": "^5.2.6",
92+
"@storybook/addon-storyshots": "^5.2.6",
93+
"@storybook/react": "^5.2.6",
94+
"autoprefixer": "^9.7.1",
9395
"babel-core": "^7.0.0-bridge.0",
94-
"babel-eslint": "^10.0.1",
95-
"babel-jest": "^23.6.0",
96+
"babel-eslint": "^10.0.3",
97+
"babel-jest": "^24.9.0",
9698
"babel-loader": "^8.0.4",
9799
"codesandbox": "~2.1.10",
98100
"coveralls": "^3.0.1",
99-
"cross-env": "^5.1.6",
101+
"cross-env": "^6.0.3",
100102
"enzyme": "^3.10.0",
101103
"enzyme-adapter-react-16": "^1.14.0",
102-
"eslint": "^5.9.0",
103-
"eslint-config-airbnb": "^17.1.0",
104+
"eslint": "^6.6.0",
105+
"eslint-config-airbnb": "^18.0.1",
104106
"eslint-config-prettier": "^6.5.0",
105-
"eslint-plugin-import": "^2.12.0",
106-
"eslint-plugin-jsx-a11y": "^6.0.3",
107-
"eslint-plugin-react": "^7.8.2",
108-
"gh-pages": "^2.0.1",
109-
"jest": "^23.1.0",
110-
"jest-enzyme": "^7.1.1",
111-
"parcel-bundler": "^1.11.0",
112-
"prettier": "^1.13.3",
113-
"react": "^16.3.0",
107+
"eslint-plugin-import": "^2.18.2",
108+
"eslint-plugin-jsx-a11y": "^6.2.3",
109+
"eslint-plugin-react": "^7.16.0",
110+
"gh-pages": "^2.1.1",
111+
"jest": "^24.9.0",
112+
"jest-enzyme": "^7.1.2",
113+
"parcel-bundler": "^1.12.4",
114+
"prettier": "^1.19.1",
115+
"react": "^16.11.0",
114116
"react-addons-shallow-compare": "^15.6.2",
115-
"react-dnd-test-backend": "^9.3.4",
116-
"react-dnd-touch-backend": "^9.3.4",
117-
"react-dom": "^16.3.0",
118-
"react-hot-loader": "^4.3.0",
119-
"react-sortable-tree-theme-file-explorer": "^1.1.2",
120-
"react-test-renderer": "^16.4.0",
121-
"rimraf": "^2.6.2",
122-
"rollup": "^0.67.1",
117+
"react-dnd-test-backend": "^9.4.0",
118+
"react-dnd-touch-backend": "^9.4.0",
119+
"react-dom": "^16.11.0",
120+
"react-hot-loader": "^4.12.17",
121+
"react-sortable-tree-theme-file-explorer": "^2.0.0",
122+
"react-test-renderer": "^16.11.0",
123+
"rimraf": "^3.0.0",
124+
"rollup": "^1.27.0",
123125
"rollup-plugin-babel": "^4.0.3",
124-
"rollup-plugin-commonjs": "^9.1.3",
125-
"rollup-plugin-node-resolve": "^4.2.4",
126-
"rollup-plugin-postcss": "^1.6.2",
127-
"standard-version": "^4.4.0"
126+
"rollup-plugin-commonjs": "^10.1.0",
127+
"rollup-plugin-node-resolve": "^5.2.0",
128+
"rollup-plugin-postcss": "^2.0.3",
129+
"standard-version": "^7.0.0"
128130
},
129131
"keywords": [
130132
"react",

Diff for: stories/__snapshots__/storyshots.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -5316,7 +5316,6 @@ exports[`Storyshots Basics Themes 1`] = `
53165316
>
53175317
<div
53185318
className="rstcustom__node"
5319-
rowDirection="ltr"
53205319
style={
53215320
Object {
53225321
"height": 25,
@@ -5328,7 +5327,6 @@ exports[`Storyshots Basics Themes 1`] = `
53285327
}
53295328
>
53305329
<div
5331-
rowDirection="ltr"
53325330
style={
53335331
Object {
53345332
"height": "100%",
@@ -5396,7 +5394,6 @@ exports[`Storyshots Basics Themes 1`] = `
53965394
</div>
53975395
<div
53985396
className="rstcustom__node"
5399-
rowDirection="ltr"
54005397
style={
54015398
Object {
54025399
"height": 25,
@@ -5408,7 +5405,6 @@ exports[`Storyshots Basics Themes 1`] = `
54085405
}
54095406
>
54105407
<div
5411-
rowDirection="ltr"
54125408
style={
54135409
Object {
54145410
"height": "100%",
@@ -5484,7 +5480,6 @@ exports[`Storyshots Basics Themes 1`] = `
54845480
</div>
54855481
<div
54865482
className="rstcustom__node"
5487-
rowDirection="ltr"
54885483
style={
54895484
Object {
54905485
"height": 25,
@@ -5496,7 +5491,6 @@ exports[`Storyshots Basics Themes 1`] = `
54965491
}
54975492
>
54985493
<div
5499-
rowDirection="ltr"
55005494
style={
55015495
Object {
55025496
"height": "100%",
@@ -5577,7 +5571,6 @@ exports[`Storyshots Basics Themes 1`] = `
55775571
</div>
55785572
<div
55795573
className="rstcustom__node"
5580-
rowDirection="ltr"
55815574
style={
55825575
Object {
55835576
"height": 25,
@@ -5589,7 +5582,6 @@ exports[`Storyshots Basics Themes 1`] = `
55895582
}
55905583
>
55915584
<div
5592-
rowDirection="ltr"
55935585
style={
55945586
Object {
55955587
"height": "100%",
@@ -5646,7 +5638,6 @@ exports[`Storyshots Basics Themes 1`] = `
56465638
</div>
56475639
<div
56485640
className="rstcustom__node"
5649-
rowDirection="ltr"
56505641
style={
56515642
Object {
56525643
"height": 25,
@@ -5658,7 +5649,6 @@ exports[`Storyshots Basics Themes 1`] = `
56585649
}
56595650
>
56605651
<div
5661-
rowDirection="ltr"
56625652
style={
56635653
Object {
56645654
"height": "100%",

Diff for: website/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class App extends React.Component {
3434
Drag-and-drop sortable component for nested data and hierarchies
3535
</div>
3636
<iframe
37+
title="sandbox"
3738
src="https://codesandbox.io/embed/github/frontend-collective/react-sortable-tree/tree/master/website/sandbox?odemirror=1&view=preview"
3839
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
3940
/>

Diff for: website/sandbox/App.js

+24-11
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ const alertNodeInfo = ({ node, path, treeIndex }) => {
1919
};
2020

2121
export default class App extends React.Component {
22-
state = {
23-
searchString: '',
24-
searchFocusIndex: 0,
25-
searchFoundCount: null,
26-
treeData,
27-
};
22+
constructor(props) {
23+
super(props);
24+
25+
this.state = {
26+
searchString: '',
27+
searchFocusIndex: 0,
28+
searchFoundCount: null,
29+
treeData,
30+
};
31+
}
2832

2933
handleTreeOnChange = treeData => {
3034
this.setState({ treeData });
@@ -78,21 +82,29 @@ export default class App extends React.Component {
7882
return (
7983
<div className="wrapper">
8084
<div className="bar-wrapper">
81-
<button onClick={this.toggleNodeExpansion.bind(this, true)}>
85+
<button
86+
type="button"
87+
onClick={this.toggleNodeExpansion.bind(this, true)}
88+
>
8289
Expand all
8390
</button>
8491
<button
92+
type="button"
8593
className="collapse"
8694
onClick={this.toggleNodeExpansion.bind(this, false)}
8795
>
8896
Collapse all
8997
</button>
9098
<label>Search: </label>
91-
<input onChange={this.handleSearchOnChange} />
92-
<button className="previous" onClick={this.selectPrevMatch}>
99+
<input type="text" onChange={this.handleSearchOnChange} />
100+
<button
101+
type="button"
102+
className="previous"
103+
onClick={this.selectPrevMatch}
104+
>
93105
Previous
94106
</button>
95-
<button className="next" onClick={this.selectNextMatch}>
107+
<button type="button" className="next" onClick={this.selectNextMatch}>
96108
Next
97109
</button>
98110
<label>
@@ -125,10 +137,11 @@ export default class App extends React.Component {
125137
matches.length > 0 ? searchFocusIndex % matches.length : 0,
126138
})
127139
}
128-
isVirtualized={true}
140+
isVirtualized
129141
generateNodeProps={rowInfo => ({
130142
buttons: [
131143
<button
144+
type="button"
132145
className="btn btn-outline-success"
133146
style={{
134147
verticalAlign: 'middle',

Diff for: website/sandbox/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import ReactDOM from 'react-dom';
33
import App from './App';
44

55
import './styles.css';
6-
import 'react-sortable-tree/style.css';
6+
import '../../src/react-sortable-tree.css';
7+
import '../../src/node-renderer-default.css';
8+
import '../../src/tree-node.css';
79

810
const rootElement = document.getElementById('root');
911
ReactDOM.render(<App />, rootElement);

0 commit comments

Comments
 (0)