Skip to content

Dependency & packaging cleanup #11

@dalberola

Description

@dalberola

Dependency hygiene in packages/dredd (mostly [verified]).

  • chai@4.5.0 is in dependencies but never imported in lib/ (grep confirms it's test-only) — it ships to end users. Move to devDependencies. First confirm no hooks docs promise that Dredd provides chai transitively. [verified]
  • Stale htmlencode@0.0.5 (2013) used for XML escaping in packages/dredd/lib/reporters/XUnitReporter.js, and html@1.0.0 in prettifyResponse.js. Evaluate maintained alternatives (entities / he). [verified]
  • Winston is already 3.19.0 but the v2 compat shim and the "once we upgrade Winston, simplify to .log(loggerInfo)" FIXME remain at packages/dredd/lib/Dredd.js:226-234. Simplification is now unblocked. [verified]
  • proxyquire is used at runtime to load hook files (addHooks.js) — heavyweight for one use; consider a lighter mechanism. (Note, not a bug.)
  • Revisit resolutions.ansi-regex: 5.0.1 — install warns it's incompatible with requested ^6.x. [verified]

(Not a finding: resolutions.lodash: 4.18.1 is valid — that is the current latest.)

Tasks

  • Move chai to devDependencies (after confirming hook docs).
  • Replace/justify htmlencode and html.
  • Remove the Winston-2 compat shim and stale FIXME.
  • Revisit the ansi-regex resolution pin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions