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

Treat :import and :export statements as pure. Fixes #21 #23

Merged

Conversation

fdintino
Copy link
Contributor

This fixes #21 and would resolve the related next.js tickets vercel/next.js#10142 and vercel/next.js#11629.

It seems incorrect to use something called context.useLocals for this purpose, as way I am in this PR, but it's only used for the pure mode check, and I couldn't think of a more descriptive variable name. I'm open to any alternative approaches.

@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2020

Codecov Report

Merging #23 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
+ Coverage   98.98%   99.00%   +0.01%     
==========================================
  Files           2        2              
  Lines         296      301       +5     
  Branches       94       96       +2     
==========================================
+ Hits          293      298       +5     
  Misses          3        3              
Impacted Files Coverage Δ
test.js 100.00% <ø> (ø)
index.js 98.89% <100.00%> (+0.02%) ⬆️

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 446dd71...e992820. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

Error when importing values in pure mode
3 participants