Skip to content

Commit ba9d969

Browse files
rajasegarKelly Selden
authored andcommitted
Try cp-volatile codemod (#725)
* [FEAT] Add cp-volatile codemod
1 parent 44f0fbd commit ba9d969

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

test/fixtures/codemod/latest-node/my-app/app/controllers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export default Controller.extend({
77
return `${this.firstName} ${this.lastName}`;
88
}),
99

10+
get fullName2() {
11+
return `${this.firstName} ${this.lastName}`;
12+
},
13+
1014
actions: {
1115
foo(object) {
1216
this.doStuff(object);

test/fixtures/codemod/local/my-app/app/controllers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ export default Ember.Controller.extend({
66
return `${this.firstName} ${this.lastName}`;
77
}).property('firstName', 'lastName'),
88

9+
fullName2: computed(function() {
10+
return `${this.firstName} ${this.lastName}`;
11+
}).volatile('firstName', 'lastName'),
12+
913
actions: {
1014
foo(object) {
1115
Ember.propertyWillChange(object, 'someProperty');

test/fixtures/codemod/min-node/my-app/app/controllers/application.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export default Controller.extend({
77
return `${this.firstName} ${this.lastName}`;
88
}),
99

10+
get fullName2() {
11+
return `${this.firstName} ${this.lastName}`;
12+
},
13+
1014
actions: {
1115
foo(object) {
1216
this.doStuff(object);

0 commit comments

Comments
 (0)