Skip to content

Commit

Permalink
fix(docs): remove NodeJS 10 and add callout for conditional exports (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed May 7, 2024
1 parent 13a86ad commit c99ff62
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import { Octokit, App } from "https://esm.sh/octokit?dts";

</td></tr>
<tr><th>
Node 12+
Node
</th><td>

Install with <code>npm/pnpm install octokit</code>, or <code>yarn add octokit</code>
Expand All @@ -86,21 +86,16 @@ Install with <code>npm/pnpm install octokit</code>, or <code>yarn add octokit</c
import { Octokit, App } from "octokit";
```

</td></tr>
<tr><th>
Node 10 and below
</th><td>

Install with <code>npm/pnpm install octokit</code>, or <code>yarn add octokit</code>

```js
const { Octokit, App } = require("octokit");
```

</td></tr>
</tbody>
</table>

> [!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).<br>
> 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).
Expand Down

0 comments on commit c99ff62

Please sign in to comment.