cloudscape-design / jest-preset

Jest presets for Cloudscape Design System
https://cloudscape.design/
Apache License 2.0
5 stars 1 forks source link

fix: Ignore project configuration files #36

Closed just-boris closed 5 months ago

just-boris commented 5 months ago

Issue #, if available:

Description of changes:

Disable default babel behavior where it reads and applies configuration from .babelrc and babel.config.js files, because they may break our code


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (17cbb36) to head (079d21d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #36 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 15 15 Branches 1 1 ========================================= Hits 15 15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jperals commented 5 months ago

Is there a chance that any existing customer actually relies on the current behavior?

just-boris commented 5 months ago

In our preset, we scope it down to our own files: https://github.com/cloudscape-design/jest-preset/blob/17cbb36e577d592df8c55ee3bdd9e3b2041fe69e/jest-preset.js#L7-L12

I can't imagine a situation how this change may affect customers who are using our public API as intended

jperals commented 5 months ago

I'm imagining a customer with an old setup and local configuration to transpile their old to some old ES version, and our Jest preset is doing it for our files as well (even if accidentally), so that if not transpiling our files anymore could break their test runs. Could that be?

just-boris commented 5 months ago

What mitigation do you suggest?

just-boris commented 5 months ago

Summary of the offline discussion. The impact of that use-case is negligible