feat: resolve actual subpaths before guessing
🔗 Linked issue
❓ Type of change
- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [x] 👌 Enhancement (improving an existing functionality like performance)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
This resolves actual subpaths rather than guessing, so (for example) node-fetch-native/dist/polyfill.mjs can correctly be resolved to node-fetch-native/polyfill and back again.
📝 Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Codecov Report
Merging #527 (133f2bd) into main (99fbfb9) will decrease coverage by
0.03%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #527 +/- ##
==========================================
- Coverage 76.50% 76.48% -0.03%
==========================================
Files 73 73
Lines 7594 7578 -16
Branches 755 750 -5
==========================================
- Hits 5810 5796 -14
+ Misses 1783 1781 -2
Partials 1 1
| Files Changed | Coverage Δ | |
|---|---|---|
| src/rollup/plugins/externals.ts | 93.27% <100.00%> (+0.16%) |
:arrow_up: |
If you like this approach we can also extract into a mlly util.
A refactor to mlly would be nice idea for reverse resolving subpaths 👍🏼
extracted:
- [x] https://github.com/unjs/pkg-types/pull/47
- [x] https://github.com/unjs/mlly/pull/89
@danielroe is this ready to review ?
It is.
@danielroe Had to create a new branch to fix the conflicts. You can force push from there https://github.com/unjs/nitro/pull/1395 This looks good to me, altough I'm not really a rollup wizard like you 💇🏽
I don't believe there are any conflicts in this branch. I resolved them 5 days ago with a rebase.
Ah yes ignore me 🤦 GitHub UI fooled me