Skip to content
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

Use typescript to parse source files #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmair
Copy link

@tmair tmair commented Jun 24, 2017

Fixes #54

This pull request uses typescript to construct an AST and find the positions where the require()s should be placed. It should fix several issues and edge cases caused by the regexp approach.

All tests are passing and one new test (adding the possibility to use template literals) was added.

@codecov-io
Copy link

codecov-io commented Jun 24, 2017

Codecov Report

Merging #70 into master will increase coverage by 2.47%.
The diff coverage is 98.78%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #70      +/-   ##
=========================================
+ Coverage   96.42%   98.9%   +2.47%     
=========================================
  Files           1       1              
  Lines          28      91      +63     
  Branches        5      24      +19     
=========================================
+ Hits           27      90      +63     
  Misses          1       1
Impacted Files Coverage Δ
index.js 98.9% <98.78%> (+2.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2dc887...4ded269. Read the comment docs.

@tmair
Copy link
Author

tmair commented Jun 24, 2017

@TheLarkInn I am planning on looking through the issues and see which of them are resolved by this PR. Some of the other PRs already define new tests for the edge cases they fix (based on the regexp approach). So I am planning on adding those tests to the spec as well, just to make sure that the AST approach really covers them

@crhairr
Copy link

crhairr commented Jan 22, 2018

This would resolve my issue where the regex fails on properly quoted JSON object keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Help Wanted] Transition from String to AST parsing.
3 participants