Commit graph

258 commits

Author SHA1 Message Date
JJ Kasper
938eb0e28c
v12.0.11-canary.7 2022-02-06 19:10:52 -06:00
JJ Kasper
f322d62639
v12.0.11-canary.6 2022-02-04 17:02:00 -06:00
JJ Kasper
502a869a68
v12.0.11-canary.5 2022-02-04 11:15:32 -06:00
JJ Kasper
740f908aa4
v12.0.11-canary.4 2022-02-03 13:18:41 -06: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
Steven
abae663f2b v12.0.11-canary.3 2022-02-02 17:29:18 -05:00
Andrey Lunyov
831d45d73d
Add support for Relay projects without artifactDirectory (#33918)
* update plugin

* Update the test

* remove dbg

* Use pages_dir in Relay

* copy edits

* cargo test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-02 16:00:02 -06:00
JJ Kasper
aae0370d63
v12.0.11-canary.2 2022-02-02 13:32:35 -06:00
JJ Kasper
39d3210776
v12.0.11-canary.1 2022-02-01 17:01:29 -06:00
JJ Kasper
dd486602b6
v12.0.11-canary.0 2022-02-01 14:05:04 -06: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
4c28177c15
v12.0.10 2022-01-31 19:52:18 -06:00
Steven
94989461ff v12.0.10-canary.2 2022-01-31 19:14:21 -05:00
Steven
48dee57ff5 v12.0.10-canary.1 2022-01-28 18:51:51 -05:00
JJ Kasper
b314c9886c
v12.0.10-canary.0 2022-01-27 16:50:54 -06:00
Jiachi Liu
3bda6e66b6
Use swc parse for flight server and client loaders (#33713)
* Add `parse` method for next-swc
* Use shared next-swc to parse rsc components AST
* Remove the invalid case of parsing `ExportAllDecalaration` (we didn't support it well before, so I deleted. need to support later)


Co-authored-by: Donny/강동윤 <29931815+kdy1@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-01-27 15:48:09 +00:00
JJ Kasper
07431d3e0f
v12.0.9 2022-01-26 16:01:19 -06:00
JJ Kasper
c938e20077
v12.0.9-canary.12 2022-01-26 15:10:58 -06:00
JJ Kasper
865a079923
v12.0.9-canary.11 2022-01-26 10:31:07 -06:00
JJ Kasper
b5d4564cca
Revert "Relay Support in Rust Compiler" (#33699) 2022-01-26 17:26:32 +01:00
Tim Neutkens
65c63c9434 v12.0.9-canary.10 2022-01-26 12:00:50 +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
JJ Kasper
8d1c58525c
v12.0.9-canary.9 2022-01-25 10:53:28 -06: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
JJ Kasper
f60a480771
v12.0.9-canary.8 2022-01-24 16:30:26 -06:00
JJ Kasper
3329ac6460
v12.0.9-canary.7 2022-01-24 13:14:25 -06: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
JJ Kasper
2a349c769d
v12.0.9-canary.6 2022-01-21 15:55:00 -06:00
Tim Neutkens
8959292d2b v12.0.9-canary.5 2022-01-21 15:42:22 +01: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
Tim Neutkens
96057c8f67 v12.0.9-canary.4 2022-01-20 09:57:25 +01:00
Donny/강동윤
a54eb376e1
feat(next-swc): Update swc (#33485) 2022-01-20 09:54:56 +01:00
JJ Kasper
2fd17ba1f8
v12.0.9-canary.3 2022-01-19 16:09:37 -06: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
Tim Neutkens
82f3233c0c v12.0.9-canary.2 2022-01-19 09:16:10 +01: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
Tim Neutkens
45eb137a89 v12.0.9-canary.1 2022-01-18 16:42:03 +01: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
JJ Kasper
7db6aa2fde
v12.0.9-canary.0 2022-01-13 15:19:42 -06:00
Tim Neutkens
d7a96d22be v12.0.8 2022-01-12 09:14:02 +01:00
Tim Neutkens
df0e89984e v12.0.8-canary.22 2022-01-12 09:09:32 +01:00
JJ Kasper
0de84472eb
v12.0.8-canary.21 2022-01-11 15:00:27 -06:00
Tobias Koppers
9836429bee
drop dynamic import with ssr: false on server-side (#32606) 2022-01-11 14:46:28 +01:00
Fatih Kalifa
600f113358
next-swc: fix ssg code elimination when used in render (#32709)
* next-swc: fix ssg code elimination when used in render

* simplify logic and add more thorough tests

* comment

* remove fold_export_default and fix JSX member expression
2022-01-11 14:02:24 +01:00
JJ Kasper
3eabb7f4c7
v12.0.8-canary.20 2022-01-10 14:59:41 -06:00
Donny/강동윤
87dbd03eb0
Update swc (#33063) 2022-01-10 11:37:32 +01:00
JJ Kasper
aeb67cc28d
v12.0.8-canary.19 2022-01-06 11:09:32 -06:00
JJ Kasper
5680007fa2
v12.0.8-canary.18 2022-01-05 13:49:39 -06:00
JJ Kasper
cfa8ab9cbf
v12.0.8-canary.17 2022-01-04 15:29:37 -06:00
JJ Kasper
69a56759ee
v12.0.8-canary.16 2022-01-03 18:58:27 -06:00
Steven
6f10d94d90
Revert "Reduce install size for linux glibc/musl (#32850)" (#32973)
This reverts commit a5fab84840.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-01-03 18:47:48 -06:00
JJ Kasper
5378db8f80
v12.0.8-canary.15 2022-01-03 15:46:09 -06:00
Steven
a5fab84840
Reduce install size for linux glibc/musl (#32850)
In Next.js [12.0.1](
https://packagephobia.com/result?p=next@12.0.1), musl support was added which caused linux to install both glibc and musl binaries.

This PR adds the `install` script to prevent installing unused binaries, reducing the install size by 47MB.

We originally thought this could be added to Node.js core and thus npm but [it was rejected](https://github.com/nodejs/node/pull/41338).

Note getReport() works on Node.js [`>=11.8.0`](https://nodejs.org/api/process.html#processreportgetreporterr) which is safe to use since Next.js requires [`"node": ">=12.22.0"`](265f71e225/packages/next/package.json (L280)).
2022-01-03 21:17:46 +00:00
JJ Kasper
381ca374e5
v12.0.8-canary.14 2022-01-02 16:36:23 -06:00
JJ Kasper
265f71e225
v12.0.8-canary.13 2021-12-22 13:03:32 -06:00
JJ Kasper
d85e5ab48e
v12.0.8-canary.12 2021-12-21 14:46:52 -06:00
JJ Kasper
725f6b44d6
v12.0.8-canary.11 2021-12-20 09:28:17 -06:00
Hannes Bornö
802f4dcf5d
next-swc: styled-jsx error checking and reporting updated (invalid-styled-jsx-children.md) (#31940)
Co-authored-by: Hannes Lund <hannes.lund.2@consultant.volvo.com>
2021-12-20 16:17:37 +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
JJ Kasper
3e83205eab
v12.0.8-canary.10 2021-12-17 20:24:59 -06:00
JJ Kasper
d7811d3207
v12.0.8-canary.9 2021-12-17 15:47:01 -06:00
Jared Palmer
ed022eda0f
Add turbo / improve Rust build caching in GitHub Actions (#31464)
Implements Turborepo for the Next.js repository and leverage it for native build caching.

Co-authored-by: Maia Teegarden <2865858+padmaia@users.noreply.github.com>
2021-12-16 20:10:45 +00:00
Tim Neutkens
e90f0aec7a v12.0.8-canary.8 2021-12-16 14:50:34 +01: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/강동윤
47cd07bb75
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-12-16 12:23:31 +01:00
Hannes Bornö
b0bd0eefc6
next-swc: Emit errors and add tests to next-ssg (#32254)
## 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`
2021-12-16 04:26:41 +00:00
JJ Kasper
f221f8857d
v12.0.8-canary.7 2021-12-15 13:31:38 -06:00
Tim Neutkens
12bb1b1da2 v12.0.8-canary.6 2021-12-14 18:05:17 +01:00
Tobias Koppers
ee220730db
fixes to allow lazy compilation for import() (#32441) 2021-12-14 11:33:04 +01:00
JJ Kasper
48cee5485a
v12.0.8-canary.5 2021-12-13 13:07:44 -06: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
JJ Kasper
83e661031c
v12.0.8-canary.4 2021-12-10 10:08:40 -06:00
Donny/강동윤
6015f3c332
fix(next-swc/styled-jsx): Fix nth (#32358)
## 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`
2021-12-10 13:22:09 +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
JJ Kasper
7e055dddbb
v12.0.8-canary.3 2021-12-08 18:01:57 -06:00
Maia Teegarden
0f7f3323c1
Add shake exports transform to next-swc (#32253)
* Add shake exports transform to next-swc

* Less cloning

* Use JsWord instead of String
2021-12-08 11:04:13 -08:00
Donny/강동윤
4ce49b79a2
Update swc (#32210)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-12-08 18:54:21 +01:00
JJ Kasper
345956f1d2
v12.0.8-canary.2 2021-12-08 10:58:41 -06:00
JJ Kasper
2e530ee299
v12.0.8-canary.1 2021-12-06 20:49:13 -06:00
Tim Neutkens
0f0c28a45f v12.0.8-canary.0 2021-12-05 15:44:48 +01:00
JJ Kasper
ebf509539c
v12.0.7 2021-12-04 18:21:43 -06:00
JJ Kasper
1e21c7df13
v12.0.7-canary.0 2021-12-04 17:03:15 -06:00
Tim Neutkens
56c68dba51 v12.0.6 2021-12-04 13:12:21 +01:00
Tim Neutkens
e257dbfad5 v12.0.6-canary.0 2021-12-04 11:26:57 +01:00
JJ Kasper
b6162bb6b6
v12.0.5 2021-12-03 16:45:00 -06:00
JJ Kasper
1705020808
v12.0.5-canary.19 2021-12-03 15:32:42 -06:00
JJ Kasper
b194664d8d
v12.0.5-canary.18 2021-12-03 13:25:35 -06:00
Tim Neutkens
e58e7b17aa v12.0.5-canary.17 2021-12-03 19:22:03 +01:00
Tim Neutkens
41f87abdf7 v12.0.5-canary.16 2021-12-03 12:30:59 +01:00
Tim Neutkens
c1f6abbe54 v12.0.5-canary.15 2021-12-03 12:30:14 +01:00
JJ Kasper
5763a33a03
v12.0.5-canary.14 2021-12-02 14:55:53 -06:00
JJ Kasper
32ac918672
v12.0.5-canary.13 2021-12-01 10:07:32 -06:00
JJ Kasper
4410de9ff3
v12.0.5-canary.12 2021-11-30 13:33:32 -06: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
JJ Kasper
3b089ae18f
v12.0.5-canary.11 2021-11-29 16:18:39 -06:00
Hannes Bornö
466687e88e
SWC: Add error checks and tests to next-dynamic (#31683)
fixes #31520

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] 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`
2021-11-26 14:22:28 +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
Tim Neutkens
b2acdbb788 v12.0.5-canary.10 2021-11-25 20:45:30 +01:00
Tobias Koppers
a4159321b2
read file in swc when no loaders follow the next-swc-loader (#31682)
Fixes #31685


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


Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2021-11-25 14:00:14 +00:00
Maia Teegarden
1bc9b1ac02
Fix wasm loading (#31772)
* Fix wasm loading

* Remove consoles
2021-11-24 15:33:34 -08:00
Tim Neutkens
e95c9caca3 v12.0.5-canary.9 2021-11-23 18:51:52 +01:00
Tim Neutkens
c2e73ead7f
Enable require for swc_bundler (#31663)
## 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`
2021-11-21 17:38:11 +00:00
Tim Neutkens
21cb8a1fe8 v12.0.5-canary.8 2021-11-21 15:51:15 +01:00
Tim Neutkens
ba89d204e8 v12.0.5-canary.7 2021-11-21 13:07:17 +01: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