You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since switching from urql/core 3.0.3 to 4.0.10 and graphcache 5.0.1 to 6.1.1 our Next bundle no longer runs in Safari 12 or 13.
It's due to the public field declaration use in GraphCache - specifically the lines keyOfField=keyOfField;
and resolveFieldByKey=this.resolve;
in class Store
I can see you changed browser support in August 2022 - and say that you support ECMA2015+ which includes Safari 12.
The addition of @babel/plugin-proposal-class-properties would correct the transpilation I believe.
Is this something you'd be happy to add please?
Using https://babeljs.io/ - compiled version of urql-exchange-graphcache.mjs - AS IS:
Using https://babeljs.io/ - compiled version of urql-exchange-graphcache.mjs - WITH @babel/plugin-proposal-class-properties PLUGIN:
Hey, thanks for reporting this! 🙌
I'll make sure I get a hotfix out since this affects Safar <14.1 and is hence quite severe. I spotted the PR that regressed this but, to keep the build process simple and lean with recent changes, I put a further ESLint rule in place that should prevent regression on this.
Cheers!
kitten
changed the title
Support for Safari 12+ babel issue in GraphCache's store class
Untranspiled class property initializers break Safari <14.1
Jun 15, 2023
kitten
changed the title
Untranspiled class property initializers break Safari <14.1
graphcache: Untranspiled class property initializers break Safari <14.1
Jun 15, 2023
Describe the bug
Since switching from urql/core 3.0.3 to 4.0.10 and graphcache 5.0.1 to 6.1.1 our Next bundle no longer runs in Safari 12 or 13.
It's due to the public field declaration use in GraphCache - specifically the lines
keyOfField=keyOfField;
and
resolveFieldByKey=this.resolve;
in class Store
I can see you changed browser support in August 2022 - and say that you support ECMA2015+ which includes Safari 12.
The addition of
@babel/plugin-proposal-class-properties
would correct the transpilation I believe.Is this something you'd be happy to add please?
Using https://babeljs.io/ - compiled version of urql-exchange-graphcache.mjs - AS IS:
Using https://babeljs.io/ - compiled version of urql-exchange-graphcache.mjs - WITH @babel/plugin-proposal-class-properties PLUGIN:
Reproduction
https://github.com/urql-graphql/urql/blob/main/exchanges/graphcache/src/store/store.ts
Urql version
Validations
The text was updated successfully, but these errors were encountered: