v0.14 -> v0.15 migration guide
Removed Requests+
As we said before, Requests+ features are totally removed in 0.15.
Passing options
won't do anything.
Removed ApiQueue
After Spawner API release, there are no need in ApiQueue
because of duplicated logic:
// <=0.15
import { ApiQueue } from '@apicase/core'
const queue = new ApiQueue()
queue.push(SomeService.doRequest, { url: '/foo' })
queue.push(SomeService.doRequest, { url: '/bar' })
queue.push(SomeService.doRequest, { url: '/baz' })
// 0.15+
import { ApiSpawner } from '@apicase/spawner'
const spawner = new ApiSpawner({
mode: "queue",
base: SomeService
})
/* Spawn requests */
spawner.spawn({ url: "/foo" })
spawner.spawn({ url: "/bar" })
spawner.spawn({ url: "/baz" })
So, you have to get rid of ApiQueue
in order to ApiSpawner
with queue
mode.
Removed ApiService
ApiService
is now totally removed from @apicase/core
package. Use @apicase/services
instead.