fix(@aws-amplify/core): bump tslib to ^2.1.0 to guarantee __spreadArray at runtime - #14884
Open
dikshit-n wants to merge 4 commits into
Open
fix(@aws-amplify/core): bump tslib to ^2.1.0 to guarantee __spreadArray at runtime#14884dikshit-n wants to merge 4 commits into
dikshit-n wants to merge 4 commits into
Conversation
|
bobbor
approved these changes
Jul 22, 2026
Member
|
Thanks @dikshit-n for the PR. Looks good. let's move forward |
osama-rizk
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bump
@aws-amplify/corev5 runtimetslibdependency from^1.8.0to^2.1.0so the emitted__spreadArrayhelper is guaranteed to exist at runtime.Problem
@aws-amplify/core@5.8.18compiles withimportHelpers: true+target: es5, emitting calls totslib.__spreadArray. However,^1.8.0resolves only totslib@1.x(max1.14.1), which does not export__spreadArray— it was added intslib@2.1.0. Under certain dependency-tree conditions (e.g. a peer pullingtslib@1.x), this causes__spreadArray is not a functionat runtime.This is the same class of bug fixed for
@aws-amplify/datastorein #14878.Solution
Bump
dependencies.tslibfrom^1.8.0to^2.1.0inpackages/core/package.json. This mirrors the datastore fix and guarantees the__spreadArrayhelper is available when core's lib is consumed.Changes Made
packages/core/package.json:tslibdependency range^1.8.0→^2.1.0Testing
npm ls tslibin@aws-amplify/coreworkspace confirms^2.1.0resolves correctly.Checklist
@aws-amplify/datastorein fix(datastore): declare tslib ^2.1.0 to fix __spreadArray is not a function #14878v5-stablemaintenance branchCloses #14879