-
Notifications
You must be signed in to change notification settings - Fork 44
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
[web] Update dependencies (2023-03-02) #449
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Actually via `node update --lockfile-version 2` for not changing the lockfileVersion. This option was introduce in npm 8.1.0, see https://github.com/npm/cli/blob/v8.19.4/CHANGELOG.md#v810-2021-10-14
Most of new test complaint were because we were mocking useEffect return functions to promises, which is not allowed.
And also fix mixed indentation style in the stylelintrc.json file. For more info about the Stylelint migration visit https://stylelint.io/migration-guide/to-15
At this moment we are not using types definitions from other packages but getting errors from @patternfly/react-core ``` > check-types > tsc Error: node_modules/@patternfly/react-core/dist/esm/components/Drawer/DrawerPanelContent.d.ts(3,18): error TS2430: Interface 'DrawerPanelContentProps' incorrectly extends interface 'HTMLProps<HTMLDivElement>'. Types of property 'onResize' are incompatible. Type '(width: number, id: string) => void' is not assignable to type 'ReactEventHandler<HTMLDivElement>'. ... Error: node_modules/@patternfly/react-core/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts(8,35): error TS2304: Cannot find name 'SVGIconProps'. ``` See https://www.typescriptlang.org/tsconfig#skipLibCheck
dgdavid
force-pushed
the
update-dependencies-20230302
branch
from
March 2, 2023 22:58
21ad2a6
to
30e4509
Compare
It looks good. We can merge when the #443 is merged. |
imobachgs
approved these changes
Mar 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
A bunch of node packages has released new versions after the latest dependencies update we did in #331
Click to show/hide npm outdated output
Solution
To update them using the
npm update
andnpm install package-name@latest
commands.Notes
The
--lockfile-version 2
option has been used with mentioned commands to avoid touching thelockfileVersion
in the package-lock.json file. This option was introduced in npm 8.1.0, see the announcement in its changelog.Most of the packages got directly update with
npm update --lockfile-version 2
The rest of packages were updated manually by running
npm install --lockfile-version 2 package-name@latest
commandOnly the
po2json
has not been changed because looks more like a downgrade than an update (?)This time, the project has been updated to React 18 because the testing-library issue mentioned in [web] Update dependencies #331 has been fixed, see https://github.com/testing-library/react-testing-library/releases/tag/v14.0.0
Some tests needed to be fixed: they were mocking useEffect return values to jest.fn()/Promises, making the suite fails with a
TypeError: destroy is not a function
message.The
--skipLibCheck
option has been passed to thecheck-types
for not checking types from node_modules. At this moment we are not using types definitions from other packages but getting errors from @patternfly/react-core.Click to show/hide errors found by check-types in patternfly/core
check-types
tsc
Error: node_modules/@patternfly/react-core/dist/esm/components/Drawer/DrawerPanelContent.d.ts(3,18): error TS2430: Interface 'DrawerPanelContentProps' incorrectly extends interface 'HTMLProps'.
Types of property 'onResize' are incompatible.
Type '(width: number, id: string) => void' is not assignable to type 'ReactEventHandler'.
Error: node_modules/@patternfly/react-core/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts(4,35): error TS2304: Cannot find name 'SVGIconProps'.
Error: node_modules/@patternfly/react-core/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts(5,34): error TS2304: Cannot find name 'SVGIconProps'.
Error: node_modules/@patternfly/react-core/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts(6,35): error TS2304: Cannot find name 'SVGIconProps'.
Error: node_modules/@patternfly/react-core/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts(7,32): error TS2304: Cannot find name 'SVGIconProps'.
Error: node_modules/@patternfly/react-core/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts(8,35): error TS2304: Cannot find name 'SVGIconProps'.
Error: Process completed with exit code 2.
Because of the above, the
--skipErroChecking
typedoc's option has been added to thenpm run jsdoc
taskThis PR has been created on top of
add-missing-section
branch because it contains more tests and I wanted to have them tested with the update. I'll happily adapt it tomaster
as soon as [web] Move each section to its own page #443 is mergedTesting.
All relevant tasks were executed without problems.