Skip to content

Commit

Permalink
debug value type of dryRun parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jstaresincic committed Sep 7, 2022
1 parent c90de08 commit 9a0530d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion delete-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports = async function (inputs) {
);
info("All packages list:");
packages = packages.filter((p) => {
info(p.name);
info("p: " + p.name);
return !p.name.startsWith("deleted_");
});

Expand Down
14 changes: 11 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ async function run() {
};
info("Input values:");
Object.entries(inputs).map((v) => info(v[0] + ": " + v[1]));
const deleted = await deleteVersions(inputs);
if (inputs.dryRun === "false") inputs.dryRun = false;
if (inputs.dryRun) {
info(
"Dry run is NOT deleting packages, list below is what would be deleted, dryRun: " + Number(inputs.dryRun)
"How do I receive dryRun? Type: " +
typeof inputs.dryRun +
" Value: " +
inputs.dryRun
);
info(
"Dry run is NOT deleting packages, list below is what would be deleted, dryRun: " +
Number(inputs.dryRun)
);
}
const deleted = await deleteVersions(inputs);
deleted.forEach((package) => {
package.versions.forEach((v) => {
info(`Deleted ${package.name} version ${v.version}`);
Expand Down

0 comments on commit 9a0530d

Please sign in to comment.