Skip to content
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

fix(scripts): skip files with stripped comments containing incorrect JavaScript #3937

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Sep 12, 2022

Issue

Fixes: #3847

Description

Skips files with stripped comments if there is incorrect JavaScript.

Testing

Verified that files with incorrect JavaScript are not overwritten:

$ yarn build:types:downlevel
yarn run v1.22.19
$ node --es-module-specifier-resolution=node ./scripts/downlevel-dts
(node:35884) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
Failed to format "clients/client-apigatewayv2/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-cloudfront/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-elastic-load-balancing-v2/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-glacier/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-lex-runtime-service/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-lex-runtime-v2/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-lookoutequipment/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-mediastore/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-quicksight/dist-types/ts3.4/QuickSight.d.ts". Skipping...
Failed to format "clients/client-route-53/dist-types/ts3.4/Route53.d.ts". Skipping...
Failed to format "clients/client-glue/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-glue/dist-types/ts3.4/models/models_2.d.ts". Skipping...
Failed to format "clients/client-robomaker/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-swf/dist-types/ts3.4/SWF.d.ts". Skipping...
Failed to format "clients/client-lightsail/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Failed to format "clients/client-wisdom/dist-types/ts3.4/Wisdom.d.ts". Skipping...
Failed to format "clients/client-quicksight/dist-types/ts3.4/models/models_1.d.ts". Skipping...
Failed to format "clients/client-wafv2/dist-types/ts3.4/models/models_0.d.ts". Skipping...
Done in 101.21s.

Example file is which is not overwritten:

$ tail clients/client-lex-runtime-v2/dist-types/ts3.4/models/models_0.d.ts
 */
export declare const RecognizeTextResponseFilterSensitiveLog: (obj: RecognizeTextResponse) => any;
/**
 * @internal
 */
export declare const StartConversationResponseEventStreamFilterSensitiveLog: (obj: StartConversationResponseEventStream) => any;
/**
 * @internal
 */
export declare const StartConversationResponseFilterSensitiveLog: (obj: StartConversationResponse) => any;

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr requested a review from a team as a code owner September 12, 2022 23:53
@trivikr trivikr changed the title fix(scripts): skip files with stripped comments for incorrect JavaScript fix(scripts): skip files with stripped comments containing incorrect JavaScript Sep 12, 2022
Co-authored-by: George Fu <kuhe@users.noreply.github.com>
@trivikr trivikr merged commit bbb09f3 into aws:main Sep 13, 2022
@trivikr trivikr deleted the fix-strip-comments branch September 13, 2022 04:06
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Corrupt TS 3.4 declaration files in multiple packages
2 participants