Skip to content

Commit

Permalink
refactor(swc_node_base): Rename to swc_malloc (#8272)
Browse files Browse the repository at this point in the history
**Description:**

This is quite convinient.
  • Loading branch information
kdy1 authored Nov 11, 2023
1 parent 14a6bf0 commit 9a0572b
Show file tree
Hide file tree
Showing 54 changed files with 78 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ jobs:
- crate: swc_macros_common
os: ubuntu-latest
runner: ubuntu-latest
- crate: swc_node_base
- crate: swc_malloc
os: ubuntu-latest
runner: ubuntu-latest
- crate: swc_node_bundler
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bindings/binding_core_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ swc_core = { version = "0.86.52", features = [
"base_node",
"base_concurrent",
] }
swc_node_base = "0.5.9"
swc_malloc = "0.5.9"
2 changes: 1 addition & 1 deletion bindings/binding_core_node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#[macro_use]
extern crate napi_derive;

extern crate swc_node_base;
extern crate swc_malloc;

use std::{env, panic::set_hook, sync::Arc};

Expand Down
4 changes: 2 additions & 2 deletions bindings/binding_minifier_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ node_macro_deps = { path = "../node_macro_deps" }
path-clean = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["unbounded_depth"] }
sourcemap = "6.0.0"
tracing = { version = "0.1.37", features = ["release_max_level_info"] }
tracing-chrome = "0.5.0"
tracing-futures = "0.2.5"
tracing-subscriber = { version = "0.3.9", features = ["env-filter"] }
sourcemap = "6.0.0"

swc_compiler_base = { version = "0.3.46", features = ["node"] }
swc_config = "0.1.7"
Expand All @@ -50,5 +50,5 @@ swc_core = { version = "0.86.52", features = [
"ecma_visit",
] }
swc_error_reporters = "0.17.8"
swc_node_base = "0.5.9"
swc_malloc = "0.5.9"
swc_nodejs_common = "0.0.8"
2 changes: 1 addition & 1 deletion bindings/binding_minifier_node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#[macro_use]
extern crate napi_derive;

extern crate swc_node_base;
extern crate swc_malloc;

