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

fix(core): resolve some strip-source-code bugs #15840

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

forivall
Copy link
Contributor

@forivall forivall commented Mar 22, 2023

I found some bugs, added some test cases, and used my knowledge of js parsing quirks around template and regex literals to resolve them.

The regex handling was adapted from https://github.com/Microsoft/typescript/blob/2c952fe8505fc427cdfe30ed4b40343f0f5f39bc/src/services/classifier.ts#L260

Current Behavior

Imports after a template literal with 2 variables are not analyzed

Expected Behavior

These imports should be included in the dependency graph

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Mar 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 0:17AM (UTC)

@forivall forivall force-pushed the forivall/strip-source-code-bug branch from 2a63753 to e758a55 Compare March 22, 2023 23:29
@forivall forivall changed the title chore(core): add unit test case for strip-source-code bug fix(core): resolve some strip-source-code bugs Mar 22, 2023
Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you so much for looking into this. 🎉

@FrozenPandaz FrozenPandaz merged commit 8af80de into nrwl:master Mar 23, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants