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: pass relative ignore paths when scanning public assets #1632

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Aug 25, 2023

πŸ”— Linked issue

❓ 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

We now support ignoring public assets (#945) but at the moment we do not resolve/relativise paths, so an ignore pattern of public/test.txt would not match test.txt when scanning the public/ directory. The issue is that it then becomes impossible to specify ignore patterns that only apply in public directories, for example.

This is a change in behaviour but I think more intuitive.

πŸ“ Checklist

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

@danielroe danielroe added the bug Something isn't working label Aug 25, 2023
@danielroe danielroe requested a review from pi0 August 25, 2023 11:05
@danielroe danielroe self-assigned this Aug 25, 2023
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #1632 (9e56fcc) into main (6c67404) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1632      +/-   ##
==========================================
+ Coverage   77.64%   77.74%   +0.10%     
==========================================
  Files          76       76              
  Lines        7818     7824       +6     
  Branches      795      803       +8     
==========================================
+ Hits         6070     6083      +13     
+ Misses       1745     1739       -6     
+ Partials        3        2       -1     
Files Changed Coverage Ξ”
src/build.ts 84.40% <100.00%> (+0.16%) ⬆️

... and 2 files with indirect coverage changes

? p
: relative(srcDir, resolve(nitro.options.srcDir, p))
)
.filter((p) => !p.startsWith("../")),
Copy link
Member

Choose a reason for hiding this comment

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

This might make issues with multi-layer when relative path is outside of main srcDir but inside other layer's source dir... But let's try and see!

@pi0 pi0 merged commit b4967ff into main Aug 25, 2023
9 checks passed
@pi0 pi0 deleted the fix/relative-ignore branch August 25, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants