ui5-community / ui5-ecosystem-showcase

A repository showcasing the UI5 tooling extensibility to combine OSS tools for UI5 application development.
https://ui5-community.github.io/ui5-ecosystem-showcase/
Other
194 stars 94 forks source link

[ui5-tooling-stringreplace] .ts files not detected for replacing #979

Closed KevinC0210 closed 8 months ago

KevinC0210 commented 8 months ago

When using the ui5-tooling-stringreplace-task to replace values in files, TypeScript files always get ignored even when adding the .ts ending to the files configuration in the ui5.yaml. I looked into it and the issue is the MIME type of the ending .ts. In that case the MIME type results in video/mp2t. As video and image files are excluded from the stringreplace task, the TypeScript files are excluded as well.

When using the ui5-tooling-stringreplace the expected functionality is that it is also usable for replacing strings in TypeScript files. The easiest fix for this issue would be to make an exception for .ts files when fetching the MIME type so that it does not use the MIME type video/mp2t which is provided by the mime type library.

petermuessig commented 8 months ago

I'll release a new version now - thanks for your finding and the PR! 🚀