Skip to content

chore(deps): drop unused content-disposition dependency#4980

Open
aglinxinyuan wants to merge 2 commits intoapache:mainfrom
aglinxinyuan:chore/drop-content-disposition
Open

chore(deps): drop unused content-disposition dependency#4980
aglinxinyuan wants to merge 2 commits intoapache:mainfrom
aglinxinyuan:chore/drop-content-disposition

Conversation

@aglinxinyuan
Copy link
Copy Markdown
Contributor

@aglinxinyuan aglinxinyuan commented May 7, 2026

What changes were proposed in this PR?

download.service.ts carried a top-level var contentDisposition = require("content-disposition") that was never read or called. Removing the dead require lets us drop the content-disposition runtime dep and its @types/content-disposition companion, plus the now-stale bundled-license entries for the transitive packages that fell out with it.

File Change
frontend/src/app/dashboard/service/user/download/download.service.ts drop the dead require("content-disposition") line
frontend/package.json remove content-disposition (deps) and @types/content-disposition (devDeps)
frontend/LICENSE-binary drop content-disposition@0.5.4 plus 5 transitives no longer bundled (base64-js, buffer, ieee754, path-browserify, safe-buffer)
frontend/yarn.lock regenerated — drops the transitive entries for free

Before → After (download.service.ts):

  ┌──────────────────────────────────────────────────────────────────┐
  │ ...imports...                                                    │
  │                                                                  │
  │ var contentDisposition = require("content-disposition");  ← dead │
  │                                                                  │
  │ export const EXPORT_BASE_URL = ...                               │
  └──────────────────────────────────────────────────────────────────┘
                                    ↓
  ┌──────────────────────────────────────────────────────────────────┐
  │ ...imports...                                                    │
  │                                                                  │
  │ export const EXPORT_BASE_URL = ...                               │
  └──────────────────────────────────────────────────────────────────┘

Any related issues, documentation, discussions?

Closes #4979.

How was this PR tested?

  • yarn install succeeds and rewrites yarn.lock (transitive entries fall away)
  • yarn build exits 0
  • yarn test stays at 63 / 269 parity
  • CI's check_binary_deps.py --ignore-transitive-version npm …/3rdpartylicenses.json will be the final arbiter on the LICENSE-binary cleanup

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

`download.service.ts` had a top-level
`var contentDisposition = require("content-disposition")` that was never read
or called. Removed the dead require, then dropped both `content-disposition`
and `@types/content-disposition` from package.json (and the bundled-license
roll-up). yarn.lock loses the transitive entries for free.

Closes apache#4979.
Copilot AI review requested due to automatic review settings May 7, 2026 08:18
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file frontend Changes related to the frontend GUI labels May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unused content-disposition require from the frontend download service and cleans up the corresponding direct dependencies and licensing manifests to keep the frontend dependency set lean.

Changes:

  • Removed dead require("content-disposition") from download.service.ts.
  • Dropped content-disposition and @types/content-disposition from frontend/package.json.
  • Updated frontend/yarn.lock and frontend/LICENSE-binary to reflect the dependency cleanup.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
frontend/src/app/dashboard/service/user/download/download.service.ts Removes unused content-disposition require.
frontend/package.json Deletes direct runtime + typings dependencies for content-disposition.
frontend/LICENSE-binary Removes content-disposition@0.5.4 entry from the bundled license manifest.
frontend/yarn.lock Regenerated lockfile reflecting dependency graph updates after removal.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aglinxinyuan aglinxinyuan requested a review from bobbai00 May 7, 2026 08:29
…nsitives

The 5 packages flagged by check_binary_deps.py (base64-js, buffer, ieee754,
path-browserify, safe-buffer) were only bundled because content-disposition
pulled them in transitively. Once content-disposition itself is gone, they
fall out of the webpack bundle and the LICENSE-binary entries are stale.
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.71%. Comparing base (b9bbf0d) to head (972c66e).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4980      +/-   ##
============================================
- Coverage     42.71%   42.71%   -0.01%     
  Complexity     2185     2185              
============================================
  Files          1032     1032              
  Lines         38161    38160       -1     
  Branches       4006     4006              
============================================
- Hits          16301    16300       -1     
  Misses        20840    20840              
  Partials       1020     1020              
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø) Carriedforward from b9bbf0d
agent-service 33.72% <ø> (ø) Carriedforward from b9bbf0d
amber 43.18% <ø> (ø) Carriedforward from b9bbf0d
computing-unit-managing-service 0.00% <ø> (ø) Carriedforward from b9bbf0d
config-service 0.00% <ø> (ø) Carriedforward from b9bbf0d
file-service 32.18% <ø> (ø) Carriedforward from b9bbf0d
frontend 33.08% <ø> (-0.01%) ⬇️
python 88.90% <ø> (ø) Carriedforward from b9bbf0d
workflow-compiling-service 47.72% <ø> (ø) Carriedforward from b9bbf0d

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop unused content-disposition dependency

3 participants