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

migrate to yarn 2 + batch dependency upgrade #566

Merged
merged 14 commits into from
May 10, 2021
Merged

Conversation

ethanwu10
Copy link
Member

@ethanwu10 ethanwu10 commented May 10, 2021

Migrate yarn to yarn berry without PnP.

Batch dependency upgrade has no major production dependency upgrades. Tooling / dev dep major upgrades include Husky 6 (new hook executor) and AJV 8 (no significant changes). eslint dependencies have also all been hoisted to the project root.

No package version changes, only Yarn 2 migration (without pnp)
A few majors held back for another commit, Prettier re-run; theme-ui was
upgraded with a breaking deprecation that will be fixed in the next
commit.
`useCustomProperties` is now under `theme.config`.
@ethanwu10 ethanwu10 changed the base branch from master to next May 10, 2021 00:51
Fix CI and Docker build to use yarn 2 commands, run `yarn dedupe` on
pre-commit and CI, and update a few more configs for yarn 2 paths and
conventions.
Disable diffs and auto merging on vendored yarn code, disable diffs on
yarn.lock, and remove .yarn/sdks from repo.
Merge in changes to Fastify request log serializer from upstream
Fastify. This fixes a deprecation warning.
Instead of using the object returned by `render`, query using the global
`screen` as recommended by Kent C. Dodds.
https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#not-using-screen
Since the `getBy*` functions throw when they cannot find an element,
prefer them for querying for elements that should exist (except when the
test is explicitly for whether or not the element exists). This removes
most of the null checks in the test code.
Since yarn 2 uses an internal shell parser[1] which supports environment
variables, we no longer need to use cross-env for cross-platform
environment variable setting.

[1]: https://github.com/yarnpkg/berry/tree/%40yarnpkg/shell%2F2.4.1/packages/yarnpkg-shell
@codecov
Copy link

codecov bot commented May 10, 2021

Codecov Report

Merging #566 (b0c5d50) into next (4594c42) will not change coverage.
The diff coverage is 21.05%.

Impacted file tree graph

@@           Coverage Diff           @@
##             next     #566   +/-   ##
=======================================
  Coverage   50.97%   50.97%           
=======================================
  Files          89       89           
  Lines        1542     1542           
  Branches      292      286    -6     
=======================================
  Hits          786      786           
  Misses        735      735           
  Partials       21       21           
Impacted Files Coverage Δ
packages/client/src/api/util.ts 0.00% <0.00%> (ø)
packages/client/src/components/test-util.tsx 100.00% <ø> (ø)
packages/client/src/util/auth.tsx 0.00% <ø> (ø)
packages/server/src/app.js 62.50% <ø> (ø)
packages/server/src/email/index.ts 69.23% <0.00%> (ø)
packages/server/src/api/helpers.ts 89.47% <100.00%> (ø)
packages/server/src/api/index.ts 45.45% <100.00%> (ø)
packages/server/src/challenges/index.ts 85.29% <100.00%> (ø)
...ckages/server/src/providers/uploads/local/index.ts 18.18% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4594c42...b0c5d50. Read the comment docs.

@ethanwu10 ethanwu10 marked this pull request as ready for review May 10, 2021 03:19
@ethanwu10 ethanwu10 requested a review from ginkoid May 10, 2021 04:22
@ethanwu10
Copy link
Member Author

ethanwu10 commented May 10, 2021

Storybook throws warnings but still starts; seems to be related to storybookjs/storybook#14805

Since it doesn't seem to affect anything, we can probably just merge as-is (I don't particularly want to add the manual babel plugin option override to suppress it since it's a storybook issue and doesn't exist in our normal webpack build).

Fix .yarn being included twice, add dockerignore entries for yarn to
hopefully prevent some churn (using the ignore list recommended for
PnP zero-install).
When casting the handler functions exported from individual routes,
derive the target type by inspecting the `route` method of the
FastifyInstance we are registering them on. Since we adjust the instance
type to better match `http.Server`, this fixes a type mismatch that
appears when compiling on some platforms when trying to register the
handlers.
@ethanwu10 ethanwu10 enabled auto-merge May 10, 2021 22:42
@ethanwu10 ethanwu10 merged commit d5b7219 into next May 10, 2021
@ethanwu10 ethanwu10 deleted the dependencies/yarn-2-batch branch May 10, 2021 22:45
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.

2 participants