zlargon / google-tts

Google TTS (Text-To-Speech) for node.js
https://www.npmjs.com/package/google-tts-api
MIT License
276 stars 56 forks source link

fix node fetch vulnerability #32

Closed okhiroyuki closed 3 years ago

okhiroyuki commented 3 years ago

Update isomorphic-fetch to eliminate a node-fetch vulnerability.

refs: #31

test

yarn test
yarn run v1.22.10
$ mocha

  English TTS
    ✓ Hello (101ms)
    ✓ hello
    ✓ hello world
    ✓ 123

  Long Characters
    ✓ English: 180 characters
    ✓ English: 200 characters
    ✓ English: 268 characters throw RangeError
    ✓ Chinese: 193 characters
    ✓ Chinese: 200 characters
    ✓ Chinese: 211 characters throw RangeError

  parameters
    ✓ text = null (566ms)
    ✓ text = '' (201ms)
    ✓ text = 123 (186ms)
    ✓ lang = null (191ms)
    ✓ lang = '' (198ms)
    ✓ lang = 123 (number) (193ms)
    ✓ speed = null (188ms)
    ✓ speed = '123' (226ms)
    ✓ timeout = 10 ms (too short to success)

  Chinese TTS
    ✓ 你好
    ✓ 你好世界
    ✓ 123

  22 passing (2s)

✨  Done in 4.75s.
coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 96.364% when pulling 7be0b40628cd8ce885e34aac28604d45bd9af906 on okhiroyuki:fix/node-fetch-vulnerability into b55689fffcdcc2445ad30a65d51899f18bfb8e6f on zlargon:master.

zlargon commented 3 years ago

@okhiroyuki, thanks for helping solve the vulnerability. The vulnerability issue has been fixed in the latest version 0.0.5. Also, the test framework was changing from Mocha to Jest for better supporting with latest node version. Thanks.