chore: fix promisify helper (#16544)
* chore: fix promise deprecation helper * fix deprecations * update deprecation tests
This commit is contained in:
parent
63bf370cc0
commit
5a35c3a279
12 changed files with 65 additions and 48 deletions
|
@ -11,10 +11,10 @@ const fromPartition = (partition) => {
|
|||
if (!session[wrappedSymbol]) {
|
||||
session[wrappedSymbol] = true
|
||||
const { cookies } = session
|
||||
cookies.flushStore = deprecate.promisify(cookies.flushStore, 0)
|
||||
cookies.get = deprecate.promisify(cookies.get, 1)
|
||||
cookies.remove = deprecate.promisify(cookies.remove, 2)
|
||||
cookies.set = deprecate.promisify(cookies.set, 1)
|
||||
cookies.flushStore = deprecate.promisify(cookies.flushStore)
|
||||
cookies.get = deprecate.promisify(cookies.get)
|
||||
cookies.remove = deprecate.promisify(cookies.remove)
|
||||
cookies.set = deprecate.promisify(cookies.set)
|
||||
}
|
||||
return session
|
||||
}
|
||||
|
@ -35,6 +35,6 @@ Object.setPrototypeOf(Session.prototype, EventEmitter.prototype)
|
|||
Object.setPrototypeOf(Cookies.prototype, EventEmitter.prototype)
|
||||
|
||||
Session.prototype._init = function () {
|
||||
this.protocol.isProtocolHandled = deprecate.promisify(this.protocol.isProtocolHandled, 2)
|
||||
this.protocol.isProtocolHandled = deprecate.promisify(this.protocol.isProtocolHandled)
|
||||
app.emit('session-created', this)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue