Only important and/or breaking changes are documented here.
- remove "name" key, in favor of "title" key
- add "ext" key
- ensure duration is a duration
- add custom providers
- embed is now called source
- ext is the extension matching the mime type
- url is kept in response
- canonical url is inspected if any
- new way to search for embeds and objects
- providers option can be a path to a module
- html does not contain
<script>
, instead a script url is added
- providers endpoints can have a "last" property (default true), telling more endpoints can be found. This allows one to add a builder to an endpoint.
- use twitter oembed endpoint and get missing info from snippet.
- use libcurl to work around many issues with nodejs http(s,2) client.
-
Change
type
semantics (link becomes page, archive becomes file). -
New field:
use
tells how the resource should be shown. -
Update default html fields according to type/use
-
ext is now only generated by mime module - it is safe to use
-
revert the change of name for
type
, for better compatibility with previous versions. Type represents how the url/html can be used. -
what: the field that tells what the url represents
- drop the
all
option - throw using http-errors (err becomes err.statusCode)
- node >= 12 required
- expose Inspector class
inspector(url, opts)
becomesnew Inspector(opts).look(url)
- the object passed to look can contain user-set metadata that won't be overwritten
inspector.norm(obj)
to normalize an object without look
- Move to ESM
- Engine: node >= 16
- Depends streat 1.0.0 which properly clean exiftool process on exit
- opts.providers must be an array, not a path. Only --providers cli can be a path.
- connection timeout (default 5 seconds)
- fix source inspection
- fix how types are inferred
- support array of strings in metadata
- update deps