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

Fixed issue with unknown extension when using allowArbitraryExtensions compiler option #313

Merged
merged 3 commits into from Apr 15, 2024

Conversation

stepankuzmin
Copy link
Contributor

@stepankuzmin stepankuzmin commented Apr 12, 2024

Skip files with unknown extensions. Otherwise, dts-bundle-generator will throw on .d.json.ts files because it doesn't support overriding the type of a JSON file.

Copy link
Owner

@timocov timocov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Please add a test case for this change, see https://github.com/timocov/dts-bundle-generator/tree/master/tests/e2e

@timocov
Copy link
Owner

timocov commented Apr 14, 2024

https://github.com/timocov/dts-bundle-generator/tree/master/tests/e2e/test-cases/allow-js could be a good example of what you'd need to have.

@stepankuzmin
Copy link
Contributor Author

stepankuzmin commented Apr 15, 2024

@timocov sure! Added in f7d7a72

@timocov
Copy link
Owner

timocov commented Apr 15, 2024

@stepankuzmin are you sure this fix fixes your problem? I just tried to run your test case against the version without your changes and it just works... Do you have a repro that I can take a look at?

So we can validate the fix works
@timocov
Copy link
Owner

timocov commented Apr 15, 2024

It seems changing extension of an entry file from .ts to .d.ts helped (maybe the compiler inlined types after compilation or so).

@timocov timocov changed the title Skip unsupported extensions Fixed issue with unknown extension when using allowArbitraryExtensions compiler option Apr 15, 2024
@timocov timocov merged commit 1a228c4 into timocov:master Apr 15, 2024
4 checks passed
@timocov timocov added this to the 9.4 milestone Apr 15, 2024
@timocov
Copy link
Owner

timocov commented Apr 15, 2024

The fix has been published in 9.4.0 version.

@stepankuzmin stepankuzmin deleted the skip-unsupported-extensions branch April 16, 2024 13:03
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 this pull request may close these issues.

None yet

2 participants