Skip to content

Commit

Permalink
Merge pull request #19569 from eirslett-visma/feature/bump-update-not…
Browse files Browse the repository at this point in the history
…ifier-library

Update the version of the "update-notifier" package
  • Loading branch information
shilman authored Oct 21, 2022
2 parents a21931e + 63dcb4d commit 6281805
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 176 deletions.
6 changes: 3 additions & 3 deletions code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"shelljs": "^0.8.5",
"strip-json-comments": "^3.0.1",
"ts-dedent": "^2.0.0",
"update-notifier": "^5.0.1",
"update-notifier": "^6.0.2",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
Expand All @@ -83,11 +83,11 @@
"@types/puppeteer-core": "^2.1.0",
"@types/semver": "^7.3.4",
"@types/shelljs": "^0.8.7",
"@types/update-notifier": "^5.0.0",
"@types/update-notifier": "^6.0.1",
"@types/util-deprecate": "^1.0.0",
"strip-json-comments": "^3.1.1",
"typescript": "~4.6.3",
"update-notifier": "^5.0.1"
"update-notifier": "^6.0.2"
},
"publishConfig": {
"access": "public"
Expand Down
5 changes: 3 additions & 2 deletions code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UpdateNotifier, Package } from 'update-notifier';
import type { Package } from 'update-notifier';
import chalk from 'chalk';
import prompts from 'prompts';
import { telemetry } from '@storybook/telemetry';
Expand Down Expand Up @@ -270,7 +270,8 @@ export async function initiate(options: CommandOptions, pkg: Package): Promise<v
}

// Update notify code.
new UpdateNotifier({
const { default: updateNotifier } = await import('update-notifier');
updateNotifier({
pkg,
updateCheckInterval: 1000 * 60 * 60, // every hour (we could increase this later on.)
}).notify();
Expand Down
Loading

0 comments on commit 6281805

Please sign in to comment.