Skip to content

Conversation

@yoannmoinet
Copy link
Member

@yoannmoinet yoannmoinet commented Oct 15, 2025

Follow-up to #227.
Needs #235 for better testing.

  • Add SUPPORTED_EXTENSIONS constant defining allowed file types (.js, .ts, .tsx, .jsx, .mjs, .mjsx)
  • Add isFileSupported() and warnUnsupportedFile() helper functions
  • Filter out unsupported files in all bundlers:
    • esbuild: Filter outputs before post-processing
    • rollup/vite: Check file extension in banner/footer hooks
    • webpack/rspack: Skip unsupported files in compilation.updateAsset
  • Log warnings when attempting to inject into unsupported file types

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Oct 15, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d5d91b3 | Docs | Was this helpful? Give us feedback!

- Add SUPPORTED_EXTENSIONS constant defining allowed file types (.js, .ts, .tsx, .jsx, .mjs, .mjsx)
- Add isFileSupported() and warnUnsupportedFile() helper functions
- Filter out unsupported files in all bundlers:
  - esbuild: Filter outputs before post-processing
  - rollup/vite: Check file extension in banner/footer hooks
  - webpack/rspack: Skip unsupported files in compilation.updateAsset
- Log warnings when attempting to inject into unsupported file types
@yoannmoinet yoannmoinet force-pushed the yoann/prevent-injection-unsupported-filetypes branch from 861b43e to b745de1 Compare October 20, 2025 15:13
@yoannmoinet yoannmoinet changed the base branch from master to yoann/refactor-testing-css October 20, 2025 15:13
@yoannmoinet yoannmoinet marked this pull request as ready for review October 20, 2025 20:39
Base automatically changed from yoann/refactor-testing-css to master October 21, 2025 19:48
@yoannmoinet yoannmoinet merged commit 709e61a into master Oct 22, 2025
4 checks passed
@yoannmoinet yoannmoinet deleted the yoann/prevent-injection-unsupported-filetypes branch October 22, 2025 13:24
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.

3 participants