ember-cli / ember-cli/babel-plugin-debug-macros

Handle `CallExpression` for debug macros.

未关闭
#46 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
13
派生
13
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先跟踪 ExpressionStatement 的调试宏替换处理,并将其与示例中所示的 ReturnStatement 和 ArrowFunctionExpression 内的 CallExpression 情况进行比较。确认两个 assert 调用都会被处理,并为这两种形式添加或运行覆盖率;完成的标准是两个示例都不会被跳过。

由索引模型根据 Issue 内容生成。

评估

技术栈
babel, typescript
领域
tooling
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。