Giter Site home page Giter Site logo

jsdelivr / data.jsdelivr.com Goto Github PK

View Code? Open in Web Editor NEW
205.0 15.0 38.0 5.75 MB

The public jsDelivr API. Get npm packages, files, versions, entry points, as well as their CDN URLs and download stats.

Home Page: https://data.jsdelivr.com/v1

License: Open Software License 3.0

JavaScript 99.93% Shell 0.07%
javascript npm github api esm statistics

data.jsdelivr.com's Introduction

jsDelivr API

Related projects:

The API is free to use and imposes no rate limits. However, if you plan to make 100+ RPM for longer periods of time, you should contact us first. Please note that usage statistics are available with a 48 hour delay. We only have data starting from Aug 19, 2017 and data older than one year may not be available.

Let us know how you use this API

If you create a tool/plugin/etc. which uses this API, please include a link to your tool in the User-Agent header so that we can learn more about how this API is being used.

Restrictions

Neither jsDelivr CDN nor this API supports packages larger than 50 MB for GitHub and 100 MB for npm. Trying to get a list of files using the API will result in a 403 response.

Endpoints

See the documentation or download the OpenAPI spec file.

FAQ

Search npm packages

There is no search endpoint in this API because there are already two other APIs for that:

Contributing

Refer to CONTRIBUTING.md for more information.

Production config

module.exports = {
    server: {
        port: 'SERVER_PORT', // defaults to 4454
        debugToken: 'SERVER_DEBUG_TOKEN' // The debug endpoint will be available at /debug/SERVER_DEBUG_TOKEN
    },
    db: {
        connection: {
            host: 'DB_CONNECTION_HOST', // defaults to localhost
            port: 'DB_CONNECTION_PORT', // defaults to 3306
            user: 'DB_CONNECTION_USER',
            password: 'DB_CONNECTION_PASSWORD',
            database: 'DB_CONNECTION_DATABASE', // defaults to jsdelivr-stats
        },
    },
    redis: {
        db: 'REDIS_DB', // defaults to 0
        host: 'REDIS_HOST',
        port: 'REDIS_PORT',
        password: 'REDIS_PASSWORD',
    },
    v1: {
        gh: {
            apiToken: 'V_1_GH_API_TOKEN',
        },
    },
}

Additionally, ELASTIC_APM_SERVER_URL, ELASTIC_APM_SECRET_TOKEN, ELASTIC_SEARCH_URL (including user + pass), and NODE_ENV=production should be set.

data.jsdelivr.com's People

Contributors

birkhofflee avatar geraltrivyan avatar jimaek avatar martincostello avatar martinkolarik avatar zarianec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data.jsdelivr.com's Issues

500 & 524 on usage stats request

I am trying to get the usage stats for my package, I also tried the example on the readme page (https://data.jsdelivr.com/v1/package/npm/jquery/stats) and I am still getting a 500 Internal Server Error.

This is the actual response I am getting after a considerable amount of time (about a minute)

{
	"status": 500,
	"message": "Internal Server Error"
}

A version list request (https://data.jsdelivr.com/v1/package/npm/jquery) works just fine...

{
	"tags": {
		"beta": "3.4.1",
		"latest": "3.4.1"
	},
	"versions": [
		"3.4.1",
		"3.4.0",
		"3.3.1",
		"3.3.0",
		"3.2.1",
		"3.2.0",
		"3.1.1",
		"3.1.0",
		"3.0.0",
		"3.0.0-rc1",
		"3.0.0-beta1",
		"3.0.0-alpha1",
		"2.2.4",
		"2.2.3",
		"2.2.2",
		"2.2.1",
		"2.2.0",
		"2.1.4",
		"2.1.3",
		"2.1.2",
		"2.1.1",
		"2.1.1-rc2",
		"2.1.1-rc1",
		"2.1.1-beta1",
		"2.1.0",
		"2.1.0-rc1",
		"2.1.0-beta3",
		"2.1.0-beta2",
		"1.12.4",
		"1.12.3",
		"1.12.2",
		"1.12.1",
		"1.12.0",
		"1.11.3",
		"1.11.2",
		"1.11.1",
		"1.11.1-rc2",
		"1.11.1-rc1",
		"1.11.1-beta1",
		"1.11.0",
		"1.11.0-rc1",
		"1.11.0-beta3",
		"1.9.1",
		"1.8.3",
		"1.8.2",
		"1.7.3",
		"1.7.2",
		"1.6.3",
		"1.6.2",
		"1.5.1"
	]
}

Sometimes I also get a Error 524 from Cloudflare...

screenshot

I am from Indonesia, I also tried using a VPN from Singapore without success.

I don't really need this for any project right now, I just think it worth to notify you about the issue.

Thank you.

Question: Package Usage Stats Performance/Stability

Hi there! We've been experiencing frequent timeout issues (eventually receiving an HTTP 524 error) with the package usage stats api when we use a value for period other than the default month

Some times the API returns fine, but it is a consistent and recurring issue that's been causing some problems for us over at Shields.io.

Is it possible to get this API stabilized and/or is there a different API/query we could use to get the hit counts for a package/repo on a per year, week, and daily basis?

Thanks!

Download stats for custom CDN endpoints

I was wondering if there is any way to get the download stats for custom CND endpoints (and in particular cdn.jsdelivr.net/pyodide/).

We talked about it a year or so ago, and it was costly to obtain at the time. So just opening this issue in case the situation changed since (I seem to remember some Github discussions about this but I could be wrong).

If there is anything we can contribute to make this easier, please let me know.

Incorrectly showing CSS file

For recent versions of fullcalendar, the https://cdn.jsdelivr.net/npm/fullcalendar/main.min.css is being advertised when in fact its part of an old version of the package. The current version of the package (6.1.0) does not have CSS files anymore. This is confusing our users a bit!

PS- I love the recent redesign of the site. Very slick.

How could I refresh my CDN cache?

As we know, the cache has no time limit, so how can I refresh my CDN cache without a new release? Need I post an email to anyone? Thank you for helping me. :D

Get combined badge and stats for same gh + npm package

If I publish code on github and npm, I'd like the jsDelivr badge to report combined stats for both. (Yay vanity metrics!)

To avoid abuse (e.g., a badge that combines stats for an unknown project with the stats for an unrelated popular project), perhaps you could use the repository field in package.json to make the correlation. It appears that field is already extracted somewhere because it appears on the page for packages.

Ability to list/query packages

This is two-fold.

  1. Before, it was possible to get all the versions and assets in a single query. Now, I have to do a single query to get just the versions and then from that, do multiple requests to get each version's assets. This isn't really ideal from an API consumption standpoint because that means instead of making a single request, I'm now making dozens. Yes, I did see Trying to get a list of files using the API will result in a 403 response. on the project page, but it offers no reasonable explanation for why this is, especially considering that this was a feature of the previous API this one is supposed to supersede.

  2. Before, it was possible to query multiple packages based on wildcards. This was primarily useful for inline UI discovery and installation for a CMS. AFAICT, there is currently no replacement functionality of any kind offered. I understand this is a new structure and, likely for performance reasons, some functionality is limited. However, isn't it possible to perhaps get around this by introducing more query string options?

GitHub packages not working properly

It seems that since a while accessing files and metadata of GitHub projects is not working very reliable anymore. I think it has something to do with the fact that the versions cannot be loaded from GitHub:

Repository (working): http://github.com/bgrins/spectrum (tags exist, releases exist)
Landing Page (working): https://cdn.jsdelivr.net/gh/bgrins/spectrum/
Listing versions via API (not working): https://data.jsdelivr.com/v1/package/gh/bgrins/spectrum
Listing files via API (not working): https://data.jsdelivr.com/v1/package/gh/bgrins/[email protected]/flat

This is causing LibMan (ASP.net core library manager) to fail if you have GH packages.

Edit: If this issue would be better placed over at the data.jsdelivr.com repo feel free to move the issue with the "transfer issue" option of GH.

Server incorrectly advertises HTTP/3 support

I'm still exploring HTTP/3 (and QUIC) so I may misunderstand something here, but as far as I can tell, https://data.jsdelivr.com seems to be advertising support for HTTP/3 protocol with the alt-svc : h3=":443" header. However attempting to make a QUIC connection to the server does not seem to be working.

Checking on a testing site also seem to indicate that HTTP/3 support is not available on the server.

It would be great that if the server does not support HTTP/3 it should not send the alt-svc header with the h3 value, or even better to enable support of HTTP/3 for the server (the https://cdn.jsdelivr.net host seems to already have good HTTP/3 support already for example).

Missing CORS header in Hong Kong

Describe the bug

data.jsdelivr.com always redirects to data-jsdelivr-com.onrender.com and without access-control-allow-origin header.

Affected jsDelivr links

(others are not affected)

Response headers

HTTP/2 301
date: Tue, 06 Sep 2022 19:32:53 GMT
content-type: text/html; charset=utf-8
content-length: 101
location: https://data-jsdelivr-com.onrender.com/v1/package/npm/element-plus
server: BunnyCDN-HK-557
cdn-pullzone: 499850
cdn-uid: b1941f61-b576-4f40-80de-5677acb38f74
cdn-requestcountrycode: HK
alt-svc: h3=":443"
alt-svc: h3-29=":443"
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
cf-ray: 73b6887dff196e64-HKG
cdn-proxyver: 1.02
cdn-requestpullsuccess: True
cdn-requestpullcode: 301
cdn-cachedat: 08/16/2022 01:52:53
cdn-edgestorageid: 557
cdn-status: 301
cdn-requestid: 48e8a4fb986ddb35eaee263f22202c37
cdn-cache: HIT

Screenshots

image

Please complete the following information:

  • Device OS: macOS
  • Browser: Chrome / curl CLI
  • Browser version: 104.0.5112.101
  • VPN provider if you use one: BunnyCDN-HK-557
  • Your location (country): only Hong Kong (tested on CN, US, JP without any issue)

Additional context

Affected website: https://issue.element-plus.org/

LICENSE

Open Software License ("OSL") v. 3.0

This Open Software License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following licensing notice adjacent to the copyright notice for the Original
Work:

Licensed under the Open Software License version 3.0

  1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
    non-exclusive, sublicensable license, for the duration of the copyright, to do
    the following:

a) to reproduce the Original Work in copies, either alone or as part of a
collective work;

b) to translate, adapt, alter, transform, modify, or arrange the Original
Work, thereby creating derivative works ("Derivative Works") based upon the
Original Work;

c) to distribute or communicate copies of the Original Work and Derivative
Works to the public, with the proviso that copies of Original Work or
Derivative Works that You distribute or communicate shall be licensed under
this Open Software License;

