-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: remove options.typescript support #73
Conversation
Codecov Report
@@ Coverage Diff @@
## master #73 +/- ##
==========================================
- Coverage 94.96% 94.88% -0.08%
==========================================
Files 12 12
Lines 596 587 -9
==========================================
- Hits 566 557 -9
Misses 30 30
Continue to review full report at Codecov.
|
lib/format_options.js
Outdated
@@ -42,9 +42,9 @@ module.exports = function formatOptions(options) { | |||
|
|||
// typescript | |||
if (!('typescript' in options)) { |
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.
我觉得这里可以改下,直接从 egg-bin 读取环境变量,不要传入 options 了
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.
也行,也就是 egg-bin test/cov 那边已经分析好了这段逻辑了,这里直接读取 env,我改改
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.
改了,再喵喵
lib/format_options.js
Outdated
} | ||
} | ||
} | ||
options.typescript = String(process.env.EGG_TYPESCRIPT).toLowerCase() === 'true'; |
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.
不需要 toLowerCase 了吧?会设置这个环境变量的就只有 egg-bin,egg-bin 就是设置成了 true ,没必要再做一层兼容的处理把?
lib/format_options.js
Outdated
} | ||
} | ||
} | ||
options.typescript = String(process.env.EGG_TYPESCRIPT).toLowerCase() === 'true'; |
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.
如果 egg-core 改成读 env 的话,这一整段应该都不需要了,因为已经不需要传递 options 了
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.
你直接接管这个 PR
全部移除掉了,可以再看看 |
挂了? |
fixed |
3.17.1 |
Checklist
npm test
passesAffected core subsystem(s)
Description of change