Skip to content

Commit

Permalink
chore: update dependencies (#421)
Browse files Browse the repository at this point in the history
* Updated dependencies

* Run Prettier

* Using react-dnd@6

* Updated install

* Fixing tests

* Using own version of react-dnd-scrollzone
  • Loading branch information
dolezel authored and wuweiweiwu committed Nov 30, 2018
1 parent 33f73db commit 9343a55
Show file tree
Hide file tree
Showing 19 changed files with 4,097 additions and 4,974 deletions.
41 changes: 17 additions & 24 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
const env = process.env.NODE_ENV;

if (env === 'rollup') {
module.exports = {
presets: [
[
'env',
{
modules: false,
},
],
'stage-2',
'react',
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
plugins: ['external-helpers'],
};
}

if (env === 'test') {
module.exports = {
comments: false,
plugins: ['transform-es2015-modules-commonjs'],
presets: ['react', 'stage-2'],
};
}
'@babel/preset-react',
],
env: {
test: {
plugins: [
'@babel/plugin-transform-modules-commonjs',
],
}
}
};
13 changes: 0 additions & 13 deletions .eslintrc

This file was deleted.

19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: [
'eslint-config-airbnb',
'prettier',
'prettier/react'
],
parser: 'babel-eslint',
env: {
browser: true,
jest: true
},
rules: {
'react/destructuring-assignment': 0,
'react/jsx-filename-extension': 0,
'react/prefer-stateless-function': 0,
'react/no-did-mount-set-state': 0,
'react/sort-comp': 0
},
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ coverage
*.DS_Store

# Build directories (Will be preserved by npm)
.cache
dist
build
style.css
Expand Down
64 changes: 28 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.3.0",
"description": "Drag-and-drop sortable component for nested data and hierarchies",
"scripts": {
"postinstall": "cd node_modules/react-dnd-scrollzone && npm i --ignore-scripts && npm run build",
"prebuild": "npm run lint",
"build": "npm run clean && NODE_ENV=rollup rollup -c",
"build:storybook": "npm run clean:storybook && build-storybook -o build",
Expand All @@ -19,11 +20,6 @@
},
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"babel": {
"presets": [
"./.babelrc.js"
]
},
"files": [
"dist",
"style.css"
Expand Down Expand Up @@ -64,9 +60,9 @@
"dependencies": {
"lodash.isequal": "^4.5.0",
"prop-types": "^15.6.1",
"react-dnd": "3.0.2",
"react-dnd-html5-backend": "3.0.2",
"react-dnd-scrollzone": "^4.0.0",
"react-dnd": "^6.0.0",
"react-dnd-html5-backend": "^6.0.0",
"react-dnd-scrollzone": "github:dolezel/react-dnd-scrollzone.git#41203ef00c991f744aa87e897d7d518d32f6a994",
"react-lifecycles-compat": "^3.0.4",
"react-virtualized": "^9.19.1"
},
Expand All @@ -75,62 +71,58 @@
"react-dom": "^15.3.0 || ^16.0.0"
},
"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"@storybook/addon-options": "^4.0.0-alpha.4",
"@storybook/addon-storyshots": "^4.0.0-alpha.4",
"@storybook/react": "^4.0.0-alpha.4",
"autoprefixer": "^8.5.2",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-jest": "^23.0.1",
"babel-loader": "^7.1.4",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"autoprefixer": "^9.3.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.4",
"codesandbox": "^1.2.10",
"coveralls": "^3.0.1",
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
"css-loader": "^1.0.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint": "^5.9.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.8.2",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"gh-pages": "^1.1.0",
"file-loader": "^2.0.0",
"gh-pages": "^2.0.1",
"html-webpack-plugin": "^3.2.0",
"jest": "^23.1.0",
"jest-enzyme": "^6.0.1",
"jest-enzyme": "^7.0.1",
"json-loader": "^0.5.7",
"postcss-loader": "^2.1.5",
"postcss-loader": "^3.0.0",
"prettier": "^1.13.3",
"react": "^16.4.0",
"react-addons-shallow-compare": "^15.6.2",
"react-dnd-test-backend": "3.0.2",
"react-dnd-touch-backend": "0.4.0",
"react-dnd-test-backend": "6.0.0",
"react-dnd-touch-backend": "0.6.0",
"react-dom": "^16.4.0",
"react-hot-loader": "^4.3.0",
"react-sortable-tree-theme-file-explorer": "^1.1.2",
"react-test-renderer": "^16.4.0",
"rimraf": "^2.6.2",
"rollup": "^0.59.4",
"rollup-plugin-babel": "^3.0.4",
"rollup": "^0.67.1",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-postcss": "^1.6.2",
"standard-version": "^4.4.0",
"style-loader": "^0.21.0",
"style-loader": "^0.23.1",
"webpack": "^4.10.2",
"webpack-cli": "^2.1.4",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.4",
"webpack-node-externals": "^1.7.2"
},
Expand Down
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
'react',
'react-dom',
'react-dnd',
'react-dnd/lib/DragDropContext',
'prop-types',
'react-dnd-html5-backend',
'react-dnd-scrollzone',
Expand Down
16 changes: 6 additions & 10 deletions src/node-renderer-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,12 @@ class NodeRendererDefault extends Component {
}
/>

{node.expanded &&
!isDragging && (
<div
style={{ width: scaffoldBlockPxWidth }}
className={classnames(
'rst__lineChildren',
rowDirectionClass
)}
/>
)}
{node.expanded && !isDragging && (
<div
style={{ width: scaffoldBlockPxWidth }}
className={classnames('rst__lineChildren', rowDirectionClass)}
/>
)}
</div>
)}

Expand Down
Loading

0 comments on commit 9343a55

Please sign in to comment.