Skip to content

Installing Typescript definitions for react and react-addons-test-utils is inconsistent with npm #4226

@StanleyGoldman

Description

@StanleyGoldman

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Performing a yarn add of @types/react@^15.6.1 and @types/react-addons-test-utils creates output that is inconsistent with npm install of the same packages.

The package.json of @types/react-addons-test-utils lists react@* for it's dependency. I'm assuming this is the root of the issue.

If the current behavior is a bug, please provide the steps to reproduce.
yarn add @types/react@^15.6.1 @types/react-addons-test-utils --save-dev

Creates the following..

node_modules/@types/react (containing react 15.6 Typescript definitions)
node_modules/@types/react-addons-test-utils
node_modules/@types/react-addons-test-utils/node_modules/@types/react  (containing react 16.0 Typescript definitions)

What is the expected behavior?
yarn add @types/react@^15.6.1 @types/react-addons-test-utils --save-dev

as compared to..

npm install @types/react@^15.6.1 @types/react-addons-test-utils --save-dev

Creates the following..

node_modules/@types/react (containing react 15.6 Typescript definitions)
node_modules/@types/react-addons-test-utils

Please mention your node.js, yarn and operating system version.

  • Windows 10
  • yarn 0.27.5
  • node v6.11.2

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