-
Notifications
You must be signed in to change notification settings - Fork 11
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 frontend-build to v12 #270
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #270 +/- ##
==========================================
+ Coverage 77.46% 77.58% +0.11%
==========================================
Files 34 34
Lines 648 647 -1
Branches 162 162
==========================================
Hits 502 502
+ Misses 133 132 -1
Partials 13 13
Continue to review full report at Codecov.
|
packages/catalog-search/package.json
Outdated
@@ -44,7 +44,7 @@ | |||
}, | |||
"devDependencies": { | |||
"@edx/browserslist-config": "1.1.0", | |||
"@edx/frontend-build": "11.0.1", | |||
"@edx/frontend-build": "^12.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we pin the version?
|
||
SearchSuggestions.propTypes = { | ||
autoCompleteHits: PropTypes.arrayOf(PropTypes.object).isRequired, | ||
autoCompleteHits: PropTypes.arrayOf(PropTypes.shape({})).isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe we can include content_type here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump.
packages/catalog-search/package.json
Outdated
@@ -44,7 +44,7 @@ | |||
}, | |||
"devDependencies": { | |||
"@edx/browserslist-config": "1.1.0", | |||
"@edx/frontend-build": "11.0.1", | |||
"@edx/frontend-build": "^12.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: keep @edx/frontend-build
pinned like the other dependencies.
@@ -45,7 +45,7 @@ SearchSuggestionItem.propTypes = { | |||
key: PropTypes.string, | |||
title: PropTypes.string, | |||
program_type: PropTypes.string, | |||
authoring_organizations: PropTypes.array, | |||
authoring_organizations: PropTypes.shape([]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropTypes.shape
is usually reserved for an object prop, not an array. Should this be PropTypes.arrayOf(PropTypes.shape())
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related, is this hit.authoring_organizations
actually used in this component? If not, is it necessary to include in the prop types definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authoring_organizations
is not used in this component. Removed it from prop types definition
|
||
SearchSuggestions.propTypes = { | ||
autoCompleteHits: PropTypes.arrayOf(PropTypes.object).isRequired, | ||
autoCompleteHits: PropTypes.arrayOf(PropTypes.shape({})).isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump.
const { history } = renderWithRouter(<SearchData> | ||
<SearchPaginationBase nbPages={4} currentRefinement={3} /> | ||
</SearchData>, { | ||
route: 'search/?page=3', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting looks a bit funky. Am I correct in thinking it also causes the ESLint error that you disabled on line 1 (react/jsx-closing-tag-location
)?
Would something like the following work?
const { history } = renderWithRouter((
<SearchData>
<SearchPaginationBase nbPages={4} currentRefinement={3} />
</SearchData>,
), {
route: 'search/?page=3',
});
packages/hotjar/package.json
Outdated
@@ -38,7 +38,7 @@ | |||
"sideEffects": false, | |||
"devDependencies": { | |||
"@edx/browserslist-config": "1.1.0", | |||
"@edx/frontend-build": "11.0.1", | |||
"@edx/frontend-build": "^12.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: pin this dependency like all the other dependencies are pinned.
packages/logistration/package.json
Outdated
@@ -42,7 +42,7 @@ | |||
}, | |||
"devDependencies": { | |||
"@edx/browserslist-config": "1.1.0", | |||
"@edx/frontend-build": "11.0.1", | |||
"@edx/frontend-build": "^12.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: pin this dependency like all the other dependencies are pinned.
packages/utils/package.json
Outdated
@@ -42,7 +42,7 @@ | |||
}, | |||
"devDependencies": { | |||
"@edx/browserslist-config": "1.1.0", | |||
"@edx/frontend-build": "11.0.1", | |||
"@edx/frontend-build": "^12.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: pin this dependency like all the other dependencies are pinned.
// eslint-disable-next-line react/jsx-no-constructed-context-values | ||
<ResponsiveContext.Provider value={{ width: breakpoints.large.maxWidth }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other ESLint PRs I looked at recently resolved this error in most tests versus ignoring the ESLint error. Why are we opting to ignore the error here versus fixing it?
// eslint-disable-next-line import/no-unresolved | ||
import '@testing-library/jest-dom/extend-expect'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[curious] why did this import need to disable the import/no-unresolved
ESLint rule when import '@testing-library/jest-dom/extend-expect';
is used in several other files, seemingly without the ESlint error? Why do we only have to ignore the error here? Or, conversely, can we avoid needing to disable this rule since it doesn't seem relevant for the other places where we're importing this same package in other test files.
… into bilalqamar95/frontend-build-upgrade
… into bilalqamar95/frontend-build-upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @BilalQamar95 are you familiar with the release process in this repo? It does require a manual step to trigger a Github Action workflow.
Also, when you merge, ensure the merged commit will follow the semantic-release commit format. I'd also consider whether these changes are technically a breaking change or not?
@BilalQamar95, any hitches here? |
Seems good to go, also I don't think these changes are technically breaking change |
Hi @adamstankiewicz, so I did follow the release process & manually triggered the Publish from package.json Github Action workflow found here. The release workflow is still failing on |
@BilalQamar95 Huh, interesting... the I believe what happened is that the first run of the
Any commit to The result from a successful run of the However, it does look like it was able to push the tags for the new versions. Because of this, even though there was no publish commit to The situation we're in now is that we're missing the package.json, package-lock.json, and CHANGELOG.md updates for all the changed packages from this PR on For example, you can see your changes in the NPM code explorer on the version published yesterday but, if you look in the CHANGELOG on We need a way to get those changes back into |
@adamstankiewicz Thank you for such detailed explanation. |
Ticket:
42: Upgrade eslint to v8.x
What changed?
frontend-build
to v12 (Eslint was updated infrontend-build
version resulting in it's version being bumped to v12. This PR updatesfrontend-build
to reciprocate eslint version update)eslint
issues post updateMerge checklist:
frontend-app-learner-portal-enterprise
,frontend-app-admin-portal
, andfrontend-app-enterprise-public-catalog
). Will consumers safely be able to upgrade to this change without any breaking changes?BREAKING CHANGE
so the NPM package is released as such.Post merge:
chore(release): publish
) that incremented versions in relevant package.json and CHANGELOG files, and created Git tags for those versions.Publish from package.json
Github Action workflow to publish these new package versions to NPM.master
branch.npm view <package_name> versions --json
).