Skip to content

v9.0.0

Latest
Compare
Choose a tag to compare
@exogen exogen released this 16 Apr 04:54
· 5 commits to master since this release

Breaking Change

  • This package is now written and distributed as native ECMAScript modules. The minimum Node.js version is now v12.18.0.
  • Public exports are now defined using the package.json exports field. No more reaching into graphbrainz/lib to import various helpers; instead, most helpers are exported from the package root (including everything necessary to implement extensions). The built-in extensions are still available as graphbrainz/extensions/cover-art-archive, graphbrainz/extensions/fanart-tv, graphbrainz/extensions/mediawiki, and graphbrainz/extensions/the-audio-db.
  • There is no longer a default export; the GraphBrainz middleware is now exported under the name middleware.
  • When calling createSchema or createContext, the extensions option must contain the already resolved extension objects to apply, rather than the module paths to import. Using module paths with dynamic import() would require making these functions asynchronous, which was too difficult to work with. You can still supply a list of module names to the GraphBrainz middleware function, since that can work asynchronously.
  • The HTTP client used by the built-in Client class now uses got instead of request (which has been deprecated). Extensions subclassing Client will potentially need to update the options they pass when making calls.
  • The various retry options previously implemented by Client are now deprecated. It now uses got’s retry support via the retry option, and will use got’s defaults if not specified.

Internal

  • All dependencies upgraded.
  • No more Babel, syntax supported by modern Node.js is used instead.
  • Migrated off of replayer and onto ava-nock for HTTP record & replay in tests.