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: replace prepublishOnly script with downlevel-dts #2537

Merged
merged 4 commits into from
Jul 1, 2021

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jul 1, 2021

Issue

Fixes: #2474

Description

The prepublishOnly script was running in our release automation with the following error:

npm WARN lifecycle @aws-sdk/util-dynamodb@3.19.0~prepublishOnly: cannot run in wd @aws-sdk/util-dynamodb@3.19.0 yarn build && downlevel-dts dist/types dist/types/ts3.4 (wd=.)

Due to this error, the downlevelled types were not getting published.
This happened as we ran npm publish script using package directory in our release automation, and npm cli ran prepublishOnly script from root directory.

The fix is to rename prepublishOnly to downlevel-dts and call it explicitly from our release automation. The yarn build is not required as dist folder is already present.

Testing

  • Similar change was tested by explicitly calling prepublishOnly script with package directory in release automation scripts.
  • This change will be tested post merge by replacing prepublishOnly call with downlevel-dts

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

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@a8502a7). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2537   +/-   ##
=======================================
  Coverage        ?   59.55%           
=======================================
  Files           ?      495           
  Lines           ?    26411           
  Branches        ?     6272           
=======================================
  Hits            ?    15729           
  Misses          ?    10682           
  Partials        ?        0           

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 a8502a7...06e4008. Read the comment docs.

@trivikr trivikr merged commit 63818a1 into aws:main Jul 1, 2021
@trivikr trivikr deleted the script-downlevel-dts branch July 1, 2021 17:02
@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 Jul 16, 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.

Typescript 3.7.x breaking @aws-sdk/types ... again
3 participants