summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml10
-rw-r--r--cli/inspector.rs4
-rw-r--r--cli/module_graph.rs2
-rw-r--r--cli/tests/bundle/fixture01.out4
-rw-r--r--cli/tests/bundle/fixture02.out13
-rw-r--r--cli/tests/bundle/fixture03.out4
-rw-r--r--cli/tests/bundle/fixture05.out3
-rw-r--r--cli/tests/bundle/fixture08.out8
-rw-r--r--cli/tests/bundle/fixture09.out11
-rw-r--r--cli/tests/bundle/fixture10.out5
-rw-r--r--cli/tests/bundle/fixture11.out8
-rw-r--r--cli/tests/bundle/fixture14.out50
-rw-r--r--cli/tests/lint/file2.ts2
13 files changed, 70 insertions, 54 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 482c6f364..b691d781d 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -34,8 +34,8 @@ winapi = "0.3.9"
[dependencies]
deno_crypto = { path = "../op_crates/crypto", version = "0.2.0" }
deno_core = { path = "../core", version = "0.68.0" }
-deno_doc = "0.1.15"
-deno_lint = "0.2.9"
+deno_doc = "0.1.16"
+deno_lint = "0.2.11"
deno_web = { path = "../op_crates/web", version = "0.19.0" }
deno_fetch = { path = "../op_crates/fetch", version = "0.11.0" }
@@ -47,7 +47,7 @@ clap = "2.33.3"
dissimilar = "1.0.2"
dlopen = "0.1.8"
encoding_rs = "0.8.24"
-dprint-plugin-typescript = "0.32.8"
+dprint-plugin-typescript = "0.32.9"
filetime = "0.2.12"
http = "0.2.1"
indexmap = "1.6.0"
@@ -65,9 +65,9 @@ serde = { version = "1.0.116", features = ["derive"] }
shell-escape = "0.1.5"
sys-info = "0.7.0"
sourcemap = "6.0.1"
-swc_bundler = "=0.16.1"
+swc_bundler = "=0.17.1"
swc_common = { version = "=0.10.5", features = ["sourcemap"] }
-swc_ecmascript = { version = "=0.13.3", features = ["codegen", "dep_graph", "parser", "react", "transforms", "visit"] }
+swc_ecmascript = { version = "=0.14.1", features = ["codegen", "dep_graph", "parser", "react", "transforms", "visit"] }
tempfile = "3.1.0"
termcolor = "1.1.0"
tokio = { version = "0.2.22", features = ["full"] }
diff --git a/cli/inspector.rs b/cli/inspector.rs
index dd1122020..4da71435f 100644
--- a/cli/inspector.rs
+++ b/cli/inspector.rs
@@ -235,9 +235,9 @@ async fn server(
pin_mut!(server_handler);
select! {
- _ = register_inspector_handler => (),
+ _ = register_inspector_handler => {},
_ = deregister_inspector_handler => unreachable!(),
- _ = server_handler => (),
+ _ = server_handler => {},
}
}
diff --git a/cli/module_graph.rs b/cli/module_graph.rs
index 0bd51251f..d11dda1ca 100644
--- a/cli/module_graph.rs
+++ b/cli/module_graph.rs
@@ -2180,7 +2180,7 @@ pub mod tests {
assert!(actual.is_some());
let actual = actual.unwrap();
assert!(actual.contains("const b = \"b\";"));
- assert!(actual.contains("console.log(b);"));
+ assert!(actual.contains("console.log(mod);"));
}
#[tokio::test]
diff --git a/cli/tests/bundle/fixture01.out b/cli/tests/bundle/fixture01.out
index e29d0d38a..c6d2bd6d7 100644
--- a/cli/tests/bundle/fixture01.out
+++ b/cli/tests/bundle/fixture01.out
@@ -1,7 +1,7 @@
-const a = function() {
+const mod = function() {
const a = "a";
return {
a
};
}();
-console.log(a);
+console.log(mod);
diff --git a/cli/tests/bundle/fixture02.out b/cli/tests/bundle/fixture02.out
index 41880e73d..a00289183 100644
--- a/cli/tests/bundle/fixture02.out
+++ b/cli/tests/bundle/fixture02.out
@@ -1,11 +1,14 @@
-const c = function() {
- const c1 = "c";
+const mod = function() {
+ const c = "c";
+ const c1 = c;
class C {
}
return {
- c: c1,
+ c,
default: C
};
}();
-console.log("b");
-console.log(c);
+const c = mod;
+const b = "b";
+console.log(b);
+console.log(mod);
diff --git a/cli/tests/bundle/fixture03.out b/cli/tests/bundle/fixture03.out
index d4c79e2ec..27d0a7a13 100644
--- a/cli/tests/bundle/fixture03.out
+++ b/cli/tests/bundle/fixture03.out
@@ -1,4 +1,6 @@
+const a = "a";
+const a1 = a;
const d = {
- a: "a"
+ a: a
};
console.log(d);
diff --git a/cli/tests/bundle/fixture05.out b/cli/tests/bundle/fixture05.out
index 7b2a34601..1289cca5f 100644
--- a/cli/tests/bundle/fixture05.out
+++ b/cli/tests/bundle/fixture05.out
@@ -1 +1,2 @@
-console.log("a");
+const a = "a";
+console.log(a);
diff --git a/cli/tests/bundle/fixture08.out b/cli/tests/bundle/fixture08.out
index f9435ab2a..01d6befb4 100644
--- a/cli/tests/bundle/fixture08.out
+++ b/cli/tests/bundle/fixture08.out
@@ -1,7 +1,9 @@
-const a = function() {
- const a1 = "a";
+const mod = function() {
+ const a = "a";
+ const a1 = a;
return {
- a: a1
+ a
};
}();
+const a = mod;
export { a };
diff --git a/cli/tests/bundle/fixture09.out b/cli/tests/bundle/fixture09.out
index 7f9646946..e7396f493 100644
--- a/cli/tests/bundle/fixture09.out
+++ b/cli/tests/bundle/fixture09.out
@@ -1,4 +1,4 @@
-const _i = function() {
+const mod = function() {
function a(...d) {
return d.join(" ");
}
@@ -6,7 +6,7 @@ const _i = function() {
a
};
}();
-const _j = function() {
+const mod1 = function() {
function a(...d) {
return d.join("/");
}
@@ -14,6 +14,7 @@ const _j = function() {
a
};
}();
-const k = globalThis.value ? _i : _j;
-const { a , } = k;
-export { a };
+const k = globalThis.value ? mod : mod1;
+const { a: a2 , } = k;
+const a1 = a2;
+export { a1 as a };
diff --git a/cli/tests/bundle/fixture10.out b/cli/tests/bundle/fixture10.out
index 7436722b5..5491e5e7f 100644
--- a/cli/tests/bundle/fixture10.out
+++ b/cli/tests/bundle/fixture10.out
@@ -1,4 +1,5 @@
+const a = "a";
const o = {
};
-const { a ="a" } = o;
-console.log(a);
+const { a: a1 = a } = o;
+console.log(a1);
diff --git a/cli/tests/bundle/fixture11.out b/cli/tests/bundle/fixture11.out
index 526693ef2..c09f0cac9 100644
--- a/cli/tests/bundle/fixture11.out
+++ b/cli/tests/bundle/fixture11.out
@@ -1,15 +1,13 @@
function a() {
console.log("a");
}
-var O;
+var O2;
(function(O1) {
O1[O1["A"] = 0] = "A";
O1[O1["B"] = 1] = "B";
O1[O1["C"] = 2] = "C";
-})(O || (O = {
+})(O2 || (O2 = {
}));
-const O1 = O;
-export { O1 as O };
class A {
#a;
#c;
@@ -29,3 +27,5 @@ class A {
const a2 = new A();
a2.a();
a2.c();
+const O1 = O2;
+export { O1 as O };
diff --git a/cli/tests/bundle/fixture14.out b/cli/tests/bundle/fixture14.out
index c1a14cebe..cb0b4834f 100644
--- a/cli/tests/bundle/fixture14.out
+++ b/cli/tests/bundle/fixture14.out
@@ -1,25 +1,31 @@
-const lib = function() {
- const a = function() {
- const a1 = [];
- return {
- a: a1
- };
- }();
- const b = function() {
- const b1 = [];
- return {
- b: b1
- };
- }();
- const c = function() {
- const c1 = [];
- return {
- c: c1
- };
- }();
- const mod = [];
+const mod = function() {
+ const a = [];
+ const a1 = a;
return {
- mod
+ a
};
}();
-console.log(lib);
+const a = mod;
+const mod1 = function() {
+ const b = [];
+ const b1 = b;
+ return {
+ b
+ };
+}();
+const b = mod1;
+const mod2 = function() {
+ const c = [];
+ const c1 = c;
+ return {
+ c
+ };
+}();
+const c = mod2;
+const mod3 = function() {
+ const mod4 = [];
+ return {
+ mod: mod4
+ };
+}();
+console.log(mod3);
diff --git a/cli/tests/lint/file2.ts b/cli/tests/lint/file2.ts
index 10c709ba2..a2be5c5e0 100644
--- a/cli/tests/lint/file2.ts
+++ b/cli/tests/lint/file2.ts
@@ -2,5 +2,5 @@ try {
await Deno.open("./some/file.txt");
} catch (e) {}
-// deno-lint-ignore no-explicit-any require-await
+// deno-lint-ignore no-explicit-any
function foo(): any {}