Skip to content
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

tsconfig prompts don't show up if root dir is a workspace member without a deno.json #1180

Open
nathanwhit opened this issue Oct 12, 2024 · 3 comments
Assignees

Comments

@nathanwhit
Copy link
Member

nathanwhit commented Oct 12, 2024

Describe the bug
We added helper popups in #1166, but they don't seem to trigger if you're in a workspace member with only a package.json

To Reproduce

❯ deno run -A npm:create-next-app@latest
✔ What is your project named? … my-app
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like to use `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to customize the default import alias (@/*)? … No / Yes
❯ echo '{ "workspace": ["./my-app"], "nodeModulesDir": "manual"  }' >> deno.json
❯ deno install
❯ code ./my-app

Note that the deno extension enables by default, but the prompts don't show up. If you create a deno.json in my-app or if you open the workspace root in vscode, they do.

Expected behavior

Prompts appear if in a workspace member, even if it doesn't have a deno.json

@nayeemrmn
Copy link
Collaborator

nayeemrmn commented Oct 12, 2024

This is currently intentional, since we assume that the extension won't enable unless there's a deno.json... I think the problem is we're still promoting "deno.enable": true. We should have been phasing out the usage of this setting in favour of deno.json detection.

Edit: I misunderstood the workspace member part

@nathanwhit
Copy link
Member Author

nathanwhit commented Oct 12, 2024

This is currently intentional, since we assume that the extension won't enable unless there's a deno.json... I think the problem is we're still promoting "deno.enable": true. We should have been phasing out the usage of this setting in favour of deno.json detection.

It enables even without "deno.enable": true because it's part of the workspace, I have

"enable": null,
  "disablePaths": [],
  "enablePaths": null,

in my language server status, but the LSP is enabled (I assume due to being a workspace member)

@nathanwhit
Copy link
Member Author

I believe the issue is that it's looking for a tsconfig.json next to the deno.json, but since we're in a workspace member without a deno.json (the deno.json is in the parent dir) that condition isn't met

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

No branches or pull requests

2 participants