Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Cross-repo codeintel doesn't work if package includes index.d.ts but no types field in package.json #319

@felixfbecker

Description

@felixfbecker

We filter out the dependency if it does not have a types field, but an index.d.ts is also valid.

Example: p-event

We would need to check if the package contains an index.d.ts while filtering. We could make a HEAD request to unpkg.com for that, but that would not work for private packages. Alternatively, the filtering by package.json would probably completely go away if we used yarn 2 - then we can add a plugin to yarn that filters files on the fly
instead of pre-filtering entire packages out without knowing their content.

We could also open a streamed HTTP request to the tarball and only look at the file headers to see if a TypeScript file is in it. This would still be faster than downloading it with all its dependencies, but would mean all top-level dependencies need to be downloaded before dependency installation even starts.

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