Skip to content

Commit

Permalink
Merge branch 'canary' into wdb-move-sort-to-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored Sep 15, 2023
2 parents d34a143 + e262627 commit 5d106c9
Show file tree
Hide file tree
Showing 116 changed files with 1,812 additions and 953 deletions.
539 changes: 390 additions & 149 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ next-transform-dynamic = { path = "packages/next-swc/crates/next-transform-dynam
next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-transform-strip-page-exports" }

# SWC crates
swc_core = { version = "=0.79.55", features = ["ecma_loader_lru", "ecma_loader_parking_lot"] }
testing = { version = "0.33.21" }
swc_core = { version = "0.83.12", features = [
"ecma_loader_lru",
"ecma_loader_parking_lot",
] }
testing = { version = "0.34.1" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230914.5" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230915.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230914.5" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230915.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230914.5" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230915.2" }

# General Deps

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.4.20-canary.31"
"version": "13.4.20-canary.32"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"@picocss/pico": "1.5.10",
"@svgr/webpack": "5.5.0",
"@swc/cli": "0.1.55",
"@swc/core": "1.3.55",
"@swc/helpers": "0.5.1",
"@swc/core": "1.3.85",
"@swc/helpers": "0.5.2",
"@testing-library/jest-dom": "6.1.2",
"@testing-library/react": "13.0.0",
"@types/cheerio": "0.22.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"description": "ESLint configuration used by Next.js.",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config",
"dependencies": {
"@next/eslint-plugin-next": "13.4.20-canary.31",
"@next/eslint-plugin-next": "13.4.20-canary.32",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"description": "ESLint plugin for NextJS.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "13.4.20-canary.31",
"version": "13.4.20-canary.32",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions packages/next-swc/crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct TransformOptions {
pub server_components: Option<react_server_components::Config>,

#[serde(default)]
pub styled_jsx: bool,
pub styled_jsx: Option<turbopack_binding::swc::custom_transform::styled_jsx::visitor::Config>,

#[serde(default)]
pub styled_components:
Expand Down Expand Up @@ -202,11 +202,12 @@ where
)),
_ => Either::Right(noop()),
},
if opts.styled_jsx {
if let Some(config) = opts.styled_jsx {
Either::Left(
turbopack_binding::swc::custom_transform::styled_jsx::visitor::styled_jsx(
cm.clone(),
file.name.clone(),
config,
),
)
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/core/src/optimize_barrel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl Fold for OptimizeBarrel {
.into(),
raw: None,
}),
asserts: None,
with: None,
type_only: false,
})));
}
Expand Down
6 changes: 3 additions & 3 deletions packages/next-swc/crates/core/src/server_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
raw: None,
}),
type_only: false,
asserts: None,
with: None,
})));
}

Expand Down Expand Up @@ -1001,7 +1001,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
raw: None,
}),
type_only: false,
asserts: None,
with: None,
})));
new.push(ModuleItem::Stmt(Stmt::Expr(ExprStmt {
span: DUMMY_SP,
Expand Down Expand Up @@ -1076,7 +1076,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
raw: None,
}),
type_only: false,
asserts: None,
with: None,
})));
// Make it the first item
new.rotate_right(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/core/tests/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn test(input: &Path, minify: bool) {
is_server: false,
server_components: None,
styled_components: Some(assert_json("{}")),
styled_jsx: true,
styled_jsx: Some(assert_json("{}")),
remove_console: None,
react_remove_properties: None,
relay: None,
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/core/tests/full/example/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ import t from "other";
}())[0];
export var __N_SSG = !0;
export default function e() {
return React.createElement("div", null);
return /*#__PURE__*/ React.createElement("div", null);
}
Loading

0 comments on commit 5d106c9

Please sign in to comment.