-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ember-data/codemods package #9343
Conversation
} | ||
|
||
// prettier-ignore | ||
runTests( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jscodeshift's default testing setup is missing some features, so I wrote my own.
For each codemod, we can add a folder in __testfixtures__
with the dasherized codemod name, and this test setup will run that codemod against all of the files contained therein. testName.input.ts
will be modded and the result will be compared with testName.output.ts
. You can also add testName.info.json
with other useful stuff (e.g. config--not set up yet--or expected log output--see e.g. below).
example:
// testName.info.json
{
"expectedLogs": [
[
"warn",
"oh noes"
],
]
}
It was just spewing errors
They're unnecessary and cause a syntax error
We can infer request types from builders now. yay
A new package for EmberData codemods. The first will be the
legacy-compat-builders
codemod to convertconst foo = await store.findRecord('foo', '1')
toconst { content: foo } = await store.request(findRecord('foo', '1')
, etc.Description
Notes for the release