-
Notifications
You must be signed in to change notification settings - Fork 276
fix: move dependencies to peer dependencies #1019
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
Conversation
Yes! This should help with the recent issues around upgrading |
Hi @aramissennyeydd, I haven't had time to test yet but I think this could potentially work. Am I correct in that the
Hi @alvinometric, can you explain why/how you think this should help prevent Docusaurus dependency conflicts? Interested to hear your thoughts. Thanks! |
This depends on the package manager, if the user already installed a specific version for their site, this will prevent a secondary version from being installed. In my case, we are using a specific version of docusaurs for our docsite and this package is bringing in a separate version with different resolutions.
Again, depends on the package manager - in general, the default is that it will allow install but add a warning log. |
Visit the preview URL for this PR (updated for commit 4fe47d9): https://docusaurus-openapi-36b86--pr1019-507tuj9n.web.app (expires Fri, 13 Dec 2024 15:41:02 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bf293780ee827f578864d92193b8c2866acd459f |
Thanks @aramissennyeydd, that makes sense. I suppose this leaves room for users to still end up with dep conflicts, but at least they'd get a warning. With Docusaurus, there's a potential for breaking changes, even between patch releases, so I've made it a habit to always delete my |
@sserrata Did you by chance loose the icon for When we use the canary, I see that the CSS class has some odd values for the URL. .openapi-tabs__code-item--http::after {
content: "";
display: inline-block;
width: 32px; /* Explicitly setting width to 32 pixels */
height: 32px; /* Explicitly setting height to 32 pixels */
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIyTDggMTZMMTIgMTBNMjAgMjJMMjQgMTZMIDIwIDEwIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
background-size: contain;
background-repeat: no-repeat;
background-position: center; /* Center the SVG */
margin-top: 0.5rem;
} WHereas other language classes have a normal URL. .openapi-tabs__code-item--java::after {
content: "";
width: var(--code-tab-logo-width);
height: var(--code-tab-logo-height);
background: url("https://raw.githubusercontent.com/devicons/devicon/master/icons/java/java-original.svg") no-repeat;
margin-block: auto;
} |
If you believe you found a bug please open a separate issue with steps to repro. Before that, I suggest searching through older issues or have a look at the demo as I believe this one has already been addressed. Thanks! |
Thanks @sserrata I placed this in the wrong issue 🤦🏻 |
Using the canary version and
I am also unsure how peer dependencies should be resolved, but I expect this to be undesired behaviour. |
@Gijsdeman I think you're right, I opened #1023 to fix that one. Do the rest of the peer dependencies work? Going to test this against Backstage's docsite tonight. |
As far as I can tell the rest of the dependencies are resolved correctly. |
Confirmed on my end that the dependencies are resolving to the same docusaurus version that I have installed in the project and I'm not getting any runtime errors. |
Description
Motivation and Context
I'm trying to add this plugin to Backstage's docsite to automatically show OpenAPI-documented APIs (PR: backstage/backstage#27573). I noticed that this package was causing a lot of lockfile churn and bringing in versions that I would expect to be duplicates, but aren't.
How Has This Been Tested?
Locally linked this into my Backstage fork and verified that no additional docusaurus dependencies were duplicated, there was only a single version of each dep.
This is my first contribution to this repo, so please share any additional testing steps I should be taking here 🙇 .
Types of changes
Checklist