Skip to content

Published package does not include TS definitions #87

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

Closed
neezer opened this issue Nov 13, 2019 · 9 comments
Closed

Published package does not include TS definitions #87

neezer opened this issue Nov 13, 2019 · 9 comments
Labels
Pkg: koa-better-body Status: Completed Issue with steps to reproduce the bug that’s been verified by at least one reviewer.

Comments

@neezer
Copy link

neezer commented Nov 13, 2019

typings is defined in package.json, but the file it points to is not present in the distributed package:

https://unpkg.com/browse/koa-better-body@3.1.13/package.json

  "typings": "dist/typings/index.d.ts",
❯ npm pack koa-better-body
npm notice 
npm notice 📦  koa-better-body@3.1.13
npm notice === Tarball Contents === 
npm notice 619B   dist/main/index.js      
npm notice 477B   dist/module/index.js    
npm notice 4.9kB  dist/main/utils.js      
npm notice 4.4kB  dist/module/utils.js    
npm notice 2.5kB  package.json            
npm notice 2.2kB  dist/main/index.js.map  
npm notice 2.3kB  dist/module/index.js.map
npm notice 13.1kB dist/main/utils.js.map  
npm notice 13.3kB dist/module/utils.js.map
npm notice 19.0kB CHANGELOG.md            
npm notice 24.1kB README.md               
npm notice === Tarball Details === 
npm notice name:          koa-better-body                         
npm notice version:       3.1.13                                  
npm notice filename:      koa-better-body-3.1.13.tgz              
npm notice package size:  20.9 kB                                 
npm notice unpacked size: 86.9 kB                                 
npm notice shasum:        eab742745401eff70b8069b29c284df87be2c1a6
npm notice integrity:     sha512-744Ay3hXDobRS[...]xC4sWJbErFndg==
npm notice total files:   11                                      
npm notice 
koa-better-body-3.1.13.tgz

In DefinitelyTyped/DefinitelyTyped#39451, @types/koa-better-body was deprecated (12 days ago), so this missing typings file is making this package unbuildable with TypeScript.

@tunnckoCore
Copy link
Owner

tunnckoCore commented Nov 18, 2019

Doh... problems problems problems. Why are they doing this? Or at least can mention me...

I recently tend to add that field but not yet having a typescript definitions. It's work in progress repo and situation. I'm slowly migrating everything here so... it's a lot of work to get everything working correctly and seamlessly.

Thanks for the report.

@tunnckoCore tunnckoCore added Pkg: koa-better-body Priority: High After critical issues are fixed, these should be dealt with before any further issues. Status: Blocked Another issue needs to be resolved first or an external blocker. Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity, without a functionality. labels Nov 18, 2019
@tunnckoCore
Copy link
Owner

tunnckoCore commented Nov 18, 2019

@neezer is it okay now? Changes there are rolled back.

@tunnckoCore tunnckoCore added Status: Completed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. and removed Priority: High After critical issues are fixed, these should be dealt with before any further issues. Status: Blocked Another issue needs to be resolved first or an external blocker. Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity, without a functionality. labels Nov 18, 2019
@neezer
Copy link
Author

neezer commented Nov 19, 2019

I recently tend to add that field but not yet having a typescript definitions.

I would discourage this. There are many tools in the TS ecosystem that switch behavior on the typings field, so providing that field without the backing file is much more likely to cause problems than simply omitting the field until you get the definitions in place.

I would track what is in essence a "todo" in a GitHub issue, or README, or anywhere else that is documentation-oriented and not used programmatically. My two cents.

is it okay now? Changes there are rolled back.

I'll check and report back.

@tunnckoCore
Copy link
Owner

tunnckoCore commented Nov 19, 2019

Yup, sure. I'll take that in mind and update the packages that have typings field without types.

tunnckoCore added a commit that referenced this issue Nov 21, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
@maximedupre
Copy link

@tunnckoCore Do you plan on providing the type definitions in the near future?

Cheers!

@tunnckoCore
Copy link
Owner

yea in the near future, after 10th i'm returning from holidays

@maximedupre
Copy link

@tunnckoCore Got it! Is there an available type def file somewhere that I can link manually into my project? As I recall, I had no problem before the repo changed place, so my guess is that the file exist, but I can't find it in the old repo. Happy holidays sir!

@tunnckoCore
Copy link
Owner

tunnckoCore commented Dec 22, 2019

Hmmm, no, I dont think... oh, wait I think there is typedef in definitely-typed repo and so a @types package. Only the versions doesn't match, but that's not a problem there is no api changes in the minor version. Intentionally. I think it's 3.0.24 or 25.

@maximedupre
Copy link

npm i --save @types/koa-better-body@3.0.0 :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pkg: koa-better-body Status: Completed Issue with steps to reproduce the bug that’s been verified by at least one reviewer.
Projects
None yet
Development

No branches or pull requests

3 participants