You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see the below in the source code, which explains that plugins should be able to extend others, and that the order matters.
One particularity: the plugin initialization order is quite strict, with
plugins listed in /foo/bar/.yarnrc.yml taking precedence over plugins
listed in /foo/.yarnrc.yml and /.yarnrc.yml. Additionally, while plugins
can depend on one another, they can only depend on plugins that have been
instantiated before them (so a plugin listed in /foo/.yarnrc.yml can
depend on another one listed on /foo/bar/.yarnrc.yml, but not the other
way around).
That makes sense for extending, but for non extending, i would have assumed that third party plugin instantiation should be the reverse. Because it's convenient to declare common/global ones at a higher level. For example in a monorepo you might have:
.yarnrc.yml # declares common/global plugins
foo/.yarnrc.yml # declares Foo specific plugins, expects to inherit/use the parent ones too
bar/.yarnrc.yml # declares Bar specific plugins, expects to inherit/use the parent ones too
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I can see the below in the source code, which explains that plugins should be able to extend others, and that the order matters.
That makes sense for extending, but for non extending, i would have assumed that third party plugin instantiation should be the reverse. Because it's convenient to declare common/global ones at a higher level. For example in a monorepo you might have:
Currently in this scenario if i'm performing a focused install of only Foo then the resolved ordering (per
yarn plugin runtime
) would become:That's potentially problematic if we expect preprocessing via the
common
plugin to occur prior tofoo
doing its thing.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions