Commit graph

47 commits

Author SHA1 Message Date
Donny/강동윤
a463553da2
Update swc (#37149)
* Update swc

* Update test refs

* Update test refs
2022-05-24 00:56:45 -05:00
Donny/강동윤
76fbae93fc
Update swc (#37148) 2022-05-23 23:50:25 -05:00
Donny/강동윤
9732463f92
Update swc (#37009)
This PR

 - updates swc crates to 224a2ea8b6

 - resolves`https://github.com/vercel/next.js/discussions/30237?sort=new#discussioncomment-2759673`

 - resolves `https://github.com/vercel/next.js/discussions/30237?sort=new#discussioncomment-2780370`


<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/169214393-5798681f-2a48-48b8-ba4a-24e4360e4ea5.png">
2022-05-19 20:29:04 +00:00
Donny/강동윤
16bcb070d8
Update swc (#36972)
This PR updates swc to f226c0a3d8


This PR resolves

 - `https://github.com/vercel/next.js/discussions/30237#discussioncomment-2739632`

<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/168766189-c9412011-afae-4888-9b43-045e91478771.png">

Which is related to `styled-components`
2022-05-17 14:15:24 +00:00
Donny/강동윤
359d03f899
Update swc (#36745)
This PR

 - updates swc crates to a09bfc22f8

 - resolves https://github.com/vercel/next.js/discussions/30237?sort=new#discussioncomment-2693663

 - resolves https://github.com/vercel/next.js/discussions/30237?sort=new#discussioncomment-2749346

![image](https://user-images.githubusercontent.com/29931815/168412242-6b72fc0e-788e-446b-804e-f071e0e67b73.png)


 - applies various bugfixes
2022-05-16 09:37:21 +00:00
OJ Kwon
837e0a6af8
feat(next-swc): introduce experimental tracing support for swc (#35803)
* feat(next-swc/napi): expose initcustomtracesubscriber

* feat(next/config): enable experimental swcTrace

* feat(trace): add trace for emotion transform

* refactor(swc): use .next for the default trace output

* refactor(swc): teardown subscriber via drop

* refactor(swc/trace): simplify config

* refactor(swc/trace): adjust teardown
2022-05-02 15:20:59 -07:00
Donny/강동윤
38aa6d7140
Update swc (#36535)
This PR updates swc to a72f436148


This PR applies

 - https://github.com/swc-project/swc/pull/4452
   - Fixes `yield*` of async generators in async generators.
   - Fixes name mangling of injected helpers.
     - Note: This only applies to tiny files which enables lots of helpers.
 - https://github.com/swc-project/swc/pull/4468
   - Fixes newer version of react.
2022-04-28 10:14:48 +00:00
Donny/강동윤
f2c3ef8318
Update swc (#36477)
* Update

* Update swc

* Update again

* Fix

* log

* Fix

* clippy

* Update

* Fix
2022-04-27 14:28:46 +02:00
Donny/강동윤
b4d4f24129
Update swc (#36351)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 09:20:44 +02:00
Donny/강동윤
9456fc6b3b
Update swc (#36269)
This PR updates swc crates to 33e4661090



I'll undraft this after verifying some more fixes.


 - Resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2587218
<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/163984412-cd887458-9507-4f20-9fd9-e0864d3904d7.png">


 - Resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2585357


<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/163990124-10c7dc62-7613-444b-bffd-69b69c880592.png">
2022-04-21 10:52:39 +00:00
Donny/강동윤
cbb64ee554
Update swc (#36187)
This PR updates swc crates to b8d9a58f13


- Closes #35811
- Closes #34811
  - I tested with https://github.com/balazsorban44/issue-34811

<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/163574875-d7392c4c-b1f1-4503-aac1-35a26c9d7ec2.png">

- Closes #34715
  - I tested with https://github.com/cungminh2710/nextjs-swc-mapbox

<img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/163574677-9733dd69-9938-4e3e-b2f1-bfbd6db9e20c.png">


 - This fixes the bug reported in the comment (https://github.com/vercel/next.js/issues/36127#issuecomment-1099794402), but I didn't test the issue itself.
2022-04-15 14:34:32 +00:00
Donny/강동윤
4bf01d4ec8
feat(next-swc): Update css parser (#36114)
This only applies 81370d16cb

This fixes parsing of legacy `calc`s.
2022-04-13 09:09:52 +00:00
Donny/강동윤
16f7084e7f
feat(next-swc): Update swc crates (#35996)
* Move

* Adjust

* publish = false

* Tree

* Move tests

* fixup

* Split `emotion`

* Split `styled_jsx`

* Split `styled_jsx`

* fmt

* `--fix`

* clippy

* Update crates

* fixup

* publish

* Bump

* Rename

* authors

* Update

* More update

* Oh

* Update test refs

* Update test refs

* Update again

* Fix
2022-04-11 11:59:16 +02: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
Heyang Zhou
860c97ccf5
SWC import modularization plugin (#34969) 2022-03-22 14:20:57 +01:00
LongYinan
2e16d02faa
SWC emotion transform plugin (#34687) 2022-03-15 08:51:15 +01:00
Donny/강동윤
e57d621fb3
feat(next-swc): Update crates (#35133)
This PR updates crates related to ecmascript to d62ef6498d

I'll update css crates separately.


This PR also reduces the size of binary.
2022-03-11 04:58:01 +00:00
Donny/강동윤
6814852ffa
feat(next-swc): Update swc (#34878)
* Update swc

* lockfile

* Update more swc crates

* Update minifier

* chore: update types

* style: fix

* Update deps

Co-authored-by: evilebottnawi <sheo13666q@gmail.com>
2022-03-01 09:41:31 -08:00
JJ Kasper
271dff5be8
Update swc crates (#34491)
* Revert "Revert swc css bump temporarily (#34440)"

This reverts commit 01524ef20f.

* Update css crates

Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2022-02-18 14:02:54 -06:00
JJ Kasper
01524ef20f
Revert swc css bump temporarily (#34440)
This reverts the below two swc crates bumps to unblock testing changes while an issue with `styled-jsx` interpolation is investigated, we can reland after that issue is addressed. 

Reverts https://github.com/vercel/next.js/pull/34408
Reverts https://github.com/vercel/next.js/pull/34355

x-ref: [slack thread](https://vercel.slack.com/archives/C02HY34AKME/p1645032079994029)
2022-02-16 20:05:39 +00:00
Donny/강동윤
73581f37f3
feat(next-swc): Update swc (#34408)
This fixes wrong lint for overloads with `export default`
2022-02-16 15:23:36 +00:00
Donny/강동윤
4500cb7d8c
feat(next-swc): Update swc (#34355)
This update swc crates to

a5b3dd815b

from 

3b7e594bc7


Note that swc does not hoist imports anymore, as runtime will hoist it anyway.


---


 - Closes https://github.com/vercel/next.js/issues/33946
2022-02-15 17:24:59 +00:00
Donny/강동윤
f1ff0fb626
feat(next-swc): Update swc (#34045)
This applies 

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

This resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2114870


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

This resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2109335

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

This resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2068850
2022-02-08 11:48:25 +00:00
Donny/강동윤
4bd76ff5df
feat(next-swc): Update swc (#33724)
This PR applies

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

which fixes lots of minifier issues.

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

This fixes the regression of evaluatior.

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

This fixes codegen bugs.

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

This improves compression.

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

This fixes some transform bugs.

 - https://github.com/swc-project/swc/pull/3392
 
This implements more terser options.
2022-02-03 17:39:37 +00:00
JJ Kasper
3e60c232a8
Relay Support in Rust Compiler (#33702)
Reverts vercel/next.js#33699

This re-opens the support for relay in swc, although we need to narrow in the causes for the build failures in https://github.com/vercel/next.js/runs/4950448889?check_suite_focus=true

Co-authored-by: Andrey Lunyov <102968+alunyov@users.noreply.github.com>
2022-02-01 18:18:55 +00:00
JJ Kasper
b5d4564cca
Revert "Relay Support in Rust Compiler" (#33699) 2022-01-26 17:26:32 +01:00
Terence Bezman
b20eb99a4d
Relay Support in Rust Compiler (#33240)
## Feature

Implements feature requested in https://github.com/vercel/next.js/issues/30805. 

A few people including myself have been looking to use Relay with Next.JS and want to use the new Rust Compiler. This is my stab at an implementation. 

### How it works?
Finds all  `graphql` tagged template experssions and replaces them with `require`s to the file generated by Relay.

### Where I need help
- I've only worked with Rust a handful of times so I would appreciate any feedback on my use of language features.
- Is there any performance overhead to many duplicate usages of `require`? I imagine there's a cache in place but I want to be sure.
- I've added some unit tests & integration tests but I might be missing some use cases. Feel free to comment some use cases I'm not thinking about.

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
  - I haven't added any docs since this is an experimental API.

## Documentation / Examples

You're expected to be running the Relay Compiler along side Next.JS when you're developing. This is pretty standard. I wouldn't expect people to have any problem with this.

### Usage
In your `next.config.js`
```js
module.exports = {
  experimental: {
    relay: {
      language: 'typescript', // or 'javascript`
      artifactDirectory: 'path/to/you/artifact/directory' // you can leave this undefined if you did not specify one in the `relay.json`
    }
  }
}
```


Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-01-26 08:23:57 +00:00
Donny/강동윤
f0e31ee842
feat(next-swc): Update swc (#33675)
This PR applies

 - https://github.com/swc-project/swc/pull/3367
2022-01-26 05:46:29 +00:00
Donny/강동윤
9dd0399dd8
feat(next-swc): Update swc (#33628)
This PR applies


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

Closes https://github.com/vercel/next.js/issues/33600
2022-01-25 09:22:22 +00:00
Donny/강동윤
0fb1183973
feat(next-swc): Update swc (#33595)
This PR applies

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

Resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2014245

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

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

This fixes `jsc.experimental.keepImportAssertions`.
2022-01-24 13:46:09 +00:00
Donny/강동윤
8ff9785d08
Update swc (#33514)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-01-21 12:49:38 +01:00
Donny/강동윤
a54eb376e1
feat(next-swc): Update swc (#33485) 2022-01-20 09:54:56 +01:00
Donny/강동윤
3574b91b48
feat(next-swc): Update swc (#33461)
This PR applies

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

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

Fixes https://github.com/vercel/next.js/issues/31077
2022-01-19 15:57:39 +00:00
Donny/강동윤
b111ba159a
fix(next-swc): Update swc (#33427)
This PR applies lots of patches, including

 - https://github.com/swc-project/swc/pull/3303
 - https://github.com/swc-project/swc/pull/3301
 - https://github.com/swc-project/swc/pull/3287
 - https://github.com/swc-project/swc/pull/3286
 - https://github.com/swc-project/swc/pull/3289

  - https://github.com/swc-project/swc/pull/3302
    - Fixes https://github.com/vercel/next.js/issues/33265

(Verified)

I'll undraft this after verifying
2022-01-19 08:15:45 +00:00
Donny/강동윤
aaa77dd73f
Update swc (#33342) 2022-01-17 15:09:55 +01:00
Donny/강동윤
fd231a68bf
Update swc (#33201)
This PR is a bit big because AST definitions are modified recently because previous AST defs were too error-prone.
It will prevent plugin authors from making some common mistakes.


 - Closes #33088
 - Closes #31084
 - Closes #33283
2022-01-14 11:54:01 +00:00
Donny/강동윤
87dbd03eb0
Update swc (#33063) 2022-01-10 11:37:32 +01:00
Donny/강동윤
026dd4cea0
chore: Update swc (#32664)
## 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 `yarn lint`


Fixes https://github.com/vercel/next.js/issues/30800
2021-12-20 10:55:26 +00:00
Donny/강동윤
99f9be585b
Update swc (#32566)
## 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 `yarn lint`


This applies

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

Fixes https://github.com/vercel/next.js/issues/32553

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

Fixes https://github.com/vercel/next.js/issues/32470
2021-12-16 13:48:03 +00:00
Donny/강동윤
4c8415091c
Update jsx transform of swc (#32383)
## 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 `yarn lint`


This PR applies

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

This fixes `development` mode of jsx.
2021-12-13 14:24:32 +00:00
Donny/강동윤
7df7c5e805
Upate swc (#32365)
## 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 `yarn lint`


This PR applies

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

This is a patch for self-referencing typescript enums.

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

This is a fix for source map shifting.
2021-12-10 11:42:10 +00:00
Donny/강동윤
4ce49b79a2
Update swc (#32210)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-12-08 18:54:21 +01:00
Donny/강동윤
12b44e279b
Update swc (#31963)
This PR applies

 - https://github.com/swc-project/swc/pull/2916
   - Closes https://github.com/vercel/next.js/issues/31757
2021-11-30 15:12:37 +00:00
Heyang Zhou
809d0155ff
Add support for removing React properties. (#31606) 2021-11-26 14:45:03 +01:00
Donny/강동윤
cfe561eae2
Update swc (#31816) 2021-11-26 10:01:30 +01:00
Maia Teegarden
1bc9b1ac02
Fix wasm loading (#31772)
* Fix wasm loading

* Remove consoles
2021-11-24 15:33:34 -08: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.lock (Browse further)