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(conf): proper typescript cosmiconfig loader #1386

Merged

Conversation

timofei-iatsenko
Copy link
Collaborator

fixes: #1295

@vercel
Copy link

vercel bot commented Jan 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 31, 2023 at 0:45AM (UTC)

@github-actions
Copy link

size-limit report 📦

Path Size
./packages/core/build/esm/index.js 2.89 KB (0%)
./packages/detect-locale/build/esm/index.js 804 B (0%)
./packages/react/build/esm/index.js 2.61 KB (0%)
./packages/remote-loader/build/esm/index.js 7.36 KB (0%)

Comment on lines -165 to -170
mockFs({
".linguirc": JSON.stringify({
locales: ["en-US"],
fallbackLocale: "en",
}),
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mockFs is actually very dangerous because it breaks resolution of files in underlying libraries. typescript-comiconfig is not an exclusion. It didn't work with mockFs, so I removed it in favour of real file in FS.

@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 82.60% // Head: 82.63% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (301a02a) compared to base (ad9b735).
Patch coverage: 90.08% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1386      +/-   ##
==========================================
+ Coverage   82.60%   82.63%   +0.02%     
==========================================
  Files          56       66      +10     
  Lines        1799     1756      -43     
  Branches      506      483      -23     
==========================================
- Hits         1486     1451      -35     
+ Misses        183      177       -6     
+ Partials      130      128       -2     
Impacted Files Coverage Δ
packages/cli/src/api/formats/index.ts 60.00% <ø> (ø)
packages/conf/src/index.ts 85.13% <ø> (-0.95%) ⬇️
packages/core/src/formats.ts 84.37% <ø> (ø)
packages/core/src/index.ts 100.00% <ø> (ø)
packages/macro/src/utils.ts 100.00% <ø> (ø)
packages/react/src/Trans.tsx 80.64% <ø> (ø)
packages/remote-loader/src/index.ts 66.66% <ø> (ø)
packages/remote-loader/src/browserCompiler.ts 40.00% <40.00%> (-24.87%) ⬇️
packages/cli/src/api/detect.ts 57.89% <66.66%> (-6.82%) ⬇️
packages/core/src/context.ts 80.00% <77.77%> (+0.37%) ⬆️
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@andrii-bodnar andrii-bodnar merged commit 8da122d into lingui:main Jan 31, 2023
@timofei-iatsenko timofei-iatsenko deleted the fix/cosmiconfig-typescript branch January 31, 2023 14:14
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.

Custom TypescriptLoader for cosmic config breaks import/require module resolution
3 participants