Skip to content

Add yarn cache to default build cache paths#12961

Merged
onsclom merged 16 commits intomainfrom
austinmerrick/add-yarn-cache-to-build-cache
Jan 31, 2025
Merged

Add yarn cache to default build cache paths#12961
onsclom merged 16 commits intomainfrom
austinmerrick/add-yarn-cache-to-build-cache

Conversation

@onsclom
Copy link
Copy Markdown
Contributor

@onsclom onsclom commented Jan 29, 2025

Adds .yarn/cache to the prepareCache for builders that may be using yarn. This allows yarn 2, 3, and 4 projects to cache deps between deploys.

Tested manually with each major yarn version using vercel deploy -b VERCEL_CLI_VERSION=https://vercel-i1pucqxc7.vercel.sh/tarballs/vercel.tgz and confirmed this cached deps on each version.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 29, 2025

🦋 Changeset detected

Latest commit: 11fe5ae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@vercel/static-build Minor
@vercel/build-utils Minor
@vercel/hydrogen Minor
@vercel/redwood Minor
@vercel/remix-builder Minor
@vercel/next Minor
@vercel/node Minor
vercel Patch
@vercel/client Patch
@vercel/gatsby-plugin-vercel-builder Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@onsclom onsclom marked this pull request as ready for review January 31, 2025 17:00
@onsclom onsclom merged commit 5c696af into main Jan 31, 2025
@onsclom onsclom deleted the austinmerrick/add-yarn-cache-to-build-cache branch January 31, 2025 20:15
)),
...(await glob(
isMonorepo
? '**/.yarn/cache/**'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking): prevent nested caches from being included

In an app where there are nested packages, this glob will pick up all caches found in all of those packages. Maybe we should find a way to only include the cache at a somewhat known place, like workspace package roots or repo root.

Of course, projects should have nested packages in normal circumstances. It can happen when using project test fixtures, though.‏

EndangeredMassa pushed a commit that referenced this pull request Jan 31, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

## [email protected]

### Minor Changes

- Add "react-router" framework entry
([#12932](#12932))

### Patch Changes

- Updated dependencies
\[[`5c696af2b40f0fc368e84cafa6d82b2ce998fc19`](5c696af)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add "react-router" framework entry
([#12932](#12932))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

### Patch Changes

- Updated dependencies
\[[`5c696af2b40f0fc368e84cafa6d82b2ce998fc19`](5c696af)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](#12961))

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5c696af2b40f0fc368e84cafa6d82b2ce998fc19`](5c696af)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`f9d8407866ac95db70dfd961cc51a6d2df233efa`](f9d8407)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5c696af2b40f0fc368e84cafa6d82b2ce998fc19`](5c696af)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

## [email protected]

### Minor Changes

- Add "react-router" framework entry
([#12932](vercel/vercel#12932))

### Patch Changes

- Updated dependencies
\[[`849907eb1695593f46c9992a3b809bb9ad191bb6`](vercel/vercel@849907e)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add "react-router" framework entry
([#12932](vercel/vercel#12932))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

### Patch Changes

- Updated dependencies
\[[`849907eb1695593f46c9992a3b809bb9ad191bb6`](vercel/vercel@849907e)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

## @vercel/[email protected]

### Minor Changes

- Add .yarn/cache to build cache
([#12961](vercel/vercel#12961))

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`849907eb1695593f46c9992a3b809bb9ad191bb6`](vercel/vercel@849907e)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`87ad9b119da198ddac8683ba55db663eb75c1a77`](vercel/vercel@87ad9b1)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`849907eb1695593f46c9992a3b809bb9ad191bb6`](vercel/vercel@849907e)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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