ember-source 4.8.0 → 4.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 4.8.0
8
+ * @version 4.8.2
9
9
  */
@@ -1824,7 +1824,7 @@ function _getProp(obj, keyName) {
1824
1824
 
1825
1825
  return value;
1826
1826
  }
1827
- function _getPath(obj, path) {
1827
+ function _getPath(obj, path, forSet) {
1828
1828
  let parts = typeof path === 'string' ? path.split('.') : path;
1829
1829
 
1830
1830
  for (let part of parts) {
@@ -1832,6 +1832,10 @@ function _getPath(obj, path) {
1832
1832
  return undefined;
1833
1833
  }
1834
1834
 
1835
+ if (forSet && (part === '__proto__' || part === 'constructor')) {
1836
+ return;
1837
+ }
1838
+
1835
1839
  obj = _getProp(obj, part);
1836
1840
  }
1837
1841
 
@@ -1947,7 +1951,7 @@ function _setPath(root, path, value, tolerant) {
1947
1951
  let parts = path.split('.');
1948
1952
  let keyName = parts.pop();
1949
1953
  assert('Property set failed: You passed an empty path', keyName.trim().length > 0);
1950
- let newRoot = _getPath(root, parts);
1954
+ let newRoot = _getPath(root, parts, true);
1951
1955
 
1952
1956
  if (newRoot !== null && newRoot !== undefined) {
1953
1957
  return set(newRoot, keyName, value);
@@ -1 +1 @@
1
- export default "4.8.0";
1
+ export default "4.8.2";
package/docs/data.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "The Ember API",
4
4
  "description": "The Ember API: a framework for building ambitious web applications",
5
5
  "url": "https://emberjs.com/",
6
- "version": "4.8.0"
6
+ "version": "4.8.2"
7
7
  },
8
8
  "files": {
9
9
  "node_modules/rsvp/lib/rsvp/promise/all.js": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "4.8.0",
3
+ "version": "4.8.2",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -178,6 +178,6 @@
178
178
  ]
179
179
  }
180
180
  },
181
- "_originalVersion": "4.8.0",
181
+ "_originalVersion": "4.8.2",
182
182
  "_versionPreviouslyCalculated": true
183
183
  }
@@ -106,6 +106,15 @@ declare module '@ember/component' {
106
106
  object: T
107
107
  ): T;
108
108
 
109
+ /**
110
+ * Takes a component class and returns the template associated with the given component class,
111
+ * if any, or one of its superclasses, if any, or undefined if no template association was found.
112
+ *
113
+ * @param object the component object
114
+ * @return the template factory of the given component
115
+ */
116
+ export function getComponentTemplate(obj: object): TemplateFactory | undefined;
117
+
109
118
  // In normal TypeScript, these built-in components are essentially opaque tokens
110
119
  // that just need to be importable. Declaring them with unique interfaces
111
120
  // like this, however, gives tools like Glint (that DO have a richer