From f2a29fc2f4ea17985de930024cf1ae31465e7f8c Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 7 May 2024 13:42:03 -0400 Subject: [PATCH 1/2] fix(docs): remove NodeJS 10 --- README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index c0a2f26b57..e85bad1c17 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ import { Octokit, App } from "https://esm.sh/octokit?dts"; -Node 12+ +Node Install with npm/pnpm install octokit, or yarn add octokit @@ -86,17 +86,6 @@ Install with npm/pnpm install octokit, or yarn add octokit - -Node 10 and below - - -Install with npm/pnpm install octokit, or yarn add octokit - -```js -const { Octokit, App } = require("octokit"); -``` - From 45edbed3fa2f03e6bcec8fc29aa9f4eb330b5063 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 7 May 2024 13:42:25 -0400 Subject: [PATCH 2/2] fix(docs): add callout for conditional exports --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index e85bad1c17..87f08170dd 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,12 @@ import { Octokit, App } from "octokit"; +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + ## `Octokit` API Client **standalone minimal Octokit**: [`@octokit/core`](https://github.com/octokit/core.js/#readme).