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!: writeFile now requires filename #79

Merged
merged 4 commits into from
Sep 15, 2023
Merged

fix!: writeFile now requires filename #79

merged 4 commits into from
Sep 15, 2023

Conversation

Barbapapazes
Copy link
Member

@Barbapapazes Barbapapazes commented Sep 2, 2023

πŸ”— Linked issue

fix #66
close #76

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR solve a type issue and add some tests.

And because recast, https://github.com/benjamn/recast/blob/master/lib/parser.ts#L24, does not pass the filename to the parser option, we can't use it as the output filename.

I'm not sure if how tests are written is the best way to do it, so feel free to change it if you have a better idea.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@Barbapapazes Barbapapazes self-assigned this Sep 2, 2023
@Barbapapazes Barbapapazes requested a review from antfu September 2, 2023 19:21
@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Merging #79 (59ac219) into main (a439ffa) will increase coverage by 1.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   92.40%   93.48%   +1.07%     
==========================================
  Files          23       23              
  Lines        1751     1749       -2     
  Branches      322      327       +5     
==========================================
+ Hits         1618     1635      +17     
+ Misses        133      114      -19     
Files Changed Coverage Ξ”
src/types.ts 100.00% <ΓΈ> (ΓΈ)
src/code.ts 97.77% <100.00%> (+20.85%) ⬆️

@Barbapapazes Barbapapazes changed the title fix: writeFile type issue fix: writeFile Sep 2, 2023
src/code.ts Outdated Show resolved Hide resolved
@antfu antfu changed the title fix: writeFile fix!: writeFile now requires filename Sep 6, 2023
@antfu antfu merged commit d7f7d19 into main Sep 15, 2023
@antfu antfu deleted the fix/ast branch September 15, 2023 07:55
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.

ProxifiedModule<Exports> is not compatible with writeFile().
2 participants