Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clean up dependencies and types for emotion / relay #6892

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ tikv-jemallocator = { version = "=0.5.4", features = ["disable_initial_exec_tls"

# Must be pinned with the same swc versions
#rkyv = { version = "=0.7.44" } # synced with swc wasm plugin
styled_components = { version = "=0.96.16" }
swc_config = { version = "=0.1.14" }
swc_core = { version = "0.93.0", default-features = false }
swc_ecma_minifier = { version = "0.195.0", default-features = false }
swc_emotion = { version = "=0.72.14" }
swc_error_reporters = { version = "=0.17.20" }
swc_html = { version = "=0.140.0" }
swc_html_minifier = { version = "=0.137.0" }
Expand Down
5 changes: 0 additions & 5 deletions crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1273,11 +1273,6 @@ export interface RawRelated {
sourceMap?: string
}

export interface RawRelayConfig {
artifactDirectory?: string
language: 'javascript' | 'typescript' | 'flow'
}

export interface RawRemoteOptions {
key: string
external: Array<string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
use std::path::PathBuf;

use napi_derive::napi;
use rspack_core::Builtins;
use rspack_swc_visitors::{
CustomTransform, ImportOptions, ReactOptions, RelayLanguageConfig, RelayOptions, StyleConfig,
};
use rspack_swc_visitors::{CustomTransform, ImportOptions, ReactOptions, StyleConfig};

#[derive(Debug)]
#[napi(object)]
Expand Down Expand Up @@ -116,27 +112,6 @@ impl From<RawReactOptions> for ReactOptions {
}
}

#[derive(Debug)]
#[napi(object)]
pub struct RawRelayConfig {
pub artifact_directory: Option<String>,
#[napi(ts_type = "'javascript' | 'typescript' | 'flow'")]
pub language: String,
}

impl From<RawRelayConfig> for RelayOptions {
fn from(raw_config: RawRelayConfig) -> Self {
Self {
artifact_directory: raw_config.artifact_directory.map(PathBuf::from),
language: match raw_config.language.as_str() {
"typescript" => RelayLanguageConfig::TypeScript,
"flow" => RelayLanguageConfig::Flow,
_ => RelayLanguageConfig::JavaScript,
},
}
}
}

#[derive(Debug)]
#[napi(object)]
pub struct RawBuiltins {
Expand Down
4 changes: 0 additions & 4 deletions crates/rspack_swc_visitors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
once_cell = { workspace = true }
regex = { workspace = true }
rspack_error = { path = "../rspack_error" }
serde = { workspace = true, features = ["derive"] }
styled_components = { workspace = true }
swc_core = { workspace = true, features = [
"ecma_ast",
"__visit",
Expand All @@ -23,6 +20,5 @@ swc_core = { workspace = true, features = [
"__ecma_transforms",
"ecma_transforms_optimization",
] }
swc_emotion = { workspace = true }
swc_plugin_import = { path = "../swc_plugin_import" }
swc_plugin_preact = { path = "../swc_plugin_preact" }
2 changes: 0 additions & 2 deletions crates/rspack_swc_visitors/src/emotion.rs

This file was deleted.

11 changes: 0 additions & 11 deletions crates/rspack_swc_visitors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,5 @@ pub use define::{define, Define, RawDefine};

pub type Provide = std::collections::HashMap<String, Vec<String>>;

mod relay;
pub use relay::{relay, RawRelayOptions, RelayLanguageConfig, RelayOptions};

mod import;
pub use import::{import, CustomTransform, ImportOptions, RawImportOptions, StyleConfig};

mod emotion;
pub use emotion::{emotion, EmotionOptions, RawEmotionOptions};

mod styled_components;
pub use crate::styled_components::{
styled_components, RawStyledComponentsOptions, StyledComponentsOptions,
};
221 changes: 0 additions & 221 deletions crates/rspack_swc_visitors/src/relay.rs

This file was deleted.

Loading
Loading