-
Notifications
You must be signed in to change notification settings - Fork 382
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): lazy load cosmiconfig's TypeScriptLoader #1403
fix(conf): lazy load cosmiconfig's TypeScriptLoader #1403
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
956d652
to
d30f5ee
Compare
Codecov ReportBase: 82.80% // Head: 82.79% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1403 +/- ##
==========================================
- Coverage 82.80% 82.79% -0.01%
==========================================
Files 66 66
Lines 1756 1761 +5
Branches 487 488 +1
==========================================
+ Hits 1454 1458 +4
Misses 174 174
- Partials 128 129 +1
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. |
@thekip thanks for your work on this. @andrii-bodnar I've tried adding the
This appears to work on my local, however my deployment pipeline results in this error.
Perhaps I'm not installing the package correctly? Is there an alternative way to install the package from this branch? I only saw the For the record, I'm using Webpack to bundle everything and am not using TypeScript or React in this project. |
@ryanb please follow a contribution guide. You need to build package and upload to Verdaccio, then you would be able to install it as usually. Of course on the ci that would not work because verdaccio would not be available outside your machine. |
Can confirm this fix is working, having followed the contribution guide. Thanks! |
Description
This PR is attempt to fix: #1401
cosmiconfig-typescript-loader written in the way that it doesn't matter do you really load a Typescript file in config or not, once this loader is added to cosmiconfig it requires ts-node and typescript. This is indeed unwanted behavior because some of the users may not have them and may not want to use them at all.
This PR changes 2 things:
typescript
andts-node
for the@lingui/conf
package. And also i marked them as optional.Why this happened? Why our test didn't catch this?
It's because node modules resolution system works like that.
Take 'examples/create-react-app' as an example. It has it's own pacakge.json and own
node_modules
.Furthermore, it doesn't list
ts-node
in this file, and indeednode_modules
folder doesn't have this dependency. So why this project doesn't fall with that change?It's because we have another
node_modules
folder on the root level of monorepo and node found this module there.Types of changes
Fixes # (issue)
Checklist