1.0.6 • Published 3 years ago
vscode-auto-update v1.0.6
VSCode Auto-Update
VSCode library that allows private extensions to automatically update
How to use
- install package (
vscode-auto-update) - import checker
import { AutoUpdateChecker } from 'vscode-auto-update' - add relevant fields to
package.json - start checker
new AutoUpdateChecker({ ... })(check options for params) - you're good to go
Package.json config
To use this extension, ensure the following:
- Your
package.jsonfile contains apublishConfigfield that contains aregistryvalue. (use https://registry.npmjs.org/ when using NPM) - The uploaded packge contains exactly 1
.vsixfile (does not matter where).
Options
config.friendlyName (string)- Friendly name of extension, is displayed to the user when prompting for update permissionconfig.requireUserConfirmation (bool)- Whether to wait for user approval or to just install immediatelyconfig.forceUpdateOnTag (string, optional)- If provided, force update without asking for user confirmation if a version with the given tag exists in the registry. See npm docs for more info on dist tags.config.onCheckFail ('notify'|'ignore')- Warn the user when checking fails or not. Ignore is generally best here since the user being offline should not warrant a warning.config.onUpdateAvailable (callback, optional)- Optional callback that can change behavior of installationconfig.onUpdateInstalled (callback, optional)- Optional callback that can change behavior after updatingconfig.checkInterval (number, default 1 hour)- Interval by which checking occursconfig.remote (object)- contains info about remote to useconfig.remote.context (ExtensionContext)- VSCode extension context. Used to determine remote (see below).
Change Log
1.0.6
- Add
onUpdateInstalledcallback
1.0.5
onUpdateAvailablecan now return a promise
1.0.4
- Reduce reload wait time even more (5s to 3s)
- Make it so on-extensions-changed listener is placed before install action.
1.0.3
- Support force-updating
1.0.2
- Reduce reload wait time (from 10s to 5s)
1.0.1
- Reduce unnecessary files in package
- Include sourcemap
1.0.0
- Initial release