Skip to content

Releases: oliviertassinari/babel-plugin-transform-react-remove-prop-types

v0.4.4

01 May 21:36
Compare
Choose a tag to compare

Fixes / Enhancements

  • fix(flow): support tricky use case with flow and the wrap mode (#105)
// In
type Props = {
  bar?: string,
};

function MyComponent(props: Props) {
  return <div {...props} />;
}

// Babel Transformations
[
  'babel-plugin-flow-react-proptypes',
  'babel-plugin-transform-flow-strip-types',
  'babel-plugin-transform-react-remove-prop-types',
]

// Out
function MyComponent(props) {
  return React.createElement('div', props);
}

MyComponent.propTypes = process.env.NODE_ENV !== 'production' ? {
  bar: require('prop-types').string
} : {};

v0.4.3

27 Apr 17:16
Compare
Choose a tag to compare

Fixes / Enhancements

v0.4.2

26 Apr 11:54
Compare
Choose a tag to compare

Fixes / Enhancements

  • feat(lib): change the wrap mode and add a unsafe-wrap mode (#101)

v0.4.1

16 Apr 09:57
Compare
Choose a tag to compare

Fixes / Enhancements

This PR is adding a removeImport option to remove the following import statements:

import PropTypes from 'prop-types';

It's disabled by default waiting for people to try it out.

v0.4.0

13 Apr 20:58
Compare
Choose a tag to compare

Breaking changes

  • feat(react): support create-react-class over createClass (#93)
    Dropped the support of React.createClass for the new create-react-class package.
    Notice that we rely on the createReactClass() function name to remove the prop types.

Fixes / Enhancements

  • test(react): update the tests for the v15.5.3 release of React (#88)
  • fix(react): support React.cloneElement with a stateless functional component (#94)

v0.3.3

06 Apr 22:05
Compare
Choose a tag to compare

Fixes / Enhancements

  • fix(class): handle class with no inheritance (#86)

v0.3.2

09 Feb 22:43
Compare
Choose a tag to compare

Fixes / Enhancements

  • [options] Add a ignoreFilenames option (#83)

v0.3.1

06 Feb 19:42
Compare
Choose a tag to compare

Fixes / Enhancements

  • fix(react-native): revert warning (#81)

Revert the previous breaking change has the heuristic isn't good enough.

v0.3.0

05 Feb 10:40
Compare
Choose a tag to compare

Breaking changes

  • Throw when accessing the propTypes from an imported module (#79)

That pattern has proven to be dangerous. It's now documented.

v0.2.12

03 Feb 09:48
Compare
Choose a tag to compare

Fixes / Enhancements

  • Support extend from a global Component (#72)
  • In some conditions remove() crash (#78)