GithubHelp home page GithubHelp logo

Comments (7)

RyanCavanaugh avatar RyanCavanaugh commented on August 19, 2024

this will immediately break on them as the dependencies will be bumped to the latest incompatible version.

Can you clarify how this scenario happens? If the dependent library is modified in a way that breaks the consuming library, the consuming library should be updated.

If you're talking about changes in language syntax, we plan to publish specific tagged versions (@ts2.0, etc) that represent the latest version of the definition file that's compatible with that version of the compiler. Those versions won't use * version numbers.

from types-publisher.

blakeembrey avatar blakeembrey commented on August 19, 2024

No, not changes in the language.

Say I'm relying on Express 4.x and @types/[email protected]. There's just been a new release, @types/[email protected]. Both these depend on @types/serve-static@*. If @types/serve-static gets updated, anyone using older @types/express versions are now broken as the dependencies are not pinned to a version.

from types-publisher.

blakeembrey avatar blakeembrey commented on August 19, 2024

Or the even more basic use-case, the typings themselves were incorrect for 1.2.5, so we update them. However, they were used as a dependency somewhere. That update will break the build for anyone relying on the older typings since they aren't pinned.

from types-publisher.

RyanCavanaugh avatar RyanCavanaugh commented on August 19, 2024

What do you think the right behavior is?

from types-publisher.

blakeembrey avatar blakeembrey commented on August 19, 2024

The way I worked with this was by always pinning. However, that means you in the current system you'll have to track changes of a dependency to update a new version and that'll could be trickier. Perhaps following a pattern like Typings were there's a manifest for dependencies?

from types-publisher.

RyanCavanaugh avatar RyanCavanaugh commented on August 19, 2024

I'm inclined to fix at e.g. 2.1.* and rely on people to not make breaking changes in file updates without updating downstream consumers.

from types-publisher.

blakeembrey avatar blakeembrey commented on August 19, 2024

Makes sense, you'll just need to police things a little bit then - I believe there's been a few issues around changing signatures of a library when it really does make sense, but it will break consumers who don't have pinned versions. This is really the only part that may be at odds with using NPM, since NPM install by default with ^ while you probably want --save-exact more. That said, changes happen and things can break even with a normal TypeScript module, I think it'll just rely on better policing for changes between patches and even minor versions (since ^ will install minors).

from types-publisher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.