Skip to content

Ship merge, mergeInto, copyProperties to npm #2317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions grunt/config/jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ var rootIDs = [
"ReactWithAddons"
];

// TODO: stop packaging these libraries
rootIDs = rootIDs.concat([
"merge",
"mergeInto",
"copyProperties"
]);

var normal = {
rootIDs: rootIDs,
Expand Down
1 change: 1 addition & 0 deletions src/vendor/README.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions src/vendor_deprecated/README.md
Original file line number Diff line number Diff line change
@@ -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".
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...).'
);
Original file line number Diff line number Diff line change
Expand Up @@ -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).'
);
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...).'
);