chore(deps): update update-notifier to 7.0.0 #1544
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates
update-notifier
to 7.0.0. Becauseupdate-notifier
is now an ESM, this required several additional steps.update-notifier
is imported viaawait import
- that's the only way to import ESM from CJSbabel
tries to replaceawait import
withPromise.resolve().then(() => _interopRequireWildcard(require('update-notifier'))
, I had to disable the@babel/plugin-proposal-dynamic-import
plugin.proxy-agent
tests becausejest
did not likeawait import
and insisted on the ESM-enabled environment. Luckily, the test works without dynamic imports.update-notifier
whenNODE_ENV=test
because I did not want to installcross-env
and passNODE_OPTIONS=--experimental-vm-modules
to keep Jest happy. However, we may need to do this someday.As a bonus, we have four less medium security vulnerabilities.
Steps to Test
npm run build; ./dist/bin/vip.js
should work (it will invokeupdate-notifier
; there should be no errors coming from Node.js). E2E tests will also catch an error here.