Commit graph

36 commits

Author SHA1 Message Date
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
Maia Teegarden
b80c378975
Add/wasm build (#31470) 2021-11-17 20:01:02 +01:00
Donny/강동윤
6fd44383f3
Update swc & fix styled-jsx (#31407) 2021-11-15 09:27:45 +01:00
Donny/강동윤
54ca8f41ce
next-swc: Add displayNameAndId of styled-components (#31189)
## 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`




Related to: https://github.com/vercel/next.js/issues/30802
2021-11-09 10:05:31 +00:00
Donny/강동윤
e8e4210f9f
next-swc: Add .bundle() (#30935) 2021-11-04 13:23:25 +01:00
Donny/강동윤
e79f788f74
Update swc (#30790)
## 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/2610

This increases the pass limit (which is required to prevent hanging) from 30 to 100.
Fixes https://github.com/vercel/next.js/issues/30636.

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

This marks assignment with operators as `usage`+ `assign`. Previously it was only `assisgn`. This is to preserve assignments to variables used like `(a += '').split('.'))`.

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

---

I expect this to fix some more issues on next.js repository, but I didn't list them because it's not tested.
2021-11-02 10:57:09 +00:00
Donny/강동윤
4ada314663
Add auto-commonjs and update swc (#30661)
Closes #30596



## 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 patch contains several patches from swc.

This includes https://github.com/swc-project/swc/pull/2581, which allows customizing the import path for regenerator.

 - This adds auto-detection of common js.

If `module.exports` is found and module config is not set, module config becomes common js.

 - As bonus, this includes some performance improvements

The logic for analyzing the input source file and parsing options as json is moved from the js thread to a background worker thread.
2021-10-30 13:31:58 +00:00
Donny/강동윤
085df63bf9
next-swc: Support more platforms (#30254)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-10-25 17:00:48 +02:00
Donny/강동윤
1acc9dd5da
Update swc (#30230)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-24 15:56:33 +02:00
Maia Teegarden
d5aa0387b9
Add page config swc transform (#30183)
* Add page config swc transform

* Build next-swc binaries

* Disable page config transform in some scenarios

* Build next-swc binaries

* Only skip dropping bundle in dev mode

* Build next-swc binaries

* Allow for amp 'hybrid' configuration

* Build next-swc binaries
2021-10-22 16:08:09 -07:00
Donny/강동윤
5f73633d4d
Update swc (#30127)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-21 08:31:36 +02:00
Donny/강동윤
f308b8a352
Update swc (#30066)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-19 17:50:07 +02:00
Donny/강동윤
6f5ec2bd96
Update swc (#30057)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-19 13:34:54 +02:00
Donny/강동윤
caef3373da
Update swc (#30055)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-19 09:16:59 +02:00
Donny/강동윤
486d82434b
Update swc (#30019)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-18 10:48:26 +02:00
Donny/강동윤
e844582400
Upate swc to allow line comments in css (#29943)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-10-15 17:25:31 +02:00
Donny/강동윤
9375c7fe52
Update swc (#29938)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-15 11:39:09 +02:00
Donny/강동윤
b99cfb8cfa
Update swc (#29881)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-13 16:24:31 +02:00
Donny/강동윤
bcb8e44b7e
Update swc (#29798)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-11 10:55:59 +02:00
Donny/강동윤
f1c62d5073
feat(build/swc): Add debug utilities (#29730)
* Make debug build faster

* Organize for easier testing

* Add example tests

* Test system

* Update test refs

* Ensure that we are fully processing

* Update test refs

* Update test system

* Update swc

* Fix

* Update test refs

* Update test refs

* Ignore tests in nextbuild task

* Fix attrs

* Add a test

* Update test refs

* Add a test

* Fix hygiene bug

* Update test refs

* Update swc

* Build next-swc binaries

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-10 07:25:15 +02:00
Donny/강동윤
ac187a5b43
chore: Update swc (#29689)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-07 12:11:53 +02:00
Maia Teegarden
d1308b8ab0
Chore/update swc (#29675)
* Update swc deps

* Build next-swc binaries
2021-10-06 10:16:27 -07:00
Donny/강동윤
ce73df8d59
Update swc crates (#29643)
* Update deps

* Update

* Build next-swc binaries

Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
2021-10-05 10:21:11 -07:00
Maia Teegarden
92c2dd4971
Upgrade swc deps (#29620)
* Upgrade swc deps

* Build next-swc binaries
2021-10-04 14:28:04 -07:00
Maia Teegarden
d3b8d708af
Upgrade swc deps (#29531)
* Upgrade swc deps

* Build next-swc binaries

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-30 14:21:19 -07:00
Maia Teegarden
5778f9ffb3
Remove error that is too strict in next/dynamic swc transform (#29511) 2021-09-30 08:18:45 +02:00
Donny/강동윤
90a33e7994
Update css parser (#29484)
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-29 11:09:33 +02:00
Donny/강동윤
b4d6e535a8
Update swc (#29460) 2021-09-28 15:31:14 +02:00
강동윤
81c5511b74
next-ssg: Don't inject __N_SSP for files without server props. (#29141) 2021-09-16 16:26:38 +02:00
Maia Teegarden
4a2d5a1b49
Add/styled jsx swc (#29005)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-09-15 09:24:31 +02:00
강동윤
fd2af1422d
next/dynamic: Accept pagesDir (#29055)
* Add pages_dir

* Add `pages_dir` to `next/dynamic` pass

* Dep

* Fix next/dynamic psss

* Fix

* Update test refs

* Add a test
2021-09-13 13:37:07 +02:00
Maia Teegarden
63e71b585d
Update swc in next-swc (#28970)
* Update swc in next-swc

* Fix typo

Co-authored-by: Steven <steven@ceriously.com>

* Build next-swc binaries

Co-authored-by: Steven <steven@ceriously.com>
2021-09-09 20:02:57 +02:00
Tim Neutkens
d2f43b718f
Add experimental SWC minify and SWC loader options (#27664) 2021-08-06 16:07:36 +02:00
Maia Teegarden
204445ff2f
Add/amp attribute patcher (#27700)
* Add amp attribute transform

* Add amp attribute unit tests

* Fix ci if statements

* Checkout code in rust tests

* Add rust fixtures to eslintignore

* Add cargo config

* Configure toolchain for cross compilation
2021-08-03 09:54:57 -07:00
강동윤
61586eda6a
Port next-ssg getStaticProps/getServerSideProps tree shaking Babel transform to rust (#27552) 2021-08-03 14:02:23 +02:00
Maia Teegarden
4172a4c0a6
Add initial next swc package with first transform (#27355)
* Set up next-swc package with no custom transforms

* Add hook_optimizer transform

* Fix lint

* Build next-swc on CI

* Add toolchain in rust action

* Build binaries in manual workflow

* Commit from GitHub Actions (Build next-swc native binaries)

* Update dependencies

* Update swc and use stable rust

* Build next-swc binaries

* Test compiled code

* Dedupe @node-rs/helper

* Add workflow to check next-swc binaries

* Fix check native

* PR feedback

* PR feedback

* Pr feedback

* Build next-swc binaries

* Combine native workflows

* Add docs for contributors on less common platforms

* PR feedback

* Compare JsWord instead of converting to string

* Fix workflow formatting

* Add docs for building binaries for CI

* Build next-swc binaries

* Fix workflow if syntax

* Add license info to copied code

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-07-27 17:07:28 +02:00