Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit a477e83

Browse files
mrkevfacebook-github-bot
authored andcommitted
Upgrade more deps. (#2239)
Summary: This PR upgrades more deps including gulp + some other gulp-related and build deps, and flow. The flow upgrade involved replacing uses of emptyFunction, since Flow 0.99.0 made function types stricter adding checks for function statics. There's a good blog post about it here: https://dev.to/wgao19/flow-0-99-callable-properties-function-statics-and-more-5c82 Pull Request resolved: #2239 Test Plan: yarn test, also played a bit with the rich text editor in the examples folder. Reviewed By: elboman Differential Revision: D18226234 Pulled By: mrkev fbshipit-source-id: 98310667411984eeb24eecd48568d58283950147
1 parent 0e03745 commit a477e83

File tree

5 files changed

+399
-327
lines changed

5 files changed

+399
-327
lines changed

package.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
"babel-eslint": "^10.0.3",
5050
"babel-preset-fbjs": "^3.3.0",
5151
"cross-env": "^6.0.3",
52-
"del": "^2.2.0",
53-
"envify": "^3.4.0",
52+
"del": "^5.1.0",
5453
"es6-shim": "^0.35.5",
5554
"eslint": "^6.6.0",
5655
"eslint-config-fbjs": "^3.1.1",
@@ -62,27 +61,25 @@
6261
"eslint-plugin-react": "^7.16.0",
6362
"eslint-plugin-relay": "^1.3.12",
6463
"fbjs-scripts": "^1.2.0",
65-
"flow-bin": "^0.92.0",
66-
"gulp": "^4.0.0",
64+
"flow-bin": "^0.110.1",
65+
"gulp": "^4.0.2",
6766
"gulp-babel": "^8.0.0",
68-
"gulp-clean-css": "^2.0.3",
69-
"gulp-concat-css": "^2.2.0",
67+
"gulp-clean-css": "^4.2.0",
68+
"gulp-concat-css": "^3.1.0",
7069
"gulp-derequire": "^2.1.0",
71-
"gulp-flatten": "^0.2.0",
72-
"gulp-header": "1.8.2",
73-
"gulp-if": "^2.0.2",
74-
"gulp-rename": "^1.2.2",
75-
"gulp-uglify": "^1.2.0",
70+
"gulp-flatten": "^0.4.0",
71+
"gulp-header": "^2.0.9",
72+
"gulp-if": "^3.0.0",
73+
"gulp-rename": "^1.4.0",
7674
"gulp-util": "^3.0.6",
7775
"jest": "^24.9.0",
7876
"prettier": "1.13.6",
7977
"react": "^16.8.0",
8078
"react-dom": "^16.8.0",
8179
"react-test-renderer": "^16.0.0",
8280
"stats-webpack-plugin": "^0.6.2",
83-
"through2": "^2.0.1",
81+
"through2": "^3.0.1",
8482
"uglifyjs-webpack-plugin": "^1.1.6",
85-
"vinyl-buffer": "^1.0.0",
8683
"webpack-stream": "^4.0.0"
8784
},
8885
"devEngines": {

src/.flowconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.*/react-dom/node_modules/.*
55
.*/fbjs/node_modules/.*
66
.*/node_modules/invariant/.*
7+
.*/node_modules/fbjs/lib/emptyFunction.js.flow
78

89
[include]
910
../node_modules/fbjs/lib/
@@ -37,4 +38,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
3738
module.name_mapper='ReactDOM' -> 'react-dom'
3839

3940
[version]
40-
^0.92.0
41+
^0.110.1

src/component/base/DraftEditor.react.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const Style = require('Style');
3333
const UserAgent = require('UserAgent');
3434

3535
const cx = require('cx');
36-
const emptyFunction = require('emptyFunction');
3736
const generateRandomKey = require('generateRandomKey');
3837
const getDefaultKeyBinding = require('getDefaultKeyBinding');
3938
const getScrollPosition = require('getScrollPosition');
@@ -136,8 +135,12 @@ class UpdateDraftEditorFlags extends React.Component<{
136135
class DraftEditor extends React.Component<DraftEditorProps, State> {
137136
static defaultProps: DraftEditorDefaultProps = {
138137
blockRenderMap: DefaultDraftBlockRenderMap,
139-
blockRendererFn: emptyFunction.thatReturnsNull,
140-
blockStyleFn: emptyFunction.thatReturns(''),
138+
blockRendererFn: function() {
139+
return null;
140+
},
141+
blockStyleFn: function() {
142+
return '';
143+
},
141144
keyBindingFn: getDefaultKeyBinding,
142145
readOnly: false,
143146
spellCheck: false,

src/model/immutable/BlockTree.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ import type CharacterMetadata from 'CharacterMetadata';
1616
import type ContentState from 'ContentState';
1717
import type {DraftDecoratorType} from 'DraftDecoratorType';
1818

19-
const emptyFunction = require('emptyFunction');
2019
const findRangesImmutable = require('findRangesImmutable');
2120
const Immutable = require('immutable');
2221

2322
const {List, Repeat, Record} = Immutable;
2423

25-
const returnTrue = emptyFunction.thatReturnsTrue;
24+
const returnTrue = function() {
25+
return true;
26+
};
2627

2728
const defaultLeafRange: {
2829
start: ?number,

0 commit comments

Comments
 (0)