use std::{env, panic::set_hook};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ swc_ecma_lints = { version = "0.89.29", path = "../swc_ecma_lints", features = [
"non_critical_lints",
] }
swc_ecma_testing = { version = "0.22.10", path = "../swc_ecma_testing" }
swc_node_base = { version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { version = "0.5.9", path = "../swc_malloc" }
testing = { version = "0.35.10", path = "../testing" }
walkdir = "2"

Expand Down
2 changes: 1 addition & 1 deletion crates/swc/benches/bugs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use std::{io::stderr, path::Path};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc/benches/minify.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Explicit extern crate to use allocator.
extern crate swc_node_base;
extern crate swc_malloc;

use std::{path::PathBuf, sync::Arc};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc/benches/typescript.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use std::{
io::{self, stderr},
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_bundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ swc_ecma_minifier = { version = "0.189.41", path = "../swc_ecma_minifier", featu
swc_ecma_transforms_proposal = { version = "0.168.38", path = "../swc_ecma_transforms_proposal" }
swc_ecma_transforms_react = { version = "0.180.38", path = "../swc_ecma_transforms_react" }
swc_ecma_transforms_typescript = { version = "0.185.36", path = "../swc_ecma_transforms_typescript" }
swc_node_base = { version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { version = "0.5.9", path = "../swc_malloc" }
testing = { version = "0.35.10", path = "../testing" }
2 changes: 1 addition & 1 deletion crates/swc_bundler/examples/bundle.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(clippy::needless_update)]

/// Use memory allocator
extern crate swc_node_base;
extern crate swc_malloc;

use std::{
collections::HashMap,
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bundler_concurrent = ["swc_bundler/concurrent"]

# configures specific memory allocator.
# node.js binding should depend on this.
allocator_node = ["swc_node_base"]
allocator_node = ["swc_malloc"]

## General
# Enable swc reexports. To avoid confusion between swc_core namespace,
Expand Down Expand Up @@ -357,7 +357,7 @@ swc_ecma_transforms_typescript = { optional = true, version = "0.185.36", path
swc_ecma_usage_analyzer = { optional = true, version = "0.20.26", path = "../swc_ecma_usage_analyzer" }
swc_ecma_utils = { optional = true, version = "0.124.25", path = "../swc_ecma_utils" }
swc_ecma_visit = { optional = true, version = "0.96.9", path = "../swc_ecma_visit" }
swc_node_base = { optional = true, version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { optional = true, version = "0.5.9", path = "../swc_malloc" }
swc_node_bundler = { optional = true, version = "0.58.51", path = "../swc_node_bundler" }
swc_nodejs_common = { optional = true, version = "0.0.8", path = "../swc_nodejs_common" }
swc_plugin = { optional = true, version = "0.90.0", path = "../swc_plugin" }
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ pub mod testing {

#[cfg(feature = "allocator_node")]
#[cfg_attr(docsrs, doc(cfg(feature = "allocator_node")))]
extern crate swc_node_base;
extern crate swc_malloc;

pub static SWC_CORE_VERSION: &str = include_str!(concat!(env!("OUT_DIR"), "/core_pkg_version.txt"));

Expand Down
2 changes: 1 addition & 1 deletion crates/swc_css_minifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ criterion = "0.5"

swc_css_codegen = { version = "0.151.14", path = "../swc_css_codegen" }
swc_css_parser = { version = "0.150.14", path = "../swc_css_parser" }
swc_node_base = { version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { version = "0.5.9", path = "../swc_malloc" }
testing = { version = "0.35.10", path = "../testing" }

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_css_minifier/benches/full.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use std::{fs::read_to_string, path::Path};

Expand Down
6 changes: 3 additions & 3 deletions crates/swc_css_parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ bench = false
debug = []

[dependencies]
lexical = "6.1.0"
serde = "1.0.127"
lexical = "6.1.0"
serde = "1.0.127"

swc_atoms = { version = "0.6.4", path = "../swc_atoms" }
swc_common = { version = "0.33.8", path = "../swc_common" }
Expand All @@ -31,7 +31,7 @@ swc_css_ast = { version = "0.140.9", path = "../swc_css_ast", features = [
"serde-impl",
] }
swc_css_visit = { version = "0.139.9", path = "../swc_css_visit" }
swc_node_base = { version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { version = "0.5.9", path = "../swc_malloc" }
testing = { version = "0.35.10", path = "../testing" }

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_css_parser/benches/compare.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_css_parser/benches/lexer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{input::StringInput, FileName};
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_css_parser/benches/parser.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{input::StringInput, FileName};
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ swc_common = { version = "0.33.8", path = "../swc_common", features = [
] }
swc_ecma_parser = { version = "0.141.20", path = "../swc_ecma_parser" }
swc_ecma_testing = { version = "0.22.10", path = "../swc_ecma_testing" }
swc_node_base = { version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { version = "0.5.9", path = "../swc_malloc" }
testing = { version = "0.35.10", path = "../testing" }

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_codegen/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::FileName;
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_codegen/benches/with_parse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate swc_node_base;
extern crate swc_malloc;

use criterion::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::FileName;
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_codegen/examples/gen.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Use memory allocator
extern crate swc_node_base;
extern crate swc_malloc;

use std::{env, fs, path::Path, time::Instant};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_codegen/examples/sourcemap.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Use memory allocator
extern crate swc_node_base;
extern crate swc_malloc;

use std::{
env,
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pretty_assertions = "1.3"
walkdir = "2"

swc_ecma_testing = { version = "0.22.10", path = "../swc_ecma_testing" }
swc_node_base = { version = "0.5.9", path = "../swc_node_base" }
swc_malloc = { version = "0.5.9", path = "../swc_malloc" }
testing = { version = "0.35.10", path = "../testing" }

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/benches/full.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Ported from https://github.com/privatenumber/minification-benchmarks
extern crate swc_node_base;
extern crate swc_malloc;

use std::fs::read_to_string;

Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/examples/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#![deny(warnings)]

extern crate swc_node_base;
extern crate swc_malloc;

use std::{env::args, fs, path::Path};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/examples/minifier.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![deny(warnings)]

extern crate swc_node_base;
extern crate swc_malloc;

use std::{env::args, fs, path::Path};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/examples/minify-all.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![deny(warnings)]

extern crate swc_node_base;
extern crate swc_malloc;

use std::{env, fs, path::PathBuf, time::Instant};

Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/tests/compress.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![deny(warnings)]

extern crate swc_node_base;
extern crate swc_malloc;

use std::{
env,
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_minifier/tests/exec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![deny(warnings)]

extern crate swc_node_base;
extern crate swc_malloc;

use ansi_term::Color;
use anyhow::Error;
Expand Down
Loading

0 comments on commit 9a0572b

Please sign in to comment.