cloudinary / cloudinary_npm

Cloudinary NPM for node.js integration
629 stars 323 forks source link

Lock jsdoc version to fix deps lint error #669

Closed magdakwiecien closed 4 months ago

magdakwiecien commented 4 months ago

Brief Summary of Changes

There's jsdoc ^3.5.5 in package json. Because of the caret, currently installed version is 3.6.11. This newer version contains the markdown-it and @types/markdown-it packages, and the latter one gives an dtslint error in the CI:

> cloudinary@2.2.0 dtslint /home/travis/build/cloudinary/cloudinary_npm
> tools/scripts/ditslint.sh
Error: Errors in typescript@local for external dependencies:
../node_modules/@types/markdown-it/lib/index.d.ts(151,33): error TS2694: Namespace 'LinkifyIt' has no exported member 'LinkifyIt'.
    at /home/travis/build/cloudinary/cloudinary_npm/node_modules/dtslint/bin/index.js:190:19
    at Generator.next (<anonymous>)
    at fulfilled (/home/travis/build/cloudinary/cloudinary_npm/node_modules/dtslint/bin/index.js:5:58)

Locking the jsdoc version to exact 3.5.5 helps CI to pass successfully.

Maybe there's another, better solution than downgrading jsdoc package (e.g. upgrading it to 4.x version; in general, many packages used here are outdated, also dtslint), but for the time being this fix seems to be a quick, safe and working solution.

What Does This PR Address?

Are Tests Included?

Reviewer, Please Note: