mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
fix(v2): update notifier should never suggest to downgrade (#4784)
see https://github.com/yeoman/update-notifier/pull/192
This commit is contained in:
parent
3c6a0ac97e
commit
dd8d650900
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ if (notifier.lastUpdateCheck === Date.now()) {
|
|||
notifier.lastUpdateCheck = 0;
|
||||
}
|
||||
|
||||
if (notifier.update && notifier.update.current !== notifier.update.latest) {
|
||||
if (notifier.update && semver.gt(this.update.latest, this.update.current)) {
|
||||
// eslint-disable-next-line import/no-dynamic-require, global-require
|
||||
const sitePkg = require(path.resolve(process.cwd(), 'package.json'));
|
||||
const siteDocusaurusPackagesForUpdate = Object.keys(sitePkg.dependencies)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue