Create Syncpack Issue Reproduction
Delete all files in the current directory except for this script, lerna.json
, package.json
, pnpm-workspace.yaml
, and syncpack.config.cjs
. Also delete all empty directories except for the .git
directory.
Put this script at create-syncpack-issue-reproduction.js
in the root of the repo.
const child_process = require("child_process");
const fs = require("fs");
child_process.exec("find . -type f", (err, stdout) => {
if (err) {
console.error(err);
return;
}
stdout
.trim()
.split("\n")
.forEach((file) => {
if (
file.endsWith("./create-syncpack-issue-reproduction.js") ||
file.endsWith("/lerna.json") ||
file.endsWith("/package.json") ||
file.endsWith("/pnpm-workspace.yaml") ||
file.endsWith("/syncpack.config.cjs") ||
file.includes("/.git/")
) {
return;
}
console.log(file);
fs.unlinkSync(file);
});
});
// delete empty folders, but not in the .git dir
child_process.exec("find . -type d -empty -delete", (err) => {
if (err) {
console.error(err);
}
console.log("deleted empty directories");
});