🥀

@octokit/webhooks-definitions は deprecated

2022/09/26に公開約800字

ESLint error

> npm run lint      
   3:56  error  Unable to resolve path to module '@octokit/webhooks-definitions/schema'  import/no-unresolved

Deprecated

https://www.npmjs.com/package/@octokit/webhooks-definitions
https://github.com/octokit/webhooks/issues/447

3 つのパッケージに分割されたようです。

  1. @octokit/webhooks-types - TypeScript definitions
  2. @octokit/webhooks-schemas - JSON Schemas
  3. @octokit/webhooks-examples - Examples for all webhook events

Replace

.ts ファイルで使用しているので @octokit/webhooks-types に置き換えます。

npm uninstall @octokit/webhooks-definitions
npm install @octokit/webhooks-types
example.ts
-import {PullRequestEvent, PullRequestReviewEvent} from '@octokit/webhooks-definitions/schema'
+import {PullRequestEvent, PullRequestReviewEvent} from '@octokit/webhooks-types'

Discussion

ログインするとコメントできます