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 objectSpread2 backward compatibility #10170
Fix objectSpread2 backward compatibility #10170
Conversation
nicolo-ribaudo
commented
Jul 5, 2019
Q | A |
---|---|
Fixed Issues? | Fixes #10169 |
Patch: Bug Fix? | yes |
Major: Breaking Change? | |
Minor: New Feature? | |
Tests Added + Pass? | Yes |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11055/ |
1 similar comment
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11055/ |
@nicolo-ribaudo: Using v7.5.1 still fails for us https://travis-ci.org/twbs/bootstrap/jobs/554971554 |
It seems like there is a problem with the way Or you can also try forcing rollup to use |
I’m seeing the function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { if (i % 2) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } else { Object.defineProperties(target, Object.getOwnPropertyDescriptors(arguments[i])); } } return target; } Is that something y’all’re aware of? |
Did you tell |
@nicolo-ribaudo FYI the Also, if the |
As suggested by @nicolo-ribaudo here: babel/babel#10170 (comment) Though not (yet) documented here: https://babeljs.io/docs/en/next/babel-plugin-transform-runtime.html
@nicolo-ribaudo That was the trick I needed, thanks! @billyjanitsch I was just about to leave a similar comment about documentation. You have my full support for opening an issue. |
Thanks! I have opened babel/website#2055 in the meantime, but a PR would be appreciated 😊
The try-catch block is used when loading the v7.5 plugin with an older |