nuxt-community / feed-module

Everyone deserves RSS, ATOM and JSON feeds!
MIT License
226 stars 36 forks source link

fix: create parent directories if not exist in generate mode #87

Closed rclement closed 3 years ago

rclement commented 3 years ago

Make sure to create all parents directories for the output feed files in "generate mode".

Since commit 8832f39, the usage of fs-extra.outputFile has been replaced with fs.writeFileSync. However, there is a subtle behavior change: while fs-extra.outputFile was creating all parent directories automatically, fs.writeFileSync does not. Thus all parent directories need to be created if not present already. Resolves #85.

codecov[bot] commented 3 years ago

Codecov Report

Merging #87 into master will increase coverage by 0.11%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
+ Coverage   98.27%   98.38%   +0.11%     
==========================================
  Files           2        2              
  Lines          58       62       +4     
  Branches        8        9       +1     
==========================================
+ Hits           57       61       +4     
  Misses          1        1              
Impacted Files Coverage Ξ”
lib/module.js 98.33% <100.00%> (+0.11%) :arrow_up:

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 1224ecc...0584793. Read the comment docs.

manniL commented 3 years ago

Thanks a lot for the PR! Could you add a small test case for such a scenario as well? That'd be awesome πŸ™Œ

rclement commented 3 years ago

@manniL I'll try adding a test case for it as soon as I can

briancbarrow commented 2 years ago

@manniL did this ever get published? I'm still running into the issue on my repo. When I looked at the file in my node_modules folder, i don't see these changes in there. Can we push this to NPM?

rclement commented 2 years ago

@briancbarrow In the meantime, you can install it from the Git repo:

npm install github:nuxt-community/feed-module#master
manniL commented 2 years ago

Will trigger a release this week πŸ‘πŸ»

RubenVanEldik commented 2 years ago

Hi @manniL!

Has this PR been released yet? I got the same error earlier today.