Skip to content

Drop unused content-disposition dependency #4979

@aglinxinyuan

Description

@aglinxinyuan

Task Summary

download.service.ts carries a top-level var contentDisposition = require("content-disposition") that is never read or called anywhere in the file or in the rest of frontend/src. The dependency itself is therefore dead — drop it along with its @types/content-disposition companion, and clean up the bundled-license roll-up for the transitive packages that fall out with it.

Probe Result
grep -rn 'contentDisposition' frontend/src 1 hit — the require line itself; no read sites
grep -rn 'content-disposition' frontend/src 1 hit — same line
Runtime use of contentDisposition none
Compile use of @types/content-disposition none (the require returns any since it's CommonJS)

Before → After (download.service.ts):

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

Concrete edits:

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

Task Type

  • Refactor / Cleanup

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions