Skip to content

🛠️ Repo: Convert lib/reporters/base.js to ESM #5963

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Sub-issue of #5400 (Switch from CJS to ESM internally).

lib/reporters/base.js is the last remaining CJS file among reporters. All other reporters (doc, dot, html, json, json-stream, landing, list, markdown, min, nyan, progress, spec, tap, xunit) have already been converted to .mjs.

File to convert

  • lib/reporters/base.js

Notes

Per AGENTS.md CJS-to-ESM conventions:

  • Prefer named exports over export default
  • Rename to base.mjs
  • Update all consumers to use const { ... } = require("./base.mjs") (destructured named imports)
  • The lib/reporters/index.js CJS re-export shim will need to be updated to reference base.mjs

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: repository toolingconcerning ease of contributionsemver-majorimplementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions