Skip to content

Restore public API of resolvePlugin/resolvePreset - #16888

Merged
nicolo-ribaudo merged 3 commits into
babel:mainfrom
nicolo-ribaudo:core-resolve-api
Oct 9, 2024
Merged

nicolo-ribaudo merged 3 commits into
babel:mainfrom
nicolo-ribaudo:core-resolve-api

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Oct 9, 2024 •

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #16887
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Fixes #16887. We probably need a better API, but for now lets restore the old behavior.

@nicolo-ribaudo nicolo-ribaudo added PR: Bug Fix 🐛 A type of pull request used for our changelog categories i: regression pkg: core labels Oct 9, 2024
@babel-bot

babel-bot commented Oct 9, 2024 •

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58098

export const resolvePlugin = (name: string, dirname: string) =>
resolvers.resolvePlugin(name, dirname, false).filepath;
export const resolvePreset = (name: string, dirname: string) =>
resolvers.resolvePreset(name, dirname, false).filepath;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since they are public, can we add a few test cases for them? It can be done in another PR.

@nicolo-ribaudo

Copy link
Copy Markdown
Member Author

Whops, I pushed two commits to the wrong PR

@nicolo-ribaudo
nicolo-ribaudo merged commit 2570cfd into babel:main Oct 9, 2024
@nicolo-ribaudo
nicolo-ribaudo deleted the core-resolve-api branch October 9, 2024 20:09
@nicolo-ribaudo

Copy link
Copy Markdown
Member Author

I'm releasing a patch for this.

@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 10, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: core PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Plugin config validation issue

4 participants