OP-Engineering / link-preview-js

⛓ Extract web links information: title, description, images, videos, etc. [via OpenGraph], runs on mobiles and node.
MIT License
770 stars 124 forks source link

Incompatible patch versions #123

Closed pavlikm closed 2 years ago

pavlikm commented 2 years ago

Describe the bug version 2.1.17 use in ILinkPreviewOptions attribute followRedirects as boolean, but in 2.1.19 is it declared as followRedirects?: 'follow' | 'error' | 'manual'; wich causing error Type 'true' is not assignable to type '"follow" | "error" | "manual"'

To Reproduce Steps to reproduce the behavior:

  1. await getLinkPreview(url, {timeout: 3000, followRedirects: 'follow'}); on version 2.1.17 works
  2. await getLinkPreview(url, {timeout: 3000, followRedirects: 'follow'}); on version 2.1.19 throws error

Expected behavior Despite this version 2.1.19 is versioned as patch version, it must be backward compatible with older version 2.1.17. Otherwise please publish version 3.0.0

Additional context semver.

ospfranco commented 2 years ago

Fine, I'll publish a new version