Support Promise.finally()
- Dominant language
- JavaScript
- Stars
- 419
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
```
TypeError: decompress(...).then(...).catch(...).finally is not a function
at File._extractOnFinish (…\lib\file.js:243:18)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at EventEmitter.emit (events.js:208:7)
at WriteStream. (…\lib\file.js:162:32)
at emitNone (events.js:111:20)
at WriteStream.emit (events.js:208:7)
at finishMaybe (_stream_writable.js:614:14)
at afterWrite (_stream_writable.js:465:3)
at onwrite (_stream_writable.js:455:7)
at fs.write (fs.js:2192:5)
at FSReqWrap.wrapper [as oncomplete] (fs.js:685:5)
```
The module `pify` ([github](https://github.com/sindresorhus/pify)) allows option `promiseModule`, we should be able to pass a Promise function that supports `finally()`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in lib/file.js around _extractOnFinish at line 243, then trace how pify is configured and how the promise chain is created. Done means the extraction path can use a Promise implementation that provides finally(), while preserving the existing behavior for the reported call path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100