Commit Graph

487 Commits

Author SHA1 Message Date
JJ Kasper
12121b7a71 [next] Fix build time 404 route with trailingSlash: true (#8627)
This ensures we properly handle trailing slashes in the `notFound: true` build time routes. 

Fixes: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1663691719703509)
2022-09-27 09:21:49 -04:00
Steven
a825bc9540 Publish Stable
- @vercel/build-utils@5.5.0
 - vercel@28.4.2
 - @vercel/client@12.2.7
 - @vercel/go@2.2.8
 - @vercel/hydrogen@0.0.21
 - @vercel/next@3.1.29
 - @vercel/node@2.5.18
 - @vercel/python@3.1.17
 - @vercel/redwood@1.0.26
 - @vercel/remix@1.0.27
 - @vercel/ruby@1.3.34
 - @vercel/static-build@1.0.26
2022-09-22 16:50:27 -04:00
JJ Kasper
f5486a8297 [next] Update to route app rsc paths correctly (#8611)
### Related Issues

x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1663799417151099)

Failing probes are unrelated, more info can be seen in [this thread](https://vercel.slack.com/archives/C035J346QQL/p1663820032810519?thread_ts=1663775935.504379&cid=C035J346QQL)
2022-09-22 20:44:40 +00:00
Steven
51d968314f Publish Stable
- vercel@28.4.1
 - @vercel/fs-detectors@3.4.0
 - @vercel/next@3.1.28
 - @vercel/node@2.5.17
2022-09-21 18:47:45 -04:00
Chris Barber
b4e2cbc6e5 [tests] Test route src and dest for normalized path (#8609)
Adding assertions for normalized routes.
2022-09-21 18:44:52 -04:00
Jiachi Liu
7323beea8e [next] fix app dir SSG deployment paths (#8608)
### Related Issues

Seeing this while deploying appDir to production. The collecting path is
not correct for generated dist from appDir
```
Collected static files (public/, static/, .next/static): 18.834ms
Error: ENOENT: no such file or directory, open '/vercel/path0/.next/server/pages/route-groups/checkout.html'
Error: An unexpected error occurred!
Error: ENOENT: no such file or directory, open '/vercel/path0/.next/server/pages/route-groups/checkout.html'
Error: Command "vercel build" exited with 1
```

Fix the deployment of SSG, the output html/json paths should be prefixed
with `/app`

Adding a TODO now for how to determine the app path route, leveraging
`.rsc` suffix in data route. Better to use app paths manifest to
refactor it later.

### 📋 Checklist
<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [x] The code changed/added as part of this PR has been covered with
tests
- [x] All tests pass locally with `yarn test-unit`

#### Code Review

- [x] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-21 15:40:38 -07:00
Chris Barber
1558f21e49 [tests] Added lock file for normalize paths test fixture (#8600)
Added a lock file to the normalize paths text fixture to speed up install dependencies.

#### Tests

- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2022-09-21 19:31:27 +00:00
Steven
27f4034bdc Publish Stable
- @vercel/build-utils@5.4.4
 - vercel@28.4.0
 - @vercel/client@12.2.6
 - @vercel/go@2.2.7
 - @vercel/hydrogen@0.0.20
 - @vercel/next@3.1.27
 - @vercel/node@2.5.16
 - @vercel/python@3.1.16
 - @vercel/redwood@1.0.25
 - @vercel/remix@1.0.26
 - @vercel/ruby@1.3.33
 - @vercel/static-build@1.0.25
2022-09-21 09:24:15 -04:00
Chris Barber
48eb720556 [build-utils][next] Remove Path once copied to PATH. (#8596)
Windows doesn't like it when the env has both a `PATH` and a `Path`, so `cloneEnv()` must remove `Path` after copying it to `PATH`.

Renamed the next builder `01-normalize-routes` test to `01-normalize-paths` as it's test normalization of output paths, then re-enabled the test for Windows.

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2022-09-20 22:10:26 +00:00
Steven
a35654d047 [tests] Skip test 01-normalize-routes temporarily (#8590)
The  `01-normalize-routes` test is failing on windows so we need to temporarily disable until the root cause can be corrected.
2022-09-20 14:51:01 -04:00
JJ Kasper
7f4723b3f8 [next] Update local app edge test (#8588)
### Related Issues

Fixes:
https://github.com/vercel/vercel/actions/runs/3086450305/jobs/4990850756

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with
tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR
2022-09-19 18:15:13 -07:00
Sean Massa
619ca93421 Publish Stable
- @vercel/build-utils@5.4.3
 - vercel@28.3.0
 - @vercel/client@12.2.5
 - @vercel/frameworks@1.1.6
 - @vercel/fs-detectors@3.3.0
 - @vercel/go@2.2.6
 - @vercel/hydrogen@0.0.19
 - @vercel/next@3.1.26
 - @vercel/node@2.5.15
 - @vercel/python@3.1.15
 - @vercel/redwood@1.0.24
 - @vercel/remix@1.0.25
 - @vercel/ruby@1.3.32
 - @vercel/static-build@1.0.24
2022-09-19 16:40:10 -05:00
JJ Kasper
1f30e3a4b7 [next] Update app test fixture (#8584)
### Related Issues

Updates our test fixture for related changes in latest canary of
Next.js.

Fixes: https://vercel.slack.com/archives/CGU8HUTUH/p1663607276817069

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with
tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR
2022-09-19 13:08:10 -07:00
Chris Barber
3df8313d69 [next] Use posix path separator to join routes and overrides paths (#8530)
Use posix path separators for routes (static pages, lambdas, etc) instead of the native platform path separator (e.g. backslash on Windows).

#### Tests

- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2022-09-14 23:47:57 +00:00
Steven
d5537500d8 Publish Stable
- @vercel/build-utils@5.4.2
 - vercel@28.2.3
 - @vercel/client@12.2.4
 - @vercel/frameworks@1.1.4
 - @vercel/fs-detectors@3.0.0
 - @vercel/go@2.2.5
 - @vercel/hydrogen@0.0.18
 - @vercel/next@3.1.25
 - @vercel/node@2.5.14
 - @vercel/python@3.1.14
 - @vercel/redwood@1.0.23
 - @vercel/remix@1.0.24
 - @vercel/ruby@1.3.31
 - @vercel/static-build@1.0.22
2022-09-07 15:39:47 -04:00
Jiachi Liu
a6c320846e [@vercel/next] Handle nextjs edge routes from app dir (#8524)
### Related Issues

Add handling for edge SSR in app dir, normalize the edge page routes
from app dir, like what we did for ones in `pages/`.

### 📋 Checklist

#### Tests

- [x] The code changed/added as part of this PR has been covered with
tests
- [x] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-06 16:19:28 -07:00
Steven
3ff93279cd Publish Stable
- vercel@28.2.2
 - @vercel/next@3.1.24
 - @vercel/node@2.5.13
 - @vercel/redwood@1.0.22
 - @vercel/remix@1.0.23
2022-09-01 16:42:27 -04:00
Steven
58f9d649a8 [next][node][remix][redwood] Bump @vercel/nft@0.22.1 (#8502)
Bump `@vercel/nft` to version [0.22.1](https://github.com/vercel/nft/releases/tag/0.22.1)
2022-09-01 16:41:30 -04:00
JJ Kasper
cadc082ad1 [next] Fix index app dir case (#8501)
### Related Issues

This ensures we properly normalize the `/` case from the `app-path-routes-manifest` as the outputs expect this to be normalized to `index`. 

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2022-09-01 12:06:18 -07:00
Steven
2906d83eae Publish Stable
- @vercel/build-utils@5.4.1
 - vercel@28.2.1
 - @vercel/client@12.2.3
 - @vercel/edge@0.0.4
 - @vercel/fs-detectors@2.1.0
 - @vercel/go@2.2.4
 - @vercel/hydrogen@0.0.17
 - @vercel/next@3.1.23
 - @vercel/node@2.5.12
 - @vercel/python@3.1.13
 - @vercel/redwood@1.0.21
 - @vercel/remix@1.0.22
 - @vercel/ruby@1.3.30
 - @vercel/static-build@1.0.21
2022-09-01 13:16:42 -04:00
Steven
13a8a7dbf6 [next] Revert nft to 0.21.0 (#8499)
In Next.js 12, we introduce `outputFileTracing` as the default behavior. This moved `@vercel/nft` from `@vercel/next` into `next` itself so users can upgrade or downgrade Next.js if there is a bug in `@vercel/nft`.

Unfortunately, some users are setting `outputFileTracing: false` which deopts tracing back from `next` to `@vercel/next`. So we should pin `@vercel/nft` here and never upgrade in case of any bugs.
2022-09-01 09:13:35 -07:00
Sean Massa
e7e0a55b72 Publish Stable
- @vercel/build-utils@5.4.0
 - vercel@28.2.0
 - @vercel/client@12.2.2
 - @vercel/go@2.2.3
 - @vercel/hydrogen@0.0.16
 - @vercel/next@3.1.22
 - @vercel/node@2.5.11
 - @vercel/python@3.1.12
 - @vercel/redwood@1.0.20
 - @vercel/remix@1.0.21
 - @vercel/ruby@1.3.29
 - @vercel/static-build@1.0.20
2022-08-25 15:50:50 -05:00
Naoyuki Kanezawa
ead1e411ee [next] support middleware-manifest v2 (#8319)
### Related Issues

As the title, support a new version of middleware-manifest of next.js that is going to be added in https://github.com/vercel/next.js/pull/39257

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2022-08-25 18:57:12 +00:00
Steven
32357fc06f [node][next][redwood][remix] Bump @vercel/nft@0.22.0 (#8454)
This PR bumps `@vercel/nft` to version [0.22.0](https://github.com/vercel/nft/releases/tag/0.22.0)
2022-08-24 12:13:34 -04:00
Sean Massa
6700630feb Publish Stable
- @vercel/build-utils@5.3.2
 - vercel@28.1.4
 - @vercel/client@12.2.1
 - @vercel/go@2.2.2
 - @vercel/hydrogen@0.0.15
 - @vercel/next@3.1.21
 - @vercel/node@2.5.10
 - @vercel/python@3.1.11
 - @vercel/redwood@1.0.19
 - @vercel/remix@1.0.20
 - @vercel/ruby@1.3.28
 - @vercel/static-build@1.0.19
2022-08-24 09:09:02 -05:00
Sean Massa
ebb5e2b208 Publish Stable
- vercel@28.1.1
 - @vercel/next@3.1.20
 - @vercel/python@3.1.10
2022-08-22 15:33:41 -05:00
JJ Kasper
e34858d082 [next] Add handling for app-paths-manifest (#8098)
This adds handling for the `app` outputs and adds initial tests to ensure it is working as expected. 

### Related Issues

x-ref: https://github.com/vercel/next.js/pull/38420

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2022-08-22 14:58:21 -05:00
JJ Kasper
0d13fe7e34 [next] Ensure non-static pages/500 is handled (#8438)
Related Issues
Previously we were only checking for a non-static version of pages/404 although this can also be the case for pages/500 so this ensures we match that handling and add a test case to prevent regression.
Fixes: slack thread
📋 Checklist

Tests

 The code changed/added as part of this PR has been covered with tests
 All tests pass locally with yarn test-unit

Code Review

 This PR has a concise title and thorough description useful to a reviewer
 Issue from task tracker has a link to this PR
2022-08-22 10:13:16 -05:00
JJ Kasper
4afec9d373 [next] Update middleware data routes to fix caching (#8431)
Related Issues
This fixes caches for data routes with middleware due to search params not matching between the non-data variant and the data variant. Additional tests have been added to ensure this is working as expected.
Fixes: vercel/next.js#39595
📋 Checklist

Tests

 The code changed/added as part of this PR has been covered with tests
 All tests pass locally with yarn test-unit

Code Review

 This PR has a concise title and thorough description useful to a reviewer
 Issue from task tracker has a link to this PR
2022-08-22 09:52:24 -05:00
Sean Massa
09c85f63d2 Publish Stable
- vercel@28.1.0
 - @vercel/go@2.2.0
 - @vercel/next@3.1.19
2022-08-16 15:05:36 -05:00
JJ Kasper
f3cbc5d746 [next] Fix un-necessary edge routes being added (#8408)
Currently we are adding routes for edge function un-necessarily as static edge functions don't need routes added and dynamic edge functions already have their routes included in dynamicRoutes in the routes-manifest.
Related Issues
Fixes: slack thread
📋 Checklist

Tests

 The code changed/added as part of this PR has been covered with tests
 All tests pass locally with yarn test-unit

Code Review

 This PR has a concise title and thorough description useful to a reviewer
 Issue from task tracker has a link to this PR
2022-08-16 15:14:49 +01:00
Steven
b52d01f809 Publish Stable
- @vercel/build-utils@5.3.1
 - vercel@28.0.0
 - @vercel/client@12.2.0
 - @vercel/go@2.1.1
 - @vercel/hydrogen@0.0.14
 - @vercel/next@3.1.18
 - @vercel/node@2.5.8
 - @vercel/python@3.1.9
 - @vercel/redwood@1.0.18
 - @vercel/remix@1.0.19
 - @vercel/ruby@1.3.25
 - @vercel/static-build@1.0.18
2022-08-12 16:31:35 -04:00
Sean Massa
31f79c7de1 Publish Stable
- vercel@27.4.0
 - @vercel/go@2.1.0
 - @vercel/next@3.1.17
2022-08-09 16:11:57 -05:00
JJ Kasper
5b931afbf3 [next] Ensure $$ in ISR page is handled correctly (#8359)
* Ensure $$ in ISR page is handled correctly

* update test

* Remove duplicate tests

* add comment

* tweak
2022-08-09 11:13:15 -05:00
Steven
47e3381c6d Publish Stable
- @vercel/build-utils@5.3.0
 - vercel@27.3.8
 - @vercel/client@12.1.11
 - @vercel/go@2.0.16
 - @vercel/hydrogen@0.0.13
 - @vercel/next@3.1.16
 - @vercel/node@2.5.7
 - @vercel/python@3.1.8
 - @vercel/redwood@1.0.17
 - @vercel/remix@1.0.18
 - @vercel/ruby@1.3.24
 - @vercel/static-build@1.0.17
2022-08-08 19:11:12 -04:00
Steven
2b57e12ad3 [build-utils] Refactor framework prefixed env vars into shared function (#8166)
This consolidates the logic to get the framework-specific prefixed System Environment Variables into a single shared function so each builder can reuse the same function.

- Related to #7009 
- Related to #8306

In the future, this feature could be added to any other missing builders as well as `vc dev` but we'll save that for a new PR.
2022-08-05 00:51:52 +00:00
Steven
32afd67d29 Publish Stable
- @vercel/build-utils@5.2.0
 - vercel@27.3.7
 - @vercel/client@12.1.10
 - @vercel/edge@0.0.3
 - @vercel/frameworks@1.1.3
 - @vercel/fs-detectors@2.0.5
 - @vercel/go@2.0.15
 - @vercel/hydrogen@0.0.12
 - @vercel/next@3.1.15
 - @vercel/node@2.5.6
 - @vercel/python@3.1.7
 - @vercel/redwood@1.0.16
 - @vercel/remix@1.0.17
 - @vercel/routing-utils@2.0.2
 - @vercel/ruby@1.3.23
 - @vercel/static-build@1.0.16
 - @vercel/static-config@2.0.3
2022-08-04 15:11:10 -04:00
JJ Kasper
f3428dd212 [next] Remove old middleware test (#8323)
Remove old middleware test
2022-08-04 11:57:43 -05:00
Steven
5eb8b16cbd Publish Stable
- @vercel/build-utils@5.1.1
 - vercel@27.3.6
 - @vercel/client@12.1.9
 - @vercel/edge@0.0.2
 - @vercel/frameworks@1.1.2
 - @vercel/fs-detectors@2.0.4
 - @vercel/go@2.0.14
 - @vercel/hydrogen@0.0.11
 - @vercel/next@3.1.14
 - @vercel/node@2.5.5
 - @vercel/python@3.1.6
 - @vercel/redwood@1.0.15
 - @vercel/remix@1.0.16
 - @vercel/routing-utils@2.0.1
 - @vercel/ruby@1.3.22
 - @vercel/static-build@1.0.15
 - @vercel/static-config@2.0.2
2022-08-04 11:39:58 -04:00
JJ Kasper
226bf02be2 [next] Remove middleware regexp modifying (#8321)
x-ref: [slack thread](https://vercel.slack.com/archives/C03SF65BYSG/p1659626639087909)
2022-08-04 11:39:21 -04:00
Steven
8505872f55 [tests] Update package.json scripts (#8318)
This PR consolidates all the `test` scripts to be the same and removes the `prepublishOnly` script since we always run `build` before publishing to npm.
2022-08-04 11:02:56 -04:00
Steven
7db6436797 Publish Stable
- @vercel/build-utils@5.1.0
 - vercel@27.3.5
 - @vercel/client@12.1.8
 - @vercel/go@2.0.13
 - @vercel/hydrogen@0.0.10
 - @vercel/next@3.1.13
 - @vercel/node@2.5.4
 - @vercel/python@3.1.5
 - @vercel/redwood@1.0.14
 - @vercel/remix@1.0.15
 - @vercel/ruby@1.3.21
 - @vercel/static-build@1.0.14
2022-08-04 08:37:04 -04:00
JJ Kasper
6bfff3e9eb [next] Remove un-necessary duplicate i18n route (#8313)
* Remove un-necessary duplicate i18n route

* update
2022-08-03 21:02:19 -05:00
JJ Kasper
a2df3b5463 [next] Update data route handling for i18n and static routes (#8304)
* Ensure dynamic data route handles missing default locale path

* Ensure static data routes are still handled
2022-08-03 13:40:00 -05:00
JJ Kasper
21ff4a58c3 [next] Ensure we resolve _next/data dynamic routes correctly with i18n (#8297)
* Ensure we resolve _next/data dynamic routes correctly with i18n

* remove test version
2022-08-03 09:03:15 -05:00
JJ Kasper
2b9eb02b8c [next] Fix _next/data resolving priority for dynamic routes (#8278)
* Fix _next/data resolving priority for dynamic routes

* Apply suggestions from code review

* Ensure we match middleware for _next/data without header

* fix nested middleware case

* Update data routes generating

* Add version lock for non-nested middleware

* use path.posix
2022-08-02 17:41:06 -05:00
JJ Kasper
4ef4722460 [next] Fix priority for notFound preview routes (#7902)
Fix priority for notFound preview routes
2022-08-02 17:09:09 -05:00
Steven
543ffdfe5c Publish Stable
- @vercel/build-utils@5.0.8
 - vercel@27.3.4
 - @vercel/client@12.1.7
 - @vercel/fs-detectors@2.0.3
 - @vercel/go@2.0.12
 - @vercel/hydrogen@0.0.9
 - @vercel/next@3.1.12
 - @vercel/node@2.5.3
 - @vercel/python@3.1.4
 - @vercel/redwood@1.0.13
 - @vercel/remix@1.0.14
 - @vercel/ruby@1.3.20
 - @vercel/static-build@1.0.13
2022-08-02 09:29:15 -04:00
Sean Massa
e8c7db59cf Publish Stable
- @vercel/build-utils@5.0.7
 - vercel@27.3.2
 - @vercel/client@12.1.6
 - @vercel/go@2.0.11
 - @vercel/hydrogen@0.0.8
 - @vercel/next@3.1.11
 - @vercel/node@2.5.2
 - @vercel/python@3.1.3
 - @vercel/redwood@1.0.12
 - @vercel/remix@1.0.13
 - @vercel/ruby@1.3.19
 - @vercel/static-build@1.0.12
2022-07-29 13:45:48 -05:00
Sean Massa
90c1895949 Publish Stable
- @vercel/build-utils@5.0.6
 - vercel@27.3.1
 - @vercel/client@12.1.5
 - @vercel/fs-detectors@2.0.2
 - @vercel/go@2.0.10
 - @vercel/hydrogen@0.0.7
 - @vercel/next@3.1.10
 - @vercel/node@2.5.1
 - @vercel/python@3.1.2
 - @vercel/redwood@1.0.11
 - @vercel/remix@1.0.12
 - @vercel/ruby@1.3.18
 - @vercel/static-build@1.0.11
2022-07-28 16:01:36 -05:00