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

Upgrading babel and rollup to latest #339

Merged
merged 1 commit into from Jul 17, 2020
Merged

Upgrading babel and rollup to latest #339

merged 1 commit into from Jul 17, 2020

Conversation

TheMcMurder
Copy link
Contributor

@TheMcMurder TheMcMurder commented Jul 7, 2020

Fix an issue created by using an old version of rollup.

Some projects assume that their dependencies have the full object prototype available to them. This throws an error when the dependency does not have the Object.Prototype methods on it. In our case this occurs with React when in the bundled code the following happens:

React = React && React.hasOwnProperty('default') ? React['default'] : React

This issue hasn't cropped up as of yet because most people aren't using ES Modules and this bug really only affects ES_Modules or formats that emulate them (like System.register) and ES Modules must not have Object.prototype as their prototype (it is expressly forbidden) so the erroneous assumption that rollup made in old versions is that external dependencies (in this case react) had the object prototype necessary to call hasOwnProperty but anyone using this library and ES (or System.register) modules is guaranteed to have an error because of the specification.

Upgrading Rollup is all that necessary to fix this issue but I thought it would be helpful to also upgrade babel for you.

Unfortunately there is an issue with the netlify build that makes it appear as though this build is failing when in reality we just need to upgrade to a more modern version of node on the netlify server. The current version that this build is running on (v6) was marked end of life in April of 2019 so we're well past the end of life date. I suggest an upgrade to v10 or v12 (LTS) both of which are supported until April 2021 and April 2022 respectively.

References:
systemjs/systemjs#2147
rollup/rollup#3420
TanStack/table#1995

@TheMcMurder
Copy link
Contributor Author

@mosch Due to the netlify node version the build is using this fails deployment despite passing all tests. What would it take to get this merged and published to NPM?

@TheMcMurder
Copy link
Contributor Author

@mosch Is there anything I can do to help get this fix merged?

@mosch
Copy link
Owner

mosch commented Jul 16, 2020

@TheMcMurder I'll check it out tonight!

@mosch mosch merged commit 41529ff into mosch:master Jul 17, 2020
@mosch
Copy link
Owner

mosch commented Jul 17, 2020

Published as v11.0.10

@TheMcMurder TheMcMurder deleted the upgrade-rollup branch July 17, 2020 14:40
@mosch
Copy link
Owner

mosch commented Jul 20, 2020

@TheMcMurder #340 this seems to issued a new 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.

None yet

2 participants