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

[Bug]: Types error after "types": "./dist/index.d.ts" removal from package.json #1545

Closed
1 task
tomek-f opened this issue Apr 10, 2024 · 1 comment · Fixed by #1546
Closed
1 task

[Bug]: Types error after "types": "./dist/index.d.ts" removal from package.json #1545

tomek-f opened this issue Apr 10, 2024 · 1 comment · Fixed by #1546
Labels
bug Something isn't working

Comments

@tomek-f
Copy link

tomek-f commented Apr 10, 2024

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

After 4.1.2 update:

  • NPM does not show blue types icon (This package contains built-in TypeScript declarations)
  • Typescript whines about types TS2307: Cannot find module 'browserslist-useragent-regexp' or its corresponding type declarations. There are types at '/Users/xyz/Workspace/abc/node_modules/browserslist-useragent-regexp/dist/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

Changing moduleResolution from node to 'node16', 'nodenext', or 'bundler', opens another can of worms in my project.

I believe it's this change: f014612#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L33

Was this change intentional?

4.1.1 https://www.npmjs.com/package/browserslist-useragent-regexp/v/4.1.1?activeTab=code
4.1.2 https://www.npmjs.com/package/browserslist-useragent-regexp/v/4.1.2?activeTab=code

Reproduction

N/A

browserslist-useragent-regexp version

v4.1.2

Possible solution

  • bring back "types": "./dist/index.d.ts" part
@tomek-f tomek-f added the bug Something isn't working label Apr 10, 2024
dangreen added a commit that referenced this issue Apr 10, 2024
@dangreen
Copy link
Member

v4.1.3

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