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

feat(utils): add reverseResolveAlias util #173

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

Jesse1989pp
Copy link
Contributor

@Jesse1989pp Jesse1989pp commented Apr 22, 2024

Create a reverse lookup to resolve an absolute path towards the aliased path

❓ Type of change

  • ✨ New feature (a non-breaking change that adds functionality)

📚 Description

Created an extra util which allows the user to lookup the alias path from the aliases. Pretty much reverting the resolveAlias method. Personal use case is creating some linting rules within Nuxt towards explicit imports using the aliases. Other angles are appreciated

📝 Checklist

  • I have updated the documentation accordingly.

@Jesse1989pp

This comment was marked as off-topic.

@Jesse1989pp
Copy link
Contributor Author

@danielroe See you approved the workflow once. Seems to be a generic issue in the pipeline throughout the repo. Seems to be related to the setup action. Tried bumping the node LTS consistent with some other big unjs libs. But not sure if this will resolve it. Could you run the workflow approval once more or does the error ring a bell for anyone?

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.37%. Comparing base (bdab761) to head (4be44f7).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #173      +/-   ##
==========================================
- Coverage   99.45%   99.37%   -0.08%     
==========================================
  Files           4        4              
  Lines         364      319      -45     
  Branches      114      128      +14     
==========================================
- Hits          362      317      -45     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jesse1989pp

This comment was marked as off-topic.

@pi0

This comment was marked as off-topic.

@pi0 pi0 changed the title feat(utils): reverse resolve alias feat(utils): add reverseResolveAlias util Jan 3, 2025
@pi0 pi0 merged commit 9158288 into unjs:main Jan 3, 2025
2 of 3 checks passed
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.

2 participants