actions / actions/toolkit

Regression in @actions/http-client 2.2.0 since 2.1.1: Bundle size increased by 820kB

Open
#1,621 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Regression in @actions/http-client 2.2.0 since 2.1.1: Bundle size increase by 820kB

In my case it increased from 320kB to 1130kB.

@actions/http-client is a dependency of @actions/core.

Since changes in @actions/http-client from version 2.1.1 to 2.2.0 the bundle size increased by 820kB as a result of adding the undici dependency to @actions/http-client.

Sorry to say, the @actions/core automatically installs the latest v2 of @actions/http-client which is now 2.2.0 and has terribly huge undici package.

Expected result

Replace the undici with something tiny. 820kB of source code to make http requests is ridiculous.

Additional Information

The root cause is here https://github.com/actions/toolkit/pull/1547 where the undici was added.

A lightweight HTTP client optimized for building actions

not "a lightweight" anymore.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the @actions/http-client changes between versions 2.1.1 and 2.2.0, especially the undici addition in actions/toolkit#1547. Compare the generated bundle sizes and identify a smaller HTTP-client approach; done means preserving HTTP behavior while addressing the reported 820kB increase.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.