Skip to content

Commit c5c9af0

Browse files
committed
chore(dev): update devDeps
1 parent b4b6927 commit c5c9af0

File tree

7 files changed

+1644
-1786
lines changed

7 files changed

+1644
-1786
lines changed

.flowconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@ lib/
66
index.js
77

88
[options]
9-
esproposal.class_instance_fields=enable
10-
esproposal.class_static_fields=enable
119
sharedmemory.heap_size=3221225472
12-
esproposal.optional_chaining=enable
1310
exact_by_default=true

lib/utils/domFns.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode
4242
export function addEvent(el: ?Node, event: string, handler: Function, inputOptions?: Object): void {
4343
if (!el) return;
4444
const options = {capture: true, ...inputOptions};
45+
// $FlowIgnore[method-unbinding]
4546
if (el.addEventListener) {
4647
el.addEventListener(event, handler, options);
4748
} else if (el.attachEvent) {
@@ -55,6 +56,7 @@ export function addEvent(el: ?Node, event: string, handler: Function, inputOptio
5556
export function removeEvent(el: ?Node, event: string, handler: Function, inputOptions?: Object): void {
5657
if (!el) return;
5758
const options = {capture: true, ...inputOptions};
59+
// $FlowIgnore[method-unbinding]
5860
if (el.removeEventListener) {
5961
el.removeEventListener(event, handler, options);
6062
} else if (el.detachEvent) {
@@ -100,8 +102,12 @@ export function innerWidth(node: HTMLElement): number {
100102
return width;
101103
}
102104

105+
interface EventWithOffset {
106+
clientX: number, clientY: number
107+
}
108+
103109
// Get from offsetParent
104-
export function offsetXYFromParent(evt: {clientX: number, clientY: number, ...}, offsetParent: HTMLElement, scale: number): ControlPosition {
110+
export function offsetXYFromParent(evt: EventWithOffset, offsetParent: HTMLElement, scale: number): ControlPosition {
105111
const isBody = offsetParent === offsetParent.ownerDocument.body;
106112
const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();
107113

lib/utils/shims.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export function findInArray(array: Array<any> | TouchList, callback: Function):
77
}
88

99
export function isFunction(func: any): boolean %checks {
10+
// $FlowIgnore[method-unbinding]
1011
return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
1112
}
1213

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@
3939
},
4040
"homepage": "https://github.com/react-grid-layout/react-draggable",
4141
"devDependencies": {
42-
"@babel/cli": "^7.13.10",
43-
"@babel/core": "^7.13.10",
44-
"@babel/plugin-proposal-class-properties": "^7.8.3",
45-
"@babel/plugin-transform-flow-comments": "^7.8.3",
46-
"@babel/preset-env": "^7.13.12",
47-
"@babel/preset-flow": "^7.9.0",
48-
"@babel/preset-react": "^7.9.4",
49-
"@types/react": "^16.9.35",
50-
"@types/react-dom": "^16.9.8",
42+
"@babel/cli": "^7.14.8",
43+
"@babel/core": "^7.15.0",
44+
"@babel/plugin-proposal-class-properties": "^7.14.5",
45+
"@babel/plugin-transform-flow-comments": "^7.14.5",
46+
"@babel/preset-env": "^7.15.0",
47+
"@babel/preset-flow": "^7.14.5",
48+
"@babel/preset-react": "^7.14.5",
49+
"@types/react": "^17.0.19",
50+
"@types/react-dom": "^17.0.9",
5151
"assert": "^2.0.0",
5252
"babel-eslint": "^10.1.0",
5353
"babel-loader": "^8.1.0",
5454
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
55-
"eslint": "^7.22.0",
56-
"eslint-plugin-react": "^7.20.0",
57-
"flow-bin": "^0.147.0",
58-
"jasmine-core": "^3.7.1",
59-
"karma": "^6.2.0",
55+
"eslint": "^7.32.0",
56+
"eslint-plugin-react": "^7.24.0",
57+
"flow-bin": "^0.158.0",
58+
"jasmine-core": "^3.9.0",
59+
"karma": "^6.3.4",
6060
"karma-chrome-launcher": "^3.1.0",
6161
"karma-cli": "2.0.0",
62-
"karma-firefox-launcher": "^2.1.0",
62+
"karma-firefox-launcher": "^2.1.1",
6363
"karma-ie-launcher": "^1.0.0",
6464
"karma-jasmine": "^4.0.1",
6565
"karma-phantomjs-launcher": "^1.0.4",
@@ -69,17 +69,17 @@
6969
"phantomjs-prebuilt": "^2.1.16",
7070
"pre-commit": "^1.2.2",
7171
"process": "^0.11.10",
72-
"puppeteer": "^3.1.0",
7372
"react": "^16.13.1",
7473
"react-dom": "^16.13.1",
75-
"react-frame-component": "^4.1.2",
7674
"react-test-renderer": "^16.13.1",
77-
"semver": "^7.3.2",
75+
"puppeteer": "^10.2.0",
76+
"react-frame-component": "^5.1.0",
77+
"semver": "^7.3.5",
7878
"static-server": "^3.0.0",
79-
"typescript": "^3.9.3",
80-
"webpack": "^5.27.2",
81-
"webpack-cli": "^4.5.0",
82-
"webpack-dev-server": "^3.11.0"
79+
"typescript": "^4.3.5",
80+
"webpack": "^5.51.1",
81+
"webpack-cli": "^4.8.0",
82+
"webpack-dev-server": "^4.0.0"
8383
},
8484
"resolutions": {
8585
"minimist": "^1.2.5"

specs/draggable.spec.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,8 @@ describe('react-draggable', function () {
457457

458458
setTimeout(function checkIframe() {
459459
const iframeDoc = ReactDOM.findDOMNode(frame).contentDocument;
460-
if (!iframeDoc) return setTimeout(checkIframe, 50);
461-
const body = iframeDoc.body;
462-
const node = body.querySelector('.react-draggable');
460+
if (!(iframeDoc && iframeDoc.body)) return setTimeout(checkIframe, 50);
461+
const node = iframeDoc.body.querySelector('.react-draggable');
463462
if (!node) return setTimeout(checkIframe, 50);
464463
simulateMovementFromTo(node, 0, 0, 100, 100);
465464

webpack.config.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ module.exports = (env, argv) => ({
1515
path: path.resolve(__dirname, 'build', 'web'),
1616
},
1717
devServer: {
18-
contentBase: '.',
1918
hot: true,
20-
open: true,
21-
inline: false,
22-
openPage: 'example/index.html',
23-
disableHostCheck: true,
24-
writeToDisk: true,
19+
open: 'example/index.html',
20+
client: {
21+
overlay: true,
22+
},
23+
devMiddleware: {
24+
// disableHostCheck: true,
25+
writeToDisk: true,
26+
},
27+
static: {
28+
directory: '.',
29+
}
2530
},
2631
devtool: 'source-map',
2732
externals: {

0 commit comments

Comments
 (0)