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

feat: removes DefinitelyTyped types in favor of packaged types #388

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

etler
Copy link
Contributor

@etler etler commented Aug 18, 2023

Polly sub packages were updated a few years ago to add type definition files into the main project:

Netflix/pollyjs@be036a1

Definitely typed packages are no longer needed and the conflict causes issues when using yarn.

Installing this package as a dependency in a different project with yarn produces these warnings:

warning @types/pollyjs__adapter-node-http > @types/[email protected]: This is a stub types definition. @pollyjs/adapter provides its own type definitions, so you do not need this installed.
warning @types/pollyjs__core > @types/[email protected]: This is a stub types definition. @pollyjs/adapter provides its own type definitions, so you do not need this installed.
warning @types/pollyjs__core > @types/[email protected]: This is a stub types definition. @pollyjs/persister provides its own type definitions, so you do not need this installed.
warning @types/pollyjs__persister-fs > @types/[email protected]: This is a stub types definition. @pollyjs/persister provides its own type definitions, so you do not need this installed.

When trying to build a typescript project using yarn tsc that uses this package as a dependency it causes this typescript error:

$ tsc --build tsconfig.build.json
error TS2688: Cannot find type definition file for 'pollyjs__adapter'.
  The file is in the program because:
    Entry point for implicit type library 'pollyjs__adapter'

error TS2688: Cannot find type definition file for 'pollyjs__persister'.
  The file is in the program because:
    Entry point for implicit type library 'pollyjs__persister'


Found 2 errors.

error Command failed with exit code 1.

These errors don't appear to be an issue with npm, but is a major issue for any consumers using yarn.

I also moved @types/setup-polly-jest into dev dependencies since it types are not needed for runtime installs.

Moved setup-polly-jest type package to dev dependencies
@moltar moltar changed the title Polly packages no longer need definitely typed packages fix: removes DefinitelyTyped types in favor of packaged types Aug 18, 2023
@moltar moltar changed the title fix: removes DefinitelyTyped types in favor of packaged types feat: removes DefinitelyTyped types in favor of packaged types Aug 18, 2023
@moltar
Copy link
Contributor

moltar commented Aug 18, 2023

Thank you for spotting this and thank you for your contribution @etler!

@moltar moltar merged commit 9164b50 into ScaleLeap:master Aug 18, 2023
github-actions bot pushed a commit that referenced this pull request Aug 18, 2023
# [1.6.0](v1.5.95...v1.6.0) (2023-08-18)

### Bug Fixes

* **deps:** update dependency type-fest to v4 ([#385](#385)) ([2368704](2368704))

### Features

* removes DefinitelyTyped types in favor of packaged types ([#388](#388)) ([9164b50](9164b50))
@github-actions
Copy link

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants