Replace All Uses of yarn --frozen-lockfile With yarn --immutable --immutable-cache

The default yarn install command of the CircleCI node orb uses the deprecated flag --frozen-lockfile causing yarn to warn: ➤ YN0050: The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead. A future version of the orb should use --immutable --immutable-cache instead. My understanding is that all versions of yarn that support --frozen-lockfile also support these flags. This would also imply updating the documentation of the orb and other mentions of --frozen-lockfile in CircleCI’s documentation.

There are other similar deprecation warnings related to CircleCI’s use of yarn. For example, the --cache-folder has been replaced with the cacheFolder setting in .yarnrc.yml. One would hence run yarn config set cacheFolder ~/.cache/yarn in yarn 2. On a side note: ~.cache/yarn is a typo in the Yarn partial cache restoration documentation, and should instead say ~/.cache/yarn.