-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add messaging to use new package #420
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,13 @@ | |
|
||
const yargs = require('yargs'); | ||
const updateNotifier = require('update-notifier'); | ||
const chalk = require('chalk'); | ||
|
||
const { logger } = require('@hubspot/cms-lib/logger'); | ||
const { logErrorInstance } = require('@hubspot/cms-lib/errorHandlers'); | ||
const { setLogLevel, getCommandName } = require('../lib/commonOpts'); | ||
const { trackHelpUsage } = require('../lib/usageTracking'); | ||
const pkg = require('../package.json'); | ||
const { version } = require('../package.json'); | ||
|
||
const removeCommand = require('../commands/remove'); | ||
const initCommand = require('../commands/init'); | ||
|
@@ -27,10 +28,16 @@ const listCommand = require('../commands/list'); | |
const openCommand = require('../commands/open'); | ||
const mvCommand = require('../commands/mv'); | ||
|
||
// Point update-notifier towards @hubspot/cli | ||
const pkg = { name: '@hubspot/cli', version }; | ||
|
||
const notifier = updateNotifier({ pkg }); | ||
|
||
notifier.notify({ | ||
shouldNotifyInNpmScript: true, | ||
message: | ||
chalk.bold('The CMS CLI is now the HubSpot CLI') + | ||
'\n\nTo upgrade, run:\n\nnpm uninstall -g @hubspot/cms-cli\nand npm install -g @hubspot/cli', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if we adjust the logic such that we're detecting that this code is part of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point, updated |
||
}); | ||
|
||
const argv = yargs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I'm not clear on is if
cms-cli
version will continue to increment withcli
? If so, we'll probably want to hard code this to a lower version numberThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plan is to continue using the same version scheme so that the tags / versions in the repo continue to be meaningful. We'll start with 3.0 for the
@hubspot/cli
release so that there is adequate space in the versioning scheme for@hubspot/cms-cli
should a patch be needed.