-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
Hey, I was wondering if you are open to dependency changing PRs?
chalk
This could be replaced by picocolors or ansis - both of which are much smaller and dedupe better
execa
This could be replace by tinyexec - better dedupe as a result.
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)
file-exists
A tiny helper using fs.access() + fs.stat() should be sufficient.
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.
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
Labels
No labels