ember-cli / ember-cli/babel-plugin-debug-macros
Handle `CallExpression` for debug macros.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Currently, we are handling only `ExpressionStatement`'s for debug macro replacement. Unfortunately, the following do not get processed (since they do not include an `ExpressionStatement`):
```js
function foo() {
return assert(false, 'derp'); // ReturnStatement
}
let qux = () => assert(false, 'herp'); // ArrowFunctionExpression
```
This is the underlying issue in https://github.com/babel/ember-cli-babel/issues/168.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the debug macro replacement handling for ExpressionStatement and compare it with the CallExpression cases inside ReturnStatement and ArrowFunctionExpression shown in the examples. Confirm that both assert calls are processed and add or run coverage for those two forms; done means neither example is skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100