diff --git a/src/run.js b/src/run.js index 9c799eb6..27008a46 100644 --- a/src/run.js +++ b/src/run.js @@ -1,5 +1,4 @@ const { Command } = require('commander') -const semver = require('semver') const { version } = require('../package.json') const { fetchRemote } = require('./remote') const { fetchTags } = require('./tags') @@ -76,9 +75,6 @@ const getOptions = async argv => { const getLatestVersion = async options => { if (options.latestVersion) { - if (!semver.valid(options.latestVersion)) { - throw new Error('--latest-version must be a valid semver version') - } return options.latestVersion } if (options.package) { diff --git a/test/run.js b/test/run.js index 4344e300..aed0457b 100644 --- a/test/run.js +++ b/test/run.js @@ -235,10 +235,4 @@ describe('run', () => { .then(() => done('Should throw an error')) .catch(() => done()) }) - - it('throws an error when given an invalid latest version', done => { - run(['', '', '--latest-version', 'invalid']) - .then(() => done('Should throw an error')) - .catch(() => done()) - }) })