-
Notifications
You must be signed in to change notification settings - Fork 41
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
Moving index.json
to a different package
#362
Comments
A scenario coming to my mind which could be worrying is |
You beat me to it 😅 I'll paste my issue body here :) |
Perhaps the package name of |
The payloads are big, and make up the majority of the published package:
They were originally being shipped to power type generation, which is now obsolete as we're shipping JSON schemas and generating more accurate types from those. Since these types are being used in types that are published in downstream packages, we're wanting to include this package as a production dependenecy meaning all that size will be pulled into the dependency tree when all that's really needed is the far smaller Additionally, the payloads are currently being shipped as the "main" entity for this repo, meaning doing |
For sure - |
For whenever we get around to doing this, we can spin out the payload examples directory into another repo while saving their git history using this technique |
For context: https://github.com/octokit/webhooks/ was not meant to be a production dependency, similar to https://github.com/octokit/openapi. Moving the examples out of the repository will make it harder to contribute. I really like the fact that anyone can just submit a payload example as a means to reproduce a problem with the current schemas. Also keep in mind that this repository is meant to be useful across all language ecosystems, not just for JavaScript. There are other SDKs besides the JS ones. They don't use this repository yet, but the goal for this repository is to be a shared resource in future. And if we are considering to move out the examples, why not consider to move out the types instead, similar to https://github.com/octokit/openapi-types.ts? |
I think there are two things here: publishing them in this package, and publishing them in a package - I actually think we should focus on the latter before the former, since as you've said there is a very nice flow in having the payloads in this repo which I think we could only keep if we moved to a mono-repo if we want to publish a separate package. (so, imo it's a lot easier for us to discuss & action the latter now than the former)
In my case, this won't solve the problem as I'm using the schemas not the types :) |
I'm not a fan of mono-repos for many reasons, but in this case we could publish dependency-free packages with just the types and one with just the schema which should be much easier ... the packages we would publish would only differ in
The release version, release notes, etc, could be exactly the same? |
Sure - I think that could go wrong in a few ways, but overall the contents of this repo mean if it did the actual end result wouldn't be horrible. I'll point out that it feels to me like a mono-repo without the tooling, but I'm neutral on monorepos so I'm happy to go with what you'd prefer :) My main question that that comment stems from is how do we handle versioning? I think for semantic-release's sanity it'll probably be best if we bump the versions of all three packages for any change, rather than try and juggle them. (you might know a trick or two that can make this work better) This actually could work nicely and without being breaking, as we can continue to publish I propose these packages:
|
yes, definitely.
sounds good to me. I just remembered another difference. A package should have a |
My only concern of this mono-repo proposal is what @gr2m pointed before regarding Octokit ecosystem inconsistency. Octokit aims to a multi-repo solution and in this case we are merging approaches in my opinion. Besides this point, and considering the problem we are facing here, 👍🏽 I'm okay with this proposal:
👍🏽 Agree on this. |
I'm not sure how that's related to a package that is publishing and being used purely for typescript (since the package in question is a js library), but I have no mind in publishing an empty file :) My preference would be to follow whatever DefinitelyTyped is doing, since they'll be in the same boat for this sort of thing :) |
If we take example from |
What’s missing?
Would be nice to not pack examples when publishing this package.
Why?
Avoid extra package size
Context: octokit/webhooks.js#439 (comment)
The text was updated successfully, but these errors were encountered: