-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add a way for package maintainers to specify their own overrides #8
Comments
@ljharb do you want to test the waters with this? Maybe pick an easier/simple package and try it out. |
The use cases I think are good to handle are:
The third one is a bit too complex but I thought it was worth mentioning anyways. A possible approach that could handle the first two is a new top-level key, say "variants". The LHS of this object is a category, like "cleanup", or an arbitrary string. The RHS is the same as the RHS of an So, for a concrete scenario:
Alternatively:
Thoughts? |
So the key is metadata in your package.json. Our socket overrides have a |
exactly - and i can make up my own variants if i want, and tools can choose to adopt them if they want. |
Okay. Let's roll with "variants". ChatGPT could not come up with a better name 🙃 🤣 |
@ljharb This is next on my plate to take on. There's an easy way and a less easy way to detect this. One is looking at the packages already in the node_modules folder and the other is querying the registry to get the latest version and extract the Update: We’ll try going the packument route |
In developing Socket Registry I have been noodling on giving package maintainers the ability to specify their own overrides. So we can include them where it makes sense (in our registry/manifest.json). \cc @ljharb
I'd like the data to be accessible via the npm registry. We query the registry to create the manifest per package looking for things like "deprecated". Let's keep it simple. If a version is released with a prerelease of "override" we can defer to it for some category of overrides, like "cleanup".
The text was updated successfully, but these errors were encountered: