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

Expose metadata in readPackage hook #5869

Open
1 task
DerYeger opened this issue Jan 2, 2023 · 0 comments
Open
1 task

Expose metadata in readPackage hook #5869

DerYeger opened this issue Jan 2, 2023 · 0 comments

Comments

@DerYeger
Copy link

DerYeger commented Jan 2, 2023

Describe the user story

As a developer, I often want to implement hooks for my local packages only, but I often face the issue that I cannot resolve (or otherwise trivially identify) packages of my monorepo in the readPackage hook.

Describe the solution you'd like

Add more metadata to the context parameter of the readPackage hook, including a boolean field indicating that pkg is a local package of a monorepo (or the root).

Describe the drawbacks of your solution

I cannot identify any drawbacks.

Describe alternatives you've considered

Hardcoding an array of local packages.
It's obviously not possible to resolve the package.json of a package in the hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant