Skip to content

[DOCS] Either fix corgi packument or use gzip for packument fetching #9149

Description

@saquibkhan

Is there an existing issue for this?

false

This is a CLI Docs Enhancement, not another kind of Docs Enhancement.

false

Description of Problem

The packument (package document) fetched during npm install is currently always the full/raw packument, not the minimized "corgi" version. Slack thread investigation shows that while gzip is used for audit endpoint responses, it is not consistently used for packument fetching. This means large packuments (e.g., for playwright) transfer similar data sizes whether raw or corgi, if gzipped. Currently, however, packument responses are typically uncompressed and only the full packument is used. This may lead to unnecessary data transfer, especially on large packages. The lack of gzip and not using the minimized corgi representation are both opportunities for improved efficiency.

Potential Solution

Either:

  1. Fix usage so npm install uses the minimized corgi packument (doc.min.json where appropriate), or
  2. Enable gzipping of packument fetch responses (by setting the right Accept-Encoding/request headers, and doc/unpacking correctly), as is done with audit endpoints.

Slack thread details the current evidence and code path for full packuments and gzip (see npm-registry-fetch and minipass-fetch layers for gzip handling). Either approach would reduce transfer size and could be a quick efficiency improvement for large packages.

Docs URL

#7126 ,

View original Slack conversation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions