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: exclude option not working #143

Closed
vigenere23 opened this issue Nov 10, 2022 · 3 comments
Closed

Bug: exclude option not working #143

vigenere23 opened this issue Nov 10, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@vigenere23
Copy link

vigenere23 commented Nov 10, 2022

Files in the exclude array option are still parsed for type declaration. It also parses files from the node_modules folder...

Minimal example

dts({
  exclude: ["**/*"]
})

Additional info

  • version: 1.7.0 -> this is not happening on versions before (tested on 1.6.6 and 1.6.5)
  • Tried with **
  • Tried with config in tsconfig.json too
  • Related to skipDiagnostics now defaulting to false
@vigenere23 vigenere23 changed the title exclude option not working Bug: exclude option not working Nov 10, 2022
@qmhc
Copy link
Owner

qmhc commented Nov 11, 2022

I try both in Windows and Linux, but this issue cannot be reproduced.

Could you provide a reproduction with exact steps?

@qmhc qmhc added the need more info Further information is requested label Nov 11, 2022
@qmhc
Copy link
Owner

qmhc commented Nov 11, 2022

About the skipDiagnostics option, many reported issues are due to type errors, so I think it's better to set it default to false to enable type diagnostics normally.

@vigenere23
Copy link
Author

First minimal example : https://github.com/vigenere23/vite-plugin-dts-143. This does not output the same errors, but still tries to overwrite the .d.ts files inside the node_modules directory.

Output:
error TS5055: Cannot write file './node_modules/lib0/array.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/binary.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/buffer.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/conditions.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/decoding.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/dom.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/encoding.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/environment.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/eventloop.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/function.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/isomorphic.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/json.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/map.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/math.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/metric.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/number.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/object.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/observable.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/pair.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/random.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/set.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/storage.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/string.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/symbol.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './node_modules/lib0/time.d.ts' because it would overwrite input file.

@qmhc qmhc added bug Something isn't working and removed need more info Further information is requested labels Nov 14, 2022
@qmhc qmhc closed this as completed in aea8ebd Nov 14, 2022
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

No branches or pull requests

2 participants