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

Updated front-build to v12 #354

Merged
merged 2 commits into from
Aug 11, 2022
Merged

Conversation

BilalQamar95
Copy link
Contributor

@BilalQamar95 BilalQamar95 commented Aug 5, 2022

Ticket:
42: Upgrade eslint to v8.x

Description

  • Updated frontend-build to v12 (Eslint was updated in frontend-build version resulting in it's version being bumped to v12. This PR updates frontend-build to reciprocate eslint version update)
  • Resolved eslint issues post update

Merge checklist:

  • Consider running your code modifications in the included example app within frontend-platform. This can be done by running npm start and opening http://localhost:8080.
  • Consider testing your code modifications in another local micro-frontend using local aliases configured via the module.config.js file in frontend-build.
  • Verify your commit title/body conforms to the conventional commits format (e.g., fix, feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.

Post merge:

  • After the build finishes for the merged commit, verify the new release has been pushed to NPM.

@BilalQamar95 BilalQamar95 requested a review from a team August 5, 2022 09:07
@BilalQamar95 BilalQamar95 self-assigned this Aug 5, 2022
@codecov
Copy link

codecov bot commented Aug 5, 2022

Codecov Report

Merging #354 (3730ac2) into master (ef8baa3) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
+ Coverage   81.39%   81.41%   +0.02%     
==========================================
  Files          38       38              
  Lines         919      920       +1     
  Branches      170      170              
==========================================
+ Hits          748      749       +1     
  Misses        159      159              
  Partials       12       12              
Impacted Files Coverage Δ
src/auth/MockAuthService.js 69.76% <ø> (ø)
src/react/PageRoute.jsx 100.00% <ø> (ø)
src/react/hooks.js 80.00% <ø> (ø)
src/auth/interceptors/createRetryInterceptor.js 87.87% <100.00%> (ø)
src/i18n/countries.js 65.00% <100.00%> (ø)
src/i18n/languages.js 58.33% <100.00%> (ø)
src/react/AppProvider.jsx 78.57% <100.00%> (+1.64%) ⬆️
src/react/OptionalReduxProvider.jsx 100.00% <100.00%> (ø)

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

@@ -65,11 +65,13 @@ export default function AppProvider({ store, children }) {
<IntlProvider locale={locale} messages={getMessages()}>
<ErrorBoundary>
<AppContext.Provider
value={{ authenticatedUser, config, locale }}
value={
useMemo(() => ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale])
Copy link
Contributor

Choose a reason for hiding this comment

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

As a point of style, I'd prefer to remove this useMemo hook from the JSX and create an intermediate variable that we then pass into the value attribute here.

const appContextValue = useMemo(() => ({ authenticatedUser, config, locale }), [authenticatedUser, config, locale]);

... That sorta thing.

@@ -22,7 +22,7 @@ export default function PageRoute(props) {
if (match) {
sendPageEvent();
}
}, [JSON.stringify(match)]);
Copy link
Contributor

Choose a reason for hiding this comment

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

This change makes me nervous - are we sure that the match object changes with the same frequency as the stringified version of it? I'd be worried that we end up sending page events far more frequently, which could be pretty disruptive to our analytics. If this was just to satisfy the linter I'd probably revert this and leave it as-is. We should try not to make code changes when just updating the build library.

Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

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

I think this commit should be a fix: since we're touching code that runs in our apps - it's not just a chore update of the build library.

See comments inline, there's one thing I think I'd factor a bit differently, and another which I'd hesitate to include in this PR.

@davidjoy davidjoy merged commit da4899a into master Aug 11, 2022
@davidjoy davidjoy deleted the bilalqamar95/frontend-build-upgrade branch August 11, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants