Skip to content

Commit e543a23

Browse files
committed
chore(pkg): update devDependencies
1 parent 108e344 commit e543a23

File tree

8 files changed

+2395
-1676
lines changed

8 files changed

+2395
-1676
lines changed

.babelrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
],
1414
"plugins": [
1515
"@babel/plugin-transform-flow-comments",
16-
"@babel/plugin-proposal-class-properties",
16+
"@babel/plugin-transform-class-properties",
1717
"transform-inline-environment-variables"
1818
]
1919
}

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
// For Flow
2828
"ReactElement",
2929
"ReactClass",
30-
"$Shape",
3130
"$Exact",
31+
"Partial",
3232
"$Keys",
3333
"MouseTouchEvent",
3434
}

.flowconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[ignore]
22
<PROJECT_ROOT>/node_modules/webpack-cli.*
3-
<PROJECT_ROOT>/node_modules/resolve.*
3+
<PROJECT_ROOT>/node_modules/.*malformed_package_json.*
44

55
[include]
66
lib/
77
index.js
88

99
[options]
1010
sharedmemory.heap_size=3221225472
11-
exact_by_default=true
11+
exact_by_default=true

lib/Draggable.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Draggable extends React.Component<DraggableProps, DraggableState> {
4747

4848
static displayName: ?string = 'Draggable';
4949

50-
static propTypes = {
50+
static propTypes: DraggableProps = {
5151
// Accepts all props <DraggableCore> accepts.
5252
...DraggableCore.propTypes,
5353

@@ -179,7 +179,7 @@ class Draggable extends React.Component<DraggableProps, DraggableState> {
179179

180180
// React 16.3+
181181
// Arity (props, state)
182-
static getDerivedStateFromProps({position}: DraggableProps, {prevPropsPosition}: DraggableState): ?$Shape<DraggableState> {
182+
static getDerivedStateFromProps({position}: DraggableProps, {prevPropsPosition}: DraggableState): ?Partial<DraggableState> {
183183
// Set x/y if a new position is provided in props that is different than the previous.
184184
if (
185185
position &&
@@ -262,9 +262,11 @@ class Draggable extends React.Component<DraggableProps, DraggableState> {
262262

263263
const uiData = createDraggableData(this, coreData);
264264

265-
const newState: $Shape<DraggableState> = {
265+
const newState = {
266266
x: uiData.x,
267-
y: uiData.y
267+
y: uiData.y,
268+
slackX: 0,
269+
slackY: 0,
268270
};
269271

270272
// Keep within bounds.
@@ -310,7 +312,7 @@ class Draggable extends React.Component<DraggableProps, DraggableState> {
310312

311313
log('Draggable: onDragStop: %j', coreData);
312314

313-
const newState: $Shape<DraggableState> = {
315+
const newState: Partial<DraggableState> = {
314316
dragging: false,
315317
slackX: 0,
316318
slackY: 0

lib/DraggableCore.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default class DraggableCore extends React.Component<DraggableCoreProps> {
7272

7373
static displayName: ?string = 'DraggableCore';
7474

75-
static propTypes = {
75+
static propTypes: Object = {
7676
/**
7777
* `allowAnyClick` allows dragging using any mouse button.
7878
* By default, we only accept the left button.
@@ -81,6 +81,8 @@ export default class DraggableCore extends React.Component<DraggableCoreProps> {
8181
*/
8282
allowAnyClick: PropTypes.bool,
8383

84+
children: PropTypes.node.isRequired,
85+
8486
/**
8587
* `disabled`, if true, stops the <Draggable> from dragging. All handlers,
8688
* with the exception of `onMouseDown`, will not fire.

lib/utils/domFns.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode
3333
do {
3434
if (matchesSelector(node, selector)) return true;
3535
if (node === baseNode) return false;
36+
// $FlowIgnore[incompatible-type]
3637
node = node.parentNode;
3738
} while (node);
3839

package.json

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,47 +42,48 @@
4242
},
4343
"homepage": "https://github.com/react-grid-layout/react-draggable",
4444
"devDependencies": {
45-
"@babel/cli": "^7.17.6",
46-
"@babel/core": "^7.17.9",
47-
"@babel/eslint-parser": "^7.17.0",
48-
"@babel/plugin-proposal-class-properties": "^7.16.7",
49-
"@babel/plugin-transform-flow-comments": "^7.16.7",
50-
"@babel/preset-env": "^7.16.11",
51-
"@babel/preset-flow": "^7.16.7",
52-
"@babel/preset-react": "^7.16.7",
53-
"@types/react": "^17.0.19",
54-
"@types/react-dom": "^17.0.9",
55-
"assert": "^2.0.0",
56-
"babel-loader": "^8.2.5",
57-
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
58-
"eslint": "^8.14.0",
59-
"eslint-plugin-react": "^7.29.4",
60-
"flow-bin": "^0.176.3",
61-
"jasmine-core": "^4.1.0",
62-
"karma": "^6.3.19",
63-
"karma-chrome-launcher": "^3.1.1",
45+
"@babel/cli": "^7.23.0",
46+
"@babel/core": "^7.23.0",
47+
"@babel/eslint-parser": "^7.22.15",
48+
"@babel/plugin-transform-class-properties": "^7.18.6",
49+
"@babel/plugin-transform-flow-comments": "^7.22.10",
50+
"@babel/preset-env": "^7.22.20",
51+
"@babel/preset-flow": "^7.22.15",
52+
"@babel/preset-react": "^7.22.15",
53+
"@types/node": "^20.7.0",
54+
"@types/react": "^18.2.23",
55+
"@types/react-dom": "^18.2.8",
56+
"assert": "^2.1.0",
57+
"babel-loader": "^9.1.3",
58+
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
59+
"eslint": "^8.50.0",
60+
"eslint-plugin-react": "^7.33.2",
61+
"flow-bin": "^0.217.0",
62+
"jasmine-core": "^5.1.1",
63+
"karma": "^6.4.2",
64+
"karma-chrome-launcher": "^3.2.0",
6465
"karma-cli": "2.0.0",
6566
"karma-firefox-launcher": "^2.1.2",
6667
"karma-ie-launcher": "^1.0.0",
67-
"karma-jasmine": "^5.0.0",
68+
"karma-jasmine": "^5.1.0",
6869
"karma-phantomjs-launcher": "^1.0.4",
6970
"karma-phantomjs-shim": "^1.5.0",
7071
"karma-webpack": "^5.0.0",
7172
"lodash": "^4.17.4",
7273
"phantomjs-prebuilt": "^2.1.16",
7374
"pre-commit": "^1.2.2",
7475
"process": "^0.11.10",
75-
"puppeteer": "^13.6.0",
76+
"puppeteer": "^21.3.5",
7677
"react": "^16.13.1",
7778
"react-dom": "^16.13.1",
78-
"react-frame-component": "^5.2.1",
79+
"react-frame-component": "^5.2.6",
7980
"react-test-renderer": "^16.13.1",
80-
"semver": "^7.3.7",
81+
"semver": "^7.5.4",
8182
"static-server": "^3.0.0",
82-
"typescript": "^4.6.3",
83-
"webpack": "^5.72.0",
84-
"webpack-cli": "^4.9.2",
85-
"webpack-dev-server": "^4.8.1"
83+
"typescript": "^5.2.2",
84+
"webpack": "^5.88.2",
85+
"webpack-cli": "^5.1.4",
86+
"webpack-dev-server": "^4.15.1"
8687
},
8788
"resolutions": {
8889
"minimist": "^1.2.5"
@@ -99,4 +100,4 @@
99100
"react": ">= 16.3.0",
100101
"react-dom": ">= 16.3.0"
101102
}
102-
}
103+
}

0 commit comments

Comments
 (0)