-
Notifications
You must be signed in to change notification settings - Fork 74
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
Babel versions circa 7.20 are incompatible with Hardened JavaScript #1846
Comments
See #576 |
For reference, I was able to downgrade babel in a dapp by using the following
I've also verified that the following patches to chalk are sufficient to work around the babel override mistake in affected versions: Agoric/dapp-card-store@7cf2648 Finally I've also asked if it'd be possible to release new versions of |
Looks like new versions of the babel packages got published with the fix. |
Describe the bug
Refs: Agoric/agoric-sdk#8458
Refs: #1842
New contract packages are encountering a new Hardened JavaScript incompatibility (property override mistake) when attempting to use
@endo/bundle-source
to generate contract bundles.One of the following errors appears:
Or:
Work-arounds
One option is to patch current versions, as demonstrated for this contract Kryha/KREAd@3c98655
Or, adding the following snippet to
package.json
in the affected application and runningyarn
should temporarily mitigate the problem. This will become vestigial and should be removed when a patch for@babel/code-frame
gets released.Or, call lockdown with override-taming set to severe:
Steps to reproduce
@endo/bundle-source
to dependenciesyarn
entry.js
bundle-source --to-json bundles entry.js entry
Expected behavior
Should generate a bundle in
bundles
.Platform environment
All
Additional context
Babel released what it believed to be a backward-compatible version circa 7.20 that introduced one or more property override mistakes incompatible with the Hardened JavaScript environment. Since semver does not differentiate between ordinary JavaScript and hardened JavaScript and as Babel does not test under a Hardened JavaScript environment (or merely an environment with a few frozen intrinsic prototypes), the breaking change was not recognized by the authors.
Notes
@babel/highlight
7.22.5 is compatible@babel/code-frame
7.18.6 is compatible@bable/code-frame
7.22.13 is incompatibleThe text was updated successfully, but these errors were encountered: