yarn-plugin: import appropriate type to verify beforeWorkspacePacking signature

I realised that by default the `Plugin` type from
`@yarnpkg/core` sets the type of the `hooks`
property to `any`. This meant that there wasn't
any restriction on the hooks that could be passed,
and introduced the risk that a typo in the
`beforeWorkspacePacking` name could lead to the
hook being skipped.

This commit pulls in the appropriate type for
Hooks to verify the name and signature of the hook.

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2024-11-22 15:28:23 +00:00
parent 124a108c36
commit 27600c2cd3
4 changed files with 6 additions and 2 deletions
+1
View File
@@ -34,6 +34,7 @@
"@backstage/release-manifests": "workspace:^",
"@yarnpkg/core": "^4.0.3",
"@yarnpkg/fslib": "^3.0.2",
"@yarnpkg/plugin-pack": "^4.0.0",
"lodash": "^4.17.21",
"semver": "^7.6.0"
},