Giter VIP home page Giter VIP logo

Comments (4)

blakeembrey avatar blakeembrey commented on July 28, 2024 2

Is there a chance of a response on this? Does DefinitelyTyped support peer dependencies for this at all? These changes just broke the one of the few packages I maintain that actually uses @types (e.g. TypeStrong/typedoc#444 (comment), broken from a definition that has a direct dependency on node instead of a peer dependency - using a peer dependency would have meant I would have known this transitive oddity from the beginning).

from types-publisher.

felixfbecker avatar felixfbecker commented on July 28, 2024

The whole pattern of adding the global node declaration as a dependency (not peerDependency) is the cause of this issue. See this build for example: https://travis-ci.org/felixfbecker/merkel/builds/166880677
typedoc switched over to @types in a minor release. typedoc itself only depends on @types/fs-extra and a couple other modules. So far so good, but @types/fs-extra has a dependency on @types/node@*. Which is a global declaration. But I already have node typings installed (through typings), so now I get duplicate identifier errors and my build is broken through a minor version update, and typedoc is not even to blame here because it didn't even depend on @types/node directly. It would have all been fine if @types/fs-extra declared a peerDependency.

#173 (comment)

from types-publisher.

scottmtraver avatar scottmtraver commented on July 28, 2024

Following

I am having a similar problem. Resulting from Protractor version 5.1.1 using @types/node but we already have node typings from typings.json.

from types-publisher.

WorldMaker avatar WorldMaker commented on July 28, 2024

I was definitely bit by this as well. @types/lodash wants to work whether or not some globals are defined (WeakMap being one) and so uses global module augmentation with an empty version of the interface to handle that, but that broke when lib.d.ts changes the type signature of those globals between TS versions. Moving that to a peerDependency might help. Using something more flexible than module augmentation might help.

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.