Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d257c4564d | |||
| 1b1684c2b2 | |||
| 726f49dcf6 | |||
| 8a187f16c3 | |||
| d97e6f1695 | |||
| 26e893a2fa | |||
| 5edd25364f | |||
| 019dded64b | |||
| 0007be1ca2 | |||
| 863528f299 | |||
| 97aff90a2c |
@@ -1,3 +1,7 @@
|
||||
# AngularJS is in LTS mode
|
||||
We are no longer accepting changes that are not critical bug fixes into this project.
|
||||
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.
|
||||
|
||||
<!--
|
||||
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATION
|
||||
-->
|
||||
@@ -9,8 +13,9 @@ IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOU
|
||||
|
||||
**I'm submitting a ...**
|
||||
<!-- (check one with "x") -->
|
||||
- [ ] bug report
|
||||
- [ ] feature request
|
||||
- [ ] regression from 1.7.0
|
||||
- [ ] security issue
|
||||
- [ ] issue caused by a new browser version
|
||||
- [ ] other <!--(Please do not submit support requests here - see above)-->
|
||||
|
||||
**Current behavior:**
|
||||
@@ -26,7 +31,7 @@ please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the
|
||||
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:yBpEi4).
|
||||
-->
|
||||
|
||||
**AngularJS version:** 1.x.y
|
||||
**AngularJS version:** 1.7.x
|
||||
<!-- Check whether this is still an issue in the most recent stable or in the snapshot AngularJS
|
||||
version (https://code.angularjs.org/snapshot/) -->
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<!-- General PR submission guidelines https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#submit-pr -->
|
||||
**What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)**
|
||||
# AngularJS is in LTS mode
|
||||
We are no longer accepting changes that are not critical bug fixes into this project.
|
||||
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.
|
||||
|
||||
<!-- General PR submission guidelines https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#submit-pr -->
|
||||
**Does this PR fix a regression since 1.7.0, a security flaw, or a problem caused by a new browser version?**
|
||||
|
||||
<!-- If the answer is no, then we will not merge this PR -->
|
||||
|
||||
|
||||
**What is the current behavior? (You can also link to an open issue here)**
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
<a name="1.7.9"></a>
|
||||
# 1.7.9 pollution-eradication (2019-11-19)
|
||||
|
||||
## Bug Fixes
|
||||
- **angular.merge:** do not merge __proto__ property
|
||||
([726f49](https://github.com/angular/angular.js/commit/726f49dcf6c23106ddaf5cfd5e2e592841db743a))
|
||||
- **ngStyle:** correctly remove old style when new style value is invalid
|
||||
([5edd25](https://github.com/angular/angular.js/commit/5edd25364f617083363dc2bd61f9230b38267578),
|
||||
[#16860](https://github.com/angular/angular.js/issues/16860),
|
||||
[#16868](https://github.com/angular/angular.js/issues/16868))
|
||||
|
||||
|
||||
<a name="1.7.8"></a>
|
||||
# 1.7.8 enthusiastic-oblation (2019-03-11)
|
||||
|
||||
|
||||
@@ -257,7 +257,6 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
|
||||
of the reverted commit.
|
||||
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit
|
||||
being reverted.
|
||||
A commit with this format is automatically created by the [`git revert`][git-revert] command.
|
||||
|
||||
### Type
|
||||
Must be one of the following:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2018 Google, Inc. http://angularjs.org
|
||||
Copyright (c) 2010-2019 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -577,7 +577,7 @@ orderByFilter(['a', undefined, 'o', null, 'z']);
|
||||
|
||||
|
||||
<a name="migrate1.6to1.7-ng-misc"></a>
|
||||
### Core: _Misceallenous_
|
||||
### Core: _Miscellaneous_
|
||||
|
||||
|
||||
#### **jqLite**
|
||||
|
||||
@@ -11,7 +11,7 @@ set -e
|
||||
# Curl and run this script as part of your .travis.yml before_script section:
|
||||
# before_script:
|
||||
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
|
||||
SC_VERSION="4.5.2"
|
||||
SC_VERSION="4.5.4"
|
||||
CONNECT_URL="https://saucelabs.com/downloads/sc-$SC_VERSION-linux.tar.gz"
|
||||
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
|
||||
CONNECT_DOWNLOAD="sc-$SC_VERSION-linux.tar.gz"
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@
|
||||
"jasmine-core": "^2.8.0",
|
||||
"jasmine-node": "^2.0.0",
|
||||
"jasmine-reporters": "^2.2.0",
|
||||
"jquery": "3.2.1",
|
||||
"jquery": "3.4.0",
|
||||
"jquery-2.1": "npm:jquery@2.1.4",
|
||||
"jquery-2.2": "npm:jquery@2.2.4",
|
||||
"karma": "^3.1.4",
|
||||
|
||||
@@ -11,11 +11,12 @@ export SAUCE_ACCESS_KEY
|
||||
BROWSER_STACK_ACCESS_KEY=$(echo "$BROWSER_STACK_ACCESS_KEY" | rev)
|
||||
SAUCE_ACCESS_KEY=$(echo "$SAUCE_ACCESS_KEY" | rev)
|
||||
|
||||
# The currently latest version of Safari on Saucelabs (v12) is unstable and disconnects frequently.
|
||||
# TODO: Add `SL_Safari` back, once/if it becomes more stable again.
|
||||
# The currently latest-1 version of desktop Safari on Saucelabs (v12.0) is unstable and disconnects
|
||||
# consistently. The latest version (v12.1) works fine.
|
||||
# TODO: Add `SL_Safari-1` back, once it no longer corresponds to v12.0.
|
||||
BROWSERS="SL_Chrome,SL_Chrome-1,\
|
||||
SL_Firefox,SL_Firefox-1,\
|
||||
SL_Safari-1,\
|
||||
SL_Safari,\
|
||||
SL_iOS,SL_iOS-1,\
|
||||
SL_IE_9,SL_IE_10,SL_IE_11,\
|
||||
SL_EDGE,SL_EDGE-1"
|
||||
|
||||
+4
-2
@@ -342,8 +342,10 @@ function baseExtend(dst, objs, deep) {
|
||||
} else if (isElement(src)) {
|
||||
dst[key] = src.clone();
|
||||
} else {
|
||||
if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
|
||||
baseExtend(dst[key], [src], true);
|
||||
if (key !== '__proto__') {
|
||||
if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
|
||||
baseExtend(dst[key], [src], true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dst[key] = src;
|
||||
|
||||
+33
-32
@@ -205,7 +205,7 @@
|
||||
*
|
||||
* This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
|
||||
* actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
|
||||
* arrays or objects can have a negative impact on your application performance)
|
||||
* arrays or objects can have a negative impact on your application performance.)
|
||||
*
|
||||
* <example name="doCheckArrayExample" module="do-check-module">
|
||||
* <file name="index.html">
|
||||
@@ -528,7 +528,7 @@
|
||||
* would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
|
||||
* case when only one deeply nested directive has `templateUrl`.
|
||||
*
|
||||
* Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}
|
||||
* Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}.
|
||||
*
|
||||
* You can specify `templateUrl` as a string representing the URL or as a function which takes two
|
||||
* arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
|
||||
@@ -589,7 +589,7 @@
|
||||
* own templates or compile functions. Compiling these directives results in an infinite loop and
|
||||
* stack overflow errors.
|
||||
*
|
||||
* This can be avoided by manually using $compile in the postLink function to imperatively compile
|
||||
* This can be avoided by manually using `$compile` in the postLink function to imperatively compile
|
||||
* a directive's template instead of relying on automatic template compilation via `template` or
|
||||
* `templateUrl` declaration or manual compilation inside the compile function.
|
||||
* </div>
|
||||
@@ -693,17 +693,17 @@
|
||||
*
|
||||
* * `true` - transclude the content (i.e. the child nodes) of the directive's element.
|
||||
* * `'element'` - transclude the whole of the directive's element including any directives on this
|
||||
* element that defined at a lower priority than this directive. When used, the `template`
|
||||
* element that are defined at a lower priority than this directive. When used, the `template`
|
||||
* property is ignored.
|
||||
* * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template.
|
||||
*
|
||||
* **Mult-slot transclusion** is declared by providing an object for the `transclude` property.
|
||||
* **Multi-slot transclusion** is declared by providing an object for the `transclude` property.
|
||||
*
|
||||
* This object is a map where the keys are the name of the slot to fill and the value is an element selector
|
||||
* used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`)
|
||||
* and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc).
|
||||
*
|
||||
* For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}
|
||||
* For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}.
|
||||
*
|
||||
* If the element selector is prefixed with a `?` then that slot is optional.
|
||||
*
|
||||
@@ -728,7 +728,7 @@
|
||||
* </div>
|
||||
*
|
||||
* If you want to manually control the insertion and removal of the transcluded content in your directive
|
||||
* then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery
|
||||
* then you must use this transclude function. When you call a transclude function it returns a jqLite/JQuery
|
||||
* object that contains the compiled DOM, which is linked to the correct transclusion scope.
|
||||
*
|
||||
* When you call a transclusion function you can pass in a **clone attach function**. This function accepts
|
||||
@@ -813,8 +813,8 @@
|
||||
* The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
|
||||
* `link()` or `compile()` functions. It has a variety of uses.
|
||||
*
|
||||
* * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways:
|
||||
* 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access
|
||||
* * *Accessing normalized attribute names:* Directives like `ngBind` can be expressed in many ways:
|
||||
* `ng:bind`, `data-ng-bind`, or `x-ng-bind`. The attributes object allows for normalized access
|
||||
* to the attributes.
|
||||
*
|
||||
* * *Directive inter-communication:* All directives share the same instance of the attributes
|
||||
@@ -855,25 +855,24 @@
|
||||
<file name="index.html">
|
||||
<script>
|
||||
angular.module('compileExample', [], function($compileProvider) {
|
||||
// configure new 'compile' directive by passing a directive
|
||||
// factory function. The factory function injects the '$compile'
|
||||
// Configure new 'compile' directive by passing a directive
|
||||
// factory function. The factory function injects '$compile'.
|
||||
$compileProvider.directive('compile', function($compile) {
|
||||
// directive factory creates a link function
|
||||
// The directive factory creates a link function.
|
||||
return function(scope, element, attrs) {
|
||||
scope.$watch(
|
||||
function(scope) {
|
||||
// watch the 'compile' expression for changes
|
||||
// Watch the 'compile' expression for changes.
|
||||
return scope.$eval(attrs.compile);
|
||||
},
|
||||
function(value) {
|
||||
// when the 'compile' expression changes
|
||||
// assign it into the current DOM
|
||||
// When the 'compile' expression changes
|
||||
// assign it into the current DOM.
|
||||
element.html(value);
|
||||
|
||||
// compile the new DOM and link it to the current
|
||||
// scope.
|
||||
// NOTE: we only compile .childNodes so that
|
||||
// we don't get into infinite loop compiling ourselves
|
||||
// Compile the new DOM and link it to the current scope.
|
||||
// NOTE: we only compile '.childNodes' so that we
|
||||
// don't get into an infinite loop compiling ourselves.
|
||||
$compile(element.contents())(scope);
|
||||
}
|
||||
);
|
||||
@@ -946,13 +945,13 @@
|
||||
* }
|
||||
* ```
|
||||
* * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add
|
||||
* the cloned elements; only needed for transcludes that are allowed to contain non html
|
||||
* elements (e.g. SVG elements). See also the directive.controller property.
|
||||
* the cloned elements; only needed for transcludes that are allowed to contain non HTML
|
||||
* elements (e.g. SVG elements). See also the `directive.controller` property.
|
||||
*
|
||||
* Calling the linking function returns the element of the template. It is either the original
|
||||
* element passed in, or the clone of the element if the `cloneAttachFn` is provided.
|
||||
*
|
||||
* After linking the view is not updated until after a call to $digest which typically is done by
|
||||
* After linking the view is not updated until after a call to `$digest`, which typically is done by
|
||||
* AngularJS automatically.
|
||||
*
|
||||
* If you need access to the bound view, there are two ways to do it:
|
||||
@@ -960,21 +959,23 @@
|
||||
* - If you are not asking the linking function to clone the template, create the DOM element(s)
|
||||
* before you send them to the compiler and keep this reference around.
|
||||
* ```js
|
||||
* var element = $compile('<p>{{total}}</p>')(scope);
|
||||
* var element = angular.element('<p>{{total}}</p>');
|
||||
* $compile(element)(scope);
|
||||
* ```
|
||||
*
|
||||
* - if on the other hand, you need the element to be cloned, the view reference from the original
|
||||
* example would not point to the clone, but rather to the original template that was cloned. In
|
||||
* this case, you can access the clone via the cloneAttachFn:
|
||||
* this case, you can access the clone either via the `cloneAttachFn` or the value returned by the
|
||||
* linking function:
|
||||
* ```js
|
||||
* var templateElement = angular.element('<p>{{total}}</p>'),
|
||||
* scope = ....;
|
||||
*
|
||||
* var templateElement = angular.element('<p>{{total}}</p>');
|
||||
* var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
|
||||
* //attach the clone to DOM document at the right place
|
||||
* // Attach the clone to DOM document at the right place.
|
||||
* });
|
||||
*
|
||||
* //now we have reference to the cloned DOM via `clonedElement`
|
||||
* // Now we have reference to the cloned DOM via `clonedElement`.
|
||||
* // NOTE: The `clonedElement` returned by the linking function is the same as the
|
||||
* // `clonedElement` passed to `cloneAttachFn`.
|
||||
* ```
|
||||
*
|
||||
*
|
||||
@@ -1500,9 +1501,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
||||
* @description
|
||||
* Register a new directive with the compiler.
|
||||
*
|
||||
* @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
|
||||
* will match as <code>ng-bind</code>), or an object map of directives where the keys are the
|
||||
* names and the values are the factories.
|
||||
* @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match
|
||||
* as `ng-bind`), or an object map of directives where the keys are the names and the values
|
||||
* are the factories.
|
||||
* @param {Function|Array} directiveFactory An injectable directive factory function. See the
|
||||
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
|
||||
* @returns {ng.$compileProvider} Self for chaining.
|
||||
|
||||
@@ -54,14 +54,7 @@
|
||||
var ngStyleDirective = ngDirective(function(scope, element, attr) {
|
||||
scope.$watchCollection(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {
|
||||
if (oldStyles && (newStyles !== oldStyles)) {
|
||||
if (!newStyles) {
|
||||
newStyles = {};
|
||||
}
|
||||
forEach(oldStyles, function(val, style) {
|
||||
if (newStyles[style] == null) {
|
||||
newStyles[style] = '';
|
||||
}
|
||||
});
|
||||
forEach(oldStyles, function(val, style) { element.css(style, ''); });
|
||||
}
|
||||
if (newStyles) element.css(newStyles);
|
||||
});
|
||||
|
||||
@@ -814,6 +814,19 @@ describe('angular', function() {
|
||||
expect(isElement(dst.jqObject)).toBeTruthy();
|
||||
expect(dst.jqObject.nodeName).toBeUndefined(); // i.e it is a jqLite/jQuery object
|
||||
});
|
||||
|
||||
it('should not merge the __proto__ property', function() {
|
||||
var src = JSON.parse('{ "__proto__": { "xxx": "polluted" } }');
|
||||
var dst = {};
|
||||
|
||||
merge(dst, src);
|
||||
|
||||
if (typeof dst.__proto__ !== 'undefined') { // eslint-disable-line
|
||||
// Should not overwrite the __proto__ property or pollute the Object prototype
|
||||
expect(dst.__proto__).toBe(Object.prototype); // eslint-disable-line
|
||||
}
|
||||
expect(({}).xxx).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -143,6 +143,17 @@ describe('ngStyle', function() {
|
||||
expect(element.css(postCompStyle)).not.toBe('99px');
|
||||
});
|
||||
|
||||
it('should clear style when the value is false', function() {
|
||||
scope.styleObj = {'height': '99px', 'width': '88px'};
|
||||
scope.$apply();
|
||||
expect(element.css(preCompStyle)).toBe('88px');
|
||||
expect(element.css(postCompStyle)).toBe('99px');
|
||||
scope.styleObj = {'height': false, 'width': false};
|
||||
scope.$apply();
|
||||
expect(element.css(preCompStyle)).not.toBe('88px');
|
||||
expect(element.css(postCompStyle)).not.toBe('99px');
|
||||
});
|
||||
|
||||
it('should set style when the value is zero', function() {
|
||||
scope.styleObj = {'height': '99px', 'width': '88px'};
|
||||
scope.$apply();
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU=
|
||||
|
||||
"@types/selenium-webdriver@^3.0.0":
|
||||
version "3.0.13"
|
||||
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.13.tgz#deb799c641773c5e367abafc92d1e733d62cddd7"
|
||||
integrity sha512-rI0LGoMiZGUM+tjDakQpwZOvcmQoubiJ7hxqrYU12VRxBuGGvOThxrBOU/QmJKlKg1WG6FMzuvcEyLffvVSsmw==
|
||||
version "3.0.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.12.tgz#6affe5aed1ba379175075a889adbe2bc3aa62159"
|
||||
integrity sha512-hYn+eoOehVUIdMwp5h34ZsGAO1ydja10GDup4BwyoFCdcH5MQ35nQq+AInSaBMEMopD5hEooFCyKo2Pajbe1ag==
|
||||
|
||||
Base64@~0.2.0:
|
||||
version "0.2.1"
|
||||
@@ -4347,10 +4347,10 @@ jasminewd2@^2.1.0:
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02"
|
||||
integrity sha1-LInWiJterFIqfuoywUUhVZxsvwI=
|
||||
|
||||
jquery@3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787"
|
||||
integrity sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=
|
||||
jquery@3.4.0:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.0.tgz#8de513fa0fa4b2c7d2e48a530e26f0596936efdf"
|
||||
integrity sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ==
|
||||
|
||||
js-tokens@^3.0.0:
|
||||
version "3.0.1"
|
||||
@@ -5836,9 +5836,9 @@ pako@~0.2.0:
|
||||
integrity sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=
|
||||
|
||||
pako@~1.0.2:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.7.tgz#2473439021b57f1516c82f58be7275ad8ef1bb27"
|
||||
integrity sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258"
|
||||
integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==
|
||||
|
||||
param-case@^2.1.0:
|
||||
version "2.1.0"
|
||||
|
||||
Reference in New Issue
Block a user