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

fix: Ignore project configuration files #36

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

just-boris
Copy link
Member

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.

@just-boris just-boris requested a review from a team as a code owner March 25, 2024 16:29
@just-boris just-boris requested review from jperals and removed request for a team March 25, 2024 16:29
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jperals
Copy link
Member

jperals commented Mar 25, 2024

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

@just-boris
Copy link
Member Author

In our preset, we scope it down to our own files:

'node_modules/@cloudscape-design/.+\\.js$': require.resolve('./js-transformer'),
'node_modules/@cloudscape-design/.+\\.css': require.resolve('./css-transformer'),
// `d3-color` and `d3-scale` packages (plus their transitive dependencies) are using the ESM format.
// We need to transform them to have them working in tests.
[`node_modules/(${esModules})/.+\\.js$`]: require.resolve('./js-transformer'),

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

@jperals
Copy link
Member

jperals commented Mar 26, 2024

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
Copy link
Member Author

What mitigation do you suggest?

@just-boris
Copy link
Member Author

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

@just-boris just-boris merged commit eaec2ab into main Mar 26, 2024
29 checks passed
@just-boris just-boris deleted the fix-preset-application branch March 26, 2024 12:07
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.

2 participants