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

chore(dep): upgrade typescript to 4.2.4 #2280

Merged
merged 2 commits into from Apr 20, 2021
Merged

Conversation

AllanZhengYP
Copy link
Contributor


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

@AllanZhengYP
Copy link
Contributor Author

AllanZhengYP commented Apr 19, 2021

This build fails with

src/sdk-index-link-client.ts:86:7 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.
86 ...clients,
~~~~~~~~~~
Found 1 error.

This is likely related to the issue that tslib doesn't export __spreadArray: microsoft/tslib#149

@AllanZhengYP AllanZhengYP changed the title chore(dep): upgrade typescript to 4.2.4 [WIP]chore(dep): upgrade typescript to 4.2.4 Apr 19, 2021
@AllanZhengYP
Copy link
Contributor Author

Looks like the tslib already exports spreadArray in microsoft/tslib#133. I will try again with latest stlib

@codecov-commenter
Copy link

Codecov Report

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

❗ Current head c513bb4 differs from pull request most recent head e678377. Consider uploading reports for the commit e678377 to get more accurate results
Impacted file tree graph

@@          Coverage Diff           @@
##             main   #2280   +/-   ##
======================================
  Coverage        ?       0           
======================================
  Files           ?       0           
  Lines           ?       0           
  Branches        ?       0           
======================================
  Hits            ?       0           
  Misses          ?       0           
  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 56dae4e...e678377. Read the comment docs.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-staging-test
  • Commit ID: e678377
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP changed the title [WIP]chore(dep): upgrade typescript to 4.2.4 chore(dep): upgrade typescript to 4.2.4 Apr 19, 2021
@AllanZhengYP AllanZhengYP merged commit 92a70c9 into aws:main Apr 20, 2021
@vvo
Copy link
Contributor

vvo commented Apr 23, 2021

Hey there, dunno if that's related but lambdas deployed with 3.13.1 are failing on my side with:

{
  "errorType": "TypeError",
  "errorMessage": "(0 , tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray) is not a function",
  "trace": [
    "TypeError: (0 , tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray) is not a function",
    "    at /var/task/webpack:/turnshift/node_modules/@aws-sdk/middleware-stack/dist/es/MiddlewareStack.js:110:58",
    "    at Array.reduce (<anonymous>)",
    "    at getMiddlewareList (/var/task/webpack:/turnshift/node_modules/@aws-sdk/middleware-stack/dist/es/MiddlewareStack.js:108:1)",
    "    at Object.resolve (/var/task/webpack:/turnshift/node_modules/@aws-sdk/middleware-stack/dist/es/MiddlewareStack.js:190:39)",
    "    at ListTopicsCommand.resolveMiddleware (/var/task/webpack:/turnshift/node_modules/@aws-sdk/client-sns/dist/es/commands/ListTopicsCommand.js:42:1)",
    "    at SNS.Client.send (/var/task/webpack:/turnshift/node_modules/@aws-sdk/smithy-client/dist/es/client.js:10:1)",
    "    at SNS.listTopics (/var/task/webpack:/turnshift/node_modules/@aws-sdk/client-sns/dist/es/SNS.js:348:1)",
    "    at publishMessage (/var/task/webpack:/turnshift/lib/publishMessage.js:31:48)",
    "    at /var/task/webpack:/turnshift/jobs/slackSyncAllOrganizations.js:23:28",
    "    at Array.map (<anonymous>)"
  ]
}

Searching for "__spreadArray", which is my error, led me to here. Thanks.

@oscarmorasu
Copy link

This change also broke our builds. We were referencing the sdk version as "^3.13.0". Because this was only a patch bump newer code started picking up 3.13.1, which throws the __spreadArray missing error.

For now we pinned the version to "3.13.0".

I think this should have been a minor version bump, not a patch.

@nedjs
Copy link

nedjs commented Apr 27, 2021

Should also be mentioned that version 2.0.0 of tslib does not contain the __spreadArray function . That function was introduced in 2.1.0

https://github.com/microsoft/tslib/blob/2.1.0/tslib.d.ts

@vvo
Copy link
Contributor

vvo commented May 6, 2021

@AllanZhengYP Is this solved now? Should aws-sdk specify tslib 2.1.0 instead of 2.0.0? Thanks

@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 May 21, 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.

None yet

7 participants