vincentbailly / midgard-yarn-strict Goto Github PK
View Code? Open in Web Editor NEWNodeJS package installer based on yarn and pnpm
NodeJS package installer based on yarn and pnpm
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"
}
}
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
๐
After the first install, the .store
folder name gets longer and longer making for an odd in editor experience.
This will also further help node dependency issues by moving the store farther away from the node_modules
directory.
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'".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.