From c0739410c3ec4ad100bc2692af41501d8faea5d5 Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Tue, 6 Jun 2017 10:42:17 +0200 Subject: [PATCH 1/2] fix(Angular): deprecate angular.merge This function has problems with special object types but since it's not used in core, it is not worth implementing fixes for these cases. A general purpose library like lodash (provides `merge`) should be used instead. Closes #12653 Closes #14941 Closes #15180 Closes #15992 --- src/Angular.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Angular.js b/src/Angular.js index e6bd34013b0f..73f7dbbcbbdd 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -421,6 +421,20 @@ function extend(dst) { * Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source * objects, performing a deep copy. * +* @deprecated +* sinceVersion="1.6.5" +* This function is deprecated, but will not be removed in the 1.x lifecycle. +* There are a edge cases (see {@link angular.merge#known-issues known issues}) that are not +* supported by this function. We suggest +* using [lodash's merge()](https://lodash.com/docs/4.17.4#merge) instead. +* +* @knownIssue +* This is a list of (known) object types that cannot be / are incorrectly handled by this function: +* - [`Blob`](https://developer.mozilla.org/docs/Web/API/Blob) +* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) +* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient) +* - AngularJS {@link $rootScope.Scope scopes}; +* * @param {Object} dst Destination object. * @param {...Object} src Source object(s). * @returns {Object} Reference to `dst`. From 5da1e236ccc385bb052499a8cef3b8564301c304 Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Tue, 6 Jun 2017 12:45:05 +0200 Subject: [PATCH 2/2] fix typos --- src/Angular.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Angular.js b/src/Angular.js index 73f7dbbcbbdd..4cb891a0401e 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -424,12 +424,12 @@ function extend(dst) { * @deprecated * sinceVersion="1.6.5" * This function is deprecated, but will not be removed in the 1.x lifecycle. -* There are a edge cases (see {@link angular.merge#known-issues known issues}) that are not +* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not * supported by this function. We suggest * using [lodash's merge()](https://lodash.com/docs/4.17.4#merge) instead. * * @knownIssue -* This is a list of (known) object types that cannot be / are incorrectly handled by this function: +* This is a list of (known) object types that are not handled correctly by this function: * - [`Blob`](https://developer.mozilla.org/docs/Web/API/Blob) * - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) * - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient)