Ship merge to npm
People may have a bad time if they're depending on these but we can delay that a little bit. Unless they're using directly and not polyfilling Object.assign.
Paul O’Shannessy committed
Oct 9, 2014 at 18:35 UTC
b227837b0c1396fd163f826ed9e55bb3a4ee42c0
6 files changed
+31
grunt/config/jsx.js
+6
@@ -8,6 +8,12 @@ var rootIDs = [
8
"ReactWithAddons"
9
];
10
11
+// TODO: stop packaging these libraries
12
+rootIDs = rootIDs.concat([
13
+ "merge",
14
+ "mergeInto",
15
+ "copyProperties"
16
+]);
17
18
var normal = {
19
rootIDs: rootIDs,
src/vendor/README.md
new
+1
@@ -0,0 +1 @@
1
+The files in this directory are not related to React's core functionality. They are shared utility modules that are also used in other parts of Facebook's front-end. Changes to these files need more consideration than changes to React itself.
src/vendor_deprecated/README.md
new
+3
@@ -0,0 +1,3 @@
1
+The files in this directory are modified from their original implementation. At some point the files here were included in the React package shipped to npm and used by other projects.
2
+
3
+We removed all uses of these files inside React itself but would like to provide a sane deprecation notice for other consumers. We made no promises about the files here; they were always "use at your own risk".
src/vendor_deprecated/core/copyProperties.js
renamed
+7
@@ -45,3 +45,10 @@ function copyProperties(obj, a, b, c, d, e, f) {
45
}
46
47
module.exports = copyProperties;
48
+
49
+// deprecation notice
50
+console.warn(
51
+ 'react/lib/copyProperties has been deprecated and will be removed in the ' +
52
+ 'next version of React. All uses can be replaced with ' +
53
+ 'Object.assign(obj, a, b, ...) or _.extend(obj, a, b, ...).'
54
+);
src/vendor_deprecated/core/merge.js
renamed
+7
@@ -23,3 +23,10 @@ var merge = function(one, two) {
23
};
24
25
module.exports = merge;
26
+
27
+// deprecation notice
28
+console.warn(
29
+ 'react/lib/merge has been deprecated and will be removed in the ' +
30
+ 'next version of React. All uses can be replaced with ' +
31
+ 'Object.assign({}, a, b) or _.extend({}, a, b).'
32
+);
src/vendor_deprecated/core/mergeInto.js
renamed
+7
@@ -13,3 +13,10 @@
13
"use strict";
14
15
module.exports = Object.assign;
16
+
17
+// deprecation notice
18
+console.warn(
19
+ 'react/lib/mergeInto has been deprecated and will be removed in the ' +
20
+ 'next version of React. All uses can be replaced with ' +
21
+ 'Object.assign(a, b, c, ...) or _.extend(a, b, c, ...).'
22
+);