d) to perform the Original Work publicly; and

e) to display the Original Work publicly.

  1. Grant of Patent License. Licensor grants You a worldwide, royalty-free,
    non-exclusive, sublicensable license, under patent claims owned or controlled
    by the Licensor that are embodied in the Original Work as furnished by the
    Licensor, for the duration of the patents, to make, use, sell, offer for sale,
    have made, and import the Original Work and Derivative Works.

  2. Grant of Source Code License. The term "Source Code" means the preferred
    form of the Original Work for making modifications to it and all available
    documentation describing how to modify the Original Work. Licensor agrees to
    provide a machine-readable copy of the Source Code of the Original Work along
    with each copy of the Original Work that Licensor distributes. Licensor
    reserves the right to satisfy this obligation by placing a machine-readable
    copy of the Source Code in an information repository reasonably calculated to
    permit inexpensive and convenient access by You for as long as Licensor
    continues to distribute the Original Work.

  3. Exclusions From License Grant. Neither the names of Licensor, nor the names
    of any contributors to the Original Work, nor any of their trademarks or
    service marks, may be used to endorse or promote products derived from this
    Original Work without express prior permission of the Licensor. Except as
    expressly stated herein, nothing in this License grants any license to
    Licensor's trademarks, copyrights, patents, trade secrets or any other
    intellectual property. No patent license is granted to make, use, sell, offer
    for sale, have made, or import embodiments of any patent claims other than the
    licensed claims defined in Section 2. No license is granted to the trademarks
    of Licensor even if such marks are included in the Original Work. Nothing in
    this License shall be interpreted to prohibit Licensor from licensing under
    terms different from this License any Original Work that Licensor otherwise
    would have a right to license.

  4. External Deployment. The term "External Deployment" means the use,
    distribution, or communication of the Original Work or Derivative Works in any
    way such that the Original Work or Derivative Works may be used by anyone
    other than You, whether those works are distributed or communicated to those
    persons or made available as an application intended for use over a network.
    As an express condition for the grants of license hereunder, You must treat
    any External Deployment by You of the Original Work or a Derivative Work as a
    distribution under section 1(c).

  5. Attribution Rights. You must retain, in the Source Code of any Derivative
    Works that You create, all copyright, patent, or trademark notices from the
    Source Code of the Original Work, as well as any notices of licensing and any
    descriptive text identified therein as an "Attribution Notice." You must cause
    the Source Code for any Derivative Works that You create to carry a prominent
    Attribution Notice reasonably calculated to inform recipients that You have
    modified the Original Work.

  6. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
    the copyright in and to the Original Work and the patent rights granted herein
    by Licensor are owned by the Licensor or are sublicensed to You under the
    terms of this License with the permission of the contributor(s) of those
    copyrights and patent rights. Except as expressly stated in the immediately
    preceding sentence, the Original Work is provided under this License on an "AS
    IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without
    limitation, the warranties of non-infringement, merchantability or fitness for
    a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK
    IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this
    License. No license to the Original Work is granted by this License except
    under this disclaimer.

  7. Limitation of Liability. Under no circumstances and under no legal theory,
    whether in tort (including negligence), contract, or otherwise, shall the
    Licensor be liable to anyone for any indirect, special, incidental, or
    consequential damages of any character arising as a result of this License or
    the use of the Original Work including, without limitation, damages for loss
    of goodwill, work stoppage, computer failure or malfunction, or any and all
    other commercial damages or losses. This limitation of liability shall not
    apply to the extent applicable law prohibits such limitation.

  8. Acceptance and Termination. If, at any time, You expressly assented to this
    License, that assent indicates your clear and irrevocable acceptance of this
    License and all of its terms and conditions. If You distribute or communicate
    copies of the Original Work or a Derivative Work, You must make a reasonable
    effort under the circumstances to obtain the express assent of recipients to
    the terms of this License. This License conditions your rights to undertake
    the activities listed in Section 1, including your right to create Derivative
    Works based upon the Original Work, and doing so without honoring these terms
    and conditions is prohibited by copyright law and international treaty.
    Nothing in this License is intended to affect copyright exceptions and
    limitations (including "fair use" or "fair dealing"). This License shall
    terminate immediately and You may no longer exercise any of the rights granted
    to You by this License upon your failure to honor the conditions in Section
    1(c).

  9. Termination for Patent Action. This License shall terminate automatically
    and You may no longer exercise any of the rights granted to You by this
    License as of the date You commence an action, including a cross-claim or
    counterclaim, against Licensor or any licensee alleging that the Original Work
    infringes a patent. This termination provision shall not apply for an action
    alleging patent infringement by combinations of the Original Work with other
    software or hardware.

  10. Jurisdiction, Venue and Governing Law. Any action or suit relating to this
    License may be brought only in the courts of a jurisdiction wherein the
    Licensor resides or in which Licensor conducts its primary business, and under
    the laws of that jurisdiction excluding its conflict-of-law provisions. The
    application of the United Nations Convention on Contracts for the
    International Sale of Goods is expressly excluded. Any use of the Original
    Work outside the scope of this License or after its termination shall be
    subject to the requirements and penalties of copyright or patent law in the
    appropriate jurisdiction. This section shall survive the termination of this
    License.

  11. Attorneys' Fees. In any action to enforce the terms of this License or
    seeking damages relating thereto, the prevailing party shall be entitled to
    recover its costs and expenses, including, without limitation, reasonable
    attorneys' fees and costs incurred in connection with such action, including
    any appeal of such action. This section shall survive the termination of this
    License.

  12. Miscellaneous. If any provision of this License is held to be
    unenforceable, such provision shall be reformed only to the extent necessary
    to make it enforceable.

  13. Definition of "You" in This License. "You" throughout this License,
    whether in upper or lower case, means an individual or a legal entity
    exercising rights under, and complying with all of the terms of, this License.
    For legal entities, "You" includes any entity that controls, is controlled by,
    or is under common control with you. For purposes of this definition,
    "control" means (i) the power, direct or indirect, to cause the direction or
    management of such entity, whether by contract or otherwise, or (ii) ownership
    of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
    ownership of such entity.

  14. Right to Use. You may use the Original Work in all ways not otherwise
    restricted or conditioned by this License or by law, and Licensor promises not
    to interfere with or be responsible for such uses by You.

  15. Modification of This License. This License is Copyright ยฉ 2005 Lawrence
    Rosen. Permission is granted to copy, distribute, or communicate this License
    without modification. Nothing in this License permits You to modify this
    License as applied to the Original Work or to Derivative Works. However, You
    may modify the text of this License and copy, distribute or communicate your
    modified version (the "Modified License") and apply it to other original works
    of authorship subject to the following conditions: (i) You may not indicate in
    any way that your Modified License is the "Open Software License" or "OSL" and
    you may not use those names in the name of your Modified License; (ii) You
    must replace the notice specified in the first paragraph above with the notice
    "Licensed under " or with a notice of your own
    that is not confusingly similar to the notice in this License; and (iii) You
    may not claim that your original works are open source software unless your
    Modified License has been approved by Open Source Initiative (OSI) and You
    comply with its license review and certification process.

Version badge

Technically it'll always show the same version as a npm version badge, but several projects out there created their own "jsDelivr CDN version" badge, so it might be a good idea to support this (+ it should work with GitHub links too).

502 Errors for Package Metadata

Seems like we are getting 502 errors from the package metadata endpoint:

"https://data.jsdelivr.com/v1/packages/npm/jquery"

{
  "status": 502,
  "message": "Couldn't fetch versions for jquery."
}

Origins per project

Sent an email, but I think it bounced, so copying to here: (feel free to close whenever)

If I made a PR that saves the request's origin domain to the stats, would you accept?

Why:
My open source project is getting about 2M+ hits/month now, and I know 90% of this is coming from only a couple of websites, but sometimes jsDelivr shows unexpected spikes that I have no clue who/where is using it.

Adding the request's origin domain to the stats will let you, me, and Open Source author's see which sites use their libraries the most.

Would this be ok? Thanks so much again for jsDelivr!

Manusia

[
{
"user": "alm***"
},
{
"user": "novitri"
},
{
"user": "sil
"
},
{
"user": "par***"
},
{
"user": "zulkain"
},
{
"user": "cin
"
},
{
"user": "int***"
},
{
"user": "usa***"
},
{
"user": "ani***"
},
{
"user": "uta***"
},
{
"user": "lai***"
},
{
"user": "purwi"
},
{
"user": "nar
"
},
{
"user": "firgaro"
},
{
"user": "dim
"
},
{
"user": "raj***"
},
{
"user": "gila***"
},
{
"user": "tam***"
},
{
"user": "unja***"
},
{
"user": "nam***"
},
{
"user": "jam***"
},
{
"user": "kokou"
},
{
"user": "iswah
i"
},
{
"user": "ver***"
},
{
"user": "jasm***"
},
{
"user": "usa***"
},
{
"user": "bali*** "
},
{
"user": "harj*** "
},
{
"user": "anggran"
},
{
"user": "rah
"
},
{
"user": "mayai"
},
{
"user": "van
"
},
{
"user": "novitri"
},
{
"user": "sab
"
},
{
"user": "sitol"
},
{
"user": "bana
"
},
{
"user": "iswahi"
},
{
"user": "sit
"
},
{
"user": "zami***"
},
{
"user": "rah***"
},
{
"user": "gal***"
},
{
"user": "dama***"
},
{
"user": "ell***"
},
{
"user": "suari"
},
{
"user": "patri
"
},
{
"user": "oktavi"
},
{
"user": "nad
"
},
{
"user": "mut***"
},
{
"user": "perm***"
},
{
"user": "kama*** "
},
{
"user": "purwi"
},
{
"user": "rach
"
},
{
"user": "padmai"
},
{
"user": "mart
"
},
{
"user": "haryo"
},
{
"user": "cand
"
},
{
"user": "simbn"
},
{
"user": "am
"
},
{
"user": "palai"
},
{
"user": "arta
"
},
{
"user": "gat***"
},
{
"user": "mand***"
},
{
"user": "sabr*** "
},
{
"user": "nov***"
},
{
"user": "handai"
},
{
"user": "rusm
"
},
{
"user": "ari***"
},
{
"user": "suwa***"
},
{
"user": "kar***"
},
{
"user": "simanjak"
},
{
"user": "ken
"
},
{
"user": "kus***"
},
{
"user": "ay***"
},
{
"user": "yan***"
},
{
"user": "laksmti"
},
{
"user": "bana
"
},
{
"user": "raj***"
},
{
"user": "em***"
},
{
"user": "hida***"
},
{
"user": "wir***"
},
{
"user": "usa***"
},
{
"user": "unj***"
},
{
"user": "usa***"
},
{
"user": "beli***"
},
{
"user": "yulii"
},
{
"user": "adhia
"
},
{
"user": "lazui"
},
{
"user": "ve
"
},
{
"user": "kami*** "
},
{
"user": "mart*** "
},
{
"user": "dama***"
},
{
"user": "amel***"
},
{
"user": "uta***"
},
{
"user": "harj*** "
},
{
"user": "nri***"
},
{
"user": "tam***"
},
{
"user": "dana***"
},
{
"user": "raf***"
},
{
"user": "prada"
},
{
"user": "war
"
},
{
"user": "mahea"
},
{
"user": "bali
"
},
{
"user": "uma***"
},
{
"user": "hutagng"
},
{
"user": "luki
"
},
{
"user": "baktio"
},
{
"user": "hiday
o"
},
{
"user": "cap***"
},
{
"user": "wac***"
},
{
"user": "kari***"
},
{
"user": "firgaro"
},
{
"user": "uly
"
},
{
"user": "nura***"
},
{
"user": "arg***"
},
{
"user": "wal***"
},
{
"user": "su***"
},
{
"user": "mandai"
},
{
"user": "fath
h"
},
{
"user": "van***"
},
{
"user": "purwi"
},
{
"user": "jarw
"
},
{
"user": "mit***"
},
{
"user": "tarihn"
},
{
"user": "niy
"
},
{
"user": "narp***"
},
{
"user": "tim***"
},
{
"user": "sir***"
},
{
"user": "dim***"
},
{
"user": "najmn"
},
{
"user": "ghali
i"
},
{
"user": "riya***"
},
{
"user": "ek***"
},
{
"user": "oktavi"
},
{
"user": "el
"
},
{
"user": "sito***"
},
{
"user": "ka***"
},
{
"user": "wahy***"
},
{
"user": "darm***"
},
{
"user": "iswahi"
},
{
"user": "kan
"
},
{
"user": "yulii"
},
{
"user": "hen
"
},
{
"user": "jin***"
},
{
"user": "tham***"
},
{
"user": "ais***"
},
{
"user": "far***"
},
{
"user": "kart***"
},
{
"user": "par***"
},
{
"user": "nam***"
},
{
"user": "rac***"
},
{
"user": "ju***"
},
{
"user": "nasyh"
},
{
"user": "pray
"
},
{
"user": "sara***"
},
{
"user": "yuli***"
},
{
"user": "widiati"
},
{
"user": "irw
"
},
{
"user": "mahea"
},
{
"user": "ib
"
},
{
"user": "saa***"
},
{
"user": "pran***"
},
{
"user": "ind***"
},
{
"user": "hil***"
},
{
"user": "usa***"
},
{
"user": "purwo"
},
{
"user": "pras
o"
},
{
"user": "zel***"
},
{
"user": "ve***"
},
{
"user": "mayai"
},
{
"user": "mu
"
},
{
"user": "jef***"
},
{
"user": "situmng"
},
{
"user": "up
"
},
{
"user": "mari***"
},
{
"user": "dama***"
},
{
"user": "eg***"
},
{
"user": "nugr***"
},
{
"user": "rah***"
},
{
"user": "rai***"
},
{
"user": "oktavi"
},
{
"user": "ri
"
},
{
"user": "ophe***"
},
{
"user": "hari***"
},
{
"user": "heryo"
},
{
"user": "huta
"
},
{
"user": "cah***"
},
{
"user": "cay***"
},
{
"user": "nat***"
},
{
"user": "meli***"
},
{
"user": "rah***"
},
{
"user": "nasyh"
},
{
"user": "fath
h"
},
{
"user": "suryi"
},
{
"user": "ghali
i"
},
{
"user": "end***"
},
{
"user": "yulii"
},
{
"user": "lar
"
},
{
"user": "wijayi"
},
{
"user": "si
"
},
{
"user": "aza***"
},
{
"user": "yulii"
},
{
"user": "ok
"
},
{
"user": "mary***"
},
{
"user": "lal***"
},
{
"user": "puspai"
},
{
"user": "ir
"
},
{
"user": "anggri"
},
{
"user": "gas
"
},
{
"user": "widiati"
},
{
"user": "ha
"
},
{
"user": "mari***"
},
{
"user": "kurnin"
},
{
"user": "pi
"
},
{
"user": "lest***"
},
{
"user": "el***"
},
{
"user": "suryi"
},
{
"user": "luw
"
},
{
"user": "naj***"
},
{
"user": "lan***"
},
{
"user": "sihomg"
},
{
"user": "para
a"
},
{
"user": "sudi***"
},
{
"user": "lim***"
},
{
"user": "wina***"
},
{
"user": "jel***"
},
{
"user": "rahmai"
},
{
"user": "ag
"
},
{
"user": "megana"
},
{
"user": "anast
a"
},
{
"user": "kusmai"
},
{
"user": "el
"
},
{
"user": "uta***"
}
]

The badge query `?style=rounded` is not working

Description

  1. The badge query ?style=rounded is not working, the shape of the badge is still square.
  2. The 'Alternate badge style' button is not working, clicking has no effect.

Affected jsDelivr links

All links.

Response headers

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="140" height="20" role="img" aria-label="jsDelivr: 1B hits/month">
    <title>jsDelivr: 1B hits/month</title>
    <g shape-rendering="crispEdges">
        <rect width="51" height="20" fill="#555"/>
        <rect x="51" width="89" height="20" fill="#ff5627"/>
    </g>
    <g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
        <text x="265" y="140" transform="scale(.1)" fill="#fff" textLength="410">jsDelivr</text>
        <text x="945" y="140" transform="scale(.1)" fill="#fff" textLength="790">1B hits/month</text>
    </g>
</svg>

Information

  • Device OS: [e.g. iOS, Windows, MacOS]
    MacOS
  • Browser & Version: [e.g. Chrome 103, Safari 8, Firefox 108]
    Chrome LTS
  • VPN provider (if you use one)
  • Your location (country/region)

Requisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.
  • I understand that not filling out this template correctly will lead to the issue being closed.

Additional content

No response

sdfsdfsd

[
{
"user": "alm***"
},
{
"user": "novitri"
},
{
"user": "sil
"
},
{
"user": "par***"
},
{
"user": "zulkain"
},
{
"user": "cin
"
},
{
"user": "int***"
},
{
"user": "usa***"
},
{
"user": "ani***"
},
{
"user": "uta***"
},
{
"user": "lai***"
},
{
"user": "purwi"
},
{
"user": "nar
"
},
{
"user": "firgaro"
},
{
"user": "dim
"
},
{
"user": "raj***"
},
{
"user": "gila***"
},
{
"user": "tam***"
},
{
"user": "unja***"
},
{
"user": "nam***"
},
{
"user": "jam***"
},
{
"user": "kokou"
},
{
"user": "iswah
i"
},
{
"user": "ver***"
},
{
"user": "jasm***"
},
{
"user": "usa***"
},
{
"user": "bali*** "
},
{
"user": "harj*** "
},
{
"user": "anggran"
},
{
"user": "rah
"
},
{
"user": "mayai"
},
{
"user": "van
"
},
{
"user": "novitri"
},
{
"user": "sab
"
},
{
"user": "sitol"
},
{
"user": "bana
"
},
{
"user": "iswahi"
},
{
"user": "sit
"
},
{
"user": "zami***"
},
{
"user": "rah***"
},
{
"user": "gal***"
},
{
"user": "dama***"
},
{
"user": "ell***"
},
{
"user": "suari"
},
{
"user": "patri
"
},
{
"user": "oktavi"
},
{
"user": "nad
"
},
{
"user": "mut***"
},
{
"user": "perm***"
},
{
"user": "kama*** "
},
{
"user": "purwi"
},
{
"user": "rach
"
},
{
"user": "padmai"
},
{
"user": "mart
"
},
{
"user": "haryo"
},
{
"user": "cand
"
},
{
"user": "simbn"
},
{
"user": "am
"
},
{
"user": "palai"
},
{
"user": "arta
"
},
{
"user": "gat***"
},
{
"user": "mand***"
},
{
"user": "sabr*** "
},
{
"user": "nov***"
},
{
"user": "handai"
},
{
"user": "rusm
"
},
{
"user": "ari***"
},
{
"user": "suwa***"
},
{
"user": "kar***"
},
{
"user": "simanjak"
},
{
"user": "ken
"
},
{
"user": "kus***"
},
{
"user": "ay***"
},
{
"user": "yan***"
},
{
"user": "laksmti"
},
{
"user": "bana
"
},
{
"user": "raj***"
},
{
"user": "em***"
},
{
"user": "hida***"
},
{
"user": "wir***"
},
{
"user": "usa***"
},
{
"user": "unj***"
},
{
"user": "usa***"
},
{
"user": "beli***"
},
{
"user": "yulii"
},
{
"user": "adhia
"
},
{
"user": "lazui"
},
{
"user": "ve
"
},
{
"user": "kami*** "
},
{
"user": "mart*** "
},
{
"user": "dama***"
},
{
"user": "amel***"
},
{
"user": "uta***"
},
{
"user": "harj*** "
},
{
"user": "nri***"
},
{
"user": "tam***"
},
{
"user": "dana***"
},
{
"user": "raf***"
},
{
"user": "prada"
},
{
"user": "war
"
},
{
"user": "mahea"
},
{
"user": "bali
"
},
{
"user": "uma***"
},
{
"user": "hutagng"
},
{
"user": "luki
"
},
{
"user": "baktio"
},
{
"user": "hiday
o"
},
{
"user": "cap***"
},
{
"user": "wac***"
},
{
"user": "kari***"
},
{
"user": "firgaro"
},
{
"user": "uly
"
},
{
"user": "nura***"
},
{
"user": "arg***"
},
{
"user": "wal***"
},
{
"user": "su***"
},
{
"user": "mandai"
},
{
"user": "fath
h"
},
{
"user": "van***"
},
{
"user": "purwi"
},
{
"user": "jarw
"
},
{
"user": "mit***"
},
{
"user": "tarihn"
},
{
"user": "niy
"
},
{
"user": "narp***"
},
{
"user": "tim***"
},
{
"user": "sir***"
},
{
"user": "dim***"
},
{
"user": "najmn"
},
{
"user": "ghali
i"
},
{
"user": "riya***"
},
{
"user": "ek***"
},
{
"user": "oktavi"
},
{
"user": "el
"
},
{
"user": "sito***"
},
{
"user": "ka***"
},
{
"user": "wahy***"
},
{
"user": "darm***"
},
{
"user": "iswahi"
},
{
"user": "kan
"
},
{
"user": "yulii"
},
{
"user": "hen
"
},
{
"user": "jin***"
},
{
"user": "tham***"
},
{
"user": "ais***"
},
{
"user": "far***"
},
{
"user": "kart***"
},
{
"user": "par***"
},
{
"user": "nam***"
},
{
"user": "rac***"
},
{
"user": "ju***"
},
{
"user": "nasyh"
},
{
"user": "pray
"
},
{
"user": "sara***"
},
{
"user": "yuli***"
},
{
"user": "widiati"
},
{
"user": "irw
"
},
{
"user": "mahea"
},
{
"user": "ib
"
},
{
"user": "saa***"
},
{
"user": "pran***"
},
{
"user": "ind***"
},
{
"user": "hil***"
},
{
"user": "usa***"
},
{
"user": "purwo"
},
{
"user": "pras
o"
},
{
"user": "zel***"
},
{
"user": "ve***"
},
{
"user": "mayai"
},
{
"user": "mu
"
},
{
"user": "jef***"
},
{
"user": "situmng"
},
{
"user": "up
"
},
{
"user": "mari***"
},
{
"user": "dama***"
},
{
"user": "eg***"
},
{
"user": "nugr***"
},
{
"user": "rah***"
},
{
"user": "rai***"
},
{
"user": "oktavi"
},
{
"user": "ri
"
},
{
"user": "ophe***"
},
{
"user": "hari***"
},
{
"user": "heryo"
},
{
"user": "huta
"
},
{
"user": "cah***"
},
{
"user": "cay***"
},
{
"user": "nat***"
},
{
"user": "meli***"
},
{
"user": "rah***"
},
{
"user": "nasyh"
},
{
"user": "fath
h"
},
{
"user": "suryi"
},
{
"user": "ghali
i"
},
{
"user": "end***"
},
{
"user": "yulii"
},
{
"user": "lar
"
},
{
"user": "wijayi"
},
{
"user": "si
"
},
{
"user": "aza***"
},
{
"user": "yulii"
},
{
"user": "ok
"
},
{
"user": "mary***"
},
{
"user": "lal***"
},
{
"user": "puspai"
},
{
"user": "ir
"
},
{
"user": "anggri"
},
{
"user": "gas
"
},
{
"user": "widiati"
},
{
"user": "ha
"
},
{
"user": "mari***"
},
{
"user": "kurnin"
},
{
"user": "pi
"
},
{
"user": "lest***"
},
{
"user": "el***"
},
{
"user": "suryi"
},
{
"user": "luw
"
},
{
"user": "naj***"
},
{
"user": "lan***"
},
{
"user": "sihomg"
},
{
"user": "para
a"
},
{
"user": "sudi***"
},
{
"user": "lim***"
},
{
"user": "wina***"
},
{
"user": "jel***"
},
{
"user": "rahmai"
},
{
"user": "ag
"
},
{
"user": "megana"
},
{
"user": "anast
a"
},
{
"user": "kusmai"
},
{
"user": "el
"
},
{
"user": "uta***"
}
]

Rank badge

jsDelivr rank | #1

/package/npm/:name/badge/rank/:period?
/package/gh/:user/:repo/badge/rank/:period?

Implementation similar to the existing hits badge.

Looking up packages by query

Hi this is Oskar from JSFiddle.

I've been looking into using the API for our NPM needs, one thing that would be needed is a way to search for packages by the name string.

Is this by any chance on your roadmap for the API?

Add CORS preflight support for `v1/package/resolve/npm/x`

In Safari - when you make an API call to https://data.jsdelivr.com/v1/package/resolve/npm/react@latest, it will first send an OPTIONS request to validate CORs (at least according to this book and alternatively this implies it's a root URL request)

Screen Shot 2021-10-14 at 1 17 23 PM

This doesn't seem to happen in Chromium browsers though ๐Ÿก

You can reproduce by loading https://www.typescriptlang.org/play/?jsx=2&esModuleInterop=true&q=407#example/typescript-with-react in Safari

API CORS access issue via ByWave VPN

Describe the bug
CORS error for data.jsdelivr.com domain

Affected jsDelivr links
https://www.jsdelivr.com/package/npm/swiper

Response headers

age: 202
alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400
cf-cache-status: HIT
cf-ray: 666b3832791f195f-HKG
cf-request-id: 0af6e173890000195f9f133000000001
content-length: 82
content-type: text/html; charset=utf-8
date: Tue, 29 Jun 2021 01:00:43 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
location: https://data.jsdelivr.com/v1/package/npm/swiper
nel: {"report_to":"cf-nel","max_age":604800}
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v2?s=IACCOOPVNddm7kzzRgVDk1ABjHMW2xPkjK90yCyF0xLzmfOFYld7KKFfzmVrmoC%2FNFz%2FBQmKVY%2Bp7HsWBWrjJJ80CxHMf8CcYYn2UTph5FTLAOmtsqVOSKWSFsW%2FEDU%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
strict-transport-security: max-age=31536000; includeSubDomains; preload
vary: Accept-Encoding
x-content-type-options: nosniff

Screenshots
image

Please complete the following information:

  • Device OS: Windows 10 Pro 19041.1052
  • Browser: Microsoft Edge
  • Broser version: 91.0.864.59 (Official build) (64-bit)
  • VPN provider if you use one: ByWave
  • Your location (country): China

Additional context
If VPN is disconnected, the issue disappears. I guess the VPN vendor may have some proxy rules causing this problem but still this is weird because the VPN is a transparent proxy and the header is just missing. (The access-control-allow-origin: * header exists if VPN is disconnected.)

How search

How to do a search without resorting to Algolia and the Public Registry API?

Redis Persistence

Based on https://redis.io/topics/persistence the RDB method should work best for us. We want to cache all directory listings, as they can be expensive to generate, but loosing some data is OK (i.e. a snapshot every 24 hours is good enough).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.