Skip to content

chore: standardize build commands between clients and packages #1410

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

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jul 29, 2020

Issue #, if available:
Follow-up to #1407

Description of changes:
standardize build commands between clients and packages

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

@trivikr
Copy link
Member Author

trivikr commented Jul 29, 2020

The generate-clients script doesn't update npm scripts in clients

if (name === "scripts" || name === "devDependencies") {
// Allow target package.json(toContent) has its own special script or
// dev dependencies that won't be overwritten in codegen
merged[name] = { ...toContent[name], ...merged[name] };
}

So the files were updated using command line:

ls -d */ | xargs -I {} bash -c "cd '{}' && sed -i 's/\"pretest\": \"tsc\"/\"pretest\": \"yarn build:cjs\"/g' package.json"
ls -d */ | xargs -I {} bash -c "cd '{}' && sed -i 's/\"build:es\"/\"build:cjs\": \"tsc -p tsconfig.json\",\n    \"build:es\"/g' package.json"
ls -d */ | xargs -I {} bash -c "cd '{}' && sed -i 's/yarn pretest/yarn build:cjs/g' package.json"

@trivikr
Copy link
Member Author

trivikr commented Jul 29, 2020

CodeGen was updated in smithy-lang/smithy-typescript#194

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2020

Codecov Report

Merging #1410 into master will increase coverage by 0.47%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1410      +/-   ##
==========================================
+ Coverage   79.08%   79.55%   +0.47%     
==========================================
  Files         287      296       +9     
  Lines       11155    11325     +170     
  Branches     2360     2414      +54     
==========================================
+ Hits         8822     9010     +188     
+ Misses       2333     2315      -18     
Impacted Files Coverage Δ
packages/util-create-request/src/index.ts 100.00% <0.00%> (ø)
packages/middleware-signing/src/middleware.ts 91.66% <0.00%> (ø)
...iddleware-sdk-s3-control/src/prepend-account-id.ts 86.95% <0.00%> (ø)
...re-bucket-endpoint/src/bucketEndpointMiddleware.ts 91.30% <0.00%> (ø)
...dk-transcribe-streaming/src/middleware-endpoint.ts 95.23% <0.00%> (ø)
...dential-provider-imds/src/fromContainerMetadata.ts
...edential-provider-imds/src/fromInstanceMetadata.ts
...rovider-imds/src/remoteProvider/ImdsCredentials.ts
...al-provider-imds/src/remoteProvider/httpRequest.ts
...ider-imds/src/remoteProvider/RemoteProviderInit.ts
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81b2e87...4b66a2a. Read the comment docs.

Copy link
Contributor

@alexforsyth alexforsyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! +1

@trivikr trivikr merged commit 4580e4b into aws:master Jul 30, 2020
@trivikr trivikr deleted the add-build-cjs branch July 30, 2020 16:27
@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 Jan 17, 2021
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.

3 participants