Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Conversation

dobesv
Copy link
Contributor

@dobesv dobesv commented Jun 3, 2022

When you define a babel.config.js you can return a function, e.g.

https://gist.github.com/gtzilla/a6ae9777a987df1ee1357df51bf9cd61

When parsing this config file, if it a returns a function the function has to be called and provided a stub implementation of that babel api.

See https://babeljs.io/docs/en/config-files#config-function-api

Fix for #723

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2022

Codecov Report

Merging #724 (1311e8d) into main (73c2bec) will decrease coverage by 0.37%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #724      +/-   ##
==========================================
- Coverage   98.64%   98.27%   -0.36%     
==========================================
  Files          49       49              
  Lines        1023     1037      +14     
==========================================
+ Hits         1009     1019      +10     
- Misses         14       18       +4     
Impacted Files Coverage Δ
src/utils/configuration-reader.js 100.00% <ø> (ø)
src/special/babel.js 93.62% <71.43%> (-3.94%) ⬇️
src/cli.js 95.56% <75.00%> (-4.44%) ⬇️
src/detector/importDeclaration.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d1a45f...1311e8d. Read the comment docs.

@rumpl
Copy link
Member

rumpl commented Jun 3, 2022

Code looks good but it would be great to have a test for this

@dobesv
Copy link
Contributor Author

dobesv commented Jun 3, 2022

I added a test case now

Copy link
Member

@rumpl rumpl left a comment

Choose a reason for hiding this comment

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

Nice

@rumpl rumpl merged commit 020bd36 into depcheck:main Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants