Closed dario-piotrowicz closed 8 months ago
I had to make a release so that we could get this hot-fix in: https://github.com/cloudflare/next-on-pages/pull/534
So I did release the next-dev
submodule but I marked it as experimental: https://github.com/cloudflare/next-on-pages/pull/537
So now what needs to be done is to revert https://github.com/cloudflare/next-on-pages/pull/537 when we finalize the next-dev
submodule's API
I think we should follow Wrangler's new API here
TODO after changing the API:
Note: the new Wrangler API accepts Uint8Array
types for vars but Miniflare does not yet (but it's going to)
I've added the blocked by external
label as this requires wrangler to be properly updated to surface the Bindings
type (and potentially the getBindingsProxy
utility) before we can proceed with this
In https://github.com/cloudflare/next-on-pages/pull/486 we've added the
next-dev
submodule for adding local bindings to next dev.The submodule exports the
setupDevBindings
function which accepts aDevBindingsOptions
object for the various options.Most of the options there follow Miniflare's API with the exception of
textBindings
(which in Miniflare is justbindings
), adding a new term there could be worse/more confusing then just sticking with the (potentially confusing)bindings
term (see https://github.com/cloudflare/next-on-pages/pull/486#discussion_r1368980906).So before our next release we need to decide how the
DevBindingsOptions
object needs to look like, the alternatives are:textBindings
withbindings
(to align it more with Miniflare)