-
Notifications
You must be signed in to change notification settings - Fork 36
Use typescript's tsconfig.json parsing functionality instead of JSON.parse #70
Conversation
Thanks for the contribution! Before we can merge this, we need @samuela to sign the Salesforce.com Contributor License Agreement. |
cc @jdxcode |
off-hand, I'm not really sure why this isn't working. The |
@jdxcode |
apologies this turned into such a mess, I might be able to take a look later this week if nothing else |
@jdxcode Here are the results when importing a single global
|
Ok, I tried stubbing out the function with proxyquire but even that isn't working now: thlorenz/proxyquire#236. |
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
========================================
- Coverage 68.6% 0% -68.61%
========================================
Files 7 2 -5
Lines 430 10 -420
Branches 120 3 -117
========================================
- Hits 295 0 -295
+ Misses 87 10 -77
+ Partials 48 0 -48
Continue to review full report at Codecov.
|
@jdxcode Ok, fixed the failing test. Now codecov is complaining but I don't think I did anything wrong there... |
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.
looks good to me! thanks so much!
JSON.parse
differs from the semantics of typescript's parsing, asJSON.parse
doesn't support comments. This PR switches to using typescript's provided parsing functionality for compatibility.Tests pass with the exception of "tsPath should use the provided esModuleInterop option". For some reason,
fancy.stub()
doesn't seem to be working: The tests are still calling the unpatched version. I've triedstub()
both on a global imported version of "../src/ts-node" and the "freshRequired" versions. Do let me know if I'm doing something wrong here...