From cb471277708ce5f8f8ffa394bf192f492ccaa315 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Wed, 13 Dec 2023 01:10:18 -0500 Subject: [PATCH 1/3] src: Delete unused variable in uninstall.js Follow-up to some code removal in PR 103. --- src/uninstall.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/uninstall.js b/src/uninstall.js index a5eb7f1e..680ebfe4 100644 --- a/src/uninstall.js +++ b/src/uninstall.js @@ -59,7 +59,6 @@ Delete the installed package(s) from the ~/.pulsar/packages directory.\ packageDirectory = path.join(packagesDirectory, packageName); const packageManifestPath = path.join(packageDirectory, 'package.json'); if (fs.existsSync(packageManifestPath)) { - const packageVersion = this.getPackageVersion(packageDirectory); fs.removeSync(packageDirectory); } else if (!options.argv.hard) { throw new Error(`No package.json found at ${packageManifestPath}`); From 2dbc952af0493ce619bdefb7851725705e869f60 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Wed, 13 Dec 2023 23:07:15 -0500 Subject: [PATCH 2/3] src: Delete more unused code in uninstall.js Co-authored-by: confused-Techie --- src/uninstall.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/uninstall.js b/src/uninstall.js index 680ebfe4..904a0674 100644 --- a/src/uninstall.js +++ b/src/uninstall.js @@ -27,14 +27,6 @@ Delete the installed package(s) from the ~/.pulsar/packages directory.\ return options.boolean('hard').describe('hard', 'Uninstall from ~/.pulsar/packages and ~/.pulsar/dev/packages'); } - getPackageVersion(packageDirectory) { - try { - return CSON.readFileSync(path.join(packageDirectory, 'package.json'))?.version; - } catch (error) { - return null; - } - } - async run(options) { options = this.parseOptions(options.commandArgs); const packageNames = this.packageNamesFromArgv(options.argv); From 13a67c5244cc3188b2160423d1f49225f9350885 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 14 Dec 2023 21:58:47 -0500 Subject: [PATCH 3/3] src: Delete unused require() of 'season' package Co-authored-by: confused-Techie --- src/uninstall.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/uninstall.js b/src/uninstall.js index 904a0674..c0322701 100644 --- a/src/uninstall.js +++ b/src/uninstall.js @@ -2,7 +2,6 @@ const path = require('path'); const async = require('async'); -const CSON = require('season'); const yargs = require('yargs'); const Command = require('./command');