Adds a check to ensure the `serverBuildPath` for the server bundles was created. If it was not, then that means the Vercel forked Remix compiler was not used, and we must fall back to a singular server bundle.
The fork of the Remix compiler is only necessary when the project is utilizing split configurations in their routes (i.e. mixing Node.js and Edge functions).
However, the injecting of the forked compiler has proven to be brittle and has many edge cases which cause the fork to not be present. Considering that the more common case is to _not_ use split configuration, skip the fork entirely when that is the case.
This is somewhat of a band-aid / hold over for the "old" Remix. With the Remix + Vite configuration, the fork will be entirely unnecessary.
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/build-utils@7.7.0
### Minor Changes
- Revert "Revert "Default ruby to only currently supported version
(3.2.0)"" ([#11137](https://github.com/vercel/vercel/pull/11137))
## @vercel/static-build@2.4.0
### Minor Changes
- Revert "Revert "Default ruby to only currently supported version
(3.2.0)"" ([#11137](https://github.com/vercel/vercel/pull/11137))
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.18
## vercel@33.5.1
### Patch Changes
- build: upgrade edge-runtime
([#11148](https://github.com/vercel/vercel/pull/11148))
- Updated dependencies
\[[`24c3dd282`](24c3dd282d),
[`10e200e0b`](10e200e0bf),
[`678ebbe52`](678ebbe525)]:
- @vercel/build-utils@7.7.0
- @vercel/static-build@2.4.0
- @vercel/node@3.0.19
## @vercel/client@13.1.3
### Patch Changes
- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
- @vercel/build-utils@7.7.0
## @vercel/gatsby-plugin-vercel-builder@2.0.18
### Patch Changes
- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
- @vercel/build-utils@7.7.0
## @vercel/node@3.0.19
### Patch Changes
- build: upgrade edge-runtime
([#11148](https://github.com/vercel/vercel/pull/11148))
- refactor: simplify content-length check
([#11150](https://github.com/vercel/vercel/pull/11150))
- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
- @vercel/build-utils@7.7.0
## @vercel-internals/types@1.0.23
### Patch Changes
- Updated dependencies
\[[`24c3dd282`](24c3dd282d)]:
- @vercel/build-utils@7.7.0
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The Next.js change in https://github.com/vercel/next.js/pull/61794 means
that the `Vary` header will contain `Next-Url` less often. We need to
update the assertions on our end to accommodate.
This reverts commit de63e35622 / #11104.
We had no great way to test this without release but we have other
things we'd like to deploy today. Will revert the revert when we're
closer to fixing just this issue.
This PR changes the default package manager from `yarn` to `npm` in the case that no lockfile is present.
Many years ago when `yarn` was first released, it was much faster than `npm` so we used it by default. That is no longer the case today and `yarn@1` is no longer receiving new features.
For example, `sharp` and `esbuild` no longer works with `yarn@1`:
### Related
- https://github.com/lovell/sharp/issues/3750
- https://github.com/evanw/esbuild/issues/2949
Note that this change will not impact most projects because most used a lockfile.
This PR adds requiring the modules that _we know_ will be required in
the Next.js Lambda in the module scope in a attempt to make a better use
of resources.
---------
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Makes adjustments to replace `flags` with `variants`.
Also marks the current `flags` implementation as deprecated, as it
should get removed soon. Which I'll do in a follow up PR.
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/static-build@2.2.0
### Minor Changes
- Default ruby to only currently supported version (3.2.0)
([#11104](https://github.com/vercel/vercel/pull/11104))
### Patch Changes
- [tests] Update Gatsby fixture versions
([#11101](https://github.com/vercel/vercel/pull/11101))
## vercel@33.4.1
### Patch Changes
- Updated dependencies
\[[`d05e41eea`](d05e41eeaf),
[`de63e3562`](de63e35622)]:
- @vercel/static-build@2.2.0
## @vercel/client@13.1.1
### Patch Changes
- More helpful error message when `vc deploy --prebuilt` has missing
files ([#11105](https://github.com/vercel/vercel/pull/11105))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
We're currently using the directory name at `./vendor/bundle/ruby/`[0]
to determine ruby version. This directory is created as part of running
`bundle install` during the build process. However, when multiple ruby
versions are available, you can end up with multiple directories and the
0th entry at `./vendor/bundle/ruby/` isn't guaranteed to be the Ruby
version specified in the project.
Other companies in this space seem to do some order of
- check for value in `.ruby-version` file
- check for value passed into `ruby` directive in the Gemfile
- check the value in the `*.gemspec` file if the Gemfile has a `gemspec`
directive.
We'll do that work in a future PR but for _now_ our only supported Ruby
version is Ruby 3.2.x [as of
2023-11-22](https://vercel.com/changelog/upgrading-ruby-v2-7-to-v3-2).
So this can be hard-coded for the moment.
Skipping ruby tests now since these target _current_ prod where Ruby
3.2.x is not in `PATH` until we redeploy after this gets deployed.
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@33.4.0
### Minor Changes
- Added a new option to add a sensitive environment variable
([#11033](https://github.com/vercel/vercel/pull/11033))
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This is a performance / bandwidth / storage space optimization for the **Build Output API**.
When a Builder returns function which contains a file that is a `FileFsRef` instance, it _won't_ be copied into the corresponding `.func` directory, but instead will be added to a `"files"` mapping in the `.vc-config.json` file. This mapping represents keys which are destination file paths within the function filesystem, and values which are relative paths from the root of the project codebase. This allows for common files (i.e. `node_modules`) to be referenced (instead of physically copied on the disk).
This introduces an additional complexity to `vc deploy --prebuilt`, in such that now it needs to build up the list of `"files"` referenced from the `.vc-config.json` files, and _also_ upload those file paths along with the `.vercel/output` directory.
Depends on:
* https://github.com/vercel/vercel/pull/11077
* https://github.com/vercel/vercel/pull/11080
* Use `Lambda` constructor instead of `createLambda()`
* Return `FileBlob` instance for the entrypoint files, so that they do not get written to cwd
* In `vc dev`, support `Lambda` instances which do not have `zipBuffer` property
Ensure that files referenced by the `filePathMap` property in the `.vc-config.json` files for functions in the Build Output API `.vercel/output` directory are uploaded during the prebuilt deployment process.
Related to / precursor for https://github.com/vercel/vercel/pull/11060.
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@33.2.0
### Minor Changes
- chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))
### Patch Changes
- fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))
- [cli] Add documentation string for `skip-domain` option ([#11051](https://github.com/vercel/vercel/pull/11051))
- Updated dependencies \[[`260125784`](2601257846), [`cdddb33ad`](cdddb33ad4), [`72d8604c9`](72d8604c9d), [`90d0455e1`](90d0455e1f), [`0716130e5`](0716130e58), [`b6b151f39`](b6b151f391), [`b185a7e20`](b185a7e207)]:
- @vercel/static-build@2.1.0
- @vercel/build-utils@7.5.1
- @vercel/next@4.1.0
- @vercel/remix-builder@2.0.18
- @vercel/node@3.0.17
## @vercel/next@4.1.0
### Minor Changes
- fix error when @vercel/analytics is a transitive dependency of the deployed application ([#10892](https://github.com/vercel/vercel/pull/10892))
### Patch Changes
- Use `worker.name` instead of edge function name to fix type error in `@vercel/next` ([#11050](https://github.com/vercel/vercel/pull/11050))
## @vercel/static-build@2.1.0
### Minor Changes
- chore: deprecate next/nuxt/gastby Speed Insights injection in favor of @vercel/speed-insights ([#11048](https://github.com/vercel/vercel/pull/11048))
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.16
## @vercel/build-utils@7.5.1
### Patch Changes
- Add experimental field to Lambda and size to FileFsRef output ([#11059](https://github.com/vercel/vercel/pull/11059))
## @vercel/client@13.0.14
### Patch Changes
- Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
- @vercel/build-utils@7.5.1
## @vercel/gatsby-plugin-vercel-builder@2.0.16
### Patch Changes
- Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
- @vercel/build-utils@7.5.1
## @vercel/node@3.0.17
### Patch Changes
- Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
- @vercel/build-utils@7.5.1
## @vercel/remix-builder@2.0.18
### Patch Changes
- Fix functions without a output path edge case ([#11038](https://github.com/vercel/vercel/pull/11038))
- Update `@remix-run/dev` fork to v2.5.0 ([#11054](https://github.com/vercel/vercel/pull/11054))
- Update `@remix-run/dev` fork to v2.5.1 ([#11065](https://github.com/vercel/vercel/pull/11065))
## @vercel-internals/types@1.0.21
### Patch Changes
- Updated dependencies \[[`cdddb33ad`](cdddb33ad4)]:
- @vercel/build-utils@7.5.1
### 🧐 What's in there?
With the recent release of [`@vercel/speed-insights`](https://vercel.com/docs/speed-insights/package) own package (like [`@vercel/analytics`](https://vercel.com/docs/analytics/package)), it's time to encourage users to migrate.
With the availability of `@vercel/speed-insights`, users will have to opt-in explicitly by installing the package. Their benefit is a better and fine-grained control of the reporting (in particular, per-application sample rate).
### ❗ Note to reviewers
I used `console.warn` and hope it will stands out in the build logs. I'm happy to use anything else if you have better suggestions.
There's also a deprecation warning in Next.js, which covers a related but slightly different case, when users explicitly pass analyticsId in their configuration. https://github.com/vercel/next.js/pull/60677
This adds a new experimental field for new bundling behavior. This also
adds an optional `size` field to the FileFsRef output since we already
stat to avoid having to re-stat to get this value.
Fixes an edge case where a route without a path was causing the build to
fail. Reproducible with this `remix.config.js` file:
```js
export default {
ignoredRouteFiles: ["**/.*"],
routes(defineRoutes) {
return defineRoutes((route) => {
route("/", "foo.tsx", { index: true });
});
},
};
```