Skip to content

Commit

Permalink
Revert "[BUGFIX lts] Ensures that computed can depend on dynamic hash…
Browse files Browse the repository at this point in the history
… keys"

This reverts commit 646769e.
  • Loading branch information
chancancode committed Jun 7, 2021
1 parent 886bc51 commit 4192b92
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 193 deletions.
26 changes: 13 additions & 13 deletions package.json
Expand Up @@ -51,7 +51,7 @@
"@babel/plugin-transform-block-scoping": "^7.8.3",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@ember/edition-utils": "^1.2.0",
"@glimmer/vm-babel-plugins": "0.79.3",
"@glimmer/vm-babel-plugins": "0.79.2",
"babel-plugin-debug-macros": "^0.3.3",
"babel-plugin-filter-imports": "^4.0.0",
"broccoli-concat": "^4.2.4",
Expand All @@ -76,19 +76,19 @@
},
"devDependencies": {
"@babel/preset-env": "^7.9.5",
"@glimmer/compiler": "0.79.3",
"@glimmer/destroyable": "0.79.3",
"@glimmer/compiler": "0.79.2",
"@glimmer/destroyable": "0.79.2",
"@glimmer/env": "^0.1.7",
"@glimmer/global-context": "0.79.3",
"@glimmer/interfaces": "0.79.3",
"@glimmer/manager": "0.79.3",
"@glimmer/node": "0.79.3",
"@glimmer/opcode-compiler": "0.79.3",
"@glimmer/owner": "0.79.3",
"@glimmer/program": "0.79.3",
"@glimmer/reference": "0.79.3",
"@glimmer/runtime": "0.79.3",
"@glimmer/validator": "0.79.3",
"@glimmer/global-context": "0.79.2",
"@glimmer/interfaces": "0.79.2",
"@glimmer/manager": "0.79.2",
"@glimmer/node": "0.79.2",
"@glimmer/opcode-compiler": "0.79.2",
"@glimmer/owner": "0.79.2",
"@glimmer/program": "0.79.2",
"@glimmer/reference": "0.79.2",
"@glimmer/runtime": "0.79.2",
"@glimmer/validator": "0.79.2",
"@simple-dom/document": "^1.4.0",
"@types/qunit": "^2.9.1",
"@types/rsvp": "^4.0.3",
Expand Down
Expand Up @@ -219,60 +219,6 @@ moduleFor(
this.assertText('Godfrey Chan');
}

['@test works with computeds on non-defined properties']() {
let instance;

let FooBarComponent = Component.extend({
init() {
this._super(...arguments);

if (HAS_NATIVE_PROXY) {
expectDeprecation(() => {
set(this.hash, 'lastName', 'Hietala');
}, /You set the '.*' property on a {{hash}} object/);
} else {
set(this.hash, 'lastName', 'Hietala');
}

instance = this;
},

fullName: computed('hash.firstName', 'hash.lastName', function () {
return `${this.hash.firstName} ${this.hash.lastName}`;
}),
});

this.registerComponent('foo-bar', {
ComponentClass: FooBarComponent,
template: `{{this.fullName}}`,
});

this.render(`{{foo-bar hash=(hash firstName=this.firstName)}}`, {
firstName: 'Chad',
lastName: 'Hietala',
});

this.assertText('Chad Hietala');

runTask(() => this.rerender());

this.assertText('Chad Hietala');

runTask(() => {
set(this.context, 'firstName', 'Godfrey');

if (HAS_NATIVE_PROXY) {
expectDeprecation(() => {
set(instance.hash, 'lastName', 'Chan');
}, /You set the '.*' property on a {{hash}} object/);
} else {
set(instance.hash, 'lastName', 'Chan');
}
});

this.assertText('Godfrey Chan');
}

['@test works when properties are set dynamically']() {
let fooBarInstance;
let FooBarComponent = Component.extend({
Expand Down

0 comments on commit 4192b92

Please sign in to comment.