microsoft / microsoft/TypeScript

`types-registry` keeps installing every time VS Code starts even if explicitly disabled

Đang mở
#60,487 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sheetalkamat đang làm issue này rồi.

Từ ngày 12/11/2024.

Needs Investigation
Ngôn ngữ chính
Go
Star
111k
Fork
14.4k
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
117

Mô tả

🔎 Search Terms

VS Code types-registry autoinstall
types-registry jsconfig
types-registry devcontainers

🕗 Version & Regression Information

This changed after I updated the Dev Container layout.

The new Layout is similar to:

classDiagram
    class Docker {
        <<Container>>
        Main Container
        Attached to VS Code via Dev Containers Extension

        home(/home/dev)
        bin(/usr/local/bin)
        code(/var/www/html)
    }
    class Node {
        <<Container>>
        NodeJS Container
        Vanilla Docker Hub image

        home(/home/node)
        bin(/usr/local/bin)
        code(/var/www/html)
    }
    class PHP {
        <<Container>>
        PHP Container
        Vanilla Docker Hub image

        home(/home/www-data)
        bin(/usr/local/bin)
        code(/var/www/html)
    }
    class Home{
        <<Volume>>

        .vscode/
        .npm/
        .yarn/
        .cache/
        .zshrc
        ...
    }
    class Bin{
        <<Volume>>
        
        php
        node
        npm
        yarn
    }
    class Code{
        <<Volume>>
        index.php
        index.js
    }
    Docker <-- Home
    Docker <-- Bin
    Docker <-- Code
    Node <-- Home
    Node <-- Bin
    Node <-- Code
    PHP <-- Home
    PHP <-- Bin
    PHP <-- Code

The Dev Container uses Docker Compose.

The helpers script in bin volume uses docker (via an exposed port in the host) to call the respective bin from each container (within the same compose project). The permissions from the 3 bind mounts are the same, and the users are the same (ID, Group, Groups IDs etc.).

I know the Dev Container layout is not a problem, as no extension shows any concern, even the PHP extension recognizes correctly the PHP version.

I have:

  • VS Code
    Version: 1.95.2 (Universal)
    Commit: e8653663e8840adaf45af01eab5c627a5af81807
    Date: 2024-11-07T11:07:22.054Z
    Electron: 32.2.1
    ElectronBuildId: 10427718
    Chromium: 128.0.6613.186
    Node.js: 20.18.0
    V8: 12.8.374.38-electron.0
    OS: Darwin x64 22.6.0
  • Docker
    Version: 27.3.1
    Build: ce12230
  • Node
    ImageTag: 20-alpine
    ImageSha: sha256:45a59611ca84e7fa7e39413f7a657afd43e2b71b8d6cb3cb722d97ffc842decb
⏯ Playground Link

No response

💻 Code

I have this jsconfig.json file in the /var/www/html folder which is the root of the project.

{
    "compilerOptions": {
        "typeRoots": [
            "**/*.d.ts"
        ],
        "baseUrl": ".",
        "paths": {
            "@": [
                "resources/js"
            ]
        }
    },
    "allowJS": true,
    "typeAcquisition": {
        "enable": false
    }
}

Also, I configured the npm.packageManager in both, the User and Workspace, to use yarn (as it is my preferred method to install packages).

🙁 Actual behavior

VS Code installs the types-registry package without taking into account the settings explicitly set in the jsconfig.json file or the npm.packageManager and install the package into the current project.

🙂 Expected behavior

I would expect VS Code to not install the types-registry package if it is forbidden, let alone install it into the project folder as a package for the project.

Or if it does download it, it would obey the npm.packageManager configuration and install it using yarn.

Additional information about the issue

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.