Skip to content

Commit

Permalink
feat: @octokit-next/core (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Oct 8, 2022
1 parent c591f06 commit a9a2439
Show file tree
Hide file tree
Showing 42 changed files with 2,991 additions and 1,893 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -54,10 +54,26 @@ A list of breaking changes compared to latest `@octokit/*` modules
const result = await request("GET /", { request: { fetch } });
```

- `Octokit.defaults` is now `Octokit.withDefaults`

- `Octokit.plugin` is now `Octokit.withPlugins`. Instead of accepting one argument per plugin, the method now accepts a single array argument with all plugins to be applied.

- `@octokit/openapi-types` will be renamed to `@octokit/types-openapi` to be consistents with the `@octokit/types-*` prefixed packages that only contain types

- `@octokit/auth-token`: `createTokenAuth()` no longer accepts a `token` string argument, but requires `options.token`.

- plugins now receive all options passed to the `Octokit` constructor as well as its defaults. Previously only the options passed to the constructor were passed

## Features

- `Octokit.DEFAULTS`
- `octokit.options`

## Notes for later

- replace `request.defaults()` and `endpoint.defaults()` with `request.withDefaults()` and `endpoint.withDefaults()`
- remove `options.previews` from `new Octokit(options)`

## Known issues

- Constructor option Types (`options.auth`) are not set correctly when `authStrategy` is set via `.withDefaults({ authStrategy })` ([#20](https://github.com/octokit/octokit-next.js/issues/20))
Expand Down

0 comments on commit a9a2439

Please sign in to comment.