Skip to content

Consider dependency changes #371

@outslept

Description

@outslept

Hey, I was wondering if you are open to dependency changing PRs?

  1. chalk

This could be replaced by picocolors or ansis - both of which are much smaller and dedupe better

  1. execa

This could be replace by tinyexec - better dedupe as a result.

  1. get-stdin

As per project's README https://github.com/sindresorhus/get-stdin#tip you can now achieve this functionality with Node (and you engines supports this)

  1. file-exists

A tiny helper using fs.access() + fs.stat() should be sufficient.

  1. file-extension

We can "modernize" the code under the hood and use something like

function fileExtension(name = "", { preserveCase = false } = {}) {
  const i = Math.max(name.lastIndexOf('.'), name.lastIndexOf('/'), name.lastIndexOf('\'));
  const ext = name.slice(i + 1);
  return preserveCase ? ext : ext.toLowerCase();
}

Semantics are the same and the code is more readable in my opinion.

  1. lodash

Most of the usage is Object.entries + Object.fromEntries. For .omit it's something like

Object.fromEntries(Object.entries(presetSettings).filter(([k]) => !this.ignoredSettings.includes(k)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions