bunx github:gitKrystan/ember-computed-to-getter-codemod app/**/*.js
This codemod will assume all decorated properties and getters in the same file are autotracked and will warn when a newly dependentKeyCompat
property relies on an untracked property. To add overrides:
// .codemodrc.json
{
"properties": [
[
/* property key */
string,
{
/* optional type for debugging */
type?: 'property' | 'getter' | 'setter' | 'method';
/* whether or not the property is tracked */
tracked: boolean;
}
]
]
}
pnpm install
pnpm test
Use @babel/parser
in https://astexplorer.net when working with the jscodeshift's default parser (default: babel
).