Commit graph

2562 commits

Author SHA1 Message Date
JJ Kasper
8562680f23
Update version from backport (#62745)
Ensures new canaries start from correct version as we did a backport for
`v14.1.1`

Closes NEXT-2663
2024-03-01 21:35:18 +00:00
Tim Neutkens
8034042215
Add compiler error for conflicting App Router and Pages Router in Turbopack (#62531)
## What?

Working on fixing `test/e2e/conflicting-app-page-error`, this adds a
compiler error for the case where App Router routes conflict with Pages
Router routes. It's not 1:1 the same error as in webpack because in the
webpack version we hijacked the App Router resolving logic to assume
there's a certain set of paths, where Turbopack has the full route to
route tree resolving implementation which doesn't assume there's a
single page that can be resolved.

The tests are updated to reflect this change.


<!-- 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-2592
2024-03-01 17:39:39 +01:00
Tim Neutkens
d12693e779
Handle top level errors coming from Turbopack entrypoints subscription (#62528)
## What?

Adds handling for issues that are emitted during the entrypoints
subscription, before the changes in this PR any issue (i.e. compiler
errors) that was emitted during the collection of which entrypoints
exist in the application were ignored.

<!-- 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-2591
2024-03-01 14:47:41 +01:00
vercel-release-bot
c77454a02a v14.1.1-canary.82 2024-02-29 23:21:48 +00:00
OJ Kwon
ecec67d3f5
refactor(next-swc): remove unused features (#62696)
### What

Remove unused features for the turbopack.

Closes PACK-2628
2024-02-29 11:14:16 -08:00
Leah
9f72146dd7
fix(turbopack): don't emit issues for deleted pages (#62012)
### What?

We now keep track of all client assets emitted for each route in
`ClientAssetMapper` and remove all issues associated with them when a
route get deleted.

Fixes #61384  
Closes PACK-2487
2024-02-29 16:55:49 +00:00
vercel-release-bot
603b3771ce v14.1.1-canary.81 2024-02-29 16:38:01 +00:00
Tobias Koppers
5b204be07d
Turbopack: remove unused code (#62690)
### What?

No longer used with nexturbo


Closes PACK-2624
2024-02-29 16:32:39 +00:00
Tim Neutkens
c262e6118f
Consistently use /_not-found for not found page in App Router (#62679)
## What?

#62528 caused test/e2e/app-dir/not-found/conflict-route to fail
compilation in Turbopack, this compiler error was previously already
reported by Turbopack but Next.js didn't show it, which #62528 resolved.

This PR changes the handling for the not-found handling to be consistent
between development and build, which ensures that the "special" page no
longer conflicts with app/not-found/page.js.

Closes NEXT-2617


Note: this is a reworked iteration of
https://github.com/vercel/next.js/pull/62585 which wasn't sufficient.

<!-- 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 #

-->
2024-02-29 14:47:31 +00:00
vercel-release-bot
f0461abff0 v14.1.1-canary.80 2024-02-28 23:23:19 +00:00
vercel-release-bot
6a7a0da737 v14.1.1-canary.79 2024-02-28 22:42:21 +00:00
OJ Kwon
c5299239d3
feat(next-swc): lightningcss binding (#62604)
### What

This PR enables lightningcss features in next-swc. Currently this is for
the native build targets only, for the wasm there are some unknown build
error prevents to enable this.

Closes PACK-2607
2024-02-28 21:45:02 +00:00
OJ Kwon
acdf052e88
build(cargo): remove unused features (#62616)
### What?

It doesn't look like we are using these dependencies, remove from cargo
manifests.

Deploy CI confirms all native builds are passing:
https://github.com/vercel/next.js/actions/runs/8074472383


Closes PACK-2609
2024-02-28 09:13:54 -08:00
vercel-release-bot
6b6575ce48 v14.1.1-canary.78 2024-02-28 12:09:02 +00:00
Donny/강동윤
cea5366ce0
fix(next-swc): Provide tokio context required for WASM plugins (#62441)
### What?

Run transforms with the tokio context so Wasmer works properly.

### Why?

To allow invoking Wasm plugins. `wasmer` had a breaking change.

### How?



Closes PACK-2587
Closes #62081

---------

Co-authored-by: hrmny <8845940+ForsakenHarmony@users.noreply.github.com>
2024-02-28 11:28:00 +09:00
vercel-release-bot
b0fcd44e13 v14.1.1-canary.77 2024-02-27 23:20:54 +00:00
Donny/강동윤
523b7f8601
feat(turbopack): Sort issues (#62566)
### What?

Sort issues emitted by turbopack.


### Why?

Make it deterministic and testable


### How?

Closes PACK-2440

turbopack counterpart: https://github.com/vercel/turbo/pull/7519

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-02-27 19:07:32 +00:00
vercel-release-bot
036a4f60fc v14.1.1-canary.76 2024-02-27 18:20:06 +00:00
vercel-release-bot
36dde3c37e v14.1.1-canary.75 2024-02-27 17:21:46 +00:00
vercel-release-bot
eb6867fdad v14.1.1-canary.74 2024-02-26 23:22:03 +00:00
vercel-release-bot
0fcb946eca v14.1.1-canary.73 2024-02-26 10:40:07 +00:00
vercel-release-bot
bef716ad03 v14.1.1-canary.72 2024-02-24 23:22:11 +00:00
Jiachi Liu
aa914eea73
[turbopack] update edge alias (#62461)
Use public api alias for turbopack edge runtime, aligning with webpack

Closes NEXT-2584
2024-02-24 01:25:16 +01:00
vercel-release-bot
8166c15973 v14.1.1-canary.71 2024-02-23 22:55:51 +00:00
Leah
dcf8f04135
fix(turbopack): deal with eventual consistency in get_directory_tree (#62444)
### What?

The file watcher might invalidate the (moved / deleted) directory before
the parent task can mark it as no longer needed.

Closes PACK-2588
2024-02-23 17:12:53 +01:00
Tobias Koppers
1d2225eab7
Turbopack: reduce memory usage (#62432)
### What?

Avoid cloning a bit

### Why?

less allocations and memory usage

### How?


Closes PACK-2584
2024-02-23 13:04:06 +01:00
vercel-release-bot
1aaa40c781 v14.1.1-canary.70 2024-02-22 23:23:39 +00:00
Tim Neutkens
dae8756b86
Correctly pass prependData and additionalData to sass-loader for Turbopack (#62397)
## What?

Ensures that `prependData` and `additionalData` are passed as loader
options instead of as part of `sassOptions`, mirrors webpack behavior.

Covers two cases that currently fail in #62321.

<!-- 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-2571
2024-02-22 18:42:25 +01:00
Tobias Koppers
f27e76e0a2
Turbopack: resolve endpoints to avoid extra nesting in tracing (#62317)
### Why?

Allows to correctly aggregate different endpoints in tracing

Closes PACK-2559
2024-02-22 08:22:24 +00:00
Donny/강동윤
8d6c1a6d40
fix(next-swc): Fix span for invalid 'use server' directives (#62259)
### What?

Highlight only `'use server'`, instead of the whole function body.

### Why?

Other statements of the body is not related to the error.


### How?

x-ref:
https://vercel.slack.com/archives/C04CAN8CGCE/p1708353068632249?thread_ts=1708351927.544179&cid=C04CAN8CGCE

Closes PACK-2538
2024-02-22 08:51:45 +01:00
vercel-release-bot
aafb329c6d v14.1.1-canary.69 2024-02-21 23:22:02 +00:00
vercel-release-bot
5dd895db83 v14.1.1-canary.68 2024-02-21 21:46:16 +00:00
Tobias Koppers
8421a97154
output filesystem without watching (#62340)
### What?

Use an output filesystem without watching to allow external changes to
output files


Closes PACK-2566
2024-02-21 20:53:50 +00:00
Tobias Koppers
e7ff4c02e5
avoid loading the page loader chunk on initial page load (#62269)
### What?

* unnecessary request
* removes a race condition with script loading



Closes PACK-2544
2024-02-21 21:49:49 +01:00
Tobias Koppers
79cb2b2256
Revert "Turbopack: reduce tasks needed for emitting" (#62324)
Reverts vercel/next.js#62291

Closes PACK-2563
2024-02-21 15:29:03 +01:00
Tobias Koppers
7d448236a2
Turbopack: add SSR category to tracing (#62318)
### Why?

Show correct type of processing in tracing


Closes PACK-2560
2024-02-21 13:42:41 +01:00
Tobias Koppers
bf196f5e5a
Turbopack: reduce tasks needed for emitting (#62291)
### What?

* reduce tasks needed for emitting
* add user level tracing


Closes PACK-2552
2024-02-21 13:36:57 +01:00
vercel-release-bot
063c286416 v14.1.1-canary.67 2024-02-21 11:00:29 +00:00
vercel-release-bot
79b7cb5f07 v14.1.1-canary.66 2024-02-21 06:09:07 +00:00
OJ Kwon
6f87054c76
fix(next-core): properly normalize app route for _ (#62307)
### What

This PR amends turbopack's behavior to handle some cases of normalized
path (`%5F` starting path), mainly fixes entry lookup works against
original path without normalization, also bends the output path of
client reference manifest matchs to what next.js expects.

Closes PACK-2553
2024-02-20 21:11:40 -08:00
vercel-release-bot
ad992d4576 v14.1.1-canary.65 2024-02-20 23:21:37 +00:00
vercel-release-bot
51e231b0b1 v14.1.1-canary.64 2024-02-20 21:39:22 +00:00
OJ Kwon
dd4b52e77e
fix(next-core): fix aliased free var for edge runtime (#62289)
### What?

Matches global free var alias to what webpack does (to the native
instead of polyfill)


Closes PACK-2550
2024-02-20 10:11:34 -08:00
Tobias Koppers
73322aa3d8
Verify correctness of externals (#62235)
### What?

* Verify correctness of externals
* error when packages can't be made external

### Why?

* Resolving to incorrect externals might lead to runtime errors
* Give users hints how to fix these issues

### How?


Closes PACK-2535

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2024-02-20 16:38:31 +00:00
vercel-release-bot
d894fac0e1 v14.1.1-canary.63 2024-02-20 16:18:08 +00:00
vercel-release-bot
321e4d0f2e v14.1.1-canary.62 2024-02-19 23:21:18 +00:00
Leah
ecb4d7484e
refactor(turbopack): resolve routes by page name instead of pathname (#61778)
### Why?

We currently use `page` and `pathname` in different places for file
system paths (manifests can be in a different folder to the js entry),
this PR makes more things just use `page` directly instead of going
through `pathname`.

This PR also adds an entry key (similar to the webpack version) uniquely
identifying all entry points (and assets).


Closes PACK-2432
2024-02-19 15:13:39 +00:00
Leah
031cf70092
fix(turbopack): catchall route matching (#62114)
This PR adds catch-all matching support to Turbopack. This allows you to
have catch-all parallel slots.

Closes NEXT-2038
Closes PACK-2518

Fixes #59502

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2024-02-19 10:44:53 +01:00
Tobias Koppers
8250a8419a
add turbo.resolveExtensions to allow to customize extensions (#62004)
### What?

* add `turbo.resolveExtensions` to allow to customize extensions in
Turbopack

fixes PACK-2335
Fixes https://github.com/vercel/turbo/issues/4934
2024-02-19 09:07:09 +00:00
vercel-release-bot
12411e9fe0 v14.1.1-canary.61 2024-02-19 00:04:04 +00:00
vercel-release-bot
7bf825741d v14.1.1-canary.60 2024-02-18 23:21:18 +00:00
vercel-release-bot
c62053f30b v14.1.1-canary.59 2024-02-17 23:20:55 +00:00
vercel-release-bot
da616e56d2 v14.1.1-canary.58 2024-02-16 23:21:11 +00:00
Tobias Koppers
8ee776dd17
add support for esmExternals in pages (#61983)
### What?

* add support for esmExternals in pages
* fix default of esmExternals to true
* fix serverComponentExternalPackages support
* add test case

fixes PACK-2311
fixes PACK-1916

Fixes https://github.com/vercel/turbo/issues/4544
2024-02-16 23:09:45 +00:00
OJ Kwon
2e138532fa
docs(next-api): trying to document project_update_info_subscribe (#61962)
### What?

Closes PACK-2469

Trying to add some description to the one of the public interface.

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-02-16 17:31:00 +00:00
vercel-release-bot
646a3d99db v14.1.1-canary.57 2024-02-16 15:27:46 +00:00
Tim Neutkens
212553958c
Fix issue with ComponentMod being read in Turbopack (#62141)
## What?

Fixes an issue where trying to build an edge runtime page with
generateStaticParams fails to read `ComponentMod`. Discussed with @sokra
and found that changing it to `import()` resolves the problem.

<!-- 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-2514
2024-02-16 16:06:38 +01:00
vercel-release-bot
994fdd71ea v14.1.1-canary.56 2024-02-15 23:22:35 +00:00
Shu Ding
d19d802671
Improve the Server Actions SWC transform (part 2) (#62052)
This fills the last piece in the puzzle and it's based on #61001. In
#61001 we covered the case of nested Server Action definition in a non
"use server" file. And this PR extends that to a "use server" file so
exported values are automatically handled just like before, but any
other definitions including nested ones will be hoisted and marked
correctly now.

```ts
'use server'

let a, f

export async function action0(b, c, ...g) { // <- Handled like before.
  return async function action1(d) {        // <- Renamed, marked and hoisted.
    'use server'
    let f
    console.log(...window, { window })
    console.log(a, b, action2)

    async function action2(e) {             // <- Renamed, marked and hoisted.
      'use server'
      console.log(a, c, d, e, f, g)
    }

    return [
      action2,
      async function action3(e) {           // <- Renamed, marked and hoisted.
        'use server'
        action2(e)
        console.log(a, c, d, e)
      },
    ]
  }
}
```

Closes NEXT-2491
2024-02-15 23:41:52 +01:00
Tim Neutkens
afd22c0251
Consolidate NextMode checks (#62106)
## What?

Consolidating the checks for NextMode so that it's easier to find where
it's implemented.

<!-- 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-2508
2024-02-15 14:19:44 -08:00
Tim Neutkens
2b177d654d
Implement Vc<NextMode> (#62099)
## What?

Ensures that `NextMode` is passed through based on the project setting
instead of hardcoding it to development in various places in the
Turbopack integration.

<!-- 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-2503
2024-02-15 17:26:35 +01:00
OJ Kwon
00633f1774
docs(turbopack): move docs to separate (#62069)
### What

For better organization, extracting docs into separate location.

Closes PACK-2494
2024-02-15 08:05:48 -08:00
Tobias Koppers
e1787bb719
Turbopack: add support for dynamic requests in require() and import() (#62092)
### What?

see https://github.com/vercel/turbo/pull/7398

### Turbopack Changes

* https://github.com/vercel/turbo/pull/7367 <!-- Tobias Koppers - add
custom_extensions to resolve options context -->
* https://github.com/vercel/turbo/pull/7398 <!-- Tobias Koppers - add
support for dynamic requests in require() and import() -->


Closes PACK-2513
2024-02-15 15:31:28 +00:00
vercel-release-bot
25809e83d1 v14.1.1-canary.55 2024-02-15 14:59:22 +00:00
Tim Neutkens
079fe5432f
Remove unused app-turbopack files (#62087)
## What?

Noticed this file was being `require`ed but doesn't actually hold
anything relevant as the flag it adds was removed already.

Also found that in the next-core crate there were files that are no
longer needed as it uses Next.js directly now. That fixes a bug when
running with `NextMode::Build` as well, as it couldn't resolve some of
these unused files.

<!-- 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-2500
2024-02-15 13:50:35 +01:00
Tim Neutkens
b3cd381d76
Add dev option to Turbopack createProject() (#62083)
## What?

Adds the `dev` option to switch between development and production
output flags for Turbopack.
Note: This only adds the option, the `false` value (production) doesn't
work yet.

<!-- 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-2499
2024-02-15 13:50:08 +01:00
Tobias Koppers
9572dfd80c
update turbopack (#62080)
* https://github.com/vercel/turbo/pull/7347 <!-- Tobias Koppers - avoid
resolving recursive main field -->
* https://github.com/vercel/turbo/pull/7349 <!-- Tobias Koppers - dedupe
resolving independent on reference type -->
* https://github.com/vercel/turbo/pull/7391 <!-- OJ Kwon -
feat(tasks-fs): allow to skip subpath invalidation -->
2024-02-15 12:41:26 +01:00
OJ Kwon
9d4954998d
fix(next-core): apply image-loader alias to the remaining context (#62070)
### What?

Fix custom image loader not being reflected in some contexts and running
the default image loader when next.config.js is present. For Webpack,
this alias is specified in `createWebpackAlias`
(8d28d5954e/packages/next/src/build/create-compiler-aliases.ts (L22))
and this setting seems to be context-agnostic in base
(8d28d5954e/packages/next/src/build/webpack-config.ts (L649)).

Closes PACK-2509
2024-02-14 20:21:16 -08:00
vercel-release-bot
aca5336449 v14.1.1-canary.54 2024-02-14 23:22:56 +00:00
OJ Kwon
d857636851
docs(turbopack): revise links (#62062)
### What?

Minor update to additional links.

PACK-2493
2024-02-14 13:18:19 -08:00
vercel-release-bot
ea65cb6541 v14.1.1-canary.53 2024-02-14 19:15:51 +00:00
Leah
f336bd6ada
fix(turbopack): react-dom/server in rsc context (#61165)
### What?
Probably not the right solution, next.js disables the `react-server`
import condition in there somehow I think

### Why?

Resend uses `@react-email/render` which uses `renderToString` from
`react-dom/server`.
Unfortunately importing `react-dom/server` with the `react-server`
import condition leads to a broken bundle (which seems like a bug in
react?).

Closes PACK-2243
Fixes #57936
2024-02-14 20:14:10 +01:00
OJ Kwon
56d35ede8e
fix(custom-transform): allow to assert empty program for rsc (#61922)
### What?
Turbopack uses `parse_as_prorgram`, and in case of empty file it returns
script instead of module so none of visitor runs for the rsc module.

This PR attempts to workaround, however need double clarification if
upstream swc behavior is desired.

Closes PACK-2460
2024-02-14 09:14:32 -08:00
OJ Kwon
65dc55a5eb
docs(turbopack): conslidate existing links (#62034)
### What?

This PR improves turbopack documentation, mostly collects existing
documents into a single place.

Also, adds a support to render mermaid diagram.

Closes PACK-2488
2024-02-14 09:12:33 -08:00
Shu Ding
45b18bb77e
Rename internal utility naming for clarification (#62048)
`createActionProxy` isn't the accurate name here - the function doesn't
return anything new but only mark the value as registered. And also, it
might not be a proxy (which is implementation detail) and might not be
used for Server Actions only. `registerServerReference` is a better name
here.

There's no functionality change in this PR, only a few renames.

Closes NEXT-2490
2024-02-14 14:09:27 +01:00
OJ Kwon
39deaa5976
refactor(next-core): do not reexport turbopack_binding (#62018)
### What

Minor correction to the imports, turbopack_binding should not be
reexported.


Closes PACK-2490
2024-02-13 16:53:37 -08:00
vercel-release-bot
9e918dec8b v14.1.1-canary.52 2024-02-13 23:21:40 +00:00
OJ Kwon
8b4005e792
docs(turbopack): reduce documentation size (#62016)
### What

next_core unexpectedly reexports everything, makes documentation size
too large.

Closes PACK-2480
2024-02-13 14:36:11 -08:00
OJ Kwon
2567b35acd
fix(next-core): correct error message (#62011)
<!-- 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 PACK-2486
2024-02-13 13:37:02 -08:00
OJ Kwon
1dc3c01030
docs(turbopack): build more docs (#61977)
### What

This PR changes setup for the turbopack documentation.

Long story in short, we want to 2 types of documentation: one for high
level description (archtecture, etcs) and another for the api doc.
rustdoc / cargo doc unfortunately doesn't support to integrate both
easily.

PR adds mdbook setup to workaround those - instead of using rustdoc's
index as entrypoint, mdbook becomes an entrypoint to rustdoc. This
allows to host plain text document, and also able to access full rustdoc
pages.


preview: https://turbopack-rust-docs-b6qta4xdq.vercel.sh/
rustdoc:
https://turbopack-rust-docs-b6qta4xdq.vercel.sh/rustdoc/index.html


Closes PACK-2475
Closes PACK-2468
2024-02-13 12:17:25 -08:00
Tobias Koppers
310c9beead
Turbopack: remove server addr (#61932)
### What?

remove server_addr option

### Why?

We no longer need the server addr for bundling.


Closes PACK-2462
2024-02-13 13:12:30 +00:00
Donny/강동윤
42872bf423
Update swc_core to v0.90.7 and update turbopack (#61662)
# Turbopack changes

* https://github.com/vercel/turbo/pull/7342 <!-- OJ Kwon - docs(turbopack): build, deploy rustdocs -->
* https://github.com/vercel/turbo/pull/7356 <!-- OJ Kwon - ci(workflow): remove doc deploy -->
* https://github.com/vercel/turbo/pull/7272 <!-- Donny/강동윤 - build: Update `swc_core` to `v0.90.7` -->


### What?

Update swc crates

### Why?

- To apply https://github.com/swc-project/swc/pull/8532 and other bugfixes

### How?

 - Closes PACK-2389
 - Closes PACK-2446
 - Closes #61788
2024-02-13 04:20:16 +00:00
vercel-release-bot
e3fa949d77 v14.1.1-canary.51 2024-02-12 23:21:34 +00:00
OJ Kwon
b04c70335d
ci(workflow): deploy rustdocs for turbopack (#61958)
### What

We'd like to deploy generated rustdocs from turbopack & related packages
(next-swc), setting up a CI workflow to automate those.

Since we need next.js side packages to build docs, this CI sets up
things in this repo.

Closes PACK-2375.
2024-02-12 15:14:36 -08:00
vercel-release-bot
4107f609a7 v14.1.1-canary.50 2024-02-12 18:45:11 +00:00
vercel-release-bot
6a049eaf0c v14.1.1-canary.49 2024-02-12 18:11:59 +00:00
vercel-release-bot
5437fdaa15 v14.1.1-canary.48 2024-02-11 23:22:10 +00:00
vercel-release-bot
03b652a955 v14.1.1-canary.47 2024-02-10 23:21:27 +00:00
vercel-release-bot
194311d8c9 v14.1.1-canary.46 2024-02-09 21:49:06 +00:00
Zack Tanner
3e3c012726
provide interception rewrites to edge runtime (#61414)
In #61794, the routes manifest is used to find the interception route rewrites in `next-server` and computed on the fly in `next-dev-server` based on `appPaths`.

The edge runtime doesn't have access to the routes manifest nor a full list of app paths. This writes an entry for the edge runtime to make the interception routes readable, and adds plumbing to return them in the `getInterceptionRouteRewrites` handling in `web-server`. This is what we use to signal to the server whether to return ‘Next-URL’ in the Vary for RSC requests. 

This piggybacks on the existing interception routes test but adds an edge runtime case.

Closes NEXT-2304
2024-02-09 10:30:58 -08:00
vercel-release-bot
f8343210dd v14.1.1-canary.45 2024-02-09 09:18:47 +00:00
Donny/강동윤
e838f268ec
feat: Allow specifying useLightningcss for styled-jsx (#61359)
### What?

Add `styledJsx` option to the schema.

### Why?

This is required to test `lightningcss` against internal apps.

### How?



Closes PACK-2316
2024-02-08 17:05:29 +01:00
vercel-release-bot
0114c2cb24 v14.1.1-canary.44 2024-02-08 12:22:09 +00:00
Will Binns-Smith
50ef635c0c
Fall back loading chunks for sourcemap tracing (#61790)
This implements falling back to try multiple locations loading chunks
for sourcemap tracing.

Unfortunately, when RSC replays server errors on the client, it does not
carry over the [0] symbol used to annotate server frames. Instead,
errors are recreated by React and only include the message and stack.

This allows more tests to pass, as we are able to correctly trace stack
frames by loading the appropriate server chunk.

Closes PACK-2442
2024-02-08 09:05:08 +01:00
OJ Kwon
775e898603
feat(next-core): build time client|server-only assertion (#61732)
### What

This PR injects a build-time error for the turbopack if
`client|server-only` is imported in incorrect context. The basic idea is
using resolve plugin, so in resolve time if matching context (which
alises erroneous import), raise a build time error.

Unfortunately this won't fix all of the tests in `invalid-imports`, due
to

1. resolveplugin does not have way to trace import from transformed, so
not able to detect `styled-jsx` from using `<styled..` tags
2. webpack (in our implementation) and turbopack's resolveplugin have
different order of transform / module trace chain, so enabling resolve
plugin in some context raises build error instead of runtime error in
rsc-build-error.

Closes PACK-2397
2024-02-08 09:04:43 +01:00
Donny/강동윤
c662d57342
fix(next-swc): Detect exports.foo from cjs_finder (#61795)
### What?

Patch cjs finder to detect `exports.foo` (instead of module.exports)

### Why?

This causes an issue for `react.production.min.js`.

x-ref: https://vercel.slack.com/archives/C02HY34AKME/p1707343215879979

### How?

Closes PACK-2443
2024-02-08 11:28:33 +09:00
vercel-release-bot
d04cfb68a4 v14.1.1-canary.43 2024-02-07 23:21:21 +00:00
OJ Kwon
13af19a562
build(cargo): add deps for the wasi (#61784)
<!-- 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



### Why?

### How?

Closes NEXT-
Fixes #

-->

### What?

minor config update to the deps to include tokio for the wasi target.


Closes PACK-2435
2024-02-07 10:44:30 -08:00
vercel-release-bot
fa4d1a501c v14.1.1-canary.42 2024-02-07 08:48:27 +00:00
Tobias Koppers
86c46edce7
source map fixes (#61723)
### What?

* show guessed original file for generate code
* avoid internal cast
* add get_source_map method
* hide turbopack runtime stack lines
* hide unmapped stack lines


Closes PACK-2400

Before:


![image](https://github.com/vercel/next.js/assets/1365881/29f24f59-7c77-4496-92de-efcc72d28ad5)

After:


![image](https://github.com/vercel/next.js/assets/1365881/ca07e9f9-71ea-440d-97a2-c2c731ab3899)

and expanded:


![image](https://github.com/vercel/next.js/assets/1365881/1f73e632-890d-4681-8f21-ef502c676aae)

### Other Turbopack changes


* https://github.com/vercel/turbo/pull/4235 <!-- Leah -
chore(turborepo-lib): use compile error for feature validation -->
* https://github.com/vercel/turbo/pull/7285 <!-- Tobias Koppers -
resolve source maps that are attached in source code -->
* https://github.com/vercel/turbo/pull/7301 <!-- Donny/강동윤 -
fix(turbopack): Reverse order of css chunks to fix css module issues -->
* https://github.com/vercel/turbo/pull/7286 <!-- Tobias Koppers - guess
original source for generated code -->
2024-02-07 08:58:08 +01:00
vercel-release-bot
b77373e283 v14.1.1-canary.41 2024-02-07 06:48:49 +00:00
OJ Kwon
f437ebb2c1
feat(next-core): expand matching js extensions for the rules (#61745)
### What?

fixes unexpected use client build warning in some applications.

We've consolidated all the ecmaplugins into custom rules. It behaves
different for the ecma inputs, while plugin runs any ecmascript inputs
rules only runs with matching target. The culprit module in question was
published as `.mjs`, so the necessary transform didn't ran.

Closes PACK-2419
2024-02-06 17:05:32 -08:00
vercel-release-bot
b61a709068 v14.1.1-canary.40 2024-02-06 23:21:25 +00:00
vercel-release-bot
f07c2bd559 v14.1.1-canary.39 2024-02-06 23:19:27 +00:00
Will Binns-Smith
0060de1c49
Reapply "Turbopack: convert between locations correctly (#61477)" (#61733) (#61735)
This reverts commit a32d654c73.


Closes PACK-2421
2024-02-06 14:24:30 -08:00
Will Binns-Smith
a32d654c73
Revert "Turbopack: convert between locations correctly (#61477)" (#61733)
This reverts commit b19585f7fa.


Closes PACK-2420
2024-02-06 20:33:49 +01:00
vercel-release-bot
300cf76c83 v14.1.1-canary.38 2024-02-06 19:24:56 +00:00
Will Binns-Smith
b19585f7fa
Turbopack: convert between locations correctly (#61477)
- parsed stack traces (and error stack locations in js) have 1-based
lines and 1-based columns
- source map tokens have 0-based lines and 0-based columns
- babel code frames use 1-based lines and 0-based columns

This was not always respected. This preserves the 1-based lines and
columns in anything called a stack frame, 0-based lines and columns for
source map apis, and converts to babel’s format as needed.


Closes PACK-2341

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2024-02-06 11:09:48 -08:00
OJ Kwon
9cadae5eef
feat(next-swc): support wasm32-* build target (#61586)
<!-- 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

### How?

Closes NEXT-
Fixes #

-->

### What?

This PR introduces a ground work to generate wasm bindings package from
our napi bindings. This doesn't actually replace anything yet, however
aim to establish our napi bindings package can be built against wasm32
target.

### Why?

We currently have two bindings package to generate native / wasm target
support, one for napi and one other for wasm. Recently napi-rs started
to support to generate bindings for the wasm directly - which means we
can get rid of the wasm-pack based bindings code entirely and maintain a
single bindings code only.

This'll makes our `next-swc` simpler as well, since the invocation to
the bindings now becomes identical we don't have to additional wasm
specific logics to invoke functions (i.e transform, transformsync..).
Also napi generates wasi-supported wasm bindings, provides few more
features to the current wasm bindings.

#### Good
- Async napi binding fn works transparently (`transform`, `minify`...)
- (Experimental) thread supports depends on node.js runtime
- Wasi support: i.e it can even read filesystem directly!

#### Things to consider
- node.js's wasi support is experimental yet
- napi-rs's wasm support is in beta yet, specifically `packaging`
generated wasm output.

Due to `things to consider` reasons, this PR does not replace existing
wasm target yet. We should be able to plan out things later.

**What happens to the turbopack api in napi bindings?**

Simply put, this **does not support turbopack in wasm**. Build works by
disabling turbopack (more notably, underlying dependency doesn't support
wasm) features. It is something to explore separately.


Closes PACK-2367


There is a branch at https://github.com/vercel/next.js/pull/61586 shows
quick demo for importing, running sync / async / read external files.
2024-02-06 10:15:13 -08:00
OJ Kwon
e652a6f652
feat(transforms): enable rsc transforms for the remaining contexts (#61231)
### What?

This PR wraps up supporting rsc transforms (mostly for the assertion) in
Turbopack. PR contains a few changes to support it, including:

- adjust / expand transform rules for the corresponding contexts
- fix file name / node_modules check
- extract visitors for the assertion / transforms

This change enables most of the rsc-build* tests and some more other
tests. The only failing tests in the rsc-build-errors is due to
Turbopack not triggering hmr with empty file.

Closes PACK-2303
2024-02-06 09:15:07 -08:00
vercel-release-bot
59bf406d0a v14.1.1-canary.37 2024-02-06 17:07:44 +00:00
Leah
933c98651c
fix(turbopack): read preload option for google fonts (#61679)
### What?

I forgot to check the `preload` option when implementing it and just
looked at the `subsets`.

This also fixes duplicate preload tags by adding them to a set in the
default `_document.tsx`



Closes PACK-2392
2024-02-06 08:30:12 +01:00
Josh Story
23955574ae
Update React from 60a927d04 to 2bc7d336a (#61522)
Updates React from 60a927d04 to 2bc7d336a

Also updates aliases for `react.shared-subset` to `react.react-server`

### React upstream changes

- https://github.com/facebook/react/pull/28250
- https://github.com/facebook/react/pull/28225
- https://github.com/facebook/react/pull/28123
- https://github.com/facebook/react/pull/28240
- https://github.com/facebook/react/pull/28239
- https://github.com/facebook/react/pull/28245
- https://github.com/facebook/react/pull/28244
- https://github.com/facebook/react/pull/28238
- https://github.com/facebook/react/pull/28235
- https://github.com/facebook/react/pull/28221
- https://github.com/facebook/react/pull/28215
- https://github.com/facebook/react/pull/28214
- https://github.com/facebook/react/pull/28213
- https://github.com/facebook/react/pull/28212
- https://github.com/facebook/react/pull/28211
- https://github.com/facebook/react/pull/28247
- https://github.com/facebook/react/pull/28210
- https://github.com/facebook/react/pull/28186
- https://github.com/facebook/react/pull/28232
- https://github.com/facebook/react/pull/28169
- https://github.com/facebook/react/pull/28177
- https://github.com/facebook/react/pull/28170
- https://github.com/facebook/react/pull/28168
- https://github.com/facebook/react/pull/28122
- https://github.com/facebook/react/pull/27982
- https://github.com/facebook/react/pull/28217
- https://github.com/facebook/react/pull/28223
- https://github.com/facebook/react/pull/28208
- https://github.com/facebook/react/pull/28209
- https://github.com/facebook/react/pull/28200
- https://github.com/facebook/react/pull/28199
- https://github.com/facebook/react/pull/28198
- https://github.com/facebook/react/pull/28197
- https://github.com/facebook/react/pull/28196
- https://github.com/facebook/react/pull/28194
- https://github.com/facebook/react/pull/28192
- https://github.com/facebook/react/pull/28191
- https://github.com/facebook/react/pull/28182
- https://github.com/facebook/react/pull/28181
- https://github.com/facebook/react/pull/28180
- https://github.com/facebook/react/pull/28178
- https://github.com/facebook/react/pull/28201
- https://github.com/facebook/react/pull/28176
- https://github.com/facebook/react/pull/28162
- https://github.com/facebook/react/pull/28131
- https://github.com/facebook/react/pull/28190
- https://github.com/facebook/react/pull/28172
- https://github.com/facebook/react/pull/28171
- https://github.com/facebook/react/pull/28173
- https://github.com/facebook/react/pull/28174
- https://github.com/facebook/react/pull/28175
- https://github.com/facebook/react/pull/28136
- https://github.com/facebook/react/pull/28135
- https://github.com/facebook/react/pull/28134
- https://github.com/facebook/react/pull/28133
- https://github.com/facebook/react/pull/28132
- https://github.com/facebook/react/pull/28130
- https://github.com/facebook/react/pull/28202
- https://github.com/facebook/react/pull/28102
- https://github.com/facebook/react/pull/28161
- https://github.com/facebook/react/pull/28193
- https://github.com/facebook/react/pull/28195
- https://github.com/facebook/react/pull/28189
- https://github.com/facebook/react/pull/28160
- https://github.com/facebook/react/pull/28096
- https://github.com/facebook/react/pull/28183
- https://github.com/facebook/react/pull/28125
- https://github.com/facebook/react/pull/28157
- https://github.com/facebook/react/pull/28115
- https://github.com/facebook/react/pull/28124
- https://github.com/facebook/react/pull/28163
- https://github.com/facebook/react/pull/28164
- https://github.com/facebook/react/pull/28150
- https://github.com/facebook/react/pull/28159
- https://github.com/facebook/react/pull/28069
- https://github.com/facebook/react/pull/28110
- https://github.com/facebook/react/pull/28148
- https://github.com/facebook/react/pull/28116
- https://github.com/facebook/react/pull/28099
- https://github.com/facebook/react/pull/28100
- https://github.com/facebook/react/pull/28147
- https://github.com/facebook/react/pull/28128
- https://github.com/facebook/react/pull/28126
- https://github.com/facebook/react/pull/28139
- https://github.com/facebook/react/pull/28140
- https://github.com/facebook/react/pull/28141
- https://github.com/facebook/react/pull/28142
- https://github.com/facebook/react/pull/28113
- https://github.com/facebook/react/pull/28129
- https://github.com/facebook/react/pull/28114
- https://github.com/facebook/react/pull/28053
- https://github.com/facebook/react/pull/28091
- https://github.com/facebook/react/pull/28087
- https://github.com/facebook/react/pull/28112
- https://github.com/facebook/react/pull/28086
- https://github.com/facebook/react/pull/28101
- https://github.com/facebook/react/pull/28106
- https://github.com/facebook/react/pull/28117
- https://github.com/facebook/react/pull/28118
- https://github.com/facebook/react/pull/28105
- https://github.com/facebook/react/pull/27883
- https://github.com/facebook/react/pull/28111
- https://github.com/facebook/react/pull/28095
- https://github.com/facebook/react/pull/28108
- https://github.com/facebook/react/pull/28090
- https://github.com/facebook/react/pull/28089
- https://github.com/facebook/react/pull/28076
- https://github.com/facebook/react/pull/28074
- https://github.com/facebook/react/pull/28103
- https://github.com/facebook/react/pull/28098
- https://github.com/facebook/react/pull/28097
- https://github.com/facebook/react/pull/28068
- https://github.com/facebook/react/pull/28093
- https://github.com/facebook/react/pull/28094
- https://github.com/facebook/react/pull/28073
- https://github.com/facebook/react/pull/28084
- https://github.com/facebook/react/pull/28063
- https://github.com/facebook/react/pull/28085
- https://github.com/facebook/react/pull/28083
- https://github.com/facebook/react/pull/28065
- https://github.com/facebook/react/pull/28061
- https://github.com/facebook/react/pull/28077
- https://github.com/facebook/react/pull/28075
- https://github.com/facebook/react/pull/28078
- https://github.com/facebook/react/pull/28050
- https://github.com/facebook/react/pull/28011
- https://github.com/facebook/react/pull/28055
- https://github.com/facebook/react/pull/28066
- https://github.com/facebook/react/pull/28067
- https://github.com/facebook/react/pull/28010
- https://github.com/facebook/react/pull/27993
- https://github.com/facebook/react/pull/28052
- https://github.com/facebook/react/pull/28060
- https://github.com/facebook/react/pull/28059
- https://github.com/facebook/react/pull/28034
- https://github.com/facebook/react/pull/28033
- https://github.com/facebook/react/pull/28004
- https://github.com/facebook/react/pull/28051
- https://github.com/facebook/react/pull/28012
- https://github.com/facebook/react/pull/28001
- https://github.com/facebook/react/pull/28002
- https://github.com/facebook/react/pull/27995
- https://github.com/facebook/react/pull/28006
- https://github.com/facebook/react/pull/28005
- https://github.com/facebook/react/pull/28007
- https://github.com/facebook/react/pull/28008
- https://github.com/facebook/react/pull/28009
- https://github.com/facebook/react/pull/28000
- https://github.com/facebook/react/pull/28003
- https://github.com/facebook/react/pull/27997
- https://github.com/facebook/react/pull/27240
- https://github.com/facebook/react/pull/27977
- https://github.com/facebook/react/pull/27940
- https://github.com/facebook/react/pull/27939
- https://github.com/facebook/react/pull/28090
- https://github.com/facebook/react/pull/28089
- https://github.com/facebook/react/pull/28076
- https://github.com/facebook/react/pull/28074
- https://github.com/facebook/react/pull/28103
- https://github.com/facebook/react/pull/28098
- https://github.com/facebook/react/pull/28097
- https://github.com/facebook/react/pull/28068
- https://github.com/facebook/react/pull/28093
- https://github.com/facebook/react/pull/28094
- https://github.com/facebook/react/pull/28073
- https://github.com/facebook/react/pull/28084
- https://github.com/facebook/react/pull/28063
- https://github.com/facebook/react/pull/28085
- https://github.com/facebook/react/pull/28083
- https://github.com/facebook/react/pull/28065
- https://github.com/facebook/react/pull/28061
- https://github.com/facebook/react/pull/28077
- https://github.com/facebook/react/pull/28075
- https://github.com/facebook/react/pull/28078
- https://github.com/facebook/react/pull/28050
- https://github.com/facebook/react/pull/28011
- https://github.com/facebook/react/pull/28055
- https://github.com/facebook/react/pull/28066
- https://github.com/facebook/react/pull/28067
- https://github.com/facebook/react/pull/28010
- https://github.com/facebook/react/pull/27993
- https://github.com/facebook/react/pull/28052
- https://github.com/facebook/react/pull/28060
- https://github.com/facebook/react/pull/28059
- https://github.com/facebook/react/pull/28034
- https://github.com/facebook/react/pull/28033
- https://github.com/facebook/react/pull/28004
- https://github.com/facebook/react/pull/28051
- https://github.com/facebook/react/pull/28012
- https://github.com/facebook/react/pull/28001
- https://github.com/facebook/react/pull/28002
- https://github.com/facebook/react/pull/27995
- https://github.com/facebook/react/pull/28006
- https://github.com/facebook/react/pull/28005
- https://github.com/facebook/react/pull/28007
- https://github.com/facebook/react/pull/28008
- https://github.com/facebook/react/pull/28009
- https://github.com/facebook/react/pull/28000
- https://github.com/facebook/react/pull/28003
- https://github.com/facebook/react/pull/27997
- https://github.com/facebook/react/pull/27240
- https://github.com/facebook/react/pull/27977
- https://github.com/facebook/react/pull/27940
- https://github.com/facebook/react/pull/27939

Closes NEXT-2331
2024-02-05 18:22:27 -08:00
vercel-release-bot
bdd0dd2d50 v14.1.1-canary.36 2024-02-05 23:22:30 +00:00
OJ Kwon
a4d33d4acd
fix(next-core): adjust server alias for the context (#61690)
### What

This PR attempts to adjust import map to `server-only` / `client-only`
close to the existing webpack configs, makes to pass more tests.

Closes PACK-2396
2024-02-05 14:05:37 -08:00
vercel-release-bot
b1f6b8246e v14.1.1-canary.35 2024-02-05 19:38:59 +00:00
vercel-release-bot
d1fa2876e8 v14.1.1-canary.34 2024-02-05 17:25:07 +00:00
Tobias Koppers
2ac1468540
avoid processing client components and server actions in route handlers (#60985)
### What?

app api routes doesn't need to handle client components and server
actions


Closes PACK-2271
2024-02-05 09:57:14 +01:00
vercel-release-bot
5d2e79b61f v14.1.1-canary.33 2024-02-05 01:29:47 +00:00
vercel-release-bot
498d29413b v14.1.1-canary.32 2024-02-04 23:21:04 +00:00
vercel-release-bot
db24fc0c3f v14.1.1-canary.31 2024-02-04 20:10:43 +00:00
vercel-release-bot
bedfeac4e3 v14.1.1-canary.30 2024-02-03 23:21:46 +00:00
Leah
cb77a9c586
feat(turbopack): serve google fonts locally and allow preloading them (#61596)
### What?

Adds support for preloading google fonts.

Closes PACK-2351
2024-02-03 21:34:36 +01:00
Leah
1f8a5a2ed6
feat(turbopack): only preload fonts that opt in (#61591)
### What?

Adds another `ImportMappingReplacement` for the font file in order to
add markers to the filename.
The markers are used to generate the `next-font-manifest.json` (and also
in next.js code).

Closes PACK-2352
2024-02-03 19:53:21 +01:00
vercel-release-bot
aa66300f75 v14.1.1-canary.29 2024-02-02 23:21:11 +00:00
OJ Kwon
fc22d287ba
refactor(next-core): consolidate custom ecma transform rules (#61481)
This PR consolidates how we inject specific, custom ecma transforms for
the each context.

Previously we had 2 different way to apply custom transforms via
ecmatransform plugin / custom rules, but it could create some conflict
in order as well as can be confusing between how it gets created. PR
uses new moduleruleeffect instead, consolidates all of the references
into single way.

Closes PACK-2342
2024-02-02 12:58:33 -08:00
Leah
2afb6379d1
feat: first pass of next/font manifest (#61424)
### What?

We need the manifest to pass a bunch of preloading tests.

Currently, this is just a dumb implementation that preloads all fonts
and always sets size-adjust to true.

Google fonts are also still requested from Google directly it seems and
therefore never preloaded.
2024-02-02 09:42:36 +01:00
vercel-release-bot
5cd7790091 v14.1.1-canary.28 2024-02-01 23:21:30 +00:00
vercel-release-bot
a35f689c5b v14.1.1-canary.27 2024-01-31 23:21:57 +00:00
Will Binns-Smith
c7ba7b8d8c
Turbopack: fix telemetry attributes for swc options (#61474)
Previously, this considered explicitly `false` options as true, as they
were still `Some(_)`.


Closes PACK-2340
2024-01-31 13:58:08 -08:00
vercel-release-bot
dbd9598f56 v14.1.1-canary.26 2024-01-31 18:11:07 +00:00
Tim Neutkens
724c4462d5
Support crossOrigin in Turbopack (#61461)
## What?

Implements `crossOrigin` in the React Client Components manifest for
Turbopack. This feature was missing.

Removes the `false` value as it doesn't actually do anything, the
default is no crossorigin property.

<!-- 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-2313
2024-01-31 18:37:34 +01:00
Tobias Koppers
e5b514692e
fix a perf problem in VersionedContentMap (#61442)
### What?

Avoid a dependency from the emit operation to the `get_and_write`
lookup.

### Why?

This makes HMR much faster since the `get_internal` method is pretty
slow.


Closes PACK-2337
2024-01-31 11:50:00 +01:00
Donny/강동윤
ead21691b6
chore: Update swc_core to v0.89.6 (#61426)
### What?

Update SWC crates

### Why?

To apply the latest bugfixes

### How?

Fixes #40385



Closes PACK-2332
2024-01-31 18:35:20 +09:00
vercel-release-bot
6df41fde43 v14.1.1-canary.25 2024-01-31 00:29:05 +00:00
vercel-release-bot
7c4d724e57 v14.1.1-canary.24 2024-01-30 23:22:57 +00:00
vercel-release-bot
1eecfc7d74 v14.1.1-canary.23 2024-01-30 19:02:50 +00:00
vercel-release-bot
62bba1982e v14.1.1-canary.22 2024-01-30 14:37:47 +00:00
Tim Neutkens
e114229d61
Same as #61360 (#61369)
## What?

Same PR as #61360, somehow that branch could not be checked out / wasn't
available in git.

<!-- 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-2295

---------

Co-authored-by: Will Binns-Smith <wbinnssmith@gmail.com>
2024-01-30 15:13:06 +01:00
vercel-release-bot
4cf64ec79d v14.1.1-canary.21 2024-01-29 23:22:19 +00:00
Leah
e4b3531377
fix(turbopack): don't parse .ts files as .tsx (#61219)
### What?

We currently parse JSX syntax in all typescript files which is wrong.

Closes PACK-2302

Turbo PR: https://github.com/vercel/turbo/pull/7121

### Turbopack Updates

* https://github.com/vercel/turbo/pull/7099 <!-- Donny/강동윤 -
fix(turbopack): Fix panic from `EcmascriptModuleFacadeModule::content`
-->
* https://github.com/vercel/turbo/pull/7121 <!-- Leah - fix(turbopack):
don't parse `.ts` files as `.tsx` -->
2024-01-29 21:13:32 +00:00
vercel-release-bot
380a491981 v14.1.1-canary.20 2024-01-29 07:16:59 +00:00
Donny/강동윤
38f229b09b
fix: Revert preset-env mode of styled-jsx in webpack mode (#61306)
### What?

Partially revert SWC update PR, to avoid a breaking change.

### Why?

x-ref: https://vercel.slack.com/archives/C03EWR7LGEN/p1706511131287999

### How?



Closes PACK-2309
2024-01-29 08:13:47 +01:00
vercel-release-bot
93fb762fc6 v14.1.1-canary.19 2024-01-29 05:29:58 +00:00
vercel-release-bot
98be3ba23e v14.1.1-canary.18 2024-01-28 23:21:57 +00:00
vercel-release-bot
f61b382f12 v14.1.1-canary.17 2024-01-27 23:21:15 +00:00
Shu Ding
ecef83ac61
Fix Server Reference being double registered (#61244)
When we apply `createActionProxy` twice to the same value, it currently
errors because we can't override the ID of it.

This PR makes sure that 1) when the value already have an ID defined, we
skip setting it again; 2) all the action IDs are being tracked even for
duplicated ones.

Note that it's technically impossible to "detect" the duplication here
(via static analyzation) and only set it once. For example:

```ts
'use server'

export async function foo () {}
export const bar = a_value_we_dont_know_yet ? foo : async () => {}
```

So, the compiler will always wrap `createActionProxy` for every exported
value and assume they're different Server Actions (hence different IDs).
With this fix, if we find that it's already defined before, we just
return the defined reference as they're strictly identical so the ID
does't matter.

Closes #54655, closes #61183.

Closes NEXT-2264
2024-01-27 14:15:24 +01:00
vercel-release-bot
98795f0737 v14.1.1-canary.16 2024-01-27 10:08:59 +00:00
Donny/강동윤
7b9d90bcdc
Update swc_core to v0.89.x (#61086)
## Turbopack

* https://github.com/vercel/turbo/pull/7092 <!-- Donny/강동윤 - Update `swc_core` to `v0.89.x` -->


### What?

Update SWC crates

### Why?

To fix some issues

### How?

Fixes #59805
Fixes #56144


Closes PACK-2222
Closes PACK-2285
2024-01-27 09:43:57 +00:00
vercel-release-bot
b81ce7256b v14.1.1-canary.15 2024-01-26 23:22:18 +00:00