-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swc_bundler: - Fix keywords pass. swc_ecma_transforms_optimization: - Remove `dbg!`. - `constant_propagation`: Inline only injected variables.
- Loading branch information
Showing
36 changed files
with
2,896 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { isEmail } from "https://deno.land/x/segno@v1.1.0/mod.ts"; | ||
|
||
isEmail("test@test.com"); |
3 changes: 2 additions & 1 deletion
3
bundler/tests/fixture/circular-imports/complex-export/output/entry.inlined.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
const a1 = 'a'; | ||
const a2 = 'a'; | ||
const c1 = 'c'; | ||
const a1 = a2; | ||
export { a1 as a }; | ||
export { c1 as c }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const f = ()=>"hello world" | ||
; | ||
export { f as any }; | ||
const any1 = f; | ||
export { any1 as any }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const x = { | ||
n: 123, | ||
t: 'text', | ||
int: '==INT==' | ||
} | ||
|
||
const { n, t, int } = x | ||
|
||
console.log(n, t, int) |
7 changes: 7 additions & 0 deletions
7
bundler/tests/fixture/deno-9055/keywords-1/output/entry.inlined.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const x = { | ||
n: 123, | ||
t: 'text', | ||
int: '==INT==' | ||
}; | ||
const { n , t , int: __int } = x; | ||
console.log(n, t, __int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const x = { | ||
n: 123, | ||
t: 'text', | ||
int: '==INT==' | ||
}; | ||
const { n , t , int: __int } = x; | ||
console.log(n, t, __int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const x = { | ||
n: 123, | ||
t: 'text', | ||
int: '==INT==' | ||
} | ||
|
||
const { n, t, int = 5 } = x | ||
|
||
console.log(n, t, int) |
7 changes: 7 additions & 0 deletions
7
bundler/tests/fixture/deno-9055/keywords-2/output/entry.inlined.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const x = { | ||
n: 123, | ||
t: 'text', | ||
int: '==INT==' | ||
}; | ||
const { n , t , int: __int = 5 } = x; | ||
console.log(n, t, __int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const x = { | ||
n: 123, | ||
t: 'text', | ||
int: '==INT==' | ||
}; | ||
const { n , t , int: __int = 5 } = x; | ||
console.log(n, t, __int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as lib from './lib'; | ||
|
||
// exporting all functions | ||
export * from './lib'; | ||
|
||
// exporting functions namespaced to segno | ||
export { lib }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { foo } from './deps' | ||
foo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export function foo() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './lib-impl1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as lib from './lib'; | ||
|
||
// exporting all functions | ||
export * from './lib'; | ||
|
||
// exporting functions namespaced to segno | ||
export { lib }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export function foo() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './lib-impl1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as ReactDom from "https://esm.sh/react-dom@17.0.1" | ||
import * as React from "https://esm.sh/react@17.0.1" | ||
|
||
const { document } = window as any | ||
|
||
ReactDom.render(React.createElement('p', null, 'hello world!'), document.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { parse } from "https://deno.land/std@0.84.0/flags/mod.ts"; | ||
|
||
const args = parse(Deno.args, { | ||
boolean: [ | ||
"help", | ||
"verbose", | ||
], | ||
alias: { | ||
help: "h", | ||
verbose: "v", | ||
}, | ||
default: { | ||
verbose: false, | ||
}, | ||
}) as { | ||
_: string[]; | ||
help: boolean; | ||
verbose: boolean; | ||
}; | ||
|
||
console.dir(args); |
Oops, something went wrong.