Skip to content

Q: What would you expect from package managers? #43

Open

Description

@arcanis

The Types (@types) packages (and particularly whether dependencies should be regular deps or peer deps, big subject) is a bit messy in terms of dependency graph. I was wondering if you had a rough idea what would the absolute best case look like, assuming an ideal world where perfect solutions exist.

For example, would it be peer dependencies everywhere? Regular deps everywhere? A bit of both? Unlisted dependencies? A separate dependency field that package managers would understand (typedDependencies or whatever)? No more Types (@types) package and .d.ts into every package? The package manager downloading the types without needing markup?

Even as a thought experiment I think it can be interesting to hear your opinion about "split ecosystems" such as what TypeScript users experience.

Activity

  1. sandersn commented on Feb 11, 2020

    @sandersn
    Member

    We've debated this in the Typescript team and I think the consensus is that we'd like a new dependency "typeDependency". But that's not perfect and requires lots more work from various people than other solutions.

    If you look on this repo and the Typescript repo, I think you'll find more discussion of the problem.

  2. arcanis commented on Jun 4, 2020

    @arcanis
    Author

    Something I've been thinking lately was that perhaps packages should, as a general rule, simply list all their dependencies - regardless whether they'd be useful or not - and leave it to the package managers to remove the dependencies that don't make sense given the user context. For example, it would be trivial for us to simply ignore all Types (@types) dependencies.

    The advantage with such an approach is that it's very backward compatible by design: the worse that can happen is that some users download some extra packages on older systems - which is better than not listing dependencies and introducing undefined behaviors.

  3. added
    question
    on Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    publisherquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions