Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !5270

Caches the Yarn resolution for faster installs

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/arcanis/cached-resolution into master Oct 03, 2018
  • Overview 23
  • Commits 5
  • Pipelines 0
  • Changes 7

Created by: arcanis

When running create-react-app, a good chunk of the time is spent resolving the dependency tree to satisfying versions. Since react-scripts uses pinned dependencies anyway (suggesting that you always want to use precise versions), this looks a bit unnecessary.

This PR adds a new script, compile:lockfile, meant to be ran manually every now and then. It will update the yarn.lock.cached file located in the create-react-app package, which will be copied into the app directory before running yarn add react-scripts (only if Yarn is being used, of course). Three cases then:

  • If create-react-app is up-to-date with the latest react-scripts, the resolution will be mostly instantaneous.
  • If create-react-app is completely desynchronized with the react-scripts being used, the resolution will be like now (the cached resolution will simply be ignored by Yarn).
  • If create-react-app is old-but-not-that-much compared to react-scripts, Yarn will be able to reuse at least some of the cached resolution, which will still give a perf boost.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/arcanis/cached-resolution