Skip to content

[BUG]: dist-types/index.d.ts is not present in the published NPM package #405

@maxnachlinger

Description

@maxnachlinger

What happened?

Hey awesome maintainers! After upgrading from 4.1.1 to 4.1.2 I noticed the following tsc error:

 error TS7016: Could not find a declaration file for module '@octokit/plugin-retry'. '/some-path-here/node_modules/.pnpm/@octokit+plugin-retry@4.1.2_@octokit+core@4.2.0/node_modules/@octokit/plugin-retry/dist-node/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/octokit__plugin-retry` if it exists or add a new declaration (.d.ts) file containing `declare module '@octokit/plugin-retry';`

2 import { retry } from '@octokit/plugin-retry';

Having a look in the tgz on npm I only see a dist-node directory, but the package.json exports the types in dist-types/index.d.ts

Versions

"@octokit/core": "4.2.0"
"@octokit/plugin-retry": "4.1.2",
"@octokit/rest": "19.0.7",
node 16.19.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working as documentedreleased

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions