Commit graph

477 commits

Author SHA1 Message Date
Justin Ridgewell
22ef969b7b
Remove hook_optimizer transform (#41203)
Fixes an issue where `const […foo] = useState(0)` is improperly transformed into `const { 0: …foo } = useState(0)`.

The hook optimizer was useful when hooks first came out, primarily because browsers had never optimized array destructuring. But current browsers have, and the optimization doesn't help anymore.



## Bug

- [ ] Related issues linked using `fixes #number`
- [x] 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

- [x] 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-10-06 08:12:34 +00:00
JJ Kasper
e8c760f7d4
v12.3.2-canary.21 2022-10-05 22:20:38 -07:00
Jiachi Liu
99d88f2a58
Disable built-in css-in-js transform on server layer (#41040)
We're supposed not to use css-in-js in server components since it will
increase the rsc response for navigation. Also adding `styledJsx` option
for next-swc for controlling styled-jsx transform.

Test case: using styled-jsx transform in server components will not be
transformed to `styled-jsx/style` imports.
2022-10-05 18:28:55 +02:00
Tim Neutkens
45bed96714 v12.3.2-canary.20 2022-10-05 16:35:59 +02:00
JJ Kasper
0d5886f20b
v12.3.2-canary.19 2022-10-04 10:15:01 -07: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
JJ Kasper
b56c039ef2
v12.3.2-canary.18 2022-10-03 17:57:44 -07:00
Tim Neutkens
cf9137a531 v12.3.2-canary.17 2022-10-02 21:08:24 +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
Hannes Bornö
7bc28538bf
Font loader call json parsing fix (#41052)
Stringify into one json object instead. Previously parsing would break if a string included a semicolon.

## 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 19:24:10 +00:00
Tim Neutkens
304730e6d5 v12.3.2-canary.16 2022-09-30 15:17:36 +02:00
Tim Neutkens
b4e53b796b v12.3.2-canary.15 2022-09-29 20:14:29 +02: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
Tim Neutkens
c889b31222 v12.3.2-canary.14 2022-09-29 13:26:46 +02:00
JJ Kasper
c1c95bfd31
v12.3.2-canary.13 2022-09-28 23:18:47 -07:00
JJ Kasper
8659d6f87a
Revert "chore: Update swc" (#41015)
It seems we may have regressed on perf in the WASM build as we are
seeing build timeouts in our tests

x-ref:
https://github.com/vercel/next.js/actions/runs/3148769274/jobs/5119807405
x-ref:
https://github.com/vercel/next.js/actions/runs/3148820726/jobs/5119928862

Reverts vercel/next.js#40983
2022-09-28 22:49:10 -07:00
Donny/강동윤
3d4dde8f69
chore: Update swc (#40983)
This PR updates SWC to
189f9b482f

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-28 22:03:50 -07:00
Tim Neutkens
ebf2b298cb v12.3.2-canary.12 2022-09-28 17:56:44 +02:00
Tim Neutkens
58d4736116 Revert "Fix"
This reverts commit 112589e2d9.
2022-09-28 13:14:22 +02:00
Tim Neutkens
cafb5ff8ff Revert "Fix wasm"
This reverts commit fbf1bd1198.
2022-09-28 13:14:19 +02:00
Tim Neutkens
62f996e5f6 Revert "Fix"
This reverts commit 082e766ee5.
2022-09-28 13:14:15 +02:00
Tim Neutkens
08066f67ca Revert "Update swc"
This reverts commit c3db1023cb.
2022-09-28 13:14:13 +02:00
Donny/강동윤
112589e2d9 Fix 2022-09-28 19:50:41 +09:00
Donny/강동윤
fbf1bd1198 Fix wasm 2022-09-28 19:48:56 +09:00
Donny/강동윤
082e766ee5 Fix 2022-09-28 19:47:07 +09:00
Donny/강동윤
c3db1023cb Update swc 2022-09-28 19:45:36 +09:00
Jiachi Liu
918b109d76 v12.3.2-canary.11 2022-09-28 00:38:10 +02:00
Hannes Bornö
f53f5815f2
Font loader support in app (#40898)
Makes sure font loader CSS ends up correctly in the Flight Manifest and Flight Client Entries.

## 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-27 18:10:05 +00:00
JJ Kasper
83c25b74d6
v12.3.2-canary.10 2022-09-26 23:31:23 -07:00
Donny/강동윤
4f70f3af5d
chore: Update swc (#40928)
This PR updates swc crates to
3d393dd709

---

This PR applies

 - https://github.com/swc-project/swc/pull/5954

Closes https://github.com/vercel/next.js/issues/40803

 - https://github.com/swc-project/swc/pull/5956

Resolves
https://github.com/vercel/next.js/discussions/30237#discussioncomment-3717121
2022-09-26 22:50:50 -07:00
Tim Neutkens
6ceda2a3a2 v12.3.2-canary.9 2022-09-26 16:57:56 +02:00
Tim Neutkens
7ccc95c525 v12.3.2-canary.8 2022-09-26 15:52:34 +02:00
Donny/강동윤
b68f78384e
chore: Update swc (#40832)
This PR update swc crates to
8a5ed1e0ba


Noticeable changes include

 - TS 4.9 support.
 - Huge performance improvement (of every api).
2022-09-23 14:09:41 -07:00
Hannes Bornö
719116ac81
Allow export const in font loader (#40836)
Allow `export const font = Font()` syntax

## 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-23 20:40:59 +00:00
JJ Kasper
5d9f390fe4
v12.3.2-canary.7 2022-09-22 19:50:38 -07:00
JJ Kasper
8e1256d024
v12.3.2-canary.6 2022-09-22 16:33:46 -07:00
JJ Kasper
66ca4c21eb
v12.3.2-canary.5 2022-09-22 14:04:50 -07:00
JJ Kasper
24f2c53025
v12.3.2-canary.4 2022-09-22 12:53:58 -07:00
Hannes Bornö
75bbf00a8f
Add local font loader (#40801)
Moves font related types to `next/font` so they can be reused in font
loaders.

Adds an argument to font loaders, the relative path from the app root to
the module consuming the loader. Needed for resolving local files
relative to the module calling it. Also used to improve error message.

Adds `@next/font/local` font loader. Similar to `@next/font/google` but
used to host locally downloaded font files.
2022-09-22 12:49:02 -07:00
JJ Kasper
cc1e35d821
v12.3.2-canary.3 2022-09-21 22:51:10 -07:00
JJ Kasper
c2487ce262
v12.3.2-canary.2 2022-09-21 17:21:58 -07:00
JJ Kasper
4607140a7f
v12.3.2-canary.1 2022-09-21 15:20:12 -07:00
Hannes Bornö
97b31873e1
next-swc: add next-font-loaders to crates/core (#40221)
For some context:
https://vercel.slack.com/archives/CGU8HUTUH/p1662124179102509

Transforms call expressions of imported functions, only affects imports
specified in SWC options. Each argument is turned into JSON and appended
to the import as a query. The query can be read in a webpack loader,
i.e. the call expression is only evaluated at build time

### Transform
From
```tsx
import { Fn } from "package"
const res = Fn(1, "2", { three: true })
```
To
```tsx
import res from 'package?Fn;1;"2";{"three":true}'
```

### Visitors
#### NextFontLoaders (mod.rs)
Creates several visitors that updates the state and reports errors. This
is where the AST is mutated. After all other visitors are done the call
expressions and original imports are removed. The newly generated
imports are added instead.

#### FontFunctionsCollector
Finds imports from the specified packages. Function calls of these
imports should be transformed.

#### FontImportsGenerator
Creates import declarations, call expression arguments are turned into
JSON and added to the import as a query.

#### FindFunctionsOutsideModuleScope
Makes sure that there's no reference of the functions anywhere else but
the module scope.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-21 13:35:49 -07:00
Shu Ding
6d4f263121
Improved bundling strategy for the server graph (#40739)
This PR changes the external module resolution to eagerly bundle
node_modules, and some specific Next.js internal modules, if on the
`WEBPACK_LAYERS.server` layer. While resolving corresponding packages,
we use the `react-server` export condition (fallbacks to default).

A follow-up PR will be adding a Next.js option to opt-out specific
packages from being bundled on the server layer.

## 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`
- [x] 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-21 20:45:33 +02:00
Tim Neutkens
5f7caf2765 v12.3.2-canary.0 2022-09-21 10:50:28 +02:00
JJ Kasper
980095d59e
v12.3.1 2022-09-19 15:41:52 -07:00
JJ Kasper
4901fc73da
v12.3.1-canary.5 2022-09-19 14:49:23 -07:00
JJ Kasper
35098a1477
v12.3.1-canary.4 2022-09-19 11:31:09 -07:00
Shu Ding
44afc37670
Refine error messages (#40661)
As per @sebmarkbage's suggestion, this PR refines the error message to
be more readable and friendly:

```
error - ./components/qux.js

You're importing a component that needs useEffect. It only works in a Client Component but none of its parents are marked with "client", so they're Server Components by default.

   ,----
 5 | import { useEffect } from 'react'
   :          ^^^^^^^^^
   `----

Maybe one of these should be marked as a "client" entry:

./components/qux.js
./components/baz.js
./components/bar.js
./app/dashboard/index/page.js
```

It's more ideal to put error codes inside the SWC transform and format
it in the Next.js logging layer. A future improvement is to tweak the
message a bit more for these specific cases:

- [ ] The error already happens inside an entry point (page or layout),
so itself should have "client" added (or removed), not it parents.
- [ ] When importing `"server-only"` inside a client component, we can
directly hint to the user which module in the import chain is marked
with `"client"`.

## 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-19 15:50:03 +02:00
Shu Ding
c742c038b0
Port page and layout level API assertions to SWC transform (#40653)
We used to do an extra pass of SWR `parse` and loop over the AST inside
JavaScript to check if `getServerSideProps` or `getStaticProps` is used
in a client page or layout. Instead this can be done in the same
`react_server_components` SWC transform now.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] 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-19 14:30:32 +02:00
JJ Kasper
f0ed328b6f
v12.3.1-canary.3 2022-09-16 16:02:00 -07:00
Shu Ding
d5fa555841
Implement SWC transformer for server and client graphs (#40603)
This is an initial implementation of the Server Components SWC
transformer. For the server graph, it detects client entries via the
`"client"` directive and transpile them into module reference code; for
the client graph, it removes the directives. And for both graphs, it
checks if there is any invalid imports for the given environment and
shows proper errors.

With that added, we can switch from `next-flight-client-loader` to
directly use the SWC loader in one pass. Next step is to get rid of the
`.client.` extension in other plugins.

## Bug

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

## Feature

- [x] 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`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have 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.md#adding-examples)
2022-09-17 00:12:59 +02:00
Shu Ding
a8e54e79d4
Add missing feature in next-swc (#40550)
`shake_exports` relies on `ecma_transforms_optimization`, otherwise this will be thrown if running tests:

```
error[E0433]: failed to resolve: could not find `optimization` in `transforms`
 --> crates/core/src/shake_exports.rs:7:23
  |
7 |     ecma::transforms::optimization::simplify::dce::{dce, Config as DCEConfig},
  |                       ^^^^^^^^^^^^ could not find `optimization` in `transforms`
```

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-15 12:58:01 +00:00
Donny/강동윤
57be012e06
chore: Update swc (#40520)
This updates SWC crates to
69bf533571

---

 - Closes https://github.com/vercel/next.js/issues/40535

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-15 14:22:11 +02:00
JJ Kasper
46dd1cffcf
v12.3.1-canary.2 2022-09-13 17:50:17 -07:00
JJ Kasper
2872deef64
v12.3.1-canary.1 2022-09-12 09:58:25 -07:00
Donny/강동윤
53ce3bf248
chore: Update swc (#40292)
This PR update swc crates to
4c078b0ac3

This PR applies
 - patches for the performance of minifier
 - https://github.com/swc-project/swc/pull/5796
   - Closes https://github.com/vercel/next.js/issues/40399
2022-09-12 09:36:44 -07:00
JJ Kasper
614f0d8e19
v12.3.1-canary.0 2022-09-08 15:18:23 -07:00
JJ Kasper
ba4c575334
v12.3.0 2022-09-08 09:00:04 -07:00
JJ Kasper
9576a278b6
v12.2.6-canary.13 2022-09-08 08:48:54 -07:00
JH.Lee
a4d907a564
refactor(next/swc): remove unnecessary field in RemoveConsole (#40296)
This PR removes `in_function_params` field in `RemoveConsole` module.

It's an unnecessary field that does not affect the module.
2022-09-08 00:42:19 +00:00
JJ Kasper
0c58621796
v12.2.6-canary.12 2022-09-07 17:02:46 -07:00
JJ Kasper
b86bf07563
v12.2.6-canary.11 2022-09-07 13:44:58 -07:00
JJ Kasper
a33d502297
v12.2.6-canary.10 2022-09-05 13:42:39 -07:00
Jiachi Liu
93830bf04f v12.2.6-canary.9 2022-09-05 14:38:11 +02:00
Donny/강동윤
6356095481
chore: Update swc (#39965)
This PR updates SWC crates to f2a0eef4f1

---


 - Closes #17056

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-04 12:13:22 +02:00
JJ Kasper
008da124ed
v12.2.6-canary.8 2022-08-31 17:47:07 -07:00
JJ Kasper
dddc60df15
v12.2.6-canary.7 2022-08-30 12:57:31 -07:00
JJ Kasper
decc00d0d2
v12.2.6-canary.6 2022-08-29 08:53:20 -07:00
JJ Kasper
bd82f690e5
v12.2.6-canary.5 2022-08-24 15:18:19 -05:00
JJ Kasper
34e10f302a
v12.2.6-canary.4 2022-08-23 23:30:54 -05:00
JJ Kasper
1c61eff67d
v12.2.6-canary.3 2022-08-23 19:00:15 -05:00
JJ Kasper
cb430cce90
v12.2.6-canary.2 2022-08-23 09:29:24 -05:00
magic-akari
78aefee1c6
fix(swc/emotion): Correct the SPACE_AROUND_COLON regex (#39710)
## Bug

- [x] fixes #39672 
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-08-18 10:02:35 +00:00
JJ Kasper
b24b1d8421
v12.2.6-canary.1 2022-08-17 14:12:52 +01:00
Donny/강동윤
ab152918ad
feat(next-swc): Update swc (#39499)
This PR applies

 - https://github.com/swc-project/swc/pull/5487
   - Closes https://github.com/vercel/next.js/issues/39538
 - https://github.com/swc-project/swc/pull/5485
   - Closes https://github.com/vercel/next.js/issues/39412
 - https://github.com/swc-project/swc/pull/5498
   - Closes https://github.com/vercel/next.js/issues/39360
2022-08-17 11:21:57 +00:00
magic-akari
3f63a491d0
fix(next/dynamic): handle template literal import path (#39623)
## Bug

- [x] fixes #39522 
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-08-16 11:48:16 +00:00
JJ Kasper
d8809164ad
v12.2.6-canary.0 2022-08-13 12:27:25 -05:00
JJ Kasper
911ba233d9
v12.2.5 2022-08-11 20:50:08 -05:00
JJ Kasper
d06fc0f0c4
v12.2.5-canary.7 2022-08-11 19:17:02 -05:00
JJ Kasper
de1bf3e471
v12.2.5-canary.6 2022-08-11 16:46:44 -05:00
JJ Kasper
a9b415b850
v12.2.5-canary.5 2022-08-11 12:09:48 -05:00
JJ Kasper
f863ba7193
v12.2.5-canary.4 2022-08-10 23:00:59 -05:00
Noel Kim (김민혁)
40f0eb126b
feat(next-swc/modularize_imports): Add Kebab case (#38583)
* Feat: Add Kebab case

* Add document

* Feat: Add Kebab case

* Add document

* Add Test cases
2022-08-10 22:51:05 -05:00
JJ Kasper
d246257602
v12.2.5-canary.3 2022-08-10 18:18:54 -05:00
JJ Kasper
44eea0c9c9
v12.2.5-canary.2 2022-08-10 15:32:25 -05:00
JJ Kasper
a6bc38799a
v12.2.5-canary.1 2022-08-09 18:03:15 -05:00
Jiachi Liu
71f5f258ab
Setup require hook in next-server for styled-jsx resolving (#39305)
* Use require hook and alias to resolve styled-jsx

* re-export styled-jsx types from compiled

* fix lint

* add test for styled-jsx css

* setup require hook in server

* compile import path to styled-jsx/style

* revert require hook

* add test for server styled-jsx resolving

* update test

* pre copy styled-jsx assets

* fix styled-jsx dts

* add npmrc for styled-jsx e2e test

* load require hook directly

* rm legacy test

* fix lint

* fix pnpm install error

* split require hook

* only alias styled-jsx

* make styled-jsx resolving statically analyzable

* update test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-08 20:27:42 -05:00
JJ Kasper
b0f590162c
v12.2.5-canary.0 2022-08-08 18:44:10 -05:00
LongYinan
4264408b16
Fix emotion shouldForwardProp options breaks component selectors (#39390)
fixes https://github.com/vercel/next.js/issues/38291



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-08-08 03:46:11 +00:00
JJ Kasper
d6cb795fc6
v12.2.4 2022-08-04 12:24:58 -05:00
JJ Kasper
dbc38d607e
v12.2.4-canary.12 2022-08-04 09:29:59 -05:00
OJ Kwon
58b920d5ba
feat(next-swc/wasm): export async interfaces (#39231)
* build(cargo): update dependencies

* feat(next-swc/wasm): export async interfaces

* feat(next/swc): use async wasm binding interface

* refactor(next/swc): allow to fallback for non-async published pkg

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-03 20:55:02 -05:00
JJ Kasper
ad687c9304
v12.2.4-canary.11 2022-08-03 16:15:59 -05:00
JJ Kasper
b7efce6437
v12.2.4-canary.10 2022-08-03 10:54:33 -05:00
JJ Kasper
ad75204b34
v12.2.4-canary.9 2022-08-01 17:51:35 -05:00
Jessica Franco
97ab23fb6f
Add missing @napi-rs/cli devDependency to next-swc (#39164)
Otherwise build-native fails with "napi: command not found.".

Alternatively, this is missing from this package's devDependencies.



## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

P.S.: local copy fails `pnpm lint` due to the `target` subfolder with intermediate rust build artifacts... should I add a `.prettierignore` update to exclude `/packages/next-swc/target/`?

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-07-30 22:08:50 +00:00
JJ Kasper
48405e6bd7
v12.2.4-canary.8 2022-07-28 23:34:07 -05:00
Donny/강동윤
eb0e161f2e
Update swc minifier (#39158)
This PR applies

 - https://github.com/swc-project/swc/pull/5333
   - Closes https://github.com/vercel/next.js/issues/39090
2022-07-29 03:26:28 +00:00
JJ Kasper
d091c818c5
v12.2.4-canary.7 2022-07-28 20:24:34 -05:00