惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
罗磊的独立博客
J
Java Code Geeks
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
Jina AI
Jina AI
F
Fortinet All Blogs
H
Help Net Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Last Week in AI
Last Week in AI
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
C
Check Point Blog
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Useful vscode extension patterns - Update Notification
Frederik Hudák · 2026-05-30 · via DEV Community

Frederik Hudák

Basic problem - when you ship a new version, you want users to know and look at what's changed.

I will demonstrate a simple pattern you can reuse in your extension. The result is exactly this:

notification

Don't wing it

Winging a notification on startup introduces two problems:

  • brand-new installs get a toast for software they just installed
  • the toast fires again on every window reload. your users will uninstall.

Proper solution

On activation, compare the running version against the last version you told the user about. The "last notified" version is persisted in globalState, which is shared across all windows and survives restarts.

stored == none     → fresh install   → store silently, never notify
stored == current  → reload/restart  → silent
current  > stored  → update          → store, notify if the bump clears the user's preference
current  < stored  → downgrade       → store, stay silent

We also introduce a user preference where they can set if they want to be notified about major/minor/patch versions.

Don't overcomplicate the changelog

It can and should be dead simple - you don't need a webview. Keep a CHANGELOG.md, bundle it with the extension, then have the "what's new" button open a preview.

const uri = vscode.Uri.joinPath(context.extensionUri, 'CHANGELOG.md');
await vscode.commands.executeCommand('markdown.showPreview', uri);

Side benefit

When your extension inevitably becomes compromised and the hackers publish a malicious new version for you, at least your users get a nice toast message.

I don't think they'll bother to add a changelog entry though.

Example code

Self-contained example extension can be found here:
https://github.com/FreHu/vscode-update-notification

The example was carved out from my larger extension, Fresh File Explorer

I have a few more up my sleeve and plan to turn this into a short series with similar self-contained examples.