-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
🛠️ Repo: Convert lib/utils.js to ESM #5964
Copy link
Copy link
Open
Labels
area: repository toolingconcerning ease of contributionconcerning ease of contributionsemver-majorimplementation requires increase of "major" version number; "breaking changes"implementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!
Milestone
Metadata
Metadata
Assignees
Labels
area: repository toolingconcerning ease of contributionconcerning ease of contributionsemver-majorimplementation requires increase of "major" version number; "breaking changes"implementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!Mocha can use your help with this one!
Sub-issue of #5400 (Switch from CJS to ESM internally).
lib/utils.jsis a widely-consumed utility module still written in CJS. It exports many helper functions viaexports.Xand is a dependency across much of the core runtime.File to convert
lib/utils.jsNotes
Per AGENTS.md CJS-to-ESM conventions:
export defaultutils.mjsconst { ... } = require("./utils.mjs")(destructured named imports)lib/— a search forrequire.*utilswill surface them all