Commit graph

80 commits

Author SHA1 Message Date
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)