Commit graph

17 commits

Author SHA1 Message Date
Tobias Koppers
3b1aaa2686
improve source mapping of console output and errors (#47388)
### What?

* see https://github.com/vercel/turbo/pull/4284
* also adds a test case
* fixes some bugs with app dir (e. g. fixes https://github.com/vercel/turbo/issues/2496)

### Why?

* Stack traces pointing to generated code are not very useful

### How?

* Source Maps
* Code context
* Replacing magic identifiers

fixes WEB-745
2023-03-23 12:43:22 +00:00
Justin Ridgewell
a5dfe46cca
turbopack: Implement streamed middleware (#47264)
Fun! This depends on https://github.com/vercel/turbo/pull/4251 to
implement streamed Node evaluations, giving us the ability to support
streamed middleware responses.

This is just the first step to supporting RSC streaming in Turbopack. I
chose to start with this because it requires all the same base logic,
and I understand the full router->middleware->HTTP server code path, so
it's a lot easier to work on.

Fixes WEB-738
2023-03-22 21:04:33 -07:00
Alex Kirszenberg
8195e1947b
Refactor ES chunk evaluate logic into a Runtime trait (#47116)
This is the Next.js side of https://github.com/vercel/turbo/pull/4141
2023-03-22 10:28:49 +00:00
Alex Kirszenberg
ed539c5dca
Update Turbopack to turbopack-230321.1 (#47342)
Updates Turbopack to latest nightly and fix build errors.

# New features

* https://github.com/vercel/turbo/pull/4198

# Bug Fixes

* https://github.com/vercel/turbo/pull/4241

# Misc.

* https://github.com/vercel/turbo/pull/4249

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-21 11:48:48 +00:00
LongYinan
509ed00fc1
Calling turbopack from the next build CLI (#46602)
Close WEB-661
2023-03-21 10:25:08 +00:00
Tobias Koppers
6eb33b7e68
update turbopack (#47205)
## Features

* https://github.com/vercel/turbo/pull/4208

## Testing

* https://github.com/vercel/turbo/pull/4211


Co-authored-by: Justin Ridgewell <112982+jridgewell@users.noreply.github.com>
2023-03-17 08:41:32 +00:00
Justin Ridgewell
875ddea183
next-swc: Switch to testing::fixture (#47183)
The old `test_generator::test_resources` could only find resources relative to the project root, and not relative to the test file. Because of the new nextpack directory structure, this causes all kinds of headaches between running in nextpack and running in turbo (`next.js/packages/next-swc` vs `nextpack/next.js/packages/next-swc`).
2023-03-17 06:18:25 +00:00
Leah
dbdf47cf61
fix build issue and future incompatibility (#47176)
It was complaining about having 2 versions of sentry for some reason
2023-03-16 19:29:24 +00:00
Will Binns-Smith
67aceea72b
Align on next-transform-font (#47179)
fix NEXT-827 ([link](https://linear.app/vercel/issue/NEXT-827))

This aligns use of the next/font transform across the workspace under a
single crate, now called `next-transform-font`.
2023-03-16 16:33:04 +01:00
Justin Ridgewell
02125cf3b1
Implement custom Turbopack Next transformers (#47137)
Builds on https://github.com/vercel/turbo/pull/4202 to implement custom Next.js Transformers in Turbopack.

This is the final piece to moving the `next-*` crates to Next. While we've _technically_ moved everything, Turbopack didn't support running custom transformers. So we're actually stuck on the last version we cut before deleting the next crates, running the transformers that exist in the turbopack repo. With the new support, we're almost back to the tip of main branch (there's still some snafu with `swc_core` upgrading that I'm working on).

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-03-15 19:10:59 +00:00
Justin Ridgewell
8ae2df0f10 Integrate next-* crates from Turbopack (#47019)
Update workspace cargo deps
Update cargo deps to point to local workspace
Ignore too-many-arguments warnings
Fix clippy errors
Update pnpm workspaces
exclude integration tests from unit tests CI
rust-analyzer settings
add rust flags and env vars
2023-03-13 14:33:17 +01:00
LongYinan
e3843c9712
Upgrade turbopack (#45861)
The `experimental.turbotrace.memoryLimit` is not actually working, we
need to use `turbo_malloc` as the global allocator to make it work.

~~Block by:~~
- https://github.com/swc-project/swc/pull/6940
- https://github.com/vercel/turbo/pull/3772

## This PR also upgrades `turbopack-230213.2` to `turbopack-230214.1`

- https://github.com/vercel/turbo/pull/3767
- https://github.com/vercel/turbo/pull/3772
- https://github.com/vercel/turbo/pull/3762
- https://github.com/vercel/turbo/pull/3741
- https://github.com/vercel/turbo/pull/3796
2023-02-14 18:51:15 +01:00
Donny/강동윤
0768f7d1d0
chore: Update swc_core to v0.28.20 (#41153)
This PR updates swc crates to
6749e6948e
2022-10-04 16:16:11 +02:00
OJ Kwon
3b34602426
build(next/swc): consolidate swc_core dependency version (#41043)
<!--
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 that you're making:
-->

This PR utilizes cargo's new feature from latest release (1.64.0),
inheriting dependency from a workspace.

In short, top-level workspace cargo manifest can specify a version of
dependency to use, then actual packages uses it without re-declaring
version per each via workspace = true. This will help to dedupe
different versions of packages, also potentially avoid conflicts if
forgot to bump up specific versions.

In this pr only touches swc_core, which is a base dependency we use in
several place. One another benefit for this is bump up PR can be lot
more simplified, only need to update single Cargo.toml when we bump up.

Note rust-toolchain has updated to use nightly version after 1.64.0 to
enable this.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-30 12:59:32 -07:00
Donny/강동윤
3f2fef19bc
chore: Update swc_core to v0.28.10 (#41016)
This PR updates swc crates to 447e2449d9
2022-09-29 14:09:20 +00:00
Donny/강동윤
fdfa3c7bae
feat(next-swc): Update swc crates (#35395)
* Update crates

* fixup

* fix type

* Update test refs

* Update css crates

* Update test refs

* Update test refs

* Update test refs

* SourceMap

* Fix?

* Update crates

* Fix

* Update test refs

* Update test refs

* Update error reporter

* Update snapshots

* Update snapshots

* Bug?

* Fix

* Fix lint

* Update swc again

* fixup

* Update test refs

* Fix

Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
2022-03-30 15:13:40 -07:00
Maia Teegarden
a79d4fc366
Extract next-swc Rust code into its own package (#31635)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-21 12:59:56 +01:00
Renamed from packages/next/build/swc/Cargo.toml (Browse further)