diff --git a/.changeset/slimy-toys-lie.md b/.changeset/slimy-toys-lie.md new file mode 100644 index 000000000..abb77d8bc --- /dev/null +++ b/.changeset/slimy-toys-lie.md @@ -0,0 +1,9 @@ +--- +'@cloudflare/next-on-pages': patch +--- + +update `package.json` to properly export the typescript types + +the current types are declared in the `package.json` via `typesVersions` +such don't seem to get picked up correctly by all package managers, to for +the types use the `package.json` `exports` field instead diff --git a/.changeset/swift-garlics-flash.md b/.changeset/swift-garlics-flash.md new file mode 100644 index 000000000..327e1d562 --- /dev/null +++ b/.changeset/swift-garlics-flash.md @@ -0,0 +1,5 @@ +--- +'@cloudflare/next-on-pages': patch +--- + +fix the `setupDevPlatform`'s `options` parameter not being optional diff --git a/internal-packages/next-dev/src/index.ts b/internal-packages/next-dev/src/index.ts index 7f8753fe4..db79947cd 100644 --- a/internal-packages/next-dev/src/index.ts +++ b/internal-packages/next-dev/src/index.ts @@ -12,7 +12,7 @@ export * from './deprecated'; * @param options options how the function should operate and if/where to persist the platform data */ export async function setupDevPlatform( - options: GetPlatformProxyOptions, + options?: GetPlatformProxyOptions, ): Promise { const continueSetup = shouldSetupContinue(); if (!continueSetup) return; diff --git a/packages/next-on-pages/package.json b/packages/next-on-pages/package.json index 848eae92e..f6c3e2936 100644 --- a/packages/next-on-pages/package.json +++ b/packages/next-on-pages/package.json @@ -3,17 +3,14 @@ "version": "1.11.1", "bin": "./bin/index.js", "exports": { - ".": "./dist/api/index.js", - "./next-dev": "./dist/next-dev/index.cjs" - }, - "typesVersions": { - "*": { - ".": [ - "./dist/api/index.d.ts" - ], - "next-dev": [ - "./dist/next-dev/index.d.ts" - ] + ".": { + "import": "./dist/api/index.js", + "types": "./dist/api/index.d.ts" + }, + "./next-dev": { + "import": "./dist/next-dev/index.cjs", + "require": "./dist/next-dev/index.cjs", + "types": "./dist/next-dev/index.d.ts" } }, "scripts": {