Skip to content

Template Sync: Use @vscode/python-environmentΒ #478

@github-actions

Description

@github-actions

πŸ”„ Template Sync Required

Changes from the upstream vscode-python-tools-extension-template have not yet been incorporated into this repository.

Source PR

Summary

The template switched from manually looking up the Python Environments extension via extensions.getExtension() to using the official @vscode/python-environments package and its PythonEnvironments.api() helper. As part of this change, a .npmrc file was added to configure npm to resolve the @vscode-scoped packages from the Azure Artifacts feed that hosts @vscode/python-environments.

The TypeScript (src/common/python.ts) and package.json changes from this PR are already present in this repository. The only missing piece is the .npmrc registry configuration, which is required so that developers can run npm install (or regenerate package-lock.json) without the Azure feed being unknown to npm.

Files with missing changes

  • .npmrc β€” Not present in this repository. Without it, npm install will fail when resolving @vscode/python-environments from the Azure Artifacts registry because npm does not know to look there for @vscode-scoped packages.

Suggested fix

Add .npmrc to the repository root with the following content:

+`@vscode`:registry=(pkgs.dev.azure.com/redacted)

Files skipped

  • src/common/python.ts β€” Already updated to use PythonEnvironments.api() (with additional mypy-specific customisations preserved).
  • package.json β€” Already includes @vscode/python-environments: ^1.0.0 as a dependency.
  • package-lock.json β€” Already contains the resolved Azure Artifacts URL for the package.
  • src/typings/pythonEnvironments.d.ts β€” No longer present in this repository (already removed).

πŸ€– This issue was auto-generated by the extension-template-sync workflow.

Generated by Extension Template Sync

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions