Commit graph

2562 commits

Author SHA1 Message Date
vercel-release-bot
cbf901ca69 v14.2.0-canary.48 2024-03-28 23:21:44 +00:00
Will Binns-Smith
e519634c81
Turbopack: Fail when next/font is used in _document (#63788)
Test Plan:
d01a621961/test/development/next-font/font-loader-in-document-error.test.ts (L19)


Closes PACK-2858
2024-03-28 15:29:03 -07:00
OJ Kwon
7b2563da00
feat(custom-transform): more static info warning (#63837)
### What

Add few more warning assertions for the page static info.

requires https://github.com/vercel/next.js/pull/63780.

Closes PACK-2868
2024-03-28 19:31:13 +00:00
OJ Kwon
493130b789
feat(custom-transforms): partial page-static-info visitors (#63741)
### What

Supports partial `get-page-static-info` in turbopack. Since turbopack
doesn't have equivalent place to webpack's ondemandhandler, it uses
turbopack's build time transform rule instead.

As noted, this is partial implementation to pagestatic info as it does
not have existing js side evaluations. Assertions will be added
gradually to ensure regressions, for now having 1 assertion for
getstaticparams.

Closes PACK-2849
2024-03-28 09:47:33 -07:00
vercel-release-bot
fe9ce66262 v14.2.0-canary.47 2024-03-28 13:38:44 +00:00
vercel-release-bot
0c21ff7df6 v14.2.0-canary.46 2024-03-27 23:21:35 +00:00
vercel-release-bot
1d9833bc63 v14.2.0-canary.45 2024-03-27 19:12:36 +00:00
Tobias Koppers
916174b7ff
remove left-over debugging (#63774)
Closes PACK-2856
2024-03-27 19:28:59 +01:00
Tobias Koppers
f56a674f58
add tracing to server actions transform (#63773)
### What?

The transform seem to be quite inefficient regarding memory usage. Just
leaving a trace here to allow inspecting performance and memory of it
separately from the normal `parse` function.


Closes PACK-2855
2024-03-27 19:24:21 +01:00
OJ Kwon
e820e92dc3
fext(next-core): inherit root layout segment config for the routes (#63683)
### What

Supports root segment config inherit from layout. Currently route
segment config only runs agasint own source, so individual route segment
config works but if the config is set in layout level it is being
ignored. PR introduces root segment and pass into each route if tree
level have a corresponding layout.

Closes PACK-2839
2024-03-27 16:38:23 +00:00
Tobias Koppers
7d82b68233
Turbopack: parallelize app structure (#63707)
### What?

Allow to scan app structure in parallel


Closes PACK-2845
2024-03-27 17:01:06 +01:00
vercel-release-bot
2fc408d66d v14.2.0-canary.44 2024-03-26 23:23:31 +00:00
Tobias Koppers
1b76aa9ec1
Turbopack: fix allocation inefficiency (#63738)
### What?

- remove unnecessary clones

### Why?

### How?


Closes PACK-2847
2024-03-26 23:39:49 +01:00
Shu Ding
f840cb4882
Rename encryption key generation code (#63730)
This PR renames the API to be not specifically related to Server
Actions, as in the future it might be used by other things. It also adds
the `__next_encryption_key_generation_promise` variable to avoid
double-generating of the key when it's called concurrently (e.g. by the
node server and edge server compilers).

Closes NEXT-2938
2024-03-26 18:25:23 +00:00
Tobias Koppers
459e8fe96e
generate the same next/font modules for the same options (#63513)
### What?

Improves caching of next/font generated modules (make them independent
on importer context)


Closes PACK-2796
2024-03-26 10:13:03 +00:00
vercel-release-bot
c7dbbd9a54 v14.2.0-canary.43 2024-03-25 23:22:56 +00:00
OJ Kwon
35f93e3be3
fix(dev-overlay): align codeframe to formatIssue (#63624)
Closes PACK-2825
2024-03-25 09:55:22 -07:00
vercel-release-bot
c2e3d9ac18 v14.2.0-canary.42 2024-03-25 15:57:25 +00:00
Janka Uryga
f509de950b
Fix react-dom aliases for edge RSC (#63619)
Follow up to #63588, we missed edge there

Closes NEXT-2905
2024-03-25 11:37:23 +01:00
vercel-release-bot
ce0120954e v14.2.0-canary.41 2024-03-24 23:23:19 +00:00
vercel-release-bot
2746990135 v14.2.0-canary.40 2024-03-23 23:21:07 +00:00
OJ Kwon
98ffe45092
fix(next-core): refine context for unsupported edge imports (#63622)
### What

Followup for the unsupported imports in edge to inject corresponding
context only.

Closes PACK-2824
2024-03-23 06:53:49 +00:00
vercel-release-bot
65d699e7d7 v14.2.0-canary.39 2024-03-22 21:20:06 +00:00
OJ Kwon
07a39eed2e
Revert "Revert "feat(next-core): support unsupported module runtime error (#63491)"" (#63609)
### What

This PR reenables reverted PR #63491, with fixing unexpectedly mark
supported node.js internals as unsupported.

Tried to add test cases for the supported case but hitting
https://vercel.slack.com/archives/C03EWR7LGEN/p1711128538909549, need
separate investigation.
2024-03-22 11:50:54 -07:00
vercel-release-bot
fe87d8c6f9 v14.2.0-canary.38 2024-03-22 12:39:08 +00:00
vercel-release-bot
368e9aa9ae v14.2.0-canary.37 2024-03-21 23:51:55 +00:00
vercel-release-bot
d1248a7536 v14.2.0-canary.36 2024-03-21 23:23:03 +00:00
vercel-release-bot
04f5781c1b v14.2.0-canary.35 2024-03-21 17:49:30 +00:00
Tobias Koppers
7d95336779
Revert "feat(next-core): support unsupported module runtime error (#63491)" (#63575)
### What?

It's causing `__import_unsupported` is not defined in `instrumentation`
context
2024-03-21 18:43:58 +01:00
OJ Kwon
976dd526ae
feat(custom-transform): middleware dynamic assert transform (#63538)
### What

This PR implements runtime warning for dynamic codes (`eval`,
`Function`...) in edge runtime. Webpack uses middleware plugin to
replace / wrap codes, in case of Turbopack we don't have equivalent, so
creating a new transform visitor and run it if the context is edge.
Since sandbox augments global fn (__next_*), transform simply wraps the
expr if it matches to the condition.

Closes PACK-2804
2024-03-21 06:12:28 +01:00
vercel-release-bot
c0f9d246d1 v14.2.0-canary.34 2024-03-20 23:22:37 +00:00
Tobias Koppers
1c998d86da
route/middleware/instrumentation use server assets instead of client assets (#62134)
### What?

route/middleware/instrumentation use server assets
server assets use full url rewrite

### Why?

### How?

https://github.com/vercel/turbo/pull/7750

Fixes PACK-2522

fixes PACK-2645
2024-03-20 12:06:29 +01:00
vercel-release-bot
833df606b2 v14.2.0-canary.33 2024-03-19 23:22:30 +00:00
vercel-release-bot
ad4a7bf403 v14.2.0-canary.32 2024-03-19 22:10:11 +00:00
OJ Kwon
3689c03d60
feat(next-core): support unsupported module runtime error (#63491)
### What

Implement webpack's middleware plugin equivalent for webpack, to raise
unsupported error in runtime.

PR utilizes import map alias for the edge context, to resolve into
modulereplacer internally provides a virtualsource to call runtime error
logic. Since we already have globally augmented, the virtualsource only
need to take export those into module.

Closes PACK-2789
2024-03-19 13:52:06 -07:00
vercel-release-bot
7943315cce v14.2.0-canary.31 2024-03-19 14:48:23 +00:00
vercel-release-bot
1439503b3b v14.2.0-canary.30 2024-03-18 23:21:43 +00:00
OJ Kwon
4064c64024
fix(next-core): carry over original segment config to metadata route (#63419)
### What

Fixes to honor metadata route's segment config - turbopack replaces it
into route handler, then parsed segment config so original segment
config was ignored always.

Closes PACK-2762
2024-03-18 13:26:04 -07:00
vercel-release-bot
57da10beea v14.2.0-canary.29 2024-03-18 19:47:03 +00:00
vercel-release-bot
8b9e18503c v14.2.0-canary.28 2024-03-18 10:01:02 +00:00
Tim Neutkens
6380b81bff
Ensure all metadata files have missing default export errors in Turbopack (#63399)
## What?

Fixes the `"app dir - metadata dynamic routes should error if the
default export of dynamic image is missing",` test. The check was
missing in the output code for 2 metadata variations.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-2832
2024-03-18 10:30:45 +01:00
vercel-release-bot
8d5e9178f9 v14.2.0-canary.27 2024-03-17 23:23:04 +00:00
vercel-release-bot
f1a999ee73 v14.2.0-canary.26 2024-03-16 22:31:13 +00:00
Tobias Koppers
76c43b7d6a
fix transform of files ending with d (#63367)
### What?

fixed `"use client"` in files ending with `d`...

### Why?

### How?


Closes PACK-2753
2024-03-16 23:27:02 +01:00
vercel-release-bot
3b6b04ae2c v14.2.0-canary.25 2024-03-16 20:06:26 +00:00
Tobias Koppers
43d911406b
add conditions for webpack loader rules (#63333)
### What?

* Allow to apply webpack loaders depending on "conditions".
* add a few next specific conditions depending on context type

### Why?

Some loaders need different behavior depending on context

### How?


Closes PACK-2748
2024-03-16 21:02:10 +01:00
vercel-release-bot
fd692b61e0 v14.2.0-canary.24 2024-03-15 23:22:11 +00:00
vercel-release-bot
39a8429ac4 v14.2.0-canary.23 2024-03-14 23:21:31 +00:00
vercel-release-bot
847b340180 v14.2.0-canary.22 2024-03-14 12:45:30 +00:00
Tobias Koppers
efc5ae42a8
Turbopack: app externals test case improvements (#62871)
### What?

* rename test case
* improve error message and handle edge case for require resolving
* fix test case actually testing externals (webpack was silently
bundling, Turbopack showed error that helped to find the broken test
case)

### Why?

### How?


Closes PACK-2662
2024-03-14 07:22:40 +00:00