Skip to content

Commit

Permalink
Add/styled jsx swc (#29005)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
  • Loading branch information
3 people authored Sep 15, 2021
1 parent 2cfdc68 commit 4a2d5a1
Show file tree
Hide file tree
Showing 85 changed files with 3,519 additions and 249 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-03-25
toolchain: nightly-2021-08-12
target: ${{ matrix.target }}
- name: Cache cargo registry
uses: actions/cache@v1
Expand All @@ -54,7 +54,7 @@ jobs:
uses: actions/cache@v2
with:
path: packages/next/native/**
key: next-swc-nightly-2021-03-25-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_native.yml', 'packages/next/build/swc/**') }}
key: next-swc-nightly-2021-08-12-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_native.yml', 'packages/next/build/swc/**') }}
- name: Cross build aarch64 setup
if: ${{ matrix.target == 'aarch64-apple-darwin' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ jobs:
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
profile: minimal
toolchain: nightly-2021-03-25
toolchain: nightly-2021-08-12
target: ${{ matrix.target }}
- name: Cache cargo registry
uses: actions/cache@v1
Expand All @@ -491,7 +491,7 @@ jobs:
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
path: packages/next/native/next-swc.*.node
key: next-swc-nightly-2021-03-25-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_test_deploy.yml', 'packages/next/build/swc/**') }}
key: next-swc-nightly-2021-08-12-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_test_deploy.yml', 'packages/next/build/swc/**') }}
- name: Cross build aarch64 setup
if: ${{ matrix.target == 'aarch64-apple-darwin' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: |
Expand Down Expand Up @@ -531,7 +531,7 @@ jobs:
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-03-25
toolchain: nightly-2021-08-12
profile: minimal
- run: cd packages/next/build/swc && cargo test
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ packages/react-dev-overlay/lib/**
**/__tmp__/**
lerna.json
.github/actions/next-stats-action/.work
packages/next/build/swc/tests/fixture/**/*
packages/next-codemod/transforms/__testfixtures__/**/*
packages/next-codemod/transforms/__tests__/**/*
packages/next-codemod/**/*.js
Expand Down
1 change: 1 addition & 0 deletions .prettierignore_staged
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**/.next/**
**/_next/**
**/dist/**
packages/next/build/swc/tests/**
packages/next/compiled/**/*
packages/next/bundles/webpack/packages/*.runtime.js
lerna.json
Expand Down
155 changes: 153 additions & 2 deletions packages/next/build/swc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions packages/next/build/swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ crate-type = ["cdylib"]
[dependencies]
anyhow = "1.0"
backtrace = "0.3"
easy-error = "1.0.0"
napi = { version = "1", features = ["serde-json"] }
napi-derive = "1"
path-clean = "0.1"
Expand All @@ -18,9 +19,12 @@ serde_json = "1"
swc = "0.51"
swc_atoms = "0.2"
swc_common = { version = "0.12", features = ["tty-emitter", "sourcemap"] }
swc_node_base = "0.3"
swc_ecmascript = { version = "0.63", features = ["codegen", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_css = "0.6"
swc_css_codegen = "0.4"
swc_ecmascript = { version = "0.63", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_ecma_preset_env = "0.42"
swc_node_base = "0.3"
swc_stylis = "0.3"
fxhash = "0.2.1"
retain_mut = "0.1.3"
log = "0.4.14"
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/swc/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2021-03-25
nightly-2021-08-12
1 change: 1 addition & 0 deletions packages/next/build/swc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ mod hook_optimizer;
mod minify;
mod next_dynamic;
pub mod next_ssg;
mod styled_jsx;
mod transform;
mod util;

Expand Down
Loading

0 comments on commit 4a2d5a1

Please sign in to comment.