microsoft / microsoft/typespec

VSCode extension should be smarter in resolving the package manager

Open
#6,321 1 comment 0 reactions 0 assignees View on GitHub
ide
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

## Part 1: Call `tsp install` for standalone cli
Ideally call the programmatic api as well (Might export it via that internal export we'll use for init as well)

PR https://github.com/microsoft/typespec/pull/6220 completely changed how `tsp install` works to detach ourselves from needing a specific version of one in the standalone cli

The IDE should reflect the same experience.

## Part 2: Actually find what command you should use
It might actually be a bit more complicated for the IDE as for the tsp standalone experience you can use `tsp install` but with the node experience we don't know what package manager they are actually using could be
- `tsp install`(unlikely)
- `corepack` calling `tsp install` might be enough though corepack supports more things
- `npm`
- `yarn`
- `pnpm`

There is ways to detect which package manager a user is most likely using
- https://www.npmjs.com/package/detect-package-manager
- https://www.npmjs.com/package/preferred-pm
- https://www.npmjs.com/package/which-pm

all 3 seems to have similar usage amount

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.