Skip to content

Update helpers to use redefining pattern if needed (related to Micros… - #54

Merged
Ron Buckton (rbuckton) merged 1 commit into
microsoft:masterfrom
Andarist:update-helpers
Jun 19, 2018
Merged

Ron Buckton (rbuckton) merged 1 commit into
microsoft:masterfrom
Andarist:update-helpers

Conversation

@Andarist

@Andarist Mateusz Burzyński (Andarist) commented Jun 18, 2018 •

Copy link
Copy Markdown
Contributor

…oft/TypeScript#24244)

Updated according to merged changes in microsoft/TypeScript#24244

Didn't update CJS file because of it's lack of live bindings - which is relevant for __assign. As it's UMD bundle it won't be tree-shaken anyway, so I've skipped updating it.

@mhegazy

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton) can you please review and merge?

@rbuckton
Ron Buckton (rbuckton) merged commit 4dc67f4 into microsoft:master Jun 19, 2018
@Andarist
Mateusz Burzyński (Andarist) deleted the update-helpers branch June 19, 2018 21:06
@Andarist

Copy link
Copy Markdown
Contributor Author

cc Daniel Rosenwasser (@DanielRosenwasser) , would love a new release with this 😉

@DanielRosenwasser

Copy link
Copy Markdown
Member

Done. Thanks!

@sabberworm

Raphael Schweikert (sabberworm) commented May 13, 2020 •

Copy link
Copy Markdown

We polyfill Object.assign with _assign. The update to tslib 1.9.3 broke this pattern because by the time the new wrapper function is executed, Object.assign will point to __assign, which means it will loop endlessly.
I think our usage was wonky at best and I’m not opposed to this change at all but I think a breaking change like this should have warranted a new major version.

(sorry I’m venting a bit because this took me hours to track down)

@Andarist

Copy link
Copy Markdown
Contributor Author

Well, this was very hard to predict - tslib was not intended to serve as polyfill for built-ins. I wouldn't classify this as a breaking change, especially given the fact that this was released 2 years ago and you are the first person to report such a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants