Releases: jaydenseric/graphql-react
Releases · jaydenseric/graphql-react
Version 11.2.0
Minor
- Added a new
cacheKeyCreatoroption to theGraphQLinstance methodoperateand theuseGraphQLReact hook. - The previously private
hashObjectfunction is now publicly exported.
Patch
- Replaced Node.js deprecated
notEqualassertions withnotStrictEqualin tests. - Use the
TypeErrorclass instead ofErrorfor relevant errors.
Version 11.1.0
Minor
- Allow React component
displayNameandpropTypesto be removed in production builds, fixing #51. - Refactored the
useGraphQLReact hook to do less work for following renders if theoperationandfetchOptionsOverrideoptions are defined outside the component or memoized using theReact.useMemohook. - Memoize what the
useGraphQLReact hook returns for more efficient hook composition. - Added a new
loadedCacheValueproperty to the GraphQL operation status object returned by theuseGraphQLReact hook. This allows cache for an earlier operation to be rendered while loading changes to the query, variables, orfetchoptions.
Patch
- Updated dependencies.
- Use
coverage-nodeto enforce 100% code coverage for tests. - Increased the universal API size-limit from 3 KB to 3.5 KB.
- Updated the
useGraphQLReact hook examples to use the GitHub GraphQL API. - Improved the
useGraphQLReact hook tests. - Improved documentation.
Version 11.0.4
Patch
- Clearly documented ways to
importandrequirethe package exports.
Version 11.0.3
Patch
- Updated the
extract-filesdependency to v9.0.0, and used its new deeprequirepath. - Updated dev dependencies.
- No longer test Node.js v13 in GitHub Actions CI.
- Corrected the Browserslist query in the Babel config for the server API.
- Write tests as CJS and no longer separately build and test ESM and CJS to simplify package scripts, Babel and ESLint config.
- Removed the
@babel/plugin-proposal-class-propertiesdev dependency and config, as@babel/preset-envhas handed this via it’sshippedProposalsoptions since v7.10.0. - Removed unnecessary
.jsfile extensions fromrequirepaths. - Improved polyfilling globals in tests:
- Use
revertable-globalsto define globals per-test. - Use
node-fetchv3 instead ofcross-fetch.
- Use
- Removed a no longer necessary
formdata-nodeworkaround ingraphqlFetchOptionstests. - Removed
npm-debug.logfrom the.gitignorefile as npm v4.2.0+ doesn’t create it in the current working directory.
Version 11.0.2
Patch
- Updated dependencies.
- Simplified the GitHub Actions CI config with the
npm install-testcommand. - Use Babel config
overridesto ensure.jsfiles are parsed as scripts, eliminating BabelinteropRequireDefaulthelpers from transpilation output. - Updated Zeit/Vercel related URLs in documentation.
- Updated the readme “Apollo comparison” section.
Version 11.0.1
Patch
- Updated Node.js support to
^10.17.0 || ^12.0.0 || >= 13.7.0. This is only a correction; the dependency updates with breaking changes happened in previous versions. - Updated dependencies.
- Simplified JSX boolean props in tests.
- Improved event documentation.
- Fixed an incorrect
reportCacheErrorsJSDoc parameter type. - Updated EditorConfig.
Version 11.0.0
Major
- Added a package
exportsfield to support native ESM in Node.js. - Some source and published files are now
.js(CJS) instead of.mjs(ESM), so undocumented deep imports may no longer work. This approach avoids the dual package hazard. - Updated Node.js support from v10+ to
10 - 12 || >= 13.7to reflect the packageexportsrelated breaking changes.
Patch
- Updated dependencies.
- Added a new
babel-plugin-transform-runtime-file-extensionsdev dependency to simplify Babel config. - Improved the package
prepare:prettierandtest:prettierscripts. - Reordered the package
test:eslintscript args for consistency withtest:prettier. - Configured Prettier option
semito the default,true. - Reconfigured
size-limit:- Separately test the universal and server only exports, without using unpublished size limit entry files that bloat the measured sizes.
- Separately test the ESM and CJS exports.
- Separately limit tests, with the universal ESM and CJS set to a 3 KB maximum size.
- Removed redundant ESLint disable comments.
- Also run GitHub Actions with Node.js v14.
- Updated readme content.
- Updated JSDoc code examples:
- Prettier formatting.
- Import React in examples containing JSX.
- Use Node.js ESM compatible import specifiers.
Version 10.0.0
Major
- Updated Node.js support from v8.10+ to v10+.
- Updated dependencies, some of which require Node.js v10+.
- Replaced the
tapdev dependency withtest-directorandhard-rejection, and refactored tests accordingly. This improves the dev experience and reduced the dev install size by ~75.5 MB. - Use
ReactDOM.unstable_batchedUpdatesin theuseGraphQLReact hook to reduce the number of renders when loading completes, fixing #38 via #42. Althoughreact-domwas already a peer dependency, this is the first time it's being used in the client API; potentially a breaking change for atypical projects.
Patch
- Updated tests for compatibility with updated dependencies.
- Removed the
object-assigndependency and several Babel dev dependencies after simplifying the Babel config. - Added a new
babel-plugin-transform-require-extensionsdev dependency and ensured ESM import specifiers in both source and published.mjsfiles contain file names with extensions, which are mandatory in the final Node.js ESM implementation. Published CJS.jsfiles now also have file extensions inrequirepaths. - Stop using
huskyandlint-staged. - Lint fixes for
prettierv2. - Tidied Babel configs.
- Ensure GitHub Actions run on pull request.
- Use strict mode for scripts.
- Readme “Apollo comparison” section corrections and tweaks.
Version 9.1.0
Minor
- Setup GitHub Sponsors funding:
- Added
.github/funding.ymlto display a sponsor button in GitHub. - Added a
package.jsonfundingfield to enable npm CLI funding features.
- Added
Patch
- Updated dev dependencies.
Version 9.0.0
Major
- Updated Node.js support from v8.5+ to v8.10+, to match what the
eslintdev dependency now supports. This is unlikely to be a breaking change for the published package. - The
useGraphQLReact hookloadOnMount,loadOnReload, andloadOnResetoptions now default tofalseinstead oftrue. The loading related options are now all opt-in, which is easier to remember and simpler to configure for situations that previously required manual reversal of certain option defaults. It's also safer when working with mutations you don't want to accidentally load.
Patch
- Updated dependencies.
- Replaced the
size-limitdev dependency with@size-limit/preset-small-lib. - Fixed the
useGraphQLenabled optionloadOnReloadcausing a load when the globalGraphQLcache is reloaded even if there was no previously cached data to reload. - Tweaked the
useGraphQLoptionloadOnResetdocumentation. - Removed
package-lock.jsonfrom.gitignoreand.prettierignoreas it’s disabled in.npmrcanyway. - Removed redundant ESLint ignore comments.
- Use GitHub Actions instead of Travis for CI.
- Minor simplification in
useGraphQLtests. - Documentation improvements, fixing #35:
- Updated the project description with better phrasing that includes the bundle size.
- Moved the readme “Apollo comparison” section to the end, and updated the “Bundle impact” subsection for the new Apollo React hooks API.
- Added a basic example of the core API features working together to the “Examples” section, with tips commented.
- Clarified that Opera Mini isn’t supported in the Browserslist queries and readme “Support” section.
- Cleaner readme “API” section table of contents with “See” and “Examples” headings excluded, thanks to
jsdoc-mdv3.1.0.