-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
umbrella issueThis issue contains a list of dependents of a package and tracks the progress in eachThis issue contains a list of dependents of a package and tracks the progress in each
Description
Currently it has 107 direct dependencies, and many more non-direct. It's worth cleaning them up.
Modules that can be replaced with other modules:
chalk->picocolors(mainly a size win)- chokidar v3 -> v4 upgrade, -11 deps (if I remember correctly)
find-up-> empathic, -7 depsdot-prop-> dlv + dset, might be that only one is neededexeca-> tinyexec
Modules that can be removed in favor of 1-3 lines of code:
is-streamp-filter:
const filteredItems = await Promise.all(
items.map(async (item) => {
const shouldKeep = await someAsyncCondition(item); // Replace with your async condition
return shouldKeep ? item : null;
})
).then((results) => results.filter((item) => item !== null));p-map, probably could be replaced withPromise.allp-wait-for:
const waitFor = async (condition, interval = 100) => {
while (!(await condition())) {
await new Promise((resolve) => setTimeout(resolve, interval));
}
};through2-filter:
const { Transform } = require('node:stream');
const filterStream = new Transform({
decodeStrings: false,
transform(chunk, encoding, callback) {
if (chunk.includes('foo')) { // Example filter condition
this.push(chunk);
}
callback();
},
});
process.stdin
.pipe(filterStream)
.pipe(process.stdout);from2-array:
const { Readable } = require('node:stream');
const arrayToStream = (array) => {
return new Readable({
objectMode: true,
read() {
array.forEach((item) => this.push(item));
this.push(null);
},
});
};tempy->os.tmpdir()+fs.createFile/fs.mkdirhasha->crypto.createHash('sha512').digest()
PRs:
- remove
hasha: chore(deps): remove hasha netlify/cli#7017
sarahetter, talentlessguy and charkour
Metadata
Metadata
Assignees
Labels
umbrella issueThis issue contains a list of dependents of a package and tracks the progress in eachThis issue contains a list of dependents of a package and tracks the progress in each