Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types missing after upgrading from v5 to v6 #593

Closed
xboy2012 opened this issue Mar 8, 2022 · 3 comments · Fixed by #595
Closed

Types missing after upgrading from v5 to v6 #593

xboy2012 opened this issue Mar 8, 2022 · 3 comments · Fixed by #595
Assignees
Labels
bug 🪲 Something isn't working

Comments

@xboy2012
Copy link
Contributor

xboy2012 commented Mar 8, 2022

I found that after upgrading from v5 to v6

the index.d.ts is deleted, the types are not exposed any more, which is also necessary when using the nodejs API.

Please add the missing types back.

https://github.com/tclindner/npm-package-json-lint/blob/9a0ef3f01960760922a5341f386c594a97c4d3e0/index.d.ts

@tclindner
Copy link
Owner

Hey @xboy2012 where you referencing this file directly? All types should be in the dist directory now. The package.json file has a types reference that points to the public api. Will this new approach work for you?

@xboy2012
Copy link
Contributor Author

xboy2012 commented Mar 9, 2022

Hey @xboy2012 where you referencing this file directly? All types should be in the dist directory now. The package.json file has a types reference that points to the public api. Will this new approach work for you?

These types are not exposed any more, which are necessary.

FileLintResult,
LinterResult,
LintIssue,
Severity,
NpmPackageJsonLintConfig

I believe these types are refactored into other places, but not exposed as before.

Currently in package.json "types": "dist/src/api.d.ts", indicate that only type NpmPackageJsonLint is exposed.

tclindner added a commit that referenced this issue Mar 10, 2022
@tclindner tclindner added the bug 🪲 Something isn't working label Mar 10, 2022
@tclindner tclindner self-assigned this Mar 10, 2022
@tclindner
Copy link
Owner

Oops, sorry about that. I was thinking they were exported publicly. Let me know if you have any issues after 6.0.1 is released! Thanks @xboy2012

tclindner added a commit that referenced this issue Mar 10, 2022
* Export types in public API

Fixes #593

* Update api.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants