mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #2317 from zpao/npm-ship-merge
Ship merge, mergeInto, copyProperties to npm
This commit is contained in:
commit
27cbd71394
6 files changed
+31
No files matched your search
@@ -8,6 +8,12 @@ var rootIDs = [
|
||||
"ReactWithAddons"
|
||||
];
|
||||
|
||||
// TODO: stop packaging these libraries
|
||||
rootIDs = rootIDs.concat([
|
||||
"merge",
|
||||
"mergeInto",
|
||||
"copyProperties"
|
||||
]);
|
||||
|
||||
var normal = {
|
||||
rootIDs: rootIDs,
|
||||
|
||||
Vendored
+1
@@ -0,0 +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.
|
||||
@@ -0,0 +1,3 @@
|
||||
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.
|
||||
|
||||
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".
|
||||
@@ -45,3 +45,10 @@ function copyProperties(obj, a, b, c, d, e, f) {
|
||||
}
|
||||
|
||||
module.exports = copyProperties;
|
||||
|
||||
// deprecation notice
|
||||
console.warn(
|
||||
'react/lib/copyProperties has been deprecated and will be removed in the ' +
|
||||
'next version of React. All uses can be replaced with ' +
|
||||
'Object.assign(obj, a, b, ...) or _.extend(obj, a, b, ...).'
|
||||
);
|
||||
@@ -23,3 +23,10 @@ var merge = function(one, two) {
|
||||
};
|
||||
|
||||
module.exports = merge;
|
||||
|
||||
// deprecation notice
|
||||
console.warn(
|
||||
'react/lib/merge has been deprecated and will be removed in the ' +
|
||||
'next version of React. All uses can be replaced with ' +
|
||||
'Object.assign({}, a, b) or _.extend({}, a, b).'
|
||||
);
|
||||
@@ -13,3 +13,10 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = Object.assign;
|
||||
|
||||
// deprecation notice
|
||||
console.warn(
|
||||
'react/lib/mergeInto has been deprecated and will be removed in the ' +
|
||||
'next version of React. All uses can be replaced with ' +
|
||||
'Object.assign(a, b, c, ...) or _.extend(a, b, c, ...).'
|
||||
);
|
||||
Reference in new issue
Block a user