-
Notifications
You must be signed in to change notification settings - Fork 615
[WIP] feat: use common TSConfig for clients #3149
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
Conversation
foreach parentDir ("clients" "private") for dir in ./$parentDir/*; do (cd "$dir" && sed -i 's/tsconfig.json/tsconfig.cjs.json/g' ./package.json); done for dir in ./$parentDir/*; do (cd "$dir" && mv tsconfig.json tsconfig.cjs.json); done end
foreach parentDir ("clients" "private") foreach tsConfigType ("cjs" "es" "types") for dir in ./$parentDir/*; do ( cd "$dir" cp ../../clients/client-accessanalyzer/tsconfig.$tsConfigType.json tsconfig.$tsConfigType.json ); done end end
Fixes build failure issues with mocha vs jest Refs: https://www.labeightyfour.com/2019/05/17/compiler-errors-with-mocha-and-typescript/
This reverts commit 2b0d121.
This reverts commit 99bd32b.
Values taken from TSConfig base recommended https://github.com/tsconfig/bases/blob/main/bases/recommended.json
Cleaned up version posted at #3151 |
The docs generation fails with $ yarn build-documentation --clientDocs docs/clients/{{CLIENT}} --tsconfig tsconfig.typedoc.json |
Even if we're able to fix doc generation issue, the tsserver will exit with SIGABT after moving client to use root TSConfig This will make TypeScript features unusable in VSCode, like browsing code across packages. After switching to main branch, and restarting the TSServer the hover on The issue is reported upstream at microsoft/TypeScript#44951 |
Update on doc generation: added Generation of docs for non-clients succeeds when tsconfig is explicitly passed. $ yarn build-documentation --clientDocs docs/clients/{{CLIENT}} --tsconfig tsconfig.typedoc.json --theme Generation of docs for clients fails with $ ./node_modules/.bin/lerna exec --scope '@aws-sdk/client-acm' --no-bail --stream -- yarn build:docs --out $(pwd)/docs/clients/$(basename \$LERNA_PACKAGE_NAME) --tsconfig ./../../tsconfig.typedoc.json --theme
...
@aws-sdk/client-acm: /local/home/trivikr/workspace/aws-sdk-js-v3/packages/service-client-documentation-generator/dist-cjs/sdk-client-rename-project.js:23
@aws-sdk/client-acm: const metadataDir = (_b = (_a = clientDirectory.files.filter((sourceFile) => sourceFile.fileName.endsWith("/package.json"))) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.fullFileName;
@aws-sdk/client-acm: ^
@aws-sdk/client-acm: TypeError: Cannot read properties of undefined (reading 'files')
@aws-sdk/client-acm: at SdkClientRenameProjectPlugin.onRenderedBegin (/local/home/trivikr/workspace/aws-sdk-js-v3/packages/service-client-documentation-generator/dist-cjs/sdk-client-rename-project.js:23:61)
@aws-sdk/client-acm: at /local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/dist/lib/utils/events.js:260:33
@aws-sdk/client-acm: at triggerApi (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/dist/lib/utils/events.js:111:13)
@aws-sdk/client-acm: at Renderer.trigger (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/dist/lib/utils/events.js:253:13)
@aws-sdk/client-acm: at Renderer.render (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/dist/lib/output/renderer.js:34:14)
@aws-sdk/client-acm: at CliApplication.generateDocs (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/dist/lib/application.js:105:23)
@aws-sdk/client-acm: at CliApplication.bootstrap (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/dist/lib/cli.js:49:26)
@aws-sdk/client-acm: at Object.<anonymous> (/local/home/trivikr/workspace/aws-sdk-js-v3/node_modules/typedoc/bin/typedoc:5:5)
@aws-sdk/client-acm: at Module._compile (node:internal/modules/cjs/loader:1101:14)
@aws-sdk/client-acm: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
@aws-sdk/client-acm: error Command failed with exit code 1.
@aws-sdk/client-acm: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! Received non-zero exit code 1 during execution
lerna success exec Executed command in 1 package: "yarn build:docs --out /home/trivikr/workspace/aws-sdk-js-v3/docs/clients/$LERNA_PACKAGE_NAME --tsconfig ./../../tsconfig.typedoc.json --theme"
|
Closing this PR as we're going to pause this work, and merge fixes/improvements identified during the development to main branch. The final cleaned up PR for future reference will be updated in #3151 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue
Refs: #1307
Replaces: #3132
Description
Uses common TSConfig for all generated clients
Testing
CI
Additional context
This is a re-attempt of #3145 with jest maxWorkers at 50%
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.