ember-source 3.28.8 → 3.28.10
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.
- package/CHANGELOG.md +8 -0
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +2 -2
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +11 -10
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +1 -6
- package/dist/packages/@ember/-internals/metal/index.js +9 -3
- package/dist/packages/@ember/helper/index.js +2 -2
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +3 -3
- package/package.json +2 -2
package/dist/header/license.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setOwner } from '@ember/-internals/owner';
|
|
2
|
-
import { dictionary, HAS_NATIVE_PROXY,
|
|
2
|
+
import { dictionary, HAS_NATIVE_PROXY, symbol, intern } from '@ember/-internals/utils';
|
|
3
3
|
import { assert } from '@ember/debug';
|
|
4
4
|
import { assign } from '@ember/polyfills';
|
|
5
5
|
import { DEBUG } from '@glimmer/env';
|
|
@@ -455,11 +455,6 @@ class FactoryManager {
|
|
|
455
455
|
this.normalizedName = normalizedName;
|
|
456
456
|
this.madeToString = undefined;
|
|
457
457
|
this.injections = undefined;
|
|
458
|
-
setFactoryFor(this, this);
|
|
459
|
-
|
|
460
|
-
if (isInstantiatable(container, fullName) && (HAS_NATIVE_SYMBOL || INIT_FACTORY in factory)) {
|
|
461
|
-
setFactoryFor(factory, this);
|
|
462
|
-
}
|
|
463
458
|
}
|
|
464
459
|
|
|
465
460
|
toString() {
|
|
@@ -1281,7 +1281,7 @@ function _getProp(obj, keyName) {
|
|
|
1281
1281
|
|
|
1282
1282
|
return value;
|
|
1283
1283
|
}
|
|
1284
|
-
function _getPath(root, path) {
|
|
1284
|
+
function _getPath(root, path, forSet) {
|
|
1285
1285
|
let obj = root;
|
|
1286
1286
|
let parts = typeof path === 'string' ? path.split('.') : path;
|
|
1287
1287
|
|
|
@@ -1290,7 +1290,13 @@ function _getPath(root, path) {
|
|
|
1290
1290
|
return undefined;
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
|
-
|
|
1293
|
+
let part = parts[i];
|
|
1294
|
+
|
|
1295
|
+
if (forSet && (part === '__proto__' || part === 'constructor')) {
|
|
1296
|
+
return;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
obj = _getProp(obj, part);
|
|
1294
1300
|
}
|
|
1295
1301
|
|
|
1296
1302
|
return obj;
|
|
@@ -1443,7 +1449,7 @@ function _setPath(root, path, value, tolerant) {
|
|
|
1443
1449
|
let parts = path.split('.');
|
|
1444
1450
|
let keyName = parts.pop();
|
|
1445
1451
|
assert('Property set failed: You passed an empty path', keyName.trim().length > 0);
|
|
1446
|
-
let newRoot = _getPath(root, parts);
|
|
1452
|
+
let newRoot = _getPath(root, parts, true);
|
|
1447
1453
|
|
|
1448
1454
|
if (newRoot !== null && newRoot !== undefined) {
|
|
1449
1455
|
return set(newRoot, keyName, value);
|
|
@@ -264,8 +264,8 @@
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
export default class
|
|
268
|
-
plusOne = invokeHelper(this,
|
|
267
|
+
export default class PlusOneComponent extends Component {
|
|
268
|
+
plusOne = invokeHelper(this, PlusOne, () => {
|
|
269
269
|
return {
|
|
270
270
|
positional: [this.args.number],
|
|
271
271
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "3.28.
|
|
1
|
+
export default "3.28.10";
|
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": "3.28.
|
|
6
|
+
"version": "3.28.10"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"node_modules/rsvp/lib/rsvp/promise/all.js": {
|
|
@@ -8559,7 +8559,7 @@
|
|
|
8559
8559
|
},
|
|
8560
8560
|
{
|
|
8561
8561
|
"file": "packages/@ember/-internals/metal/lib/property_get.ts",
|
|
8562
|
-
"line":
|
|
8562
|
+
"line": 169,
|
|
8563
8563
|
"description": "Retrieves the value of a property from an Object, or a default value in the\ncase that the property returns `undefined`.\n\n```javascript\nimport { getWithDefault } from '@ember/object';\ngetWithDefault(person, 'lastName', 'Doe');\n```",
|
|
8564
8564
|
"itemtype": "method",
|
|
8565
8565
|
"name": "getWithDefault",
|
|
@@ -17571,7 +17571,7 @@
|
|
|
17571
17571
|
{
|
|
17572
17572
|
"file": "packages/@ember/helper/index.ts",
|
|
17573
17573
|
"line": 251,
|
|
17574
|
-
"description": "The `invokeHelper` function can be used to create a helper instance in\nJavaScript.\n\n```js\n// app/components/data-loader.js\nimport Component from '@glimmer/component';\nimport Helper from '@ember/component/helper';\nimport { invokeHelper } from '@ember/helper';\n\nclass PlusOne extends Helper {\n compute([num]) {\n return number + 1;\n }\n}\n\nexport default class
|
|
17574
|
+
"description": "The `invokeHelper` function can be used to create a helper instance in\nJavaScript.\n\n```js\n// app/components/data-loader.js\nimport Component from '@glimmer/component';\nimport Helper from '@ember/component/helper';\nimport { invokeHelper } from '@ember/helper';\n\nclass PlusOne extends Helper {\n compute([num]) {\n return number + 1;\n }\n}\n\nexport default class PlusOneComponent extends Component {\n plusOne = invokeHelper(this, PlusOne, () => {\n return {\n positional: [this.args.number],\n };\n });\n}\n```\n```hbs\n{{this.plusOne.value}}\n```\n\nIt receives three arguments:\n\n* `context`: The parent context of the helper. When the parent is torn down and\n removed, the helper will be as well.\n* `definition`: The definition of the helper.\n* `computeArgs`: An optional function that produces the arguments to the helper.\n The function receives the parent context as an argument, and must return an\n object with a `positional` property that is an array and/or a `named`\n property that is an object.\n\nAnd it returns a Cache instance that contains the most recent value of the\nhelper. You can access the helper using `getValue()` like any other cache. The\ncache is also destroyable, and using the `destroy()` function on it will cause\nthe helper to be torn down.\n\nNote that using `getValue()` on helpers that have scheduled effects will not\ntrigger the effect early. Effects will continue to run at their scheduled time.",
|
|
17575
17575
|
"itemtype": "method",
|
|
17576
17576
|
"name": "invokeHelper",
|
|
17577
17577
|
"static": 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-source",
|
|
3
|
-
"version": "3.28.
|
|
3
|
+
"version": "3.28.10",
|
|
4
4
|
"description": "A JavaScript framework for creating ambitious web applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"ember-addon": {
|
|
156
156
|
"after": "ember-cli-legacy-blueprints"
|
|
157
157
|
},
|
|
158
|
-
"_originalVersion": "3.28.
|
|
158
|
+
"_originalVersion": "3.28.10",
|
|
159
159
|
"_versionPreviouslyCalculated": true,
|
|
160
160
|
"publishConfig": {
|
|
161
161
|
"tag": "old"
|