Skip to content

outdated CJS-only dependencies #1450

@cristiand391

Description

@cristiand391

This issue tracks some of the dependencies that are at least 1 major behind but cannot update b/c they don't have CJS builds (which breaks supported CJS CLIs):

The following deps come (mostly?) fromsindresorhus and have switched to ESM-only builds in a major:

  • is-wsl using v2, latest is v3
  • widest-line using v3, latest is v5
  • string-width using v4, latest is v7
  • supports-color using v8, latest is 10

As long as we keep supporting CJS we should either replace usage of these deps or wait until node stabilizes requireing ESM from CJS (currently in RC state):
https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require

One of the requirements for this to work is that the ESM modules should not have TLA, is-wsl doesn't:
https://github.com/sindresorhus/is-wsl/blob/main/index.js

If all of the listed deps don't have TLA in their exports, the feature is GA and supported in our minimum required node version in oclif then we should give it a try and bump everything.

related:
#1234

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions