Skip to content

Releases: jaydenseric/graphql-react

Version 11.2.0

24 Sep 04:22
Compare
Choose a tag to compare

Minor

  • Added a new cacheKeyCreator option to the GraphQL instance method operate and the useGraphQL React hook.
  • The previously private hashObject function is now publicly exported.

Patch

  • Replaced Node.js deprecated notEqual assertions with notStrictEqual in tests.
  • Use the TypeError class instead of Error for relevant errors.

Version 11.1.0

22 Sep 01:18
Compare
Choose a tag to compare

Minor

  • Allow React component displayName and propTypes to be removed in production builds, fixing #51.
  • Refactored the useGraphQL React hook to do less work for following renders if the operation and fetchOptionsOverride options are defined outside the component or memoized using the React.useMemo hook.
  • Memoize what the useGraphQL React hook returns for more efficient hook composition.
  • Added a new loadedCacheValue property to the GraphQL operation status object returned by the useGraphQL React hook. This allows cache for an earlier operation to be rendered while loading changes to the query, variables, or fetch options.

Patch

  • Updated dependencies.
  • Use coverage-node to enforce 100% code coverage for tests.
  • Increased the universal API size-limit from 3 KB to 3.5 KB.
  • Updated the useGraphQL React hook examples to use the GitHub GraphQL API.
  • Improved the useGraphQL React hook tests.
  • Improved documentation.

Version 11.0.4

28 Jul 00:51
Compare
Choose a tag to compare

Patch

  • Clearly documented ways to import and require the package exports.

Version 11.0.3

27 Jul 12:23
Compare
Choose a tag to compare

Patch

  • Updated the extract-files dependency to v9.0.0, and used its new deep require path.
  • 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-properties dev dependency and config, as @babel/preset-env has handed this via it’s shippedProposals options since v7.10.0.
  • Removed unnecessary .js file extensions from require paths.
  • Improved polyfilling globals in tests:
  • Removed a no longer necessary formdata-node workaround in graphqlFetchOptions tests.
  • Removed npm-debug.log from the .gitignore file as npm v4.2.0+ doesn’t create it in the current working directory.

Version 11.0.2

19 Jul 13:09
Compare
Choose a tag to compare

Patch

  • Updated dependencies.
  • Simplified the GitHub Actions CI config with the npm install-test command.
  • Use Babel config overrides to ensure .js files are parsed as scripts, eliminating Babel interopRequireDefault helpers from transpilation output.
  • Updated Zeit/Vercel related URLs in documentation.
  • Updated the readme “Apollo comparison” section.

Version 11.0.1

08 Jun 14:19
Compare
Choose a tag to compare

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 reportCacheErrors JSDoc parameter type.
  • Updated EditorConfig.

Version 11.0.0

03 May 06:23
Compare
Choose a tag to compare

Major

  • Added a package exports field 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.7 to reflect the package exports related breaking changes.

Patch

  • Updated dependencies.
  • Added a new babel-plugin-transform-runtime-file-extensions dev dependency to simplify Babel config.
  • Improved the package prepare:prettier and test:prettier scripts.
  • Reordered the package test:eslint script args for consistency with test:prettier.
  • Configured Prettier option semi to 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

25 Mar 09:17
Compare
Choose a tag to compare

Major

  • Updated Node.js support from v8.10+ to v10+.
  • Updated dependencies, some of which require Node.js v10+.
  • Replaced the tap dev dependency with test-director and hard-rejection, and refactored tests accordingly. This improves the dev experience and reduced the dev install size by ~75.5 MB.
  • Use ReactDOM.unstable_batchedUpdates in the useGraphQL React hook to reduce the number of renders when loading completes, fixing #38 via #42. Although react-dom was 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-assign dependency and several Babel dev dependencies after simplifying the Babel config.
  • Added a new babel-plugin-transform-require-extensions dev dependency and ensured ESM import specifiers in both source and published .mjs files contain file names with extensions, which are mandatory in the final Node.js ESM implementation. Published CJS .js files now also have file extensions in require paths.
  • Stop using husky and lint-staged.
  • Lint fixes for prettier v2.
  • 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

03 Dec 04:01
Compare
Choose a tag to compare

Minor

  • Setup GitHub Sponsors funding:
    • Added .github/funding.yml to display a sponsor button in GitHub.
    • Added a package.json funding field to enable npm CLI funding features.

Patch

  • Updated dev dependencies.

Version 9.0.0

27 Nov 03:46
Compare
Choose a tag to compare

Major

  • Updated Node.js support from v8.5+ to v8.10+, to match what the eslint dev dependency now supports. This is unlikely to be a breaking change for the published package.
  • The useGraphQL React hook loadOnMount, loadOnReload, and loadOnReset options now default to false instead of true. 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-limit dev dependency with @size-limit/preset-small-lib.
  • Fixed the useGraphQL enabled option loadOnReload causing a load when the global GraphQL cache is reloaded even if there was no previously cached data to reload.
  • Tweaked the useGraphQL option loadOnReset documentation.
  • Removed package-lock.json from .gitignore and .prettierignore as it’s disabled in .npmrc anyway.
  • Removed redundant ESLint ignore comments.
  • Use GitHub Actions instead of Travis for CI.
  • Minor simplification in useGraphQL tests.
  • 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-md v3.1.0.