From 687a39c58024d9b23b035570de06dabcba20e4fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 18:13:07 +0000 Subject: [PATCH] Version Packages (#660) Co-authored-by: github-actions[bot] --- .changeset/healthy-yaks-look.md | 30 ------------- .changeset/loud-hounds-suffer.md | 17 ------- .../eslint-plugin-next-on-pages/CHANGELOG.md | 2 + .../eslint-plugin-next-on-pages/package.json | 2 +- packages/next-on-pages/CHANGELOG.md | 45 +++++++++++++++++++ packages/next-on-pages/package.json | 2 +- 6 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 .changeset/healthy-yaks-look.md delete mode 100644 .changeset/loud-hounds-suffer.md diff --git a/.changeset/healthy-yaks-look.md b/.changeset/healthy-yaks-look.md deleted file mode 100644 index dcaf48cda..000000000 --- a/.changeset/healthy-yaks-look.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'@cloudflare/next-on-pages': minor ---- - -Add new `getRequestContext` utility - -Introduce a new `getRequestContext` utility that allows developer to get access not only -to their Cloudflare `env` but also to their `cf` and `ctx` objects - -The utility can only be used in server-only code (meaning that it is incompatible with -Pages-router components). - -Usage example: - -```ts -// app/api/hello/route.js - -import { getRequestContext } from '@cloudflare/next-on-pages'; - -export const runtime = 'edge'; - -export async function GET(request) { - const { - env, - cf, - ctx: { waitUntil }, - } = getRequestContext(); - // ... -} -``` diff --git a/.changeset/loud-hounds-suffer.md b/.changeset/loud-hounds-suffer.md deleted file mode 100644 index bfbf68992..000000000 --- a/.changeset/loud-hounds-suffer.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@cloudflare/next-on-pages': minor ---- - -add new `setupDevPlatform` while deprecating `setupDevBindings` - -Previously developers would provide their bindings as inline options passed to -the `setupDevBindings` function (see: https://github.com/cloudflare/next-on-pages/tree/main/internal-packages/next-dev#how-to-use-the-module) - -Such function has been deprecated and the new `setupDevPlatform` has been added instead as its replacement, the latter does not -require users to use inline options but it reads and gathers the binding definitions from the user's `wrangler.toml` file instead, -this is: - -- consistent with the newly introduced `getBindingsProxy` utility (which is actually being used here under the hood) - (https://developers.cloudflare.com/workers/wrangler/api/#getbindingsproxy) -- more convenient for users, since `wrangler pages dev` is also going to read the `wrangler.toml` file, making users - only need to declare the bindings at most once for local development instead of twice diff --git a/packages/eslint-plugin-next-on-pages/CHANGELOG.md b/packages/eslint-plugin-next-on-pages/CHANGELOG.md index cf9ec6552..a7cbaccd5 100644 --- a/packages/eslint-plugin-next-on-pages/CHANGELOG.md +++ b/packages/eslint-plugin-next-on-pages/CHANGELOG.md @@ -1,5 +1,7 @@ # eslint-plugin-next-on-pages +## 1.9.0 + ## 1.8.6 ## 1.8.5 diff --git a/packages/eslint-plugin-next-on-pages/package.json b/packages/eslint-plugin-next-on-pages/package.json index fc3c33a13..714944739 100644 --- a/packages/eslint-plugin-next-on-pages/package.json +++ b/packages/eslint-plugin-next-on-pages/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-next-on-pages", - "version": "1.8.6", + "version": "1.9.0", "main": "dist/index.js", "scripts": { "prebuild": "rimraf dist", diff --git a/packages/next-on-pages/CHANGELOG.md b/packages/next-on-pages/CHANGELOG.md index 7546c4fde..1be1654da 100644 --- a/packages/next-on-pages/CHANGELOG.md +++ b/packages/next-on-pages/CHANGELOG.md @@ -1,5 +1,50 @@ # @cloudflare/next-on-pages +## 1.9.0 + +### Minor Changes + +- 5712c57: Add new `getRequestContext` utility + + Introduce a new `getRequestContext` utility that allows developer to get access not only + to their Cloudflare `env` but also to their `cf` and `ctx` objects + + The utility can only be used in server-only code (meaning that it is incompatible with + Pages-router components). + + Usage example: + + ```ts + // app/api/hello/route.js + + import { getRequestContext } from '@cloudflare/next-on-pages'; + + export const runtime = 'edge'; + + export async function GET(request) { + const { + env, + cf, + ctx: { waitUntil }, + } = getRequestContext(); + // ... + } + ``` + +- 06de52e: add new `setupDevPlatform` while deprecating `setupDevBindings` + + Previously developers would provide their bindings as inline options passed to + the `setupDevBindings` function (see: https://github.com/cloudflare/next-on-pages/tree/main/internal-packages/next-dev#how-to-use-the-module) + + Such function has been deprecated and the new `setupDevPlatform` has been added instead as its replacement, the latter does not + require users to use inline options but it reads and gathers the binding definitions from the user's `wrangler.toml` file instead, + this is: + + - consistent with the newly introduced `getBindingsProxy` utility (which is actually being used here under the hood) + (https://developers.cloudflare.com/workers/wrangler/api/#getbindingsproxy) + - more convenient for users, since `wrangler pages dev` is also going to read the `wrangler.toml` file, making users + only need to declare the bindings at most once for local development instead of twice + ## 1.8.6 ### Patch Changes diff --git a/packages/next-on-pages/package.json b/packages/next-on-pages/package.json index d8c25c39c..22f60c4bc 100644 --- a/packages/next-on-pages/package.json +++ b/packages/next-on-pages/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/next-on-pages", - "version": "1.8.6", + "version": "1.9.0", "bin": "./bin/index.js", "exports": { ".": "./dist/api/index.js",