-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 yarn behaviour when scripts are failing #5497
Conversation
Added babel-plugin-transform-builtin-extend
This change will increase the build size from 10.51 MB to 10.52 MB, an increase of 9.31 KB (0%)
|
wow, nice find. 👏 I never would have guessed that |
It looks like we haven't changed the npm publishing code in quite a while: https://github.com/yarnpkg/yarn/blame/master/scripts/update-npm.sh. Maybe the build config changed, but I'm not sure. |
Summary
Fix for #5451, #5457.
The test case in the first commit fails for pre-node5 builds, in the way described in the links issues. The problem are classes deriving from
Error
, which are problematic in ES5 (babel). Addingbabel-plugin-transform-builtin-extend
fixes the issue in this case.Why now?
The error surfaced because the current yarn build published on npm is a pre-node5 build while for example v1.3.1 seems to have been created by the more modern build configuration. This can be seen by checking if code like "class A extends B" got compiled to ES5 or not.