Skip to content

fix: remoteLoader pure functional on browser env#1085

Merged
semoal merged 1 commit into
mainfrom
new-tool-remote-loader
Jun 14, 2021
Merged

fix: remoteLoader pure functional on browser env#1085
semoal merged 1 commit into
mainfrom
new-tool-remote-loader

Conversation

@semoal
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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