Hook | Description |
---|---|
registerPackageExtensions |
Called when the package extensions are setup |
setupScriptEnvironment |
Called before a script is executed |
wrapScriptExecution |
Called as a script is getting executed |
wrapNetworkRequest |
Called when a network request is being made |
globalHashGeneration |
Called before the build, to compute a global hash key that we will use to detect whether packages must be rebuilt (typically when the Node version changes) |
reduceDependency |
Called during the resolution, once for each resolved package and each of their dependencies |
afterAllInstalled |
Called after the install method from the Project class successfully completed |
validateProject |
Called during the Validation step of the install method from the Project class |
validateWorkspace |
Called during the Validation step of the install method from the Project class by the validateProject hook. |
populateYarnPaths |
Used to notify the core of all the potential artifacts of the available linkers |
cleanGlobalArtifacts |
Called when the user requests to clean the global cache. Plugins should use this hook to remove their own global artifacts. |
Source: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-core/sources/Plugin.ts