@@ -38,12 +38,15 @@ for (const [location, locked] of Object.entries(lock.packages ?? {}).sort(
|
||||
const texts = [];
|
||||
for (const candidate of candidates) {
|
||||
try {
|
||||
texts.push(
|
||||
"--- " +
|
||||
candidate +
|
||||
" ---\n" +
|
||||
(await readFile(path.join(packageDirectory, candidate), "utf8")),
|
||||
);
|
||||
const licenceText = (
|
||||
await readFile(path.join(packageDirectory, candidate), "utf8")
|
||||
)
|
||||
.replace(/\r\n?/gu, "\n")
|
||||
.split("\n")
|
||||
.map((line) => line.trimEnd())
|
||||
.join("\n")
|
||||
.trimEnd();
|
||||
texts.push("--- " + candidate + " ---\n" + licenceText);
|
||||
} catch {
|
||||
/* directory */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user