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

switch Yarn v3 #4777

Closed
wants to merge 34 commits into from
Closed

switch Yarn v3 #4777

wants to merge 34 commits into from

Conversation

derhuerst
Copy link
Member

@derhuerst derhuerst commented Mar 24, 2023

This PR includes the changes of and depends on PR #4776; Please review & merge that one first.

Proposed Changes

  • upgrade to Yarn v3.4.1 (and the version plugin to v3.1.3 because the old version isn't compatible)
  • in the CI workflow spec, add -v3 to the cache keys, in order to prevent incompatible caches from being restored
  • since Yarn v3 seems to have changed the algorithm, update all checksums in yarn.lock 💥 (done via running just yarn)

Pull Request Check List

  • A reasonable set of unit tests is included
  • Console does not show new warnings/errors
  • Changes are documented or they are self explanatory
  • Code coverage does not decrease (unless measured incorrectly)

Review

  • Read and verify the code changes
  • Test the functionality by running the UI locally with all popular browsers available in your platform
  • Check that the implementation matches the design, when such one is defined in a Jira issue
  • Merge the pull request

(This is the upstream equivalent of embarkokc#22.)

@derhuerst derhuerst mentioned this pull request Mar 24, 2023
4 tasks
- use 1.4 syntax to support `COPY --link` commands
- set NODE_ENV=production
- remove $WORK build arg
…ching

- If e.g. `test` has been added in a command/step, removing it in a
subsequent command/step does not have a positive effect on the image size.
Rather, we add it .dockerignore to stop adding it in the first place.
- node_modules/.cache & /tmp/Relay* are populated by Webpack plugins.
app/server.js reads .entrypoints.main.assets in order to generate an appropriate
manifest and `preload` tags, but it doesn't need the rest. This is why we turn
all stats off via `all: false` and then selectively turn `entrypoints` on.

Before, stats.json was 82mb, now it is ~9kb.
Even if a commit has changed `yarn.lock`, we can use an old `.yarn/cache` directory, so that we don't have to fetch 99% of all dependencies again.
This probably improves favicons-webpack-plugin's performance, as node_modules won't be resolved for resolving the path.
This speeds up the webpack build within the Docker image build significantly.
@vesameskanen
Copy link
Member

This PR got already merged into V3 as a part of #4838 .

@derhuerst derhuerst deleted the yarn-v3-upstream branch August 21, 2023 14:40
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.

3 participants