Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix: upgrade prop-types dependency to 15.6+ #3003

Merged

Conversation

adamstankiewicz
Copy link
Contributor

@adamstankiewicz adamstankiewicz commented Jan 21, 2021

Summary

We ran into an issue using react-instantsearch-dom@latest during local development with regard to the prop-types@15.5.10 package, which seems to cause the following runtime error:

Uncaught TypeError: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.exact is not a function

It looks like the exact function was not added until prop-types@15.6.0 according to the CHANGELOG, but the SearchBox component of react-instantsearch-dom makes use of PropTypes.exact while remaining on prop-types@15.5.10.

This manifests as a runtime error during local development when using react-instantsearch-dom as seen above.

Result

By upgrading the prop-types package to v15.6+ (opting for prop-types@latest here), this error should no longer happen when we are trying to use react-instantsearch-dom during local development.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6abac6a:

Sandbox Source
react-instantsearch-app Configuration
routing-basic Configuration

@algobot
Copy link
Contributor

algobot commented Jan 21, 2021

Deploy preview for react-instantsearch ready!

Built with commit 6abac6a

https://deploy-preview-3003--react-instantsearch.netlify.app

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for finding this! We must have missed it due to dependency deduplication and other dependencies using a new enough version of prop-types that it didn't cause an issue

@Haroenv Haroenv merged commit fc03496 into algolia:master Jan 22, 2021
Haroenv added a commit that referenced this pull request Jan 22, 2021
## [6.8.3](v6.8.2...v6.8.3) (2021-01-22)

### Bug Fixes

* upgrade prop-types dependency to 15.6+ ([#3003](#3003)) ([fc03496](fc03496))
@Haroenv
Copy link
Contributor

Haroenv commented Jan 22, 2021

this has been released as 6.8.3 now, thanks @adamstankiewicz

@adamstankiewicz
Copy link
Contributor Author

Great, thanks @Haroenv! 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants