Skip to content

Commit c99ff62

Browse files
authored
fix(docs): remove NodeJS 10 and add callout for conditional exports (#2675)
1 parent 13a86ad commit c99ff62

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import { Octokit, App } from "https://esm.sh/octokit?dts";
7777

7878
</td></tr>
7979
<tr><th>
80-
Node 12+
80+
Node
8181
</th><td>
8282

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

89-
</td></tr>
90-
<tr><th>
91-
Node 10 and below
92-
</th><td>
93-
94-
Install with <code>npm/pnpm install octokit</code>, or <code>yarn add octokit</code>
95-
96-
```js
97-
const { Octokit, App } = require("octokit");
98-
```
99-
10089
</td></tr>
10190
</tbody>
10291
</table>
10392

93+
> [!IMPORTANT]
94+
> 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"`.
95+
>
96+
> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).<br>
97+
> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus)
98+
10499
## `Octokit` API Client
105100

106101
**standalone minimal Octokit**: [`@octokit/core`](https://github.com/octokit/core.js/#readme).

0 commit comments

Comments
 (0)