From 60c80250f88b82e78a47d1c59c5339ff2ed2c4ba Mon Sep 17 00:00:00 2001 From: Andreas Kunz Date: Mon, 29 Apr 2024 14:06:23 +0200 Subject: [PATCH] docs: add more docu for dependenciesTypePackagesForCheck option --- packages/dts-generator/README.md | 8 ++++++-- packages/dts-generator/src/index.ts | 2 +- packages/dts-generator/src/utils/arguments-index.ts | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/dts-generator/README.md b/packages/dts-generator/README.md index f27632f..655a69c 100644 --- a/packages/dts-generator/README.md +++ b/packages/dts-generator/README.md @@ -56,8 +56,12 @@ With: --dependenciesApiPath PATH Directory where the api.json files are located for the libraries on which the currently to-be-built library depends. --dependenciesDTSPathForCheck PATH - Directory where the d.ts files are located of the libraries on which the currently to-be-built library depends. Only needed for the - check. + Directory where the d.ts files are located of the libraries on which the currently to-be-built library depends. Typically used for + other UI5 libraries for which types are being generated in the same build run. Only needed for the check. + --dependenciesTypePackagesForCheck + The names of type packages on which the currently to-be-built library depends. Typically used for other UI5 libraries being + developed separately. E.g. for @types/openui5 when the current build is for a library developed outside the UI5 teams. Only needed + for the check. --directivesPath PATH Directory where the .dtsgenrc files for the libraries (current and dependencies) are located. --targetFile FILE diff --git a/packages/dts-generator/src/index.ts b/packages/dts-generator/src/index.ts index aa52958..731cc86 100644 --- a/packages/dts-generator/src/index.ts +++ b/packages/dts-generator/src/index.ts @@ -84,7 +84,7 @@ async function main() { dependenciesApiPath, directivesPath, dependenciesDTSPathForCheck: dependenciesDTSPathForCheckForGlobals, - dependenciesTypePackagesForCheck, + dependenciesTypePackagesForCheck, // would actually need to be a separate config for globals, but as they are deprecated we don't want to extend the API targetFile: targetFileForGlobals, runCheckCompile, verbose, diff --git a/packages/dts-generator/src/utils/arguments-index.ts b/packages/dts-generator/src/utils/arguments-index.ts index 2bb2064..da7da05 100644 --- a/packages/dts-generator/src/utils/arguments-index.ts +++ b/packages/dts-generator/src/utils/arguments-index.ts @@ -13,12 +13,14 @@ export const args = (() => { help: "Directory where the api.json files are located for the libraries on which the currently to-be-built library depends.", }); parser.add_argument("--dependenciesDTSPathForCheck", { - help: "Directory where the d.ts files are located of the libraries on which the currently to-be-built library depends. Only needed for the check.", + help: + "Directory where the d.ts files are located of the libraries on which the currently to-be-built library depends. Typically used for" + + " other UI5 libraries for which types are being generated in the same build run. Only needed for the check.", }); parser.add_argument("--dependenciesTypePackagesForCheck", { help: "Comma-separated list of package names of the libraries on which the currently to-be-built types depends. This is meant for entire npm packages" + - " developed separately (often by others), not sibling libraries built in the same batch. E.g. when a custom UI5 control library is built by an" + + " developed separately (often by others), not sibling libraries built in the same generation run. E.g. when a custom UI5 control library is built by an" + " application team, then it usually depends on the OpenUI5 types because those define the base classes like Control. Setting this has the effect" + " that for the TS compilation check, the `types` field of the package.json file will be set to the respective package names and any other type packages" + " are no longer considered. Only needed for the check.",