From 52a0c2069de5b77d9257524a823ea7be110fe5f7 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Mon, 25 Sep 2023 17:53:46 -0400 Subject: [PATCH 1/5] src: Rebrand "ppm --version" ("atom" --> "pulsar") We're not finding/printing the Atom version, we're finding/printing the Pulsar version. Rebrand this little bit of `ppm --version`. --- src/apm-cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apm-cli.js b/src/apm-cli.js index 56739d31..b03f6102 100644 --- a/src/apm-cli.js +++ b/src/apm-cli.js @@ -119,7 +119,7 @@ const printVersions = function(args, callback) { apm: apmVersion, npm: npmVersion, node: nodeVersion, - atom: atomVersion, + pulsar: atomVersion, python: pythonVersion, git: gitVersion, nodeArch: process.arch @@ -136,7 +136,7 @@ const printVersions = function(args, callback) { ${'apm'.red} ${apmVersion.red} ${'npm'.green} ${npmVersion.green} ${'node'.blue} ${nodeVersion.blue} ${process.arch.blue} -${'atom'.cyan} ${atomVersion.cyan} +${'pulsar'.cyan} ${atomVersion.cyan} ${'python'.yellow} ${pythonVersion.yellow} ${'git'.magenta} ${gitVersion.magenta}\ `; From 47d04263ed627e4491d25536b54cbbeefca2350a Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Mon, 25 Sep 2023 18:28:43 -0400 Subject: [PATCH 2/5] src: Rebrand "ppm --version" ("apm" --> "ppm") --- src/apm-cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apm-cli.js b/src/apm-cli.js index b03f6102..70725e1b 100644 --- a/src/apm-cli.js +++ b/src/apm-cli.js @@ -116,7 +116,7 @@ const printVersions = function(args, callback) { let versions; if (args.json) { versions = { - apm: apmVersion, + ppm: apmVersion, npm: npmVersion, node: nodeVersion, pulsar: atomVersion, @@ -133,7 +133,7 @@ const printVersions = function(args, callback) { if (gitVersion == null) { gitVersion = ''; } if (atomVersion == null) { atomVersion = ''; } versions = `\ -${'apm'.red} ${apmVersion.red} +${'ppm'.red} ${apmVersion.red} ${'npm'.green} ${npmVersion.green} ${'node'.blue} ${nodeVersion.blue} ${process.arch.blue} ${'pulsar'.cyan} ${atomVersion.cyan} From 6119199a1f1c5a4b18a7bb6ed5459f415db1b90d Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 1 Oct 2023 12:41:13 -0400 Subject: [PATCH 3/5] src: Restore atom and apm properties to JSON output of --version It's reasonable to guess this JSON output is being read programmatically *somewhere*. Leaving all old properties in-place is a slightly more conservative change we can make, even while adding *new* properties. --- src/apm-cli.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apm-cli.js b/src/apm-cli.js index 70725e1b..d872af33 100644 --- a/src/apm-cli.js +++ b/src/apm-cli.js @@ -116,9 +116,11 @@ const printVersions = function(args, callback) { let versions; if (args.json) { versions = { + apm: apmVersion, ppm: apmVersion, npm: npmVersion, node: nodeVersion, + atom: atomVersion, pulsar: atomVersion, python: pythonVersion, git: gitVersion, From 6ceabf1042e661d3e81c273095707f19e60d4735 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 1 Oct 2023 13:31:17 -0400 Subject: [PATCH 4/5] spec: Rename apm-cli.js to apm-cli-spec.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This file's name was meaningfully changed during decaf -- Our test framework won't run tests if their filename doesn't end with `spec`! Restore the `-spec` in the filename so these tests will run again! Credit to @2colours for noticing and reporting this! Co-authored-by: Polgár Márton --- spec/{apm-cli.js => apm-cli-spec.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spec/{apm-cli.js => apm-cli-spec.js} (100%) diff --git a/spec/apm-cli.js b/spec/apm-cli-spec.js similarity index 100% rename from spec/apm-cli.js rename to spec/apm-cli-spec.js From 0d7bf2a73fcde3729de0790de40bd3baa30327e5 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 1 Oct 2023 13:38:21 -0400 Subject: [PATCH 5/5] spec: Adjust expected output for ppm --version --- spec/apm-cli-spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/apm-cli-spec.js b/spec/apm-cli-spec.js index b43c1c9f..8fd9b5e5 100644 --- a/spec/apm-cli-spec.js +++ b/spec/apm-cli-spec.js @@ -42,10 +42,10 @@ describe('apm command line interface', () => { expect(console.error).not.toHaveBeenCalled(); expect(console.log).toHaveBeenCalled(); const lines = console.log.argsForCall[0][0].split('\n'); - expect(lines[0]).toBe(`apm ${require('../package.json').version}`); + expect(lines[0]).toBe(`ppm ${require('../package.json').version}`); expect(lines[1]).toBe(`npm ${require('npm/package.json').version}`); expect(lines[2]).toBe(`node ${process.versions.node} ${process.arch}`); - expect(lines[3]).toBe(`atom ${testAtomVersion}`); + expect(lines[3]).toBe(`pulsar ${testAtomVersion}`); }); }); }); @@ -60,7 +60,7 @@ describe('apm command line interface', () => { expect(console.error).not.toHaveBeenCalled(); expect(console.log).toHaveBeenCalled(); const lines = console.log.argsForCall[0][0].split('\n'); - expect(lines[0]).toBe(`apm ${require('../package.json').version}`); + expect(lines[0]).toBe(`ppm ${require('../package.json').version}`); expect(lines[1]).toBe(`npm ${require('npm/package.json').version}`); expect(lines[2]).toBe(`node ${process.versions.node} ${process.arch}`); }); @@ -78,7 +78,7 @@ describe('apm command line interface', () => { expect(console.error).not.toHaveBeenCalled(); expect(console.log).toHaveBeenCalled(); const lines = console.log.argsForCall[0][0].split('\n'); - expect(lines[3]).toBe(`atom ${testAtomVersion}`); + expect(lines[3]).toBe(`pulsar ${testAtomVersion}`); }); }); });