actions / actions/toolkit

Azure SDK packages are not tree shakeable

Open
#825 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
Azure SDK modules are being packed although not being used at all.
They're being required by @actions/cache.

To Reproduce
Steps to reproduce the behavior:
Create an action that imports @actions/cache and pack it with ncc with --stats-out option
Analyzing the stats will show that the entire Azure sdk (and other modules) are being packed with the action, which doubles the action's bundle size.

Expected behavior
to have separate imports for cache & cache with Azure so it will be possible to import cache without Azure.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: OSX

Additional context
Add any other context about the problem here.

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

Reproduce the bundle using an action that imports @actions/cache and ncc with --stats-out, then inspect the generated stats for Azure SDK dependencies. Trace how @actions/cache imports its cache and Azure functionality; done means cache-only consumers no longer bundle the Azure SDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, nodejs, typescript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.