feat(datasource/jsdelivr): add new jsdelivr datasource - #45015
Open
rm-code wants to merge 7 commits into
Open
Conversation
rm-code
force-pushed
the
feat/add-jsdelivr-datasource
branch
from
August 2, 2026 20:22
9b3ce45 to
ad2d669
Compare
Author
rm-code
marked this pull request as ready for review
August 2, 2026 21:03
rm-code
marked this pull request as draft
August 2, 2026 21:59
rm-code
marked this pull request as ready for review
August 3, 2026 09:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR adds a new datasource for the jsdelvir cdn as discussed in #26936, which is a blocker for #26937 and also could be used for a later libman manager implementation (see #41893).
The datasource queries the jsdelivr api: https://data.jsdelivr.com/v1
For fetching releases it queries three different endpoints for:
To distinguish between
ghandnpmpackages, it expects the manager to prefix the package name with a the respectivetype. As far as I understood, this should be the responsibility of the caller (extracting the URL from whatever source it's dealing with). Strictly speaking this goes against the outline given in thedatasource/README.md:If this is a violation against the coding guidelines, I would need some guidance to how we'd deal with the different endpoint types instead and I'll happily update the PR.
For digest it fetches a flat file structure via the respective API endpoints and searches for the asset in the list of files. I haven't found a better way of dealing with this, because the API doesn't offer any alternative afaict.
Context
Please select one of the following:
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.
Documentation (please check one with an [x])
I added a
readme.mddocumenting the type-prefix requirement for this datasource.How I've tested my work (please select one)
I have verified these changes via:
The public repository: n/a