Closed fragm3 closed 3 years ago
You can use a config file to ignore those packages.
@jeffijoe can you please see the issue again,
my package.json has
...
"devDependencies": {
...
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react-hooks": "^3.7.0"
}
running typesync installs "@types/testing-libraryjest-dom" and "@types/testing-libraryreact-hooks"
I guess I don't understand the problem. If you have those 2 dependencies in your package.json, why wouldn't typesync install typings for them?
@jeffijoe check this npm link, new type added by typesync: https://www.npmjs.com/package/@types/testing-library__react-hooks - for @testing-library/react-hooks is not needed as @testing-library/react-hooks provides its own type definitions.
I haven't seen that way of "shipping typings" before. I think that is an edge case, so I suggest using the ignorePackages
option.
@jeffijoe can this be added to the roadmap for typesync? for now adding it in ignorePackages
If it turns out that many other popular packages do it this way, then I would consider it. This is the first time I see it, and if everyone did it this way then TypeSync wouldn't be necessary. :)
For
"@types/testing-library__jest-dom"
and"@types/testing-library__react-hooks"
, typesync installs these packages, these packages are not top-level dependency. They are already present in https://github.com/testing-library/jest-dom/blob/main/package.json and https://github.com/testing-library/react-hooks-testing-library/blob/master/package.json as a dependency. Can this be fixed? @jeffijoeUsing these versions:
"@testing-library/jest-dom": "^5.11.6", "@testing-library/react-hooks": "^3.7.0",