From c99ff62ea2661453bfa94ccd6338061a83b7f280 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Tue, 7 May 2024 13:46:08 -0400 Subject: [PATCH] fix(docs): remove NodeJS 10 and add callout for conditional exports (#2675) --- README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c0a2f26b57..87f08170dd 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,21 +86,16 @@ 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"); -``` - +> [!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).