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

Commit

Permalink
Upgrade more deps. (#2239)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrkev authored and facebook-github-bot committed Oct 31, 2019
1 parent 0e03745 commit a477e83
Show file tree
Hide file tree
Showing 5 changed files with 399 additions and 327 deletions.
23 changes: 10 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"babel-eslint": "^10.0.3",
"babel-preset-fbjs": "^3.3.0",
"cross-env": "^6.0.3",
"del": "^2.2.0",
"envify": "^3.4.0",
"del": "^5.1.0",
"es6-shim": "^0.35.5",
"eslint": "^6.6.0",
"eslint-config-fbjs": "^3.1.1",
Expand All @@ -62,27 +61,25 @@
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-relay": "^1.3.12",
"fbjs-scripts": "^1.2.0",
"flow-bin": "^0.92.0",
"gulp": "^4.0.0",
"flow-bin": "^0.110.1",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^2.0.3",
"gulp-concat-css": "^2.2.0",
"gulp-clean-css": "^4.2.0",
"gulp-concat-css": "^3.1.0",
"gulp-derequire": "^2.1.0",
"gulp-flatten": "^0.2.0",
"gulp-header": "1.8.2",
"gulp-if": "^2.0.2",
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.2.0",
"gulp-flatten": "^0.4.0",
"gulp-header": "^2.0.9",
"gulp-if": "^3.0.0",
"gulp-rename": "^1.4.0",
"gulp-util": "^3.0.6",
"jest": "^24.9.0",
"prettier": "1.13.6",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-test-renderer": "^16.0.0",
"stats-webpack-plugin": "^0.6.2",
"through2": "^2.0.1",
"through2": "^3.0.1",
"uglifyjs-webpack-plugin": "^1.1.6",
"vinyl-buffer": "^1.0.0",
"webpack-stream": "^4.0.0"
},
"devEngines": {
Expand Down
3 changes: 2 additions & 1 deletion src/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.*/react-dom/node_modules/.*
.*/fbjs/node_modules/.*
.*/node_modules/invariant/.*
.*/node_modules/fbjs/lib/emptyFunction.js.flow

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

[version]
^0.92.0
^0.110.1
9 changes: 6 additions & 3 deletions src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const Style = require('Style');
const UserAgent = require('UserAgent');

const cx = require('cx');
const emptyFunction = require('emptyFunction');
const generateRandomKey = require('generateRandomKey');
const getDefaultKeyBinding = require('getDefaultKeyBinding');
const getScrollPosition = require('getScrollPosition');
Expand Down Expand Up @@ -136,8 +135,12 @@ class UpdateDraftEditorFlags extends React.Component<{
class DraftEditor extends React.Component<DraftEditorProps, State> {
static defaultProps: DraftEditorDefaultProps = {
blockRenderMap: DefaultDraftBlockRenderMap,
blockRendererFn: emptyFunction.thatReturnsNull,
blockStyleFn: emptyFunction.thatReturns(''),
blockRendererFn: function() {
return null;
},
blockStyleFn: function() {
return '';
},
keyBindingFn: getDefaultKeyBinding,
readOnly: false,
spellCheck: false,
Expand Down
5 changes: 3 additions & 2 deletions src/model/immutable/BlockTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ import type CharacterMetadata from 'CharacterMetadata';
import type ContentState from 'ContentState';
import type {DraftDecoratorType} from 'DraftDecoratorType';

const emptyFunction = require('emptyFunction');
const findRangesImmutable = require('findRangesImmutable');
const Immutable = require('immutable');

const {List, Repeat, Record} = Immutable;

const returnTrue = emptyFunction.thatReturnsTrue;
const returnTrue = function() {
return true;
};

const defaultLeafRange: {
start: ?number,
Expand Down
Loading

0 comments on commit a477e83

Please sign in to comment.