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: remoteLoader pure functional on browser env #1085

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Conversation

semoal
Copy link
Contributor

@semoal semoal commented Jun 14, 2021

Fine tunning of #1080, now we release a new package @lingui/remote-loader, instead of using the @lingui/loader.

Loader dependencies are so much oriented to node environments, for a safer usage and extendability I decided to extract the remoteLoader to a new package with esm, and cjs exports usable on node and browser.

Pending to add documentatio to this new tool, the API it's simple:

remoteLoader({ messages, fallbackMessages?, format: 'minimal' }}

@vercel
Copy link

vercel bot commented Jun 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/lingui-js/js-lingui/ByMcnwrmEX3WeqyaS8GG3HtGr9jg
✅ Preview: https://js-lingui-git-new-tool-remote-loader-lingui-js.vercel.app

@github-actions
Copy link

size-limit report 📦

Path Size
./packages/core/build/cjs/core.production.min.js 2.78 KB (0%)
./packages/detect-locale/build/cjs/detect-locale.production.min.js 798 B (0%)
./packages/react/build/cjs/react.production.min.js 4.85 KB (0%)
./packages/remote-loader/build/cjs/remote-loader.production.min.js 83.1 KB (+100% 🔺)

@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

Merging #1085 (dc0c935) into main (d461695) will decrease coverage by 1.03%.
The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1085      +/-   ##
==========================================
- Coverage   82.91%   81.88%   -1.04%     
==========================================
  Files          54       56       +2     
  Lines        1639     1678      +39     
  Branches      448      458      +10     
==========================================
+ Hits         1359     1374      +15     
- Misses        163      182      +19     
- Partials      117      122       +5     
Impacted Files Coverage Δ
packages/remote-loader/src/browserCompiler.ts 45.94% <45.94%> (ø)
packages/remote-loader/src/index.ts 66.66% <66.66%> (ø)
packages/remote-loader/src/minimalParser.ts 100.00% <100.00%> (ø)
packages/cli/src/api/formats/minimal.ts 25.00% <0.00%> (-8.34%) ⬇️
packages/cli/src/api/compile.ts 96.00% <0.00%> (-4.00%) ⬇️
packages/conf/src/index.ts 80.76% <0.00%> (ø)
packages/cli/src/api/formats/index.ts 60.00% <0.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 8077d99...dc0c935. Read the comment docs.

@semoal semoal merged commit 85856ac into main Jun 14, 2021
@semoal semoal deleted the new-tool-remote-loader branch June 14, 2021 17:54
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.

1 participant