Skip to content

feat(utils): add reverseResolveAlias util#173

Merged
pi0 merged 7 commits intounjs:mainfrom
Jesse1989pp:feat/reverse-resolve-alias
Jan 3, 2025
Merged

feat(utils): add reverseResolveAlias util#173
pi0 merged 7 commits intounjs:mainfrom
Jesse1989pp:feat/reverse-resolve-alias

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?

@codecov
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
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