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

Types files have capitals in them, leading to them being unreferenceable downstream #13309

Closed
7 tasks done
Princesseuh opened this issue May 23, 2023 · 0 comments · Fixed by #14615
Closed
7 tasks done
Labels
p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority)
Milestone

Comments

@Princesseuh
Copy link
Contributor

Describe the bug

TypeScript has a long-standing issue where files with capitals in them cannot be referenced in triple slashes directives on certain OSes: microsoft/TypeScript#45096. Unfortunately, this mean that downstream frameworks like Astro who cannot use Vite's client types (due to conflicting declarations) cannot re-use Vite's types for import.meta. (though this issue also applies to the other types). In Astro especially, this has lead us to having to maintain a copy of the import meta types: https://github.com/withastro/astro/blob/main/packages/astro/import-meta.d.ts

I sent a PR to fix this a long time ago: #9827, but it was refused and superseded by another PR that ended up getting reverted. Getting us back to square one, ha!

Reproduction

N/A

Steps to reproduce

  • Try to refer to Vite's types using a triple slash directive: /// <reference types="vite/types/importMeta" />
  • Doesn't work on Linux! (maybe on macOS too? Not sure.)

System Info

System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 127.70 MB / 16.00 GB
    Shell: 3.6.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 19.9.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.6.3 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Firefox: 111.0.1
    Safari: 16.2

Used Package Manager

pnpm

Logs

No response

Validations

@bluwy bluwy added p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) and removed pending triage labels May 23, 2023
@bluwy bluwy added this to the 5.0 milestone May 23, 2023
@bluwy bluwy mentioned this issue Oct 13, 2023
4 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority)
Projects
None yet
2 participants