-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enables all official plugins by default #4253
Conversation
What's the performance impact of loading all the plugins? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should automatically add @types/
dependencies by default. Since previously the plugin wasn't bundled, importing it served as a good opt-in check, but now we should probably use a heuristic to only add it if the project depends on typescript
(though there should probably be a config option for it too so that people that really want a better editor experience without type-checking can force it too 🤔).
I'll have to rework
|
It seems to be much more reasonable when taking v8-compile-cache into account (which is what Corepack automatically enables):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should print some kind of warning that users are overriding builtin plugins, otherwise people might forget to remove plugins that are now shipped by default from their projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor details otherwise looks good. Any thoughts on #4253 (review)?
const tsEnableAutoTypes = configuration.get(`tsEnableAutoTypes`) | ||
?? xfs.existsSync(ppath.join(project.cwd, `tsconfig.json` as Filename)); | ||
|
||
if (!tsEnableAutoTypes) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should check this when removing dependencies as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure I agree with this - while adding @types
should only happen when the user uses TS, they can be safely removed even when the user doesn't, since @types/foo
will always be related to foo
.
packages/acceptance-tests/pkg-tests-specs/sources/commands/constraints.test.js
Show resolved
Hide resolved
The documentation ( Lines 213 to 223 in 4ffd908
berry/.github/workflows/release-candidate.yml Lines 34 to 41 in b4d08fa
|
I agree, but for now I'd prefer to land this PR without adding too much delay; I'll keep that in mind for a followup. |
@@ -1,41 +1,6 @@ | |||
# This file contains the list of officially endorsed plugins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem like we can update this file without breaking Yarn v3
const REMOTE_REGISTRY = `https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed - at the very least I'll update the urls to point on the 3.2 tag rather than master.
e124d78
to
ec9034e
Compare
in yarn 4, all first-party plugins are installed by default. trying to install workspace-tools again fails. ref: yarnpkg/berry#4253
in yarn 4, all first-party plugins are installed by default. trying to install workspace-tools again fails. ref: yarnpkg/berry#4253
What's the problem this PR addresses?
While the plugin architecture is useful to enforce proper separation of concerns, having our official features in multiple plugins isn't very good from a pure UX perspective and only enables smaller bundles. With Corepack becoming the recommended install strategy size is less of a concern (especially given the reasonably average size impact), so we can afford to add all plugins in the standard distribution.
This doesn't affect the plugin feature itself: third-party plugins will keep being supported, and there are no plans to stop providing the exact same API we currently expose.
How did you fix it?
Enables all plugins in the build config.
Checklist