ci: ensure sourceId flag is cleaned up properly

This commit is contained in:
Johannes Loher 2021-10-02 16:19:45 +02:00
parent e1e6dc9401
commit 73a6ad4bbc

View file

@ -93,7 +93,7 @@ const jsonToNeDB = () =>
try {
file.contents = Buffer.from(
JSON.parse(file.contents.toString())
.map(cleanPackEntry)
.map((entry) => cleanPackEntry(entry))
.map((entry) => JSON.stringify(entry))
.join("\n") + "\n",
);
@ -131,7 +131,13 @@ const neDBToJSON = () =>
if (err) {
callback(err);
} else {
file.contents = Buffer.from(JSON.stringify(docs.map(cleanPackEntry), undefined, 4) + "\n");
file.contents = Buffer.from(
JSON.stringify(
docs.map((entry) => cleanPackEntry(entry)),
undefined,
4,
) + "\n",
);
file.path = path.join(
path.dirname(file.path),
path.basename(file.path, path.extname(file.path)) + ".json",