-
Notifications
You must be signed in to change notification settings - Fork 9
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
[replaced with #58] chore(package.json): Switch from yarn to npm and handle dependency upgrades #51
Conversation
….lock with package.lock
Codecov Report
@@ Coverage Diff @@
## main #51 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 19 19
Branches 5 5
=========================================
Hits 19 19 Continue to review full report at Codecov.
|
🚀 Deployed Storybook Preview: http://konveyor-lib-ui-pr-51-preview.surge.sh ✨ |
Converted to draft because I want to figure out the README bit about |
@gildub trying to test this via
I'm giving up for now, maybe we can troubleshoot together next week. I don't know if it is happening because of using |
I'm now handling dependency upgrades in #57 before we replace yarn, so after that is merged we'll need to rebase or rewrite this PR to focus on the yarn-to-npm change. |
In order to support upgrading dependencies in forklift-ui and benefit from some bug fixes in dependencies, this PR upgrades all the things we should try to keep fresh: peer dependencies consumers also depend on and will keep up to date (patternfly, yup, react, react-dom), and core code quality and docs stuff (typescript, semantic-release, storybook, jest, testing-library, eslint, rollup, babel, commitizen, prettier) This PR replaces/adopts a lot of the changes in #51, so that PR should be rebased or rewritten after this change so that it can focus on the yarn-to-npm change. Notable upgrades include: * TypeScript 3 to 4 (required the installation of `tslib` to handle some syntax) * Storybook 6.0 to 6.2 (removes the requirement of a direct dependency on webpack, so this PR removes webpack), * yup from 0.29.3 to 0.32.8 (propagates some breaking changes to consumers, see below) * PatternFly from 2020.10 to 2021.04 (https://www.patternfly.org/v4/developer-resources/release-notes) * React from 16.13 to 17.0 (we're not affected by any of their breaking changes) * eslint from 7.6 to 7.24 * prettier 2.0 to 2.2 * rollup 2.23 to 2.45 BREAKING CHANGE: The yup upgrade bundles its own TS types, removing the need to depend on `@types/yup`, and some of the type changes are breaking. `yup.Schema` has been replaced by `yup.SchemaOf`, and it correctly infers array types now so we were able to remove the hacky `MaybeArraySchema` type from useFormState. There have also been some behavior changes in some of the schema methods, particularly the `.defined()` and `.required()` methods. See those changes here: https://github.com/jquense/yup/blob/master/CHANGELOG.md (the items between 0.29.3 and 0.32.8). We felt it was a good idea to upgrade even though this is a little disruptive, because the new built-in TS types are less finicky and more helpful than the community-provided ones were.
Switching us from yarn to npm to have consistent tooling with forklift-ui. WIP: I need to test
npm link
to see if these instructions are valid.Edit: this PR previously handled dependency upgrades as well, we've addressed that in #57 so I'm closing this and opening a PR specific to the yarn-to-npm change.