Skip to content

Commit

Permalink
Merge branch 'canary' into 09-29-Fix_middleware-general_test_for_Turb…
Browse files Browse the repository at this point in the history
…opack
  • Loading branch information
kodiakhq[bot] committed Sep 29, 2023
2 parents ccc5260 + 55a638b commit 11840a1
Show file tree
Hide file tree
Showing 23 changed files with 138 additions and 618 deletions.
197 changes: 114 additions & 83 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,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.83.12", features = [
swc_core = { version = "0.83.28", 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-230929.1" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230929.3" }
# [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-230929.1" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230929.3" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230929.1" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230929.3" }

# General Deps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Next.js includes a [short list of popular packages](https://github.com/vercel/ne
- `@aws-sdk/client-s3`
- `@aws-sdk/s3-presigned-post`
- `@blockfrost/blockfrost-js`
- `@libsql/client`
- `@jpg-store/lucid-cardano`
- `@mikro-orm/core`
- `@mikro-orm/knex`
Expand Down
2 changes: 1 addition & 1 deletion examples/with-jest-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "13.2.0",
"@testing-library/user-event": "14.2.0",
"@types/jest": "29.5.5",
"@types/react": "18.0.9",
"@types/testing-library__jest-dom": "5.14.5",
"babel-jest": "28.1.0",
"identity-obj-proxy": "3.0.0",
"jest": "28.1.0",
Expand Down
1 change: 1 addition & 0 deletions examples/with-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@testing-library/jest-dom": "6.1.2",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3",
"@types/jest": "29.5.5",
"@types/react": "18.2.21",
"jest": "29.6.4",
"jest-environment-jsdom": "29.6.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/next-swc/crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ turbopack-binding = { workspace = true, features = [
"__swc_transform_modularize_imports",
"__swc_transform_relay",
] }
react_remove_properties = "0.3.0"
remove_console = "0.4.0"

[dev-dependencies]
turbopack-binding = { workspace = true, features = [
Expand Down
10 changes: 5 additions & 5 deletions packages/next-swc/crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ pub mod next_ssg;
pub mod optimize_barrel;
pub mod optimize_server_react;
pub mod page_config;
pub mod react_remove_properties;
pub mod react_server_components;
pub mod remove_console;
pub mod server_actions;
pub mod shake_exports;
mod top_level_binding_collector;

#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
Expand Down Expand Up @@ -251,12 +248,15 @@ where
relay_plugin,
match &opts.remove_console {
Some(config) if config.truthy() =>
Either::Left(remove_console::remove_console(config.clone())),
Either::Left(remove_console::remove_console(
config.clone(),
SyntaxContext::empty().apply_mark(unresolved_mark)
)),
_ => Either::Right(noop()),
},
match &opts.react_remove_properties {
Some(config) if config.truthy() =>
Either::Left(react_remove_properties::remove_properties(config.clone())),
Either::Left(react_remove_properties::react_remove_properties(config.clone())),
_ => Either::Right(noop()),
},
match &opts.shake_exports {
Expand Down
72 changes: 0 additions & 72 deletions packages/next-swc/crates/core/src/react_remove_properties.rs

This file was deleted.

131 changes: 0 additions & 131 deletions packages/next-swc/crates/core/src/remove_console.rs

This file was deleted.

0 comments on commit 11840a1

Please sign in to comment.