From 7eb4d08cab2f7767b0626930fdb7d6f10078a7ef Mon Sep 17 00:00:00 2001 From: "penify-dev[bot]" <146478655+penify-dev[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 15:24:33 +0000 Subject: [PATCH] [Penify]: Documentation for commit - b4d84ec --- scripts/update-toolkit-package.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/update-toolkit-package.js b/scripts/update-toolkit-package.js index ac11c170..4694598b 100644 --- a/scripts/update-toolkit-package.js +++ b/scripts/update-toolkit-package.js @@ -29,6 +29,14 @@ async function main() { console.log(color(['bold', 'green'], 'All extension samples updated to the latest version of the toolkit!')); } +/** + * Updates the @vscode/webview-ui-toolkit package to its latest version in all subdirectories of the specified root directory. + * + * This function retrieves a list of subdirectories within the given `rootDir`. For each subdirectory, it constructs the installation path and executes an npm command to update the toolkit package. If an error occurs during this process, it logs the error message and exits the process. + * + * @param {string} rootDir - The root directory containing the subdirectories where the toolkit package will be updated. + * @param {string} [installDir=''] - An optional subdirectory within each `rootDir` to target for the update. Defaults to an empty string, indicating the root of each subdirectory. + */ async function installLatestToolkitPackage(rootDir, installDir = '') { try {