Content-Length: 482876 | pFad | https://github.com/namecheap/ilc/pull/230

58 Feature/i18n/refactoring and tests by StyleT · Pull Request #230 · namecheap/ilc · GitHub
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

Feature/i18n/refactoring and tests #230

Merged
merged 64 commits into from
Nov 30, 2020
Merged

Conversation

StyleT
Copy link
Contributor

@StyleT StyleT commented Nov 20, 2020

No description provided.

…ntation

Feature/i18n/basic ssr implementation
@StyleT StyleT requested review from oleh-momot and nightnei and removed request for oleh-momot November 27, 2020 14:26
@StyleT StyleT marked this pull request as ready for review November 27, 2020 14:26
const i18n = registryConf.settings.i18n.enabled
? new I18n(registryConf.settings.i18n, singleSpa, appErrorHandlerFactory)
: null;
const router = new Router(registryConf, state, i18n ? i18n.unlocalizeUrl : undefined, singleSpa);
Copy link
Contributor

Choose a reason for hiding this comment

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

it's not critical, but will be better to put undefined arguments as last argument or as optional inside object. and in this case we won't set undefiend here.
https://github.com/namecheap/ilc/pull/230/files#diff-318e72ee3c278cb96c1bb2130002e8a9bcdebd2042222be2a5284e589a1bb75eR204

const preparationPromises = handlers.map(v => v.prepare(eventDetail));

return Promise.allSettled(preparationPromises).then(results => {
for (let ii = 0; ii < results.length; ii++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why ii? 😁

return Promise.allSettled(executionPromises);
}).then(results => {
results
.map((v, i) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

it's better to use reduce here

@@ -0,0 +1,88 @@
const _ = require('lodash');
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose to not use lodash if we can do it.
for example, here we can use deepmerge package.

@StyleT StyleT merged commit be79a80 into master Nov 30, 2020
@StyleT StyleT deleted the feature/i18n/refactoring_and_tests branch November 30, 2020 09:03
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.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/namecheap/ilc/pull/230

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy