ember-codemods / es5-getter-ember-codemod

34 stars 14 forks source link

unmodified #22

Closed dbinetti closed 1 year ago

dbinetti commented 5 years ago

Hi, I run the codemod per the instructions (and the solution in #20) but always get all my files unmodified, even though I have clear places that should be caught (such as let entry = yield this.model.get('entries').createRecord({...)

So, expected behavior is some files "OK" modified, but I get all files "unmodified".

Any way to debug?

npx: installed 383 in 10.381s
Processing 209 files... 
Spawning 3 workers...
Sending 50 files to free worker...
Sending 50 files to free worker...
Sending 50 files to free worker...
Sending 50 files to free worker...
Sending 9 files to free worker...
All done. 
Results: 
0 errors
209 unmodified
0 skipped
0 ok
Time elapsed: 1.300seconds 
(barberscore-web) bash-3.2$ 
dbinetti commented 5 years ago

And a better example using this:
'by': this.get('currentUser.user.id'),

rpcollins commented 4 years ago

I ran into this same thing. I looked at the source and they are intentionally skipping nested (dot notation) properties. I'm not totally sure why, possibly being cautious, but, you can pull this repo locally and modify/comment out the section that is doing the isNestedKey and run the local copy. Looks like you originally posted this a year ago, so you probably found a way around this.