@untool/react
Advanced tools
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0-alpha.0](https://github.com/untool/untool/compare/v1.10.0...v2.0.0-alpha.0) (2019-08-30) | ||
### Bug Fixes | ||
* **react:** deprecate string arguments for importComponent ([2b2b7de](https://github.com/untool/untool/commit/2b2b7de)) | ||
# [1.10.0](https://github.com/untool/untool/compare/v1.9.4...v1.10.0) (2019-08-12) | ||
@@ -8,0 +19,0 @@ |
'use strict'; | ||
const deprecate = require('depd')('@untool/react'); | ||
module.exports = ({ types: t }) => ({ | ||
@@ -34,2 +36,5 @@ visitor: { | ||
importedComponent = argument.node.value; | ||
deprecate( | ||
'[DEP001] Using a string as loader for `importComponent` is deprecated and will be removed in a future major release (https://github.com/untool/untool/blob/master/DEPRECATIONS.md).' | ||
); | ||
} else { | ||
@@ -36,0 +41,0 @@ t.assertArrowFunctionExpression(argument); |
@@ -8,2 +8,3 @@ 'use strict'; | ||
const PropTypes = require('prop-types'); | ||
const deprecate = require('depd')('@untool/react'); | ||
@@ -67,2 +68,7 @@ const { | ||
const resolve = typeof name === 'function' ? name : (module) => module[name]; | ||
if (typeof name === 'string' && name !== 'default') { | ||
deprecate( | ||
'[DEP002] Using a string to resolve the module of `importComponent` is deprecated and will be removed in a future major release (https://github.com/untool/untool/blob/master/DEPRECATIONS.md).' | ||
); | ||
} | ||
class Importer extends Component { | ||
@@ -69,0 +75,0 @@ constructor({ staticContext }) { |
{ | ||
"name": "@untool/react", | ||
"version": "1.10.0", | ||
"version": "2.0.0-alpha.0", | ||
"description": "untool react mixin", | ||
@@ -23,5 +23,6 @@ "browser": "lib/runtime.js", | ||
"@babel/preset-react": "^7.0.0", | ||
"@untool/core": "^1.10.0", | ||
"@untool/core": "^2.0.0-alpha.0", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.4.19", | ||
"clone": "^2.1.2", | ||
"depd": "^2.0.0", | ||
"duplitect": "^2.0.1", | ||
@@ -43,3 +44,3 @@ "is-plain-obj": "^2.0.0", | ||
}, | ||
"gitHead": "80d75916ffa64a74116022767daa9d5f28c6ca6c" | ||
"gitHead": "0eef531cc4c1a719cf3fda60ede73c63ab618135" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
46219
1.97%555
1.83%16
6.67%1
Infinity%