0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

upgrade: swc_bundler 0.19.2 (#9085)

This commit is contained in:
Bartek Iwańczuk 2021-01-11 15:32:34 +01:00 committed by GitHub
parent 2b75a11559
commit d676b6c63a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 53 additions and 40 deletions

20
Cargo.lock generated
View file

@ -2516,9 +2516,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_bundler" name = "swc_bundler"
version = "0.19.1" version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233e7e26004d0421a3db5f4b61bbdc7728bb798cc8ca3c73d8a82e1e22028672" checksum = "ca206cdd8d27e6fea6ceb24d890bf6ce1313ff4e6d93ef5de213a18a871153e4"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"crc", "crc",
@ -2642,9 +2642,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms" name = "swc_ecma_transforms"
version = "0.32.0" version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d2aad881f470227b9da6ab2d625468a609ad638cbfc8a1268804b1d697fdbdc" checksum = "2cf5ed72776b751ead1417159462ad2e82dd3ab9da98ffea8edf4f8c0953ea1e"
dependencies = [ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -2681,9 +2681,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_optimization" name = "swc_ecma_transforms_optimization"
version = "0.2.1" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d50aeac71e3b3b7a2b145bfb5d145b9c367d2bc5de184a0f00b94e797751c5e" checksum = "a4cd5ff2818c8b4ac9ea6a5fe302bdf0dc6ddf7368a9d7a6ea44ecdda17bed36"
dependencies = [ dependencies = [
"dashmap 4.0.1", "dashmap 4.0.1",
"fxhash", "fxhash",
@ -2741,9 +2741,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_typescript" name = "swc_ecma_transforms_typescript"
version = "0.2.0" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f811aec8fa4bcf758f75b6b42c793fabd0f843a5f78cc14647002090d4b9bc83" checksum = "8be0bec18ada45c611cb862c8700de262fb1800af35045b58b4180a39ea4dff5"
dependencies = [ dependencies = [
"fxhash", "fxhash",
"serde", "serde",
@ -2786,9 +2786,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecmascript" name = "swc_ecmascript"
version = "0.17.0" version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab54fd9535fe42b73e6409b360b10472dcfa7239aa22a7da75ab664d3105ab83" checksum = "184233c2afeec295375f7e416c323de11444051f9989cce0843c408970b191ab"
dependencies = [ dependencies = [
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen",

View file

@ -68,9 +68,9 @@ semver-parser = "0.9.0"
serde = { version = "1.0.116", features = ["derive"] } serde = { version = "1.0.116", features = ["derive"] }
shell-escape = "0.1.5" shell-escape = "0.1.5"
sourcemap = "6.0.1" sourcemap = "6.0.1"
swc_bundler = "0.19.1" swc_bundler = "0.19.2"
swc_common = { version = "0.10.8", features = ["sourcemap"] } swc_common = { version = "0.10.8", features = ["sourcemap"] }
swc_ecmascript = { version = "0.17.0", features = ["codegen", "dep_graph", "parser", "proposal", "react", "transforms", "typescript", "visit"] } swc_ecmascript = { version = "0.17.1", features = ["codegen", "dep_graph", "parser", "proposal", "react", "transforms", "typescript", "visit"] }
tempfile = "3.1.0" tempfile = "3.1.0"
termcolor = "1.1.0" termcolor = "1.1.0"
tokio = { version = "0.2.22", features = ["full"] } tokio = { version = "0.2.22", features = ["full"] }

View file

@ -1,23 +1,31 @@
[WILDCARD] [WILDCARD]
function printHello() { function returnsHi() {
console.log("Hello"); return "Hi";
} }
function returnsFoo() { function returnsFoo() {
return "Foo"; return "Foo";
} }
function printHello() {
console.log("Hello");
}
function printHello2() { function printHello2() {
printHello(); printHello();
} }
export function returnsHi() { function returnsFoo2() {
return "Hi";
}
export function returnsFoo2() {
return returnsFoo(); return returnsFoo();
} }
export function printHello3() { function printHello3() {
printHello2(); printHello2();
} }
export function throwsError() { function throwsError() {
throw Error("exception from mod1"); throw Error("exception from mod1");
} }
[WILDCARD] const returnsHi1 = returnsHi;
const returnsFoo21 = returnsFoo2;
const printHello31 = printHello3;
const throwsError1 = throwsError;
export { returnsHi as returnsHi };
export { returnsFoo2 as returnsFoo2 };
export { printHello3 as printHello3 };
export { throwsError as throwsError };

View file

@ -4,10 +4,11 @@ const mod = function() {
const c = "c"; const c = "c";
class C { class C {
} }
const __default = C;
const c1 = c; const c1 = c;
const __default = C;
const __default1 = C;
return { return {
c, c: c,
default: C default: C
}; };
}(); }();

View file

@ -2,7 +2,7 @@ const mod = function() {
const a = "a"; const a = "a";
const a1 = a; const a1 = a;
return { return {
a a: a
}; };
}(); }();
const a = mod; const a = mod;

View file

@ -15,6 +15,7 @@ const mod1 = function() {
}; };
}(); }();
const k = globalThis.value ? mod : mod1; const k = globalThis.value ? mod : mod1;
const { a: a2 , } = k; const { a , } = k;
const a1 = a2; const a1 = a;
const a2 = a;
export { a1 as a }; export { a1 as a };

View file

@ -1,5 +1,5 @@
const a = "a";
const o = { const o = {
}; };
const a = "a";
const { a: a1 = a } = o; const { a: a1 = a } = o;
console.log(a1); console.log(a1);

View file

@ -1,6 +1,3 @@
function a() {
console.log("a");
}
var O2; var O2;
(function(O1) { (function(O1) {
O1[O1["A"] = 0] = "A"; O1[O1["A"] = 0] = "A";
@ -8,6 +5,9 @@ var O2;
O1[O1["C"] = 2] = "C"; O1[O1["C"] = 2] = "C";
})(O2 || (O2 = { })(O2 || (O2 = {
})); }));
function a() {
console.log("a");
}
const O1 = O2; const O1 = O2;
export { O1 as O }; export { O1 as O };
class A { class A {
@ -29,3 +29,4 @@ class A {
const a2 = new A(); const a2 = new A();
a2.a(); a2.a();
a2.c(); a2.c();
const O3 = O2;

View file

@ -6,26 +6,26 @@ const mod = function() {
}(); }();
console.log(mod); console.log(mod);
const mod1 = function() { const mod1 = function() {
const a = []; const c = [];
const a1 = a; const c1 = c;
return { return {
a c: c
}; };
}(); }();
const a = mod1; const c = mod1;
const mod2 = function() { const mod2 = function() {
const b = []; const b = [];
const b1 = b; const b1 = b;
return { return {
b b: b
}; };
}(); }();
const b = mod2; const b = mod2;
const mod3 = function() { const mod3 = function() {
const c = []; const a = [];
const c1 = c; const a1 = a;
return { return {
c a: a
}; };
}(); }();
const c = mod3; const a = mod3;

View file

@ -1,3 +1,5 @@
export function getIndex(c) { function getIndex(c) {
return "\x00\r\n\x85\u2028\u2029".indexOf(c); return "\x00\r\n\x85\u2028\u2029".indexOf(c);
} }
const getIndex1 = getIndex;
export { getIndex as getIndex };