feat(loader): ignore .ts files in node_modules
The ts files in node_modules is useless for using the framework, but errors may be reported when loading, so ignore these files in FileLoader.
Checklist
- [x]
npm testpasses - [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows commit guidelines
Affected core subsystem(s)
None
Description of change
close: https://github.com/eggjs/egg/issues/4648
Codecov Report
Merging #230 (52c8686) into master (99ef754) will increase coverage by
0.06%. The diff coverage is100.00%.
:exclamation: Current head 52c8686 differs from pull request most recent head bf04fb0. Consider uploading reports for the commit bf04fb0 to get more accurate results
@@ Coverage Diff @@
## master #230 +/- ##
==========================================
+ Coverage 99.74% 99.80% +0.06%
==========================================
Files 19 19
Lines 1177 1038 -139
Branches 206 0 -206
==========================================
- Hits 1174 1036 -138
+ Misses 3 2 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/loader/file_loader.js | 100.00% <100.00%> (ø) |
|
| lib/loader/mixin/middleware.js | 96.49% <0.00%> (-0.24%) |
:arrow_down: |
| lib/egg.js | 100.00% <0.00%> (ø) |
|
| lib/lifecycle.js | 100.00% <0.00%> (ø) |
|
| lib/utils/index.js | 100.00% <0.00%> (ø) |
|
| lib/utils/timing.js | 100.00% <0.00%> (ø) |
|
| lib/utils/sequencify.js | 100.00% <0.00%> (ø) |
|
| lib/loader/egg_loader.js | 100.00% <0.00%> (ø) |
|
| lib/loader/mixin/config.js | 100.00% <0.00%> (ø) |
|
| ... and 9 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 99ef754...bf04fb0. Read the comment docs.
@beary 加一下单元测试用例?