Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS-23: Browser console errors from package updates #55

Merged
merged 2 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions patches/react-autosuggest+9.4.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/node_modules/react-autosuggest/dist/Autosuggest.js b/node_modules/react-autosuggest/dist/Autosuggest.js
index eaac8a7..8f21e5b 100644
--- a/node_modules/react-autosuggest/dist/Autosuggest.js
+++ b/node_modules/react-autosuggest/dist/Autosuggest.js
@@ -88,8 +88,8 @@ var Autosuggest = function (_Component) {
this.suggestionsContainer = this.autowhatever.itemsContainer;
}
}, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
+ key: 'UNSAFE_componentWillReceiveProps',
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
if ((0, _arrays2.default)(nextProps.suggestions, this.props.suggestions)) {
if (nextProps.highlightFirstSuggestion && nextProps.suggestions.length > 0 && this.justPressedUpDown === false && this.justMouseEntered === false) {
this.highlightFirstSuggestion();
diff --git a/node_modules/react-autosuggest/dist/standalone/autosuggest.js b/node_modules/react-autosuggest/dist/standalone/autosuggest.js
index 02f7a55..8a74b2e 100644
--- a/node_modules/react-autosuggest/dist/standalone/autosuggest.js
+++ b/node_modules/react-autosuggest/dist/standalone/autosuggest.js
@@ -152,8 +152,8 @@ return /******/ (function(modules) { // webpackBootstrap
this.suggestionsContainer = this.autowhatever.itemsContainer;
}
}, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
+ key: 'UNSAFE_componentWillReceiveProps',
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
if ((0, _arrays2.default)(nextProps.suggestions, this.props.suggestions)) {
if (nextProps.highlightFirstSuggestion && nextProps.suggestions.length > 0 && this.justPressedUpDown === false && this.justMouseEntered === false) {
this.highlightFirstSuggestion();
@@ -2281,8 +2281,8 @@ return /******/ (function(modules) { // webpackBootstrap
this.ensureHighlightedItemIsVisible();
}
}, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
+ key: 'UNSAFE_componentWillReceiveProps',
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.items !== this.props.items) {
this.setSectionsItems(nextProps);
}
13 changes: 13 additions & 0 deletions patches/react-dates+21.8.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/react-dates/lib/components/DateInput.js b/node_modules/react-dates/lib/components/DateInput.js
index 2723010..5641060 100644
--- a/node_modules/react-dates/lib/components/DateInput.js
+++ b/node_modules/react-dates/lib/components/DateInput.js
@@ -129,7 +129,7 @@ function (_ref) {
});
};

- _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {
var dateString = this.state.dateString;

if (dateString && nextProps.displayValue) {
2 changes: 1 addition & 1 deletion src/components/range-facet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class FederatedRangeFacet extends React.Component {
}

// See: https://reactjs.org/docs/react-component.html#the-component-lifecycle
componentWillReceiveProps(nextProps) {
componentDidUpdate(nextProps) {
// Clear component inputs when rangeFacet value transitions from populated->empty.
if (this.props.value.length && !nextProps.value.length) {
this.setState({
Expand Down
2 changes: 1 addition & 1 deletion src/components/text-search/no-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class FederatedTextSearchNoAutocomplete extends React.Component {
this.handleSubmit = this.handleSubmit.bind(this);
}

componentWillReceiveProps(nextProps) {
componentDidUpdate(nextProps) {
this.setState({
value: nextProps.value,
});
Expand Down
10 changes: 5 additions & 5 deletions src/components/text-search/search-as-you-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FederatedTextSearchAsYouType extends React.Component {
this.shouldRenderSuggestions = this.shouldRenderSuggestions.bind(this);
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
this.setState({
value: nextProps.suggestQuery && nextProps.suggestQuery.value
? nextProps.suggestQuery.value
Expand Down Expand Up @@ -342,14 +342,14 @@ FederatedTextSearchAsYouType.propTypes = {
queryField: PropTypes.string,
suggestionRows: PropTypes.number,
numChars: PropTypes.number,
result: {
result: PropTypes.shape({
titleText: PropTypes.string,
showDirectionsText: PropTypes.bool,
},
term: {
}),
term: PropTypes.shape({
titleText: PropTypes.string,
showDirectionsText: PropTypes.bool,
},
}),
}),
PropTypes.bool,
]).isRequired,
Expand Down