Skip to content

Commit 35a97fa

Browse files
authored
feat: package is now ESM (#244)
BREAKING CHANGE: package is now ESM
1 parent 9e4dfee commit 35a97fa

File tree

11 files changed

+252
-165
lines changed

11 files changed

+252
-165
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Node
7676
Install with `npm install @octokit/auth-oauth-user`
7777

7878
```js
79-
const { createOAuthUserAuth } = require("@octokit/auth-oauth-user");
79+
import { createOAuthUserAuth } from "@octokit/auth-oauth-user";
8080
```
8181

8282
</td></tr>
@@ -167,8 +167,8 @@ Node
167167
Install with `npm install @octokit/core @octokit/auth-oauth-user`. Optionally replace `@octokit/core` with a compatible module
168168

169169
```js
170-
const { Octokit } = require("@octokit/core");
171-
const { createOAuthUserAuth } = require("@octokit/auth-oauth-user");
170+
import { Octokit } from "@octokit/core";
171+
import { createOAuthUserAuth } from "@octokit/auth-oauth-user";
172172
```
173173

174174
</td></tr>
@@ -297,7 +297,7 @@ The <code>redirect_uri</code> parameter you provided in [Step 1 of GitHub's OAut
297297
You can pass in your own <a href="https://github.com/octokit/request.js"><code>@octokit/request</code></a> instance. For usage with enterprise, set <code>baseUrl</code> to the API root endpoint. Example:
298298

299299
```js
300-
const { request } = require("@octokit/request");
300+
import { request } from "@octokit/request";
301301
createOAuthAppAuth({
302302
clientId: "1234567890abcdef1234",
303303
clientSecret: "1234567890abcdef1234567890abcdef12345678",
@@ -401,7 +401,7 @@ const auth = createOAuthUserAuth({
401401
You can pass in your own <a href="https://github.com/octokit/request.js"><code>@octokit/request</code></a> instance. For usage with enterprise, set <code>baseUrl</code> to the API root endpoint. Example:
402402

403403
```js
404-
const { request } = require("@octokit/request");
404+
import { request } from "@octokit/request";
405405
createOAuthAppAuth({
406406
clientId: "1234567890abcdef1234",
407407
clientSecret: "1234567890abcdef1234567890abcdef12345678",
@@ -539,7 +539,7 @@ createOAuthAppAuth({
539539
You can pass in your own <a href="https://github.com/octokit/request.js"><code>@octokit/request</code></a> instance. For usage with enterprise, set <code>baseUrl</code> to the API root endpoint. Example:
540540

541541
```js
542-
const { request } = require("@octokit/request");
542+
import { request } from "@octokit/request";
543543
createOAuthAppAuth({
544544
clientId: "1234567890abcdef1234",
545545
clientSecret: "1234567890abcdef1234567890abcdef12345678",

0 commit comments

Comments
 (0)