Giter VIP home page Giter VIP logo

midgard-yarn-strict's People

Contributors

vincentbailly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

midgard-yarn-strict's Issues

peerDependencies are not handled correctly

Hello there ๐Ÿ‘‹

Recently in Fluent UI we noticed that there are complains about peerDependencies that we never noticed before (microsoft/fluentui#23697, microsoft/fluentui#23681, microsoft/fluentui#23639).


I created a small reproduction case (https://github.com/layershifter/midgard-yarn-problem) and indeed there are warnings about peerDependencies:

$ npx midgard-yarn-strict

[WARNING] Unmet peer dependency: @types/react-dom in @fluentui/[email protected] (parent: @fluentui/[email protected])
[WARNING] Unmet peer dependency: @types/react-dom in @fluentui/[email protected] (parent: @fluentui/[email protected])
[WARNING] Unmet peer dependency: react-dom in @fluentui/[email protected] (parent: @fluentui/[email protected])
[WARNING] Unmet peer dependency: scheduler in @fluentui/[email protected] (parent: @fluentui/[email protected])

This is extremely strange as pkg-test declared in a workspace has all required dependencies declared:

{
  "name": "pkg-test",
  "version": "1.0.0",
  "dependencies": {
    "@fluentui/react-avatar": "9.0.0-rc.10",
    "@types/react": "^17",
    "@types/react-dom": "^17",
    "react": "^17",
    "react-dom": "^17",
    "scheduler": "^0.23.0"
  }
}

Yarn v1, Yarn v3 & NPM do not emit any warnings at this moment. But they will if react, react-dom, scheduler or any other peer dependency will not be declared in pkg-test/package.json (regardless of where it is in the dependency tree):

warning "workspace-aggregator-00586a69-44fc-449f-8041-63e36c8b5446 > pkg-test > @fluentui/react-avatar > @fluentui/react-popover > @fluentui/[email protected]" has unmet peer dependency "react@>=16.8.0 <18.0.0".
warning "workspace-aggregator-00586a69-44fc-449f-8041-63e36c8b5446 > pkg-test > @fluentui/react-avatar > @fluentui/react-popover > @fluentui/[email protected]" has unmet peer dependency "react-dom@>=16.8.0 <18.0.0".
warning "workspace-aggregator-00586a69-44fc-449f-8041-63e36c8b5446 > pkg-test > @fluentui/react-avatar > @fluentui/react-popover > @fluentui/[email protected]" has unmet peer dependency "scheduler@^0.19.0 || ^0.20.0"

I also tried to trace scheduler and it's declared as peerDependency of @fluentui/[email protected]:

{ 
  "peerDependencies": {
    "@types/react": ">=16.8.0 <18.0.0",
    "@types/react-dom": ">=16.8.0 <18.0.0",
    "react": ">=16.8.0 <18.0.0",
    "react-dom": ">=16.8.0 <18.0.0",
    "scheduler": "^0.19.0 || ^0.20.0"
  }
}

https://github.com/microsoft/fluentui/blob/a569864246be0184a5a51421b3da4450deafb854/packages/react-components/react-context-selector/package.json#L38


The fix that was made to remove this warning - add scheduler as peerDependency to all packages in a dependency tree (microsoft/fluentui#23681): @fluentui/react-context-selector -> @fluentui/react-popover -> @fluentui/react-components. That does not seem correct to me. I would expect that pkg-test (a package from the example) will fail if scheduler is not listed in dependencies/devDependencies/peerDependencies, but not for errors in a tree (i.e. node_modules).

For example, if an application @fluentui/react-components which uses @fluentui/react-context-selector we should have an error about unmeet peer dependency (if an application not listing scheduler as a dependency or devDependency). However, we should not see an error about @fluentui/react-components not listing scheduler - an application is not responsible for enforcing strictness in downstream repos.

Currently it's unclear why should a package be responsible for forwarding its peerDependencies ๐Ÿ™ƒ

Monorepo EEXIST with version 1.23.31

While testing last version I got this error popping each time i'm trying to install my dependancies :

Can it be some race condition issue ?

error An unexpected error occurred: "EEXIST: file already exists, symlink '../detect-port/bin/detect-port' -> '/Users/aurelienboquet/Code/beedeez-main/node_modules/.bin/detect'".

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.