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

Installing deprecated @types package #79

Closed
devinrhode2 opened this issue Nov 17, 2021 · 4 comments · Fixed by #98
Closed

Installing deprecated @types package #79

devinrhode2 opened this issue Nov 17, 2021 · 4 comments · Fixed by #98

Comments

@devinrhode2
Copy link

I'm getting @types/testing-library__user-event installed, last published a year ago, when I am using latest version of @testing-library/user-event (13.5.0), last published 18 hours ago

However:
screenshot of https://www.npmjs.com/package/@types/testing-library__user-event

I think this may be somewhat related to #24

Maybe the @types/testing-library__user-event package should be modified, or maybe typesync should ignore packages that are deprecated on npm.

One extra small factor that may bolster this argument - if a certain package@version is deprecated, it may pose a security risk to install that package. For example, the recent coa hack: https://thehackernews.com/2021/11/two-npm-packages-with-22-million-weekly.html
screenshot of https://www.npmjs.com/package/coa

@devinrhode2 devinrhode2 changed the title Installing types for deprecated @types package Installing deprecated @types package Nov 17, 2021
@jeffijoe
Copy link
Owner

I agree on checking if a package is deprecated.

I believe if a package contains a typings property in the package.json then typesync won’t install packages for it by default, so perhaps the library needs to be updated.

@devinrhode2
Copy link
Author

Accidentally closed

@devinrhode2 devinrhode2 reopened this Nov 17, 2021
@ImLunaHey
Copy link

Just hit this with chalk.

➜  jive git:(main) ✗ npx typesync@latest
»  TypeSync v0.11.0
✔  4 new typings added.

📦 jive — package.json (4 new typings added)
├─ + @types/cron
├─ + @types/eslint
├─ + @types/nodemon
└─ + @types/chalk

✨  Go ahead and run npm install or yarn to install the packages that were added.
➜  jive git:(main) ✗ npm i
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: jive@undefined
npm WARN Found: @types/[email protected]
npm WARN node_modules/@types/cron
npm WARN   dev @types/cron@"^2.0.1" from the root project
npm WARN   1 more (@reflet/cron)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @types/cron@"^1.7.2" from @reflet/[email protected]
npm WARN node_modules/@reflet/cron
npm WARN   dev @reflet/cron@"^1.3.1" from the root project
npm WARN deprecated @types/[email protected]: This is a stub types definition for chalk (https://github.com/chalk/chalk). chalk provides its own type definitions, so you don't need @types/chalk installed!

@jeffijoe
Copy link
Owner

Fixed in #98 and released as v0.11.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants