Closed mattwoodage closed 1 year ago
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 thanks so much.
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;
andresolveFieldByKey=this.resolve;
in class StoreI 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