8000 Minimal version deprecation change by igorkofman · Pull Request #252293 · microsoft/vscode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Minimal version deprecation change #252293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

igorkofman
Copy link
@igorkofman igorkofman commented Jun 24, 2025

This change adds support for deprecating specific version of extensions. To test, serve a deprecation manifest which has a deprecatedVersion set. Any versions of the extension at or below the deprecatedVersion will be marked deprecated.

@igorkofman
Copy link
Author

@isidorn @sandy081

Thanks for the feedback. Here's a much more minimal change.

Reverted the refactoring that split the null check into two separate if statements.
The change was non-functional - both approaches are equivalent.
Reverted the addition of explicit type annotation (setting: string) that was
added in the previous commit.
Reverted the addition of the onChange listener that was updating extension
enablement state when extensions were installed/uninstalled/updated.
Also removed the IExtensionsWorkbenchService dependency.
Only removed the onChange listener that was added for updating extension
enablement on install/uninstall/update events. Kept the service dependency
as it's used elsewhere in the class.
- Combined isExtensionDeprecated check with ternary operator to use 'deprecated' variable name
- Removed unnecessary comment
- Kept template string unchanged
Removed two onChange listeners that were re-rendering widgets on extension changes.
- Removed unused service injections from two widget constructors
- Removed extra blank line in extensionsList.ts
@igorkofman
Copy link
Author
igorkofman commented Jun 24, 2025

Tested extensively locally.

igorkofman and others added 2 commits June 24, 2025 12:20
- Remove unnecessary intermediate variable
- Directly use semver.lte() in conditional check
- Keep duplication minimal between files for clarity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@igorkofman igorkofman marked this pull request as ready for review June 24, 2025 19:30
@@ -53,7 +61,7 @@ export async function migrateUnsupportedExtensions(extensionManagementService: I

let preReleaseExtension = installed.find(i => areSameExtensions(i.identifier, { id: preReleaseExtensionId }));
if (!preReleaseExtension || (!preReleaseExtension.isPreReleaseVersion && isUnsupportedExtensionEnabled)) {
preReleaseExtension = await extensionManagementService.installFromGallery(gallery, { installPreReleaseVersion: true, isMachineScoped: unsupportedExtension.isMachineScoped, operation: InstallOperation.Migrate, context: { [EXTENSION_INSTALL_SKIP_PUBLISHER_TRUST_CONTEXT]: true } });
preReleaseExtension = await extensionManagementService.installFromGallery(gallery, { installPreReleaseVersion: preRelease, isMachineScoped: unsupportedExtension.isMachineScoped, operation: InstallOperation.Migrate, context: { [EXTENSION_INSTALL_SKIP_PUBLISHER_TRUST_CONTEXT]: true } });
Copy link
Author
@igorkofman igorkofman Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is potentially a bug in the existing implementation as it results in a "pre-release" badge on the extension. Ok skipping this but seems correct to include.

@igorkofman
Copy link
Author

@microsoft-github-policy-service agree company="Anthropic"